02-21-2011 04:12 PM
Hi Everyone.
At first I want to apologize for my English.
I read temperature from my sensor network at a certain time and I want to make separate plot for each temperature sensor in waveform chart.
I did it but I did it wrong: Chart updates from right to left side and x axis is flipped. I don’t know what I’m doing wrong.
Also I'm saving date, time and temperature to file, all in string data type, should I use XY Graph?
Also I want to ask about Update modes. I need to look at the history of measured temperature while I’m reading new values (temperatures), but when I move the chart display with hand tool from Graph Palette and chart updates, display jumps at the beginning.
I will appreciate any help
I’m using LabVIEW2010, picture of a code is attached.
02-22-2011 10:02 AM
Hi Tukan,
If you want to continuosly update the display in code the best option is to use a chart over a graph. When using an XY or Waveform Graph you will need to collect all of your data at once, build the array or dynamic data and then pass it to the graph. Where as the chart can keep reading and appending data. Check out this KB for some more information on Charts vs. Graphs:
http://digital.ni.com/public.nsf/allkb/95FEE9F5B252507E862562BA00007657
Update modes only apply to charts and can be explained in detail by visiting this link:
http://digital.ni.com/public.nsf/allkb/29353B4D8E4CC95C86256B9F007D1AD2
And finally, since you are sending the chart both data and a time stamp you might want to pull the waveform chart inside of the for loop so that it can update each iteration. This might be the cause of your displayed data being
backwards. Refer to the two for loops in the first KB I linked.
Kyle
02-22-2011 12:09 PM
Hi Kyle.
I'm not sure if I understood this:
If you want to continuosly update the display in code the best option is to use a chart over a graph.
" could you say more?
I have read the articles you posted but I don't know explain my problem because of my English so I have made simple VI, maybe you'll see what I need to do.
Anyway thanks for the reply.
Tukan
02-23-2011 09:55 AM
Hi Tukan,
No problem, what I was saying was if you are continously adding points to the end of the graph you should use a Chart. If you are collecting all of your points before sending them to the display then you should use a graph.
Did this make sense?
Kyle
02-23-2011 10:23 AM
Hi Kyle,
Ok then, I thought you mean overlay Graph by Chart
I already use the chart just because of the continuous addition of new values but what I need is to have on X axis time when I measure temperature. I acquire temperature from various thermometers value by value in for loop (auto-indexing is enabled) using subVI, then I'm trying to plot these values in separate plots (according to various thermometers) in Chart. I also save these values as strings to file. But I don't know what to do with that time. I have tried to have it on x axis in many ways but always with bad result.
02-23-2011 11:16 AM
Look at the properties of the chart for the X-Axis. You should set the offset to the current time (in secs) and the multiplier (in seconds per plot) properly. Change the the time axis to either Absolute or Relative time.
02-23-2011 02:18 PM
Are you sampling these temperatures at the same rate? If not then you won't be able to easily plot them across the same time axis.
Kyle
02-24-2011 06:03 AM
@Joseph Loo wrote:
Look at the properties of the chart for the X-Axis. You should set the offset to the current time (in secs) and the multiplier (in seconds per plot) properly. Change the the time axis to either Absolute or Relative time
I have tried it, but time is shifted for an hour forward, don't know why, it's almost similar with example (real-time chart.vi) I found in NI examples.
See attachment below
02-24-2011 06:18 AM - edited 02-24-2011 06:23 AM
@K Smith wrote:
Are you sampling these temperatures at the same rate? If not then you won't be able to easily plot them across the same time axis.
Now I know that I don't have to have exact time when I measure temperature, it's enough to have current time in format HH:MM:SS when I receive temperature from the sensor to labview in for loop.
Something like this, first or second way, but I'm not sure if it is good way to acquire time.
02-24-2011 10:42 AM
@Tukan wrote:
@Joseph Loo wrote:
Look at the properties of the chart for the X-Axis. You should set the offset to the current time (in secs) and the multiplier (in seconds per plot) properly. Change the the time axis to either Absolute or Relative time
I have tried it, but time is shifted for an hour forward, don't know why, it's almost similar with example (real-time chart.vi) I found in NI examples.
See attachment below
Try extending the Chart History Length by right clicking the chart and selecting "Chart History Length." By default the chart is set to 1024 points to display then the chart shifts, try extending this to the point where you can see your entire sample. Then set the leftmost to 0secs.
Kyle