Hi:
I'm attempting to do something in LabVIEW that is probably possible but in
many different ways and was wondering what the LabVIEW community thought
about it. The problem is simply to set up the hardware to continuously acquire
n points from a PCI-6052E DAQ card in response to a digital trigger. The
hardware should pause and wait until the next trigger, after which it should
read another n points, and so on...
Details:
This is a sonar application which will drive a transducer, so i'm using one
of the counters to generate a pulse train (frequency 3 - 12 Hz, depending
on range setting) which effectively sends a 'ping'. This counter is looped
back into the PFI0/TRIG port to trigger the start of the A/D.
I do not want to contin
uously acquire data. I only want to acquire n points,
and then pause the acquisition until the next ping arrives. Ideally, i would
like to start off a process which makes the card do this, entirely from hardware,
but i have yet to find an elegant way. As it stands i can:
- start a continuous acquisition (no good, i only want to get n points after
a trigger)
or
- put the AI Control vi, programmed to respond to a digital trigger, inside
of a while loop (no good, since the AI Read Buffer command will be dependent
on the AI Control command, and the AI Read takes quite long, and i miss some
triggers before i can re-arm it - essentially, i'm dropping pings). Besides,
i'm using software to read, which i want to avoid.
or
- use scan clock gating (i'd like to get n samples, i'm afraid of missing
samples by letting the gate pulse go too long or short).
If thought about putting the AI Read vi in a while loop, which is concurrent
with the AI Control in another while loop, but i can't guar
antee order of
execution, and it seems hokey, frankly.
This seems like a standard operation, how should this be handled?
Best Regards,
Vincent