Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

A limit to Group Read's "Number to Read"?

1 Oktober 2003

I am using the NI-6503 to write to port 0 and read from ports 2 and 3 (no handshaking).

I first configure my ports using "Group Configure" to create a task-id for each group. Next, I use "Group Write" to write a single pattern to the one 8-bit write port, followed by a "Group Read" to read a single pattern from each of the two 8-bit read ports.

This works fine.

I would like, however, to read more than one pattern on each of the read ports. In the "Number to Read" field, I can increase this number from 1 to about 10 without any problems. When I excede a certain number (say 100 patterns), my card always "locks up", and begins reading incorrectly (only logic "hi"). Furthermore, writes to port 0 are al
so locked-up, and I must re-start LabView, or perform a "DAQ-Reset" on each of my read groups, in order to be able to read/write again.

Is there a limit to the number of reads I can perform on the group? I know I have used this function before to read in upwards of 2000 samples at a sample rate of about 50ksamples/second. Why doesn't it work any more? What can I do to debug the problem?

Thanks in advance,

-Brian
0 Kudos
Message 1 of 3
(3,054 Views)
Brian,

No, there is not a limit to the number of times you can read from a group. You mentioned that you have successfully read upwards of 2000 samples in the past. Were you using this same device? You also mentioned that writes to Port 0 always lockup the device. Is this only if you attempt multiple writes, or does a single write also lockup Port 0? To troubleshoot this issue, I would create a simple example with Digital Group Config.vi and Digital Single Read.vi and test each port without any other operations taking place in the program.

Spencer S.
0 Kudos
Message 2 of 3
(3,054 Views)
Spencer,

Thanks for your comments. I am afraid, however, that I didn't define the problem very clearly. Perhaps a more apt question would be this: Why would changing the "Number to Read" in "Digital Group Read" from a number below 50 to a number above 100 cause my DIO-6503 to lock-up? ("Lock-up" means that the currently running VI becomes incapable of reading, writing, or configuring the card. Once this happens, I must restart labview in order to be able to communicate with the card.)

I will keep debuging... but perhaps you can look at the overview of my VI below, and let me know if anything looks fishy. The VI is quite simple, and I perform the following actions (and in the following sequence):

Configure Group 1 (Port 2) as Read
C
onfigure Group 2 (Port 1) as Read
Configure Group 3 (Port 0) as Write
(Note: these are configured in this order to ensure that port 2 is not used for handshaking. If not using MAX-defined DAQ Channel names, configuring port 0 as a single port will cause port 2 to be used for handshaking.)

Start Loop, N=4:
Write to Group 3, Samples: 1 byte
Read from Group 2, Samples: 1 byte
Read from Group 1, Samples: 1000 bytes
End Loop

And that's it! During the Group 1 read, the card locks-up after (approximately) the 100th sample -- recognizable by the fact that all samples after this "100th" sample are 5V. (Looking at this signal simultaniously on the oscilliscope, the first 100 samples match the waveform, but the remaining samples clearly don't; the waveform is a simple 100Hz square wave.)

-Brian
0 Kudos
Message 3 of 3
(3,054 Views)