5 - Programming the DC Source
48
When the acquisition finishes, any of the FETCh queries can be used to return the results. Once the
measurement trigger is initiated, if a FETCh query is sent before the data acquisition is triggered or
before it is finished, the response data will be delayed until the trigger occurs and the acquisition
completes. This may tie up the computer if the trigger condition does not occur immediately.
One way to wait for results without tying up the computer is to use the SCPI command completion
commands. For example, you can send the *OPC command after INITialize, then occasionally poll the
OPC status bit in the standard event status register for status completion while doing other tasks. You can
also set up an SRQ condition on the OPC status bit going true and do other tasks until the SRQ interrupts.
Pre-trigger and Post-trigger Data Acquisition
The measurement system lets you capture data before, after, or at the trigger signal. When a measurement
is initiated, the dc source continuously samples the instantaneous signal level of the sensing function. As
shown in figure 5-4, you can move the block of data being read into the acquisition buffer with reference
to the acquisition trigger. This permits pre-trigger or post-trigger data sampling.
To offset the beginning of the acquisition buffer relative to the acquisition trigger, use:
SENS:SWE:OFFS:POIN <offset>
The range for the offset is -4096 to 2,000,000,000 points. As shown in the figure, when the offset is
negative, the values at the beginning of the data record represent samples taken prior to the trigger. When
the value is 0, all of the values are taken after the trigger. Values greater than zero can be used to
program a delay time from the receipt of the trigger until the data points that are entered into the buffer
are valid. (Delay time = offset x sample period).
NOTE: If, during a pre-trigger data acquisition, a trigger occurs before the pre-trigger data count
is completed, the measurement system ignores this trigger. This will prevent the
completion of the measurement if another trigger is not generated.
4096 DATA POINTS
4096 DATA POINTS
4096 DATA POINTS
OFFSET
=-
4096
OFFSET
=-
2048
OFFSET
=
0
4096 DATA POINTS
ACQUISITION
TRIGGER
OFFSET
=
0to2
9
TIME
Figure 5-4. Pre-trigger and Post-trigger Acquisition