SAMPle Subsystem
The SAMPle commands are used with the TRIGger commands to set up the
triggering parameters. Use the SAMPle commands to set a sample count,
sample source, and delay time for triggered sampling.
Command Summary
SAMPle:COUNt
SAMPle:COUNt:PRETrigger
SAMPle:SOURce
SAMPle:TIMer
SAMPle:COUNt {<count>|MIN|MAX|DEF}
SAMPle:COUNt? [{MIN|MAX|DEF}]
Specifies the number of measurements (samples) the instrument takes per trigger.
1 to 1,000,000 (1x106). Default: 1. (34460A/61A) 1 to 1,000,000,000 (1x109). Default: 1. (34465A/70A)
|
+1 |
Return ten sets of four resistance measurements, using an external trigger to start each measurement set:
CONF:RES 1E6 SAMP:COUN 4 TRIG:COUN 10 TRIG:SOUR EXT;SLOP NEG READ?
Typical Response: +1.00520000E+06, … (40 measurements)
|
- The front panel sample annunciator ( "*" ) turns on during each measurement at slower rates. The annunciator toggles at a fixed rate for fast measurements.
- You can use the specified sample count in conjunction with a trigger count (TRIGger:COUNt), which sets the number of triggers to be accepted before returning to the "idle" trigger state. The total number of measurements returned are the product of the sample count and trigger count.
- You can store up to 1,000 measurements in the reading memory of the 34460A, 10,000 measurements on the 34461A, 50,000 measurements on the 34465A/70A (without the MEM option), or 2,000,000 measurements on the 34465A/70A (with the MEM option). If reading memory overflows, new measurements overwrite the oldest measurements stored; the most recent measurements are always preserved. No error is generated, but the Reading Mem Ovfl bit (bit 14) is set in the Questionable Data Register's condition register (see Status System Introduction).
-
MAX selects 1 billion readings. However, when pretrigger is selected, the maximum is 50,000 readings (without the MEM option) or 2,000,000 readings (with the MEM option).
- This parameter is set to its default value after a Factory Reset (*RST) or Instrument Preset (SYSTem:PRESet).
SAMPle:COUNt:PRETrigger {<count>|MIN|MAX|DEF}
SAMPle:COUNt:PRETrigger? [{MIN|MAX|DEF}]
Allows collection of the data being digitized before
the trigger. Reserves memory for pretrigger
samples up to the specified number of pretrigger samples.
0 to 1,999,999. Default: 0. |
+999999 |
Configure AC voltage measurements using the 100 V range. Set the sample count to 10,000
and the pretrigger sample count to 5000 (5000 samples are
taken before the trigger, and 5000 after). The trigger occurs when the input signal reaches 0.75 volts.
CONF:VOLT:AC VOLT:AC:RANG 100 SAMP:COUN 10000 SAMP:COUN:PRET 5000 TRIG:SOUR INT TRIG:LEV 0.75 INIT
|
- Applies only to the 34465A and 34470A.
- Pretrigger applies to all measurement functions except CONTinuity and DIODe test.
- Use SAMPle:COUNt to set the
total number of samples to take,
then use SAMPle:COUNt:PRETrigger to set the number of pretrigger
samples to take.
For example, with a sample count of 50,000,
and a pretrigger sample count of 20,000, up to
20,000 samples are taken before the trigger, then 30,000 samples are
taken after the trigger occurs.
The sample count and pretrigger count do not affect when the trigger occurs.
If the memory allocated for pretrigger samples fills up, the oldest readings
are discarded. In the example above, the 20,000 most
recent pretrigger samples are saved, even if more than 20,000
samples occur before the trigger. If
the trigger occurs before
the pretrigger count is satisfied, only the actual pretrigger
samples taken are saved.
In all cases, after
the trigger is received, only sample
count minus specified pretrigger count
readings are taken. In this example, if the trigger occurs after 5 pretrigger samples have been taken (instead of the specified 20,000),
only 30,000 post-trigger samples are taken. This is because memory
was reserved for 20,000 pretrigger samples.
- If a trigger occurs during
a measurement, that measurement is considered to be a pretrigger sample.
- After setting the sample count and pretrigger
sample count, you must place the DMM in the "wait-for-trigger"
state using INITiate
or READ? An external
trigger is buffered until the DMM is in the "wait-for-trigger"
state.
- The pretrigger sample count must be less than
the sample count set with the SAMPle:COUNt
command, and there must be at least one post-trigger sample:
Pretrigger Sample Count ≤ Sample Count
- 1
- If any of the calculation functions are on (CALC:STAT
ON), the pretrigger count is limited to 10,000 samples.
- CONFigure and MEASure?
set the pretrigger sample count to "0".
- The instrument sets the pretrigger sample count
to "0" after a Factory Reset ( *RST
command) or a Preset (SYSTem:PRESet
command).
See Also
SAMPle:COUNt
SAMPle:SOURce {IMMediate|TIMer}
SAMPle:SOURce?
Determines sample timing, with TRIGger:DELay and SAMPle:TIMer to
determine sample timing, when the sample count is greater than one.
{IMMediate|TIMer}. Default: IMMediate. |
IMM
or TIM |
Set sample source to timer. The INIT command sets the meter to the "wait-for-trigger" state. When a trigger is received from the selected trigger source, the instrument starts taking periodic samples after the trigger delay.
SAMP:SOUR TIM SAMP:TIM 0.1 INIT
|
Operation
In all cases, the first
sample is taken one trigger delay time after the trigger (the delay being
set with the TRIGger:DELay command). Beyond that, the timing mechanism
depends on whether you select IMMediate (default)
or TIMer as the source:
- IMMediate - The first sample starts one trigger delay time after the trigger, and
then the trigger delay time is inserted between the first and second samples,
the second and third, and so on:
The sample timing is not deterministic
because the delay time (set with TRIGger:DELay) is inserted after
each sample completes. The actual time required to take each sample depends
on the integration time and autoranging time. In this case, the SAMPle:TIMer
command has no effect.
- TIMer - The first sample starts one trigger delay
time after the trigger. However, the second sample starts one sample interval
after the start of the first
sample, and so on:
The sample timing is deterministic
because the start of each sample
is determined by the sample interval, set with the SAMPle:TiMer command
(TRIGger:DELay affects only the start of the first sample). Integration
and autoranging affect the sampling time for each sample, but not the
sample interval as long as the sample interval is longer than the sampling
time.
Remarks
- Applies only to the 34465A and 34470A.
- This command
has no effect if the sample count is 1 (see SAMPle:COUNt).
- After setting
the sample count, sample source, and the sample interval or trigger delay
time, you must place the instrument in the "wait-for-trigger"
state using the INITiate
or READ? command. A trigger is not accepted from the selected trigger source (see TRIGger:SOURce command)
until the instrument is in the "wait-for-trigger" state.
- The instrument
sets the sample source to "IMM" after a Factory Reset ( *RST command) or an instrument Preset (SYSTem:PRESet command).
See Also
TRIGger:COUNt
TRIGger:DELay
TRIGger:SOURce
SAMPle:COUNt
SAMPle:TIMer
SAMPle:TIMer {<interval>|MIN|MAX|DEF}
SAMPle:TIMer? [{MIN|MAX|DEF}]
Sets a sample
interval for timed sampling (SAMPle:SOURce TIMer) when
the sample count is greater than one.
The first sample is taken one trigger delay time after the trigger (delay set by TRIGger:DELay). The second sample starts one sample interval after the start of the first sample, and so forth, as shown below:
Note that the sample timing is determinant because the start of each sample is determined by the sample interval. Integration and autoranging affect the sampling time for each sample, but not the sample interval as long as the sample interval is longer than the sampling time. Periodic sampling continues until the sample count (set with the SAMPle:COUNt command) is satisfied.
|
It is recommended that all triggered measurements be made using an appropriate fixed manual range. That is, turn autorange off (SENSe:<function>:RANGe:AUTO OFF), or set a fixed range using the SENSe:<function>:RANGe, CONFigure, or MEASure command. When autorange is left on, the starting time of a sample becomes uncertain (when a range change occurs) and when ranging exceeds the interval between samples; then all subsequent samples become offset from their desired start points.
|
<interval> MIN (see bullet points below) to 3600 seconds (~1 µs steps). |
+3.60000000E+003 |
Set the sample interval to 0.1 seconds. INIT sets the meter to the "wait-for-trigger" state. When a trigger is received from the selected trigger source, the instrument waits the trigger delay time, and then takes readings every 0.10 seconds until the sample count is satisfied.
SAMP:SOUR TIM SAMP:TIM 0.1 INIT
|
- The value of MIN
is measurement dependent. It depends on such things as the integration time, autozero on or off, autorange on or off, and the measurement range.
Basically, MIN is automatically determined so that the sample interval
is always greater than the sampling time (see above illustration). Execute
SAMPle:TIMer? MIN to determine the recommended interval for the current measurement configuration.
-
Since the minimum value changes depending on configuration, a command order dependency exists. You must completely configure the measurement before setting the sample timer to MIN, or you may generate an error. A complete configuration includes such things as math statistics or scaling.
- When using autorange, the MIN
value is the recommended value, not the absolute minimum value. With autorange enabled, MIN is calculated assuming a single range change will occur for every measurement (not multiple ranges, just one range up or down per measurement). You can specify an <interval> between the absolute minimum (assumes no range changes) and the recommended MIN value, but it may generate a timing violation error when making measurements. Applying a value less than the absolute minimum will generate an error.
- To determine the absolute minimum value for the present configuration, set the sample time to 20 µs (which may generate a settings conflict error), then read back the current sample timer value using the SAMPle:TIMer? query. The sample source must be set to timer with a sample count or trigger count greater than 1, for the settings conflict error to occur. The settings conflict error causes the timer to be set to the absolute minimum value.
- The sample time resolution is 1 µs, the aperture resolution is 2 us, and the actual hardware resolution is not exactly 1 µs. There are cases where a sample time value, rounded to the nearest hardware resolution, will result in a smaller value than aperture when rounded to 2 µs. This will create error -221,"Settings conflict; cannot meet requested timing; SAMP:TIM changed". For example, the following sequence of commands generates error -221 and sets the sample time to +2.00100000E-003.
*RST
FUNC "VOLT:DC"
VOLT:DC:APER 0.002
VOLT:DC:RANGE:AUTO OFF
VOLT:DC:ZERO:AUTO OFF
TRIG:DEL 0
TRIG:SOUR BUS
SAMP:COUN 2
SAMP:TIM 0.002
SAMP:SOUR TIM
This error can also occur if you attempt to set both values an odd number of µs. For example, setting both values to 23 µs, generates error -221 and sets the sample timer to 24 µs.
- After setting the sample count, source, and delay
time, you must place the meter in the "wait-for-trigger" state
using the INITiate or
READ?
command. A trigger is not accepted from the selected trigger source
(see TRIGger:SOURce command)
until the instrument is in the "wait-for-trigger" state.
- The interval may be set to any value from the absolute minimum described above
to 3600 seconds. However, the value is rounded to the nearest step.
For dc measurements, the step size is 1 µs. For ac measurements,
it is ac bandwidth dependent.
- The instrument sets the sample timer to 1 second
after a reset ( *RST
command) or an instrument preset (SYSTem:PRESet
command).
See Also
TRIGger:COUNt
TRIGger:DELay
TRIGger:SOURce
SAMPle:COUNt
SAMPle:SOURce