12-16-2014 02:54 PM
Hi, I'm working on using the DAQ digital output to control the digital input of a DAC, and I used the Number To Boolean Array Function. VI to convert the number to a Boolean array. The maximum number should be 4096, therefore it should consist of 12 elements.
For the description of the VI, it says Boolean array returns an array of 8, 16, 32, or 64 elements, depending on the number of bits in the integer. Therefore, I change the number of the channels in task to 16, but it still doesn't work. Any suggesitions are greatly appreciated.
Thanks!
Possible reason(s):
Write cannot be performed, because the number of channels in the data does not match the number of channels in the task.
When writing, supply data for all channels in the task. Alternatively, modify the task to contain the same number of channels as the data written.
Number of Channels in Task: 12
Number of Channels in Data: 32
Task Name: _unnamedTask<1B>
Solved! Go to Solution.
12-16-2014 03:00 PM
Once you have the boolean array, you can resize it using array tools. For example you can use "reshape array" with a lenght of 12 to trim the array to 12 booleans elements (you can also use array subset).
12-16-2014 03:04 PM
12-16-2014 03:37 PM
Thank you.
It works.
12-16-2014 03:50 PM - edited 12-16-2014 03:51 PM
Of course you COULD wire a U8 directly to the DAQmx Read through a build array and let DAQmx ignore the extra bits for you
Much easier to work with when you realize you need one more digital line