Use Reference Trigger to stop a measurement acquisition. To use a reference trigger, specify a buffer of finite size and a number of pretrigger samples (samples that occur before the reference trigger). The number of posttrigger samples (samples that occur after the reference trigger) desired is the buffer size minus the number of pretrigger samples.

Once the acquisition begins, the TestScale backplane writes samples to the buffer. After the TestScale backplane captures the specified number of pretrigger samples, the TestScale backplane begins to look for the reference trigger condition. If the reference trigger condition occurs before the TestScale backplane captures the specified number of pretrigger samples, the backplane ignores the condition.

If the buffer becomes full, the TestScale backplane continuously discards the oldest samples in the buffer to make space for the next sample. This data can be accessed (with some limitations) before the TestScale backplane discards it. Refer to the Can a Pretriggered Acquisition be Continuous? document for more information.

When the reference trigger occurs, the TestScale backplane continues to write samples to the buffer until the buffer contains the number of posttrigger samples desired. The following figure shows the final buffer.

The name of terminal using the Reference Trigger task can be queried using the Reference Trigger Terminal Property.

Figure 27. Reference Trigger Final Buffer

1378

Using a Digital Source

To use Reference Trigger with a digital source, specify a source and a rising or falling edge. Either PFI or one of several internal signals on the TestScale backplane can provide the source. Refer to the Device Routing in MAX topic in the NI-DAQmx Help or the LabVIEW Help for more information.

Using an Analog Source

Some TestScale modules can generate a trigger based on an analog signal. In NI-DAQmx, this is called the Analog Comparison Event. When you use an analog trigger source, the acquisition stops on the first rising or falling edge of the Analog Comparison Event signal, depending on the trigger properties. For digital input timing, the analog trigger circuit must be configured by a simultaneously running analog input task.

Note Depending on the TestScale module capabilities, you may need two modules to utilize analog triggering.

Routing the Reference Trigger Signal to an Output Terminal

You can route ReferenceTrigger to any output PFI terminal. Reference Trigger is active high by default.