LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquiring 16 bit data using 6533 / continious pattern input?

Hi,

I am trying to acquire a variable number of 16 bit words using the
6533 I/O board. I found the example VI 'Continious pattern input.vi'
does this quite well, and have modified it to write the data to a text
file.

The data is read from two 8 bit ports, 0 and 1. Port 0 is read first,
then port 1. The data is inserted into an array in a 'least
significant byte then most significant byte' pattern. This is no
problem.

The problem I am getting is the first few words are not representative
of both ports, possibly only the fist port is being read for 8 input
clocks or so.

Additionally, every 100 words (LSByte and MSbyte combined), the most
significant word seems to be read twice. This upsets th
e pattern in
the array, and when I come to combine the two words into a single 16
bit word, obviously 100 of them will be incorrect until two MSBytes
are read again, correcting the poblem. Is it to do with the number of
scans?

Does anyone know why this is?

My clock source is external, 100 scans are read at a time, and a 1K
buffer is set up.

Any help would be appriciated!!!

Joe.
0 Kudos
Message 1 of 3
(2,757 Views)
Joe,

I am not sure why you are seeing the behavior you describe.

If you open the Continuous Pattern Input VI example and leave the settings as default, but change the Device number to reflect your DIO-32HS card. If you can wire the port 0 lines to ground and the port 1 lines to 5V.

The data in the Input Info - port data read array will be interleaved.
array index 0 = port 0 first reading
array index 1 = port 1 first reading
array index 2 = port 0 second reading
array index 3 = port 1 second reading
etc...

If we are can gnd port 0 and tie port 1 to 5V then we should see 0,255,0,255,0,255...
After you have tried this setup then try to use your external clock.
0 Kudos
Message 2 of 3
(2,757 Views)
Michael,
Thanks for the advice. I did as you said and the error was still
present though. I have managed to solve the problem but am not quite
sure why the problem was showing itself in such a way. The problem was
down to an indexing error in an array which holds the data.

Thanks again,
Joe.
0 Kudos
Message 3 of 3
(2,757 Views)