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.).
已解決! 轉到解決方案。
在
07-30-2021
06:34 AM
- 上次修改時間
11-07-2024
03:51 PM
修改人
Content Cleaner
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…
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 - 已編輯 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...
Only my inability
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. 🙂