05-26-2012 09:11 AM
Hello everyone.
I have 2 questions.
1. When I make a continuous input with DAQmx, I need to put a DAQmx read in a while loop.
I can not figure out why I do not need to put all DAQmx codes into a while loop.
2. What type of data does it transport from "task in" to "task out"?
I have searched for days, still can not find any explanation about these two questions.
Please help me.
Solved! Go to Solution.
05-26-2012 11:15 AM
@Xiang00 wrote:
Hello everyone.
I have 2 questions.
1. When I make a continuous input with DAQmx, I need to put a DAQmx read in a while loop.
I can not figure out why I do not need to put all DAQmx codes into a while loop.
2. What type of data does it transport from "task in" to "task out"?
I have searched for days, still can not find any explanation about these two questions.
Please help me.
Really a good question! and one that does not have a defined answer. DAQmx abstracts the task information at a undocumented layer. From experience I can state that you may treat a Task wire as a pointer to a buffer containing the latest Task configuration of a Task bearing the Task Name. The under the hood changes to a Task configuration are just plain handled by DAQmx and you need not worry yourself about changes to Task configurations. Unless you change the Task Name, the Task Wire points to the latest Task configuration.
Or, restated, A Task wire with Task Name X will cause DAQmx to lookup the Task. If a Task with that name exists the vi calling the operaton will operate on that Task.
05-26-2012 11:27 AM
1. Once you configure a task with the channel numbers, type, range, sample rate, etc., that information is retained until the task is cleared so there is no reason to repeat that information. If you have any experience at all with the most basic of instrumentation, there is no difference. If you were using a handheld DMM set for volts, you would not turn it off and on each time you wanted to take a new measurement.