LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Plot Digital Waveform Against Custom Time Column

Hello,

I have an application that reads a spreadsheet file containing data when to turn on valves during a test.  Here's an example:

0    0    0
1    1    1
2    0    0
30    1    0
31    0    0

The first column is time (in minutes) and the next columns are two valves (it can be up to eight).  When t=0 minutes, V1 and V2 are off.  When t=1 minute, V1 and V2 are on.  You get the idea.  What I want to do is plot this on a digital waveform so the user can visually verify the valve operations.  I have a VI that reads and plots the valves correctly, but I'm not sure how to plot against the time column.  The tricky part is that when t=2, the valve values should remain in their state until 28 mintues later, when the valves are set again.  I've attached a VI that shows the valves being correctly plotted, except for the time part.

Any ideas on how to digitally plot against the first column?

Thanks in advance!
0 Kudos
Message 1 of 9
(3,113 Views)

The attachment didn't come through, so it may answer this question, but are you hoping to fill in the values.  For example from time 0 to 1 is only 1 data point.  But t=2 to t=30 do you want 28 points all at the t=2 value? 

What this would mean is that the waveform would have a dt of 1.  You will simply need to write a VI that greats mini waveforms of the right value and lengths and append them together.  The VI you wrote may already do this.  Go ahead and attach it and we can all look at it.

0 Kudos
Message 2 of 9
(3,111 Views)
That's correct - I want 28 points during that period.  I'll try attaching again.  I thought I did!
0 Kudos
Message 3 of 9
(3,106 Views)
0 Kudos
Message 4 of 9
(3,093 Views)
I hate to be a pain, but is there anyway you could save it as a LabVIEW 7.1 version?  I have v8.2 but it will only save it to v8.0, which I don't have.

Sorry!
0 Kudos
Message 5 of 9
(3,091 Views)
Here it is in 7.1
0 Kudos
Message 6 of 9
(3,087 Views)
You da man!  This was not as trivial as I thought.  Thanks for taking the time to do this!

Just out of curiosity, do you know why the first state only lasts for half a second?  The duration of the other states are correct, except for the first state.  I also changed one of the valve states at t=0 to 1 and this lasted 1.5 seconds.  There seems to be something funky happening at the beginning?  Any ideas?

Thanks


0 Kudos
Message 7 of 9
(3,086 Views)

It has to do with how youa re graphing that data, it is simply an artifact of the plot settings.  In the plot legend on the upper right corner of the graph click on it.  You can then select Transition Location.  There you can define if you want the transition to be at the begining, middle (what you have), and end.  You will need to change this on every plot you want.  If you had a lot of columns I would suggest using property nodes, but its not hard to do for 2 plots.

0 Kudos
Message 8 of 9
(3,083 Views)
I can handle the property node stuff. Smiley Wink  Thanks again!
0 Kudos
Message 9 of 9
(3,078 Views)