02-05-2014 10:09 AM
As the question sounds, I want to dynamically change parameters of a DAQ card (DAQmx). The idea is to have a one while loop doing GUI event caputures and other while loop responding to the DAQ events. It is somthing like PRODUCER-CONSUMER loops. However, I can achieve set everything thing once but not on the fly. Any suggestions as to how we can achieve this?
Thanks
Solved! Go to Solution.
02-05-2014 10:20 AM
You may need to stop the task and then start it again. Post your code please.
02-05-2014 12:02 PM - edited 02-05-2014 12:11 PM
Here is the code.I try to stop the DAQmx TASK but it doesnt work. I want to change number of channels, sampling rate etc from the GUI dynamically.
02-05-2014 03:58 PM
Your code isn't messy, but is convoluted. If you want to choose the number of signals being sampled, then provide an array of channels to sample from instead of just one. Give the array to the DAQmx Flatten Channel String function to flatten it into a single string that can be passed into the Physical Channels to read. This can only be done if a task is not running on the card. You'll need to stop the task to do change these settings then start the task. It looks like you already have the sample rate control, again just ensure that a task isn't running.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
02-05-2014 04:47 PM
Thanks for the feedback. I have resolved the issue by traditional approach. Here is the working GUI.