04-24-2023 08:27 AM
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 ?
Thanks!
04-24-2023 08:42 AM
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), …
04-24-2023 09:14 AM
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.