Precision, Performance, Confidence. ™

Using Units-Only NOMINAL or MOD1 Fields to Adjust Standards in a Loop

In the MET/CAL Help System, we learn that when the NOMINAL or MOD1 fields of an instrument FSC contains only a unit of measure (without a value), the value is taken from the memory register MEM.

This behavior creates the ability to use a DO-UNTIL loop to adjust the output of a standard until a condition is met. This is useful for tasks like establishing a reference level during an oscilloscope bandwidth test.

To perform this type of loop, we use a units-only field as the adjusted value, as in the examples below. The first example shows a loop that adjusts the reference level of the oscilloscope option output for a DUT amplitude reading of approximately 600 mV(pp).

#Define the Starting Voltage.
1.001 MATH @Voltage = 600E-3
1.002 MATH MEM = @Voltage;MEM1 = MEM
#Initiate the DO-UNTIL Loop.
1.003 DO
#Adjust the existing set point to move closer to desired level.
#In the first loop, this will remain at the starting value.
1.004 MATH MEM = MEM1 + (@Voltage - MEM) / 2
#Set the output of the standard to the current value based on MEM.
#The value of MEM1 will be changed to the current set point after this
#row since it is a Setup test type (S in MOD4).
1.005 5520 V 50kH LS S6 S L
#Check the Amplitude of the measured waveform.
#Define the condition for exiting the loop.
1.007 UNTIL (MEM >= 0.599) && (MEM <= 0.601)


This next example demonstrates using the same concept on the MOD1 field instead of NOMINAL to find the actual frequency of the 3 dB Bandwidth of an oscilloscope.

#Define the starting frequency.
1.001 MATH @Frequency = 440E6
1.002 MATH MEM = @Frequency; MEM1 = MEM
#Define the step size for the loop.
1.003 MATH @FreqStep = 10E6
#Initiate the DO-UNTIL loop.
1.004 DO
#Adjust the setpoint upward by the size of the step.
1.005 MATH @Frequency = @Frequency + @FreqStep
1.006 MATH MEM = @Frequency
#Set the output of the standard to the current value based on MEM.
1.007 5520 600mV H LS S6 S L
#Check the amplitude of the measured waveform.
#Define the condition for exiting the loop.
1.009 UNTIL (MEM <= 0.424)


When one of the two fields mentioned in this article is units-only, the other must contain a value. Only one value can be adjusted in this manner at one time.

Have more questions? Submit a request


  • Avatar
    david morgan

    Outstanding, Michael! Thank you.

    Comment actions Permalink

Please sign in to leave a comment.