LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

single channel digital output

This is my first attempt using DAQmx for digital (and analog) IO. I've scoured the message boards for insight to this problem, but found no clear answer.

 

I have many analog(30) and digital(16) outputs which I've grouped logically (or so I thought) into DAQmx tasks/channels. But now find that I cannot update one line (with DAQmx write) within a task without also updating all the others. It seems like it is all or nothing. If I group 4 digital lines in a task (even if I specifiy 'one channel for each line' in the DAQmx Create Channel, there still appears to be no way to change the output state of one line without also updating the other three. As a result, I need to drag the line state baggage of ALL my outputs throughout my design in order to update just one.

 

Please tell me I'm missing something here? Why would this simple and frequently required capability not be available? Would I really need to create a separate DAQmx task for EACH output line in order to have independent control?

 

Thanks.

 

 

0 Kudos
Message 1 of 2
(2,842 Views)

When you create a task of multiple channels, you need to use an array to send data to all the channels.  Your DAQmx Write function must be set to Multiple Channels...   Array first element for channel 1, second element for channel 2, and so on.  Just keep track of the array, change just one element, and send it all again.  Only the channel where the element is changed will have an output change.

 

If you are using an Express VI, get rid of it and learn how to use the DAQmx discrete VIs.  Express VIs will not allow total control like discrete VIs will.

 

Post your code and let us look at it.

 

- tbob

Inventor of the WORM Global
Message 2 of 2
(2,831 Views)