From Friday, January 17th 11 PM CDT (January 18th 5 AM UTC) through Saturday, January 18th 11:30 AM CDT (January 18th 5:30 PM UTC), ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

When using 6534, my buffer read size is limited to 32 bit chunks

I am using DIO read to read off the input buffer. I have two problems.

First the returned value will always be in 32 bit chunks. I.e. multiples of 32. And I need to read variable size values into my program.

Also when setting up the number of scans, to read or write, I am only able to have even number sizes. If I have an odd number it flags an error. Sometimes I may want to write a 37 update pattern but it will not let me. I have to add bits to the end of may pattern.
0 Kudos
Message 1 of 2
(3,141 Views)
Coxy

The value returned by the DIO Read vi is going to be an array of 8 bit integers. I'm not sure what you mean by 32 bit chuncks, however, The total number of elements in this array equals the number of ports in the group multiplied by the number of scans to read. For example, if your group contains two ports, then elements 0 and 1 contain the data for the first scan. Both of which are 8 bits.

You are correct in that the 6534 will not allow you to have send an odd number of bytes, it will give you a 10010 error. Therefore, when the amount of data to be transferred has to be even for one port, though does not matter for two or four ports.

Brian
0 Kudos
Message 2 of 2
(3,141 Views)