I have been struggling with a speed problem for the past few
months. I am trying to read 16 bits of data at a time from an external
digital device, and I have not been able to read fast enough. When the
external device gets a data point, it sends a .5 us TTL pulse, which I am
reading on a counter/timer set up to read rising edges. I am using
software to see if the counter has been incremented, and then using
software to send a data hold pulse to the external device and read sixteen
bits of data if the counter has been incremented.. It is taking about 20
ms to read the sixteen bits of data and three other counter/timer values,
which is way too slow. (With enough coffee *I* can practically data at 50
Hz. Well, maybe not, but...)
Someone PLEASE correct me if I am wrong, but on the AT-DIO-32F I
have, I can apparently set up two ports as one group and use the REQ1 or
REQ2 handshaking input (based on ports in the group) to hardware-trigger
data acquisition, and write the sixteen bits to a buffer which I would
later process.
Is this how "handshaking" works? THe external device says
IM READY with a high signal on the REQ pin, and the LabView board (after
being properly configured) goes OK and then reads the data into a buffer
and sends an IM DONE pulse on the ACK pin. Apparently this process takes
something on the order of microseconds, and there is a TDELAY programmable
delay to affect the time.
If this is true, it helps, but I still have one more problem--I
have three counter/timers on a PC-TIO-10 running to get real time data.
One is a 5 MHz counter for 200 ns resolution, and one counter/timer reads
the overflows of counter/timer #1 (the 5MHz one), and another
counter/timer reads the overflows of counter/timer #2 (the one that reads
the overflows of the first counter). I need to read all three of these
values when the 16-bit acquisition is triggered so I'll know what time
that data point hit my computer. I wait until the end and then process
the data, 200 ns for each click of the fast timer, 200x65535 ns for each
rollover of the fast timer, 200x65535x65535 for each rollover of the
rollover timer, and on and on. I really need to be accurate to within 1
microsecond of when this happens, 2 us at the most to match the resolution
of another device running on another computer.
Is there any way to hardware trigger a read of the three counter
values? I am saying hardware trigger because I think that is the only
thing which will give me the speed I need. I don't know how long labview
would take to read those, but I would almost bet appending the values to
three 1-d arrays would take too long.
If someone knows how to get the timing data off the same REQ
trigger as the digital port read does, please let me know. 🙂
Thank you.
Josh
PS--If anyone wants to know how to run old TSI LDV counters with LabView,
let me know....I seem to be rapidly becoming an expert on this
subject...tho not as good as I'd like. 🙂