LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

writing single boolean to ni 9472 digital output module

Solved!
Go to solution

I have a vi that writes to both analog and digital output modules, 9263 and 9472. 

I don't have a problem writing to the analog modules, but the digital modules (9472) is giving me problems.  I want to write a single boolean and it wants a boolean array.  I was  using DAQ assistant, but gave up on that.  I am probably not understanding how to access the port correctly. 

 

I included a partial copy of the code.  (LV crashed when I tried to create a snippet of the original code, so I had to copy it onto a new vi.)




metzler CLAD
0 Kudos
Message 1 of 4
(3,940 Views)
Solution
Accepted by topic author metzler

You did not include the subVI and if you want to generate a single Boolean, it makes no sense to use the Generate Dig 1D Data and that instance of DAQmx Write. Simply use 1Line 1Point. Change the instance by clicking the polymorphic selector below the DAQmx write. Select Digital>Single Channel>Single Sample>Boolean. You could also use the DAQ Assistant by just wiring a Build Array function between the Boolean control and the Signals input.

 

You should also consider a way to write your code without globals.

Message 2 of 4
(3,932 Views)

I thought I had tried changing the instance, but it works, so I guess I didn't.  Thanks.

 

I have tried to get rid of local variables, global variables, and property nodes, but am having problems updating the front panel.  Is there a good example on how to do this without variables and writing to property nodes?

 




metzler CLAD
0 Kudos
Message 3 of 4
(3,876 Views)

Hi metzler,

 

I don't really have much more information about the rest of your program to provide a suggestion on cutting down on the global variables that you are using. Is there any reason why you aren't making use of a simple control or constant?

Sanjay C.
Embedded Software Product Manager| National Instruments
0 Kudos
Message 4 of 4
(3,855 Views)