07-30-2021 05:06 AM
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.).
Solved! Go to Solution.
07-30-2021 06:34 AM
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…
07-30-2021 06:42 AM
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?
07-30-2021 07:13 AM - edited 07-30-2021 07:16 AM
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...
07-30-2021 07:19 AM
Only my inability
07-30-2021 07:50 AM - edited 07-30-2021 07:52 AM
Hi Robot,
@RobotC08 wrote:
Only my inability
Then you should start with those Training resources at the top of the LabVIEW board!
Suggestion:
07-30-2021 08:29 AM
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. 🙂