High-Speed Digitizers

cancel
Showing results for 
Search instead for 
Did you mean: 

niScope: acquire indefinately upon trigger

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.










0 Kudos
Message 1 of 5
(7,181 Views)
The reference trigger really tells the device when to stop.  When you start an acquisition, the device starts acquiring and storing points and will continue until it gets its reference trigger.  At that point, it requires the remaining number of points to complete the record and then stops.

The way a continuous acquisition works is that you configure a software reference trigger, but never send the trigger! So the device stores pre-trigger points indefinitely as long as you fetch data off of the board before it is overwritten.

To start a continuous acquisition based on an external trigger, you want to use a Start Trigger instead of a Reference Trigger.  You will set the Reference Trigger to SW like in the example.  But you can set the entire acquisition to start based on an external Start Trigger.  The difference is that you won't be able to fetch any samples from before the Start Trigger (as you can do with the Reference Trigger).

One more wrinkle: this digitizer does not support an analog edge start trigger- only a digital or SW start trigger.  You have a couple of ways to work around this.  What does your external trigger signal actually look like?  If it resembles a 3.3V digital signal, you might be able to use it anyway.  Alternatively, you may have to use a second device, which watches for the analog edge trigger, then sends a digital start trigger to the 5122.
0 Kudos
Message 2 of 5
(7,179 Views)


Okay, I think I understand the concept. So, I need to set the niscope property, "synchronization:arm reference trigger source" to be something that is connected to the "trig" connector on the 5122. My trigger signal is a simple digital pulse, BTW.

When I look at the help for this property (see link above), it lists a bunch of rtsi values but nothing that obviously represents the trig signal. I guess now that I have to use the DAQmx connect terminals vi to physically connect a valid arm reference trigger source like pfi0 to the trig input on the 5122. Is this right?

But when I bring up DAQmx connect terminals vi, the drop-downs for source and destination list a bunch of stuff, but I am not sure which one is the "trig" signal (is it "scope/StartTrigger"?, "scope/ReferenceTrigger"?).

I am getting confused now because I don't know how to route the PXI 5122 trig connector to something that is useable as a start (arm-reference) trigger source.

Is this material covered in documentation somewhere? The examples are nice, but I think I need a solid top-down read on this stuff.

Thanks!
-AT.




0 Kudos
Message 3 of 5
(7,172 Views)
You don't need to use the DAQmx Connect Terminals.

The NI-Scope property you want is Synchronization:Start Trigger (Acq. Arm):Source

(This is different from the Arm Reference Trigger)

I see that you want to use the BNC Trig connector.  This connector cannot be used as the Start Trigger source, because that input is for analog triggers only.  What you really want to use is PFI 0 (or 1), which is exposed as one of the pins in the AUX I/O Connector at the bottom of the front panel.  There is a pinout diagram for this connector in the NI High-Speed Digitizers help file, under Devices>>NI 5122>>Front Panels>>NI PXI-5122 Front Panel.  This help file also has a lot of information you may want.

You may want to contact an NI internal sales rep to get an adapter for the AUX I/O connector if you don't have one.

To summarize:
The property to set is: Synchronization:Start Trigger (Acq. Arm):Source
The value you should set on this property is: "VAL_PFI_0" or "VAL_PFI_1"
That will route the PFI 0 pin to the Start Trigger.


0 Kudos
Message 4 of 5
(7,168 Views)
Thank you again,

The high speed digitizer help file that you recommended has really cleared up my confusion, particularly the "SMC-Based Digitizers Acquisition Engine State Diagram".


-AT.

0 Kudos
Message 5 of 5
(7,146 Views)