Jump to content

time stamped waveform graph


Recommended Posts

Having not used graphs or charts in a very long time, I waswondering if someone could give me some tips on how to solve what is probably avery easy problem.

I need a waveform chart (not graph, because I only want todisplay a certain number of recent points and will be continuously accumulatingdata) of temperature readings. Where itgets complex is I need to timestamp each reading. Also, the time between datapoints is notfixed. There is no ‘sample rate’ so t0and dt will not work for me.

I need to feed this chart a starting time (timestamp) when Iinitialize the display and then at any random times later, feed it a y value andtimestamp. I expect it to plot the yvalue at the appropriate point on the chart and draw a line from the previousvalue to it. Also, if the y value is anarray, then each datepoint in the array is for a different plot, all with thesame timestamps. As the history is filled, I expect the oldest data to disappear off the left side of the chart.

I also would like to set the history length wheninitializing.

This sounds like a job for an X control to me, but I am notsure where to start. Anyone know of agood example to look at or have something to share?

Thanks,

-John

Link to comment

I needed something similar and ended up using the Variable-Time Chart XY example that ships with LV. I made a few modifications to make it do exactly what I wanted, but this should give you a good start.

Let me know if anything more elegant or flexible comes along.

Link to comment

:yes:Agreed! That's why I had to modify it.

Yes late to the game but for the sake of completness, all of the above can be done with a Waveform Chart except setting history legth at run time.

See this thread on the dark-side for an example.

http://forums.ni.com/t5/LabVIEW/How-can-I-update-the-x-axis-to-match-a-time-reading-in-a/m-p/160205#M95365

The trick is to only have a single value in the "Y" array and the chart will plot the point determined by the t0 of the wf data type. updates do not have to be periodic but you can NOT plot backwards in time (all to's must be increains or the chart resets).

Ben

  • Like 1
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.