Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple windows threads controlling a 6528.

I want to run two threads for control of a 6528 digital i/o board.

My plan is to query the board with DAQmxGetDevDILines and DAQmxGetDevDOLines, and then perform DAQmxCreateTask to get a handle. I will then issue a DAQmxCreateDIChan using that task handle, then repeat the process with another task, whose handle I will pass to DAQmxCreateDOChan. I then plan on passing the output channel handle to one windows thread responsible for outputs, and the input channel handle, to an input thread. Will this work, or will the last task created with DAQmxCreateTask take over all the channels on the board?

 If so, how can I get input traffic and output traffic on the same board, associated with separate input and output threads?
0 Kudos
Message 1 of 2
(3,239 Views)

Hello Stanni,

The DAQmx driver is a task based and hence different tasks run at different threads. Please check out this excellent knowledgebase for more details on number of threads (How Many Threads Does NI-DAQmx Have?). With this being said, your digital input task will be running in a different thread than that of the digital output. I hope this helps but don't hesitate to post back here if you have any further questions

Best Regards,
Ayman K

0 Kudos
Message 2 of 2
(3,219 Views)