LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get Digital waveform with Time.

Hi
 
I have 3 channels , each of which have ON/ OFF cycles specified with milliseconds as shown below.
 
Channel 1       OFF(3000)   ON(2000)  OFF(1000)  ON(500)  OFF(4000)  ON(300)
                     The number in the bracket is the time in milliseconds for which the channel has to be ON or OFF.
Channel 2      OFF(800)   ON(1000)  OFF(6000)  ON(2000)  OFF(5000)  ON(400)
Channel 3       OFF(1000)   ON(700)  OFF(500)  ON(800)  OFF(400)  ON(600)
 
So i need a digital waveform plot with Y axis showing the highs and lows for the channel  and X- Axis showing the time in  milliseconds.
 
All the channels can be plotted in one graph or separate graphs.
 
I tried plotting with each OFF as False and ON as TRUE and built a boolean array. then converted to digital.  but was not able to get the time (X-axis ) correctly. Is there any way to get Time on X axis for the Digital channel.
 
Thank you .Regards. Hema.
0 Kudos
Message 1 of 5
(3,230 Views)
If you are using a digital waveform data type, then when you display it on a digital graph, you will have time on the x-axis. You use the function Boolean Array to Digital function (on the Waveform>Digital Waveform>Digital conversion palette) and need to provide a sample rate. Is this what you did? If you continue to have problems, post your VI.
0 Kudos
Message 2 of 5
(3,205 Views)

Hi Dennis,

I have done the same way as you suggested.but the sample rate is common to all the channels.( that is each channel is one boolean array column in the 2D boolean array which is fed to the Digital function , but i need separate sample rate for each channel(1-D array).

The Boolean array to digital takes 2D array as input, so i was not able to get different Time on X-axis.

But i found out a solution( very long method)  by building time array separately and plotting the waveform without using sample rate.

Now i want to get rid of the '1' and '0' which gets displayed on the digital waveform by default . That is for every high there is number 1 shown and every low number 0 is shown on the graph. Please can I know how to remove this number display.

I saw digital waveform example too, but  on all digital  waveform, the numbers are shown.  Is there any property to be set to disable 1 and zero display.

Thank you.

0 Kudos
Message 3 of 5
(3,165 Views)
Sorry, but the statement that you need separate sample rates for each channel does not make any sense. You need a sample rate common to all and to suit the on/off times. The example I posted shows exactly what you asked for. It just shows the first 1.2 seconds worth of data. You can fill in the rest yourself. If you don't want time on your x-axis (this is what a common sample rate gives you), I don't understand the whole point of your original question.
 
If you don't want the 0 and 1 display, turn it off. Go to Advanced>Change Plot Legend to Tree View. Then click on a plot and select Label Format>None
 
 
0 Kudos
Message 4 of 5
(3,160 Views)

Hi Dennis,

I was of the notion that a separate Time array is to be built to get the custom time on X axis for digital waveform. So i unnecessarily complicated the solution. By taking the example that you posted, i analyzed this time ,got clear idea and simplified my VI. Thanks a lot.

Also i got rid of the 1 and 0 number display on the graph.

Thank you.

 

0 Kudos
Message 5 of 5
(3,145 Views)