From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.


Showing results for 
Search instead for 
Did you mean: 

change channel parameters then reinitialized daqmx device

labview nuebe

I have a VI which follows --  DAQmx  create channel analog voltage input --> DaQmx timing --> DAQmx start task, then reads and writes in a while loop.    I want to be able to stop the device "close DAQmx tasks", change input channels then restart the dev. I want to keep the VI running while I start and stop the DAQmx device.  I want to do this by using a "power" button that outputs a boolean true /false, which will start and stop the device.. Right now I can do this by putting a stop button in the while loop, but that stops the vi from running.

Does anyone understand what I am talking about? Can you help me out with this task, or direct to some example which does something like this.  The VI is set up like most any example on the example section dealing with analog voltage input aquisition, but I don't know how to open and close the daqmx channels while keepinf the VI  running. I want to turn the channels on and off at the daq device, not just in the VI routine. 

Thank you. 



0 Kudos
Message 1 of 4
You will need to use nested while loops. Program an outer while loop that will keep running the application. Post back if you need more help.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 2 of 4

I nested while loops but, I think I am not nderstanding the boolean values to turn the while loops on and off.

Here is my code, can you look and tell me why my boolean switches don't work

0 Kudos
Message 3 of 4
See the attached image.
Adnan Zafar
Certified LabVIEW Architect
Coleman Technologies
Message 4 of 4