Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

Using mathscript to generate multiple digital outputs for switch control

Hello 

I am new to this NI LV and a have kind of a basic question. I would like to use Mathscript to generate an array of bolean numbers which will be used to control the Digital I/O lines. I am using NI 6251 USB device and the Mathscript code runs well. But I have a problem using this array to control the Digital output. So I created a simple test programme where I set the DAQ assitant to generate 4 digital outputs(P0.0 ~ P0.3) and it gives error that  ".. number of channels in the data does not match the number of channels in the task..." (see attachment) . How can I solve this problem thank you.

0 Kudos
Message 1 of 2
(4,995 Views)

looks like you did not initialize all 4 of the elements in the bool array....Example_VI_FP.png

0 Kudos
Message 2 of 2
(4,982 Views)