LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Split "Analog 1D Wfm Nchan NSampe" by attributes

Solved!
Go to solution

I would like to split an "Analog 1D Wfm Nchan NSampe" array into multiple arrays that contain waveforms with the same attribute (DAQ module or unit of measurement for example).

 

The goal is to address the waveforms with a certain unit of measurement on a certain graph and those of another unit of measurement on another graph (e.g. a graph for temperatures, a graph for load cells, a graph for tensions, etc.).

 

 

RobotC08_0-1627639440669.png

 

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

Hi Robot,

 


@RobotC08 wrote:

I would like to split an "Analog 1D Wfm Nchan NSampe" array into multiple arrays that contain waveforms with the same attribute (DAQ module or unit of measurement for example).

 

The goal is to address the waveforms with a certain unit of measurement on a certain graph and those of another unit of measurement on another graph (e.g. a graph for temperatures, a graph for load cells, a graph for tensions, etc.).


And what is your question? Where are you stuck?

 

NI provides some attributes you could read from the waveforms, like channel name.

You can read the attributes you are interested in, and sort your waveforms based on that information into sub-arrays…

Best regards,
GerdW


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

I started using Labview a few days ago and therefore I don't know how to use it. Is there a function that can do the operation I described above quickly or do you need to run loops? If so, how can it be done?

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

Hi Robot,

 


@RobotC08 wrote:

I started using Labview a few days ago and therefore I don't know how to use it. Is there a function that can do the operation I described above quickly or do you need to run loops? If so, how can it be done?


What is wrong with loops? They are basic LabVIEW stuff, learned in those Training resources offered at the top of the LabVIEW board!

 

Read the attributes of the waveforms, using the linked function above, in a loop. You will receive an array of values, like units or channel names.

Use them to filter the waveform array according to your requirements...

 

Btw. You only need to do this sorting routine once before the loop: the order of channels will not change in a DAQmx task. And ideally you already know the channel order from DAQmx task creation...

Best regards,
GerdW


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

Only my inability

0 Kudos
Message 5 of 7
(1,271 Views)
Solution
Accepted by topic author RobotC08

Hi Robot,

 


@RobotC08 wrote:

Only my inability


Then you should start with those Training resources at the top of the LabVIEW board!

 

Suggestion:

Best regards,
GerdW


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

You are number one, you have provided me with a simple and elegant solution that works perfectly. Stay tuned that I will ask you many other things, I am recently learning. 🙂

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