07-31-2013 04:00 PM
I'm trying to write a sequence of signals to a port on my USB-6343. Two of the signals are fixed and the other is an array of binary values. I am not getting any output on the DAQ port pins (port0:line0:7) and I'm getting the error 200565 when the loop ends and the Clear Task module is executed. I can't figure out why either are occuring.
This is my first foray into programming DAQ's with LabView so this could be simple.
07-31-2013 05:20 PM
Since you are only using 3 lines, you should set your task to be 3 lines. And with that, set your DAQmx Write to be multiple channels->single sample->1D Array of Boolean. You pass in an array corresponding to what each line should be. Also, use autoindexing to make your life a lot easier.
08-01-2013 02:27 PM
Thank you for that solution.
What I found is that port0 is 32 bits and I was only providing an 8 bit value. That's why it was complaining about the number of bits since I had selected lines in port0 but then specified Single Channel->Single Sample->U8. When I change to port1, which is only 8 bits, it works and there is no error.
It does seem to me now that if I specified U8 as the data size it should have been able to convert or extend it to 32 bits.
It is true that I could supply the 8 bits to port1 as a 1-D array and select the Multiple Channels->Single Sample->1-D Boolean but it isn't the best approach to where I'm going with this.
The corrected version is attached.