01-15-2011 04:16 PM
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.)
Solved! Go to Solution.
01-15-2011 05:23 PM
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.
01-24-2011 10:35 AM
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?
01-25-2011 04:01 PM
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?