LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Passing time strings into X-axis marker values

Hi.

I am reading in a text file and tokenizing strings in the file to pass into a waveform graph. The column I pass into the plot value for the graph works perfectly, but I also want to pass in a time value string for the marker values on my x-axis, and I'm having difficulty doing this due to the fact that the graph doesn't like string values.

The strings are in the form of "12:00:00 AM". I need to pass them in the correct places, of course, so that they correspond with the Y value being passed in by that same line.

I hope that makes sense...it's hard to put into words!

Also, is there a way to create gaps in the plots of a waveform graph? To elaborate, there is a third column I pass in that contains a count. Sometimes the count "jumps" out of order (i.e., 1-2-3-6-7-9). These jumps indicate a reading from my device was missed, so I want to indicate those jumps with gaps in the plot. I know how to discover the gaps (compare the column value with the count of my while loop), so all I need to know is how to pass a "blank" or gap into my waveform array.

Thanks everyone!

Ryan Hannebaum
Campus Ambassador
National Instruments
ELP Intern '06

Message Edited by Ryan H on 11-27-2006 10:53 AM

0 Kudos
Message 1 of 3
(2,591 Views)
A waveform graph requires a time constant. If your times are arbitrary, you won't be able to plot them with the waveform graph.

You could use your third piece of data as your time constant (assume 1) and you can show gaps by plotting the value "NaN" for the missing points. You could load the data from the file one point at a time, then compare the current count to the previous. If the difference is greater than one, you could loop and plot "NaN" for the number of missing points, then the current point and repeat.
0 Kudos
Message 2 of 3
(2,581 Views)
Thank you Phillip!
0 Kudos
Message 3 of 3
(2,576 Views)