Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

NI-9476/ NI-9477 LabView example code

I am creating a Valve driver routine in LabView now using DAQmx 9.8.
In this version there is a programming example to use but I have more questions...

 

In the 32 bit register I need to set and clear bits in the register without changing the state of others

 

For example first I set bits 3 to 5,

Then I clear bit 4 without changing the state of 3 and 5.

 

A. can I read back the state of output register, and from that create a mask to reprogram the output register?

 

B Is there another way to target specific bits in the output register?

 

 

0 Kudos
Message 1 of 2
(5,722 Views)

Sir_N,

 

There really isn't any way to only update certain lines while maintaining the states of other lines within the DAQmx API. You will need to keep track of your data in an array or other data structure and then when you need to update only certain lines, you will need to handle the masking of those lines yourself in software.

Aaron W.
National Instruments
CLA, CTA and CPI
0 Kudos
Message 2 of 2
(5,706 Views)