From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Digital waveform chart?

I have 17 digital inputs that I am collecting 1000x a second. Each time I collect I get an array of 17 waveforms with one data point each. When I wire this to a digital waveform graph the graph only displays the single data point for each of the 17 DI channels. I want to display the last x seconds of data like a chart does.

 

How? What is the design pattern? It seems I can't find a "Digital Waveform Chart" in my indicators.

0 Kudos
Message 1 of 7
(1,810 Views)

Hi flycast,

 


@flycast wrote:

I have 17 digital inputs that I am collecting 1000x a second. Each time I collect I get an array of 17 waveforms with one data point each. … I want to display the last x seconds of data like a chart does.

How?


Then you should collect your boolean data in waveforms containing more than just one sample!

What about building waveforms containing "x seconds * 1000S/s" samples?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 2 of 7
(1,755 Views)

@GerdW wrote:

 

Then you should collect your boolean data in waveforms containing more than just one sample!
What about building waveforms containing "x seconds * 1000S/s" samples?

My process is not a fixed length of time. It varies from between 0.1 seconds to 150 seconds. Sounds like I need to initialize a array of digital waveform and then append the data as it comes in.

 

Thanks for your help.

0 Kudos
Message 3 of 7
(1,744 Views)

I am thinking about this a little more. I am collecting the states of air valves (open or closed) by using a DI module (NI 9425). I can collect the data in a number of different types:

 

1D Boolean

2D Boolean

1D U8

1D U16

1D U32

1D Waveform

 

flycast_0-1621605711094.png

 

It seems to me like I just don't know enough about LabView to make a well informed and wise decision about these different formats. I want to:

 

  • display the data as it is being collected.
  • Save the data in a TDMS file after each data set of 0.1 seconds to 150 seconds is collected.
  • Check the data for certain out of spec conditions

 

0 Kudos
Message 4 of 7
(1,733 Views)

Graphs and charts display data from left to right with time or points on the x axis. How are you possibly going to show 17 signals that are all 0 or 1 on that? Best case scenairo you have 8 signals overlap on 0 or 1 (and 9 signals on the other amplitude). Can you show what you expect the end result to be?

0 Kudos
Message 5 of 7
(1,725 Views)

Hi flycast,

 


@flycast wrote:

I am collecting the states of air valves (open or closed) by using a DI module (NI 9425). I can collect the data in a number of different types:

 

1D Boolean

2D Boolean

1D U8

1D U16

1D U32

1D Waveform


Well, those different datatypes belong to different acquisition modes…

 

The 1D boolean reads one sample per channel and gives you a 1D boolean array for all channels.

The other datatypes are used when you read several samples for several channels, giving you 2D data. You get

  • 2D boolean array "N channels N samples"
  • 1D arrays of other datatypes, where each element can contain the data of several channels (U8/U16/U32)
  • 1D array of waveforms, where each waveform contains several samples per channel

 


@flycast wrote:

It seems to me like I just don't know enough about LabView to make a well informed and wise decision about these different formats. I want to:

 

  • display the data as it is being collected.
  • Save the data in a TDMS file after each data set of 0.1 seconds to 150 seconds is collected.
  • Check the data for certain out of spec conditions

  • You can use any datatype from DAQmx, but you need to adapt the way you "collect" the data in an array.
  • Saving to TDMS could be done while you collect the data: is there a reason to wait until you collect a (possibly huge) array after 150s?
  • Checking the data can also be done while collecting.

Depending on your requirements you should think about producer-consumer schemes…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(1,718 Views)

How are you possibly going to show 17 signals that are all 0 or 1?

 

For those unaware, the "Digital Waveform Graph" handles this quite nicely. Will it be tall? Yes, 17 is still a lot 😉

0 Kudos
Message 7 of 7
(1,592 Views)