07-23-2021 08:20 AM - edited 07-23-2021 08:22 AM
Hello everyone,
I'm developing a VI that receives in real time waveforms data from a DAQmx read. Data contains two to an undefined number of waveforms.
I need to multiply each waveform by the sensibility of the respective sensor and add the offset (or substract it if it's the first sensor).
My current solution may work fine I guess, but I feel like it could be optimized (and from my precedent tests, the for loop may not iterate like I would like it to : incrementing everytime it accesses a waveform)
I know I can access the attributes of the waveform, but this gives me the physical channel. And the first sensor's physical channel may change over time. Plus acceding waveforms's attributes is quite consuming.
Let me know if you have any questions,
Thank you
07-23-2021 08:51 AM
Since you're using DAQmx it would be better to apply a custom scale with your scaling coefficients to the respective DAQmx channels and all the waveforms that you read are always scaled.
07-23-2021 09:12 AM
Thanks ! I'm fairly new to labview and didn't know the existence of this VI.
It doesn't seem to work with array though. I'm accessing all the channels at the same time, is that a problem ?
But i've found another solution that simplifies a bit my first loop.
As i'm receiving data in real time, the for loop iterator always goes 0 - 1 - 2 - 3 - .... - [number of last sensors] - 0 - 1 - 2 ... So i can just do this