LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Edit NI-DAQmx Scale while VI is running

Hi everyone,

 

I'm trying to edit DAQ channels scaling while my vi is running without having to launch NI-MAX. I'm also using producer-consumer architecture and I can't add extra calculation in my loops.

 

I've noticed I can create a new custom scale when my VI is running but why there's no "Edit" button like when the VI is not running? Is there a way to add it ? 

 

VI_Running.png

Thanks!

0 Kudos
Message 1 of 3
(506 Views)

Hi Alex,

 


@AlexDarsigny wrote:

I've noticed I can create a new custom scale when my VI is running but why there's no "Edit" button like when the VI is not running? Is there a way to add it ? 


While a DAQmx task is running you cannot change most of its settings, so the scale is defined at initialization stage.

That's the reason there is no "Edit" button…

 

You can stop a task, change its parameters and start again. And you can kill a task and define a new task instead.

 


@AlexDarsigny wrote:

I'm also using producer-consumer architecture and I can't add extra calculation in my loops.


And what is the reason you cannot add another consumer stage to implement the scaling on your own?

 

I implemented several scalings inside such a p-c stage like correction polynoms for DAQ device (derived from calibration), conversion from electrical unit to physical unit (like V to l/s), correction polynoms for sensor device (derived from calibration), physical unit conversion (like l/min to ml/s), …

Best regards,
GerdW


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

Hi GerdW,

 

Thanks for the quick answer. I forgot to mention something. When I start my VI, I don't start immediately my producer-consumer architecture. I just loop in a loop that ends when I press a button. When I'm looping, I can then edit my DAQ settings since my vi hasn't executed my "DAQmx Create Virtual" blocks yet. That's why I can create a new custom scale and use it immediately. The problem is I can't edit an existing one nor I can delete one. In this situation, I'm sure I should be able to do so since when I'm able to create a new one and use it immediately without stopping my vi.

 

I've thought about setting a constant scaling of 1:1 to all my channels and do the scaling in the producer loop but I try to minimize as much as possible the amount of calculation in the producer loop.

 

Thanks for your help.

0 Kudos
Message 3 of 3
(484 Views)