LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

different operations on waveforms

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)

 

MarlBnc_0-1627045887303.png

 

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

0 Kudos
Message 1 of 3
(1,436 Views)

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.

santo_13_0-1627048257124.png

 

Santhosh
Soliton Technologies

New to the forum? Please read community guidelines and how to ask smart questions

Only two ways to appreciate someone who spent their free time to reply/answer your question - give them Kudos or mark their reply as the answer/solution.

Finding it hard to source NI hardware? Try NI Trading Post
0 Kudos
Message 2 of 3
(1,414 Views)

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 ?  

MarlBnc_0-1627049364703.png

 

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 

 

MarlBnc_1-1627049527266.png

 

 

 

0 Kudos
Message 3 of 3
(1,408 Views)