What are you looking for?
Making High Speed Measurements Through Triggering
Note: This applies to the 34401A, 34970A, and 34980A
The multimeter can be triggered both manually and automatically. Use of triggers can improve throughput by acting as an alternative to inserting delays to take measurements, as well as improving the repeatability of the measurement. When a trigger occurs, a reading can be taken on one or multiple channels. Trigger sources can be immediate, software, hardware, or via a timer. Commands allow you to specify the appropriate delay between triggers, as well as the number of samples or sweeps to be taken.
To use triggers, select the function, range, and resolution, then specify the source of the trigger. There are several sources to choose from. IMMediate is the default source. When power is cycled or a *RST command is sent, IMMediate is automatically set as the trigger source. Once the wait-for-trigger state occurs (after sending INIT), a trigger will immediately be issued. The trigger signal is always present in the wait-for-trigger state with the IMMediate source. Note that if not using the default source, the TRIGger:SOURce command must come after the CONF command, as the CONF will reset the trigger system and set the trigger source back to IMMediate. This rule applies for all other trigger settings as well.
A BUS (software) trigger can also be used. After configuring and creating the trigger settings, the DMM must be put in the wait-for-trigger state by sending INIT. Then *TRG must be sent to trigger each measurement. The trigger count defines how many *TRG commands will be accepted before returning to the idle state. For example, if the trigger count is set to three, *TRG must be sent three times before fetching the results. An error will result if *TRG is sent more than three times.
Another trigger source is EXTernal (hardware), which can be applied to the rear panel. Figure 1 shows the proper external trigger input pin (Pin 6) for the 34980A. Each time a low true TTL pulse > 1us is received, the DMM takes SAMPle:COUNt readings. Note that a low edge of the pulse must first occur. The trigger will then occur on the rising edge of the pulse. The DMM must be in the wait-for-trigger state for the external trigger to initiate readings. The DMM’s ABUS relays close at INIT time. The trigger count defines how many external pulses will be accepted before returning to the idle state. Note that triggers are only buffered if TRIGger:COUNt is > 1 and already in wait-for-trigger mode. See below for results of an external triggering example program.
A final source for triggering is the TIMer. You can set the time you wish to elapse between subsequent triggers, i.e. the start of one trigger to the start of the next trigger (in seconds), for measurements on channels in the current scan list. If the scan interval is less than the time required to measure all channels in the scan list, the instrument will scan continuously, as fast as possible. You can specify a trigger timer from 0 seconds (default) to 359,999 seconds (99:59:59 hours), with 1 ms resolution.
Figure 2 shows the relationship between triggers, sweeps, and samples for scanning. The trigger count defines the number of triggers that will be accepted by the internal DMM before returning to the idle trigger state. The sample count selects the number of samples per channel per trigger to be taken one channel at a time. The trigger and sample count apply to both scanning and stand-alone DMM measurements (with no scan list). A sweep is one pass through the scan list. SAMPle:COUNt readings are taken on each channel in the scan list, one channel at a time, until the sweep is complete. This process repeats itself SWEep:COUNt times until the next trigger. If no channels have been routed to the scan (ROUT:SCAN), only triggers and samples will be used for the DMM. The total number of measurements made is the product of the trigger, sweep, and sample count. The trigger, sweep, and sample count can be set from 1 (default) up to 500,000 triggers. TRIGger:COUNt can also be set to INFinity (continuous). Note that the 34401A does not have the sweep function.
The TRIGger:DELay command inserts a delay between the trigger signal and the first sample taken by the internal DMM or the first reading in the sample burst. A trigger delay is helpful when you want the input to settle before taking a reading or for pacing a burst of readings. A trigger delay can be from 0 to 3600 seconds, with 4 µs resolution. Otherwise, the delay is set automatically. The instrument determines the delay based on function, range, and integration time. For the maximum reading rate, set the delay to zero or MIN.
After configuring the scan, and setting up the trigger source, count, timer, delay, sweep and sample count, the multimeter can then be placed in the wait-for-trigger state. This can be done by sending the INIT, MEAS?, or READ? commands. If the multimeter is in the wait-for-trigger state, and a trigger signal occurs, readings will start to be taken. For all trigger sources, FETCH? can be used to retrieve the results (if INIT is used), once the DMM returns to the idle trigger state. INIT;:FETCH? can be used when you need to insert a command after arming a reading in order to cause the event that will generate an external trigger.
A triggering example was conducted to show the difference between using an external trigger to initiate readings and using a delay. A delay is often inserted in test programs when a reading must be made after another event occurs. For example, the delay could allow for a voltage signal to reach a percentage of its final value. A better method is to set up a trigger that will begin the reading when the desired voltage level is reached. This is an important factor for throughput because using a delay can add unnecessary reading time. Faster measurements can often be taken through external triggering, and can also produce more repeatable results.
Generating external triggers often requires the use of signal conditioning in order to create the required TTL level signal from non-TTL sources. The 34980A’s breadboard card is well suited to do this. The example program used the 34951A DAC and 34959A Breadboard modules on the 34980A. The DAC module was used to create two voltage levels as seen in Figure 3. 10V was passed through a simple RC circuit mounted on the Breadboard module to simulate the rise and fall of a voltage source turning on and off respectively. The 10V source was turned off and the capacitor started discharging. The rising edge of the low pulse occurred once the voltage reached one time constant (3.68V) as seen in Figure 4. This activated the trigger. The trigger set the DMM to take five samples. Note that the readings taken in this example are simply to verify the voltage level.
The following is the Visual Basic code using T&M Toolkit for external trigger and delay test program.
Imports Keysight.TMFramework Sub DAC_Waveform1_34951() Dim instrument As Keysight.TMFramework.InstrumentIO.DirectIO instrument = New Keysight.TMFramework.InstrumentIO.DirectIO ("GPIB0::9::INSTR", False, 2000) With instrument ' Reset instrument to power on state .WriteLine("*RST;*cls")
' turn DAC1 voltage on .WriteLine("Sour:Volt 3.68,(@1001)") .WriteLine("Output:State ON,(@1001)")
Keysight.TMFramework.Timing.Delay(2000000)
.WriteLine("conf:volt:dc 10") .WriteLine("sens:volt:zero:auto off") .WriteLine("sens:volt:nplc .02")
'use bus for delay test; ext for trigger .WriteLine("trig:sour ext") '.WriteLine("trig:sour bus")
.WriteLine("trig:del MIN") .WriteLine("samp:coun 5") .WriteLine("init") ' turn DAC2 voltage on .WriteLine("Sour:Volt 10,(@1002)") .WriteLine("Output:State ON,(@1002)")
Keysight.TMFramework.Timing.Delay(60000)
' turn DAC2 voltage off .WriteLine("Sour:Volt 0, (@1002)") .WriteLine("Output:State ON,(@1002)")
'remove this line for delay test .WriteLine("*wai")
'add these lines for delay test 'Keysight.TMFramework.Timing.Delay(10000) '.WriteLine("*trg")
.WriteLine("fetch?") TextBox1.Text = .Read() End With End Sub
The results of the experiment are charted in Figure 6. The graph on the left displays voltage readings of 5 samples taken on each of 10 tests employing an external trigger. The trigger was set once the voltage level reached 3.68V (equivalent to one RC time constant). Once the trigger occurred, a measurement was made by the DMM at the output of the RC circuit (Figure 3). Note that even with a fast DMM integration time, the signal is changing during the measurement, so results are the average over the measurement interval. The subsequent samples are also taken after the same integration delay (NPLC .02, autozero OFF, Delay MIN). The graph on the right in Figure 6 displays voltage readings taken after a delay of 10ms (equivalent to one RC). By theory, the results of the two graphs should be the same. The delay readings however, are not as consistent as the trigger readings. The voltage read on each test varies a significant amount. The first sample of the delay readings is a much lower voltage than expected. Also, the range of voltage readings is much larger for the delay test than the trigger test, showing that using an external trigger can improve repeatability.
Conclusion
External triggering features several benefits over inserting delays. The particular example used in this paper had a calculable time constant that could be inserted into the program. In many applications however, an appropriate delay is unknown, and programmers might insert a guess or approximation that is too large. The programmer might plan to conduct a few tests to optimize the delay value, but as this takes time, may skip this step and leave the initial delay. This can greatly increase reading time. Additionally, the variation of readings over a number of runs using a delay is much more than with triggering. This is especially important when using a fast waveform. Even if the appropriate delay is calculated, there still exists a variation window that is less likely to occur with triggering (Figure 6). There are many factors that can offset the results when using delays. Delays are susceptible to interference from other active applications. For example, if a virus scan starts on the PC where your program is operating while the delay is running, the reading time will increase and the measurements will be skewed. Delays have to take into account the time to compile the program, send the I/O commands, and then for the DMM to parse the characters and begin the measurements. Everything is done through software. Triggers however are set up ahead of time, and hardware is in control. Triggering requires little or no optimization, can greatly save development time, improve repeatability, and increase throughput.