Hi all,
I am getting some headaches with the pxi-5122. I had it working great when I was acquiring a fixed number of samples upon an external trigger. But now, I need to acquire indefinitely upon getting an external trigger.
On the web, there is a "stream to disk queues" example that is close to what I want. In the example, they use a "
software ref trigger" and set "
Fetch relative to" = "
read pointer" and "
min record length" is left as the default of 1000. Then after initiating acquisition, a loop monitors "
fetch backlog" until it is bigger than "
samples per fetch", then a fetch is performed until the user stops the loop. It acquires indefinately presumably because
"min record length" is ignored.
I tried to adapt the example to use an external trigger by using an "
analog edge ref trigger". I set "
Fetch relative to"="
trigger", I don't set "
min record length" to anything. I then copied from the "fetch in chunks" example, and set and maintained the "
fetch offset" in the loop so that it would always grab the next available chunk of samples. After all of this the best I could do was to get the default record length of 1000 samples in the scope memory and it stops after that. I can increase the "min record length" to something arbitrarily long of course, but I would rather not do that. I am supposing that when I use "
fetch relative to"="
trigger", niscope thinks I am doing fixed length acquisition. Is this the case?
To sum up my question:
How do I correctly configure niscope to acquire indefinitely upon an external trigger?
Thanks!
-AT.