LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

daqmx loop

Solved!
Go to solution

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.

 

0 Kudos
Message 1 of 3
(2,608 Views)

@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.


"Should be" isn't "Is" -Jay
Message 2 of 3
(2,604 Views)
Solution
Accepted by topic author Xiang00

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.

Message 3 of 3
(2,601 Views)