Fact 6. Learn Common Child Commands

As seen in the SCPI Command Tree Viewer, most commands have lower-level commands (children). Some child commands are unique and documented in the Interactive SCPI Command Tree. Other child commands are repeated under many commands, are not shown in the Interactive SCPI Command Tree, and are known as common child commands.

For example, FlexPLL's :DISPlay:GRAPh:X:SPAN command has the following common child commands:

				:DISPlay:GRAPh:X:SPAN:DEFault
				:DISPlay:GRAPh:X:SPAN:MAXimum
				:DISPlay:GRAPh:X:SPAN:MINimum
			:DISPlay:GRAPh:X:SPAN:STEP

 

Commands with ON/OFF Parameter Arguments

Some commands turn on or off a setting with ON and OFF parameter arguments. For example, the :ACQuire:AVERaging ON command, which turns waveform averaging on or off. The available child command for on off settings is:

:TOGGle
Toggles the setting which turns the display on if it is currently off. Or, if the display is on, turns the display off. For example, :CHANnel:DISPlay:TOGGle.

Commands with Parameter Arguments

An example of a command with parameter arguments is the :CHANnel:COLor command, which has the arguments TCOLor1 through TCOLor16. These commands generally have the following common child commands:

:DEFault
Sets the setting to the corresponding default argument. Use the query form of this common child command to return the default argument.
:NEXT
Sets the setting to the corresponding next argument. To learn the order of the arguments, use the VSET? common query described below. There is no query form of this common child command.
:PREVious
Sets the setting to the corresponding previous argument. To learn the order of the arguments, use the VSET? common query described below. There is no query form of this common child command.
:VSET?
Returns a list of all valid arguments.

 

Commands with Numerical Arguments

An example of a command with parameter arguments is the :DISPlay:GRAPh:X:SPAN command. These commands generally have the following common child commands:

:DEFault
Sets the setting to the default value. Use the query form of this common child command to return the default value.
:MINimum
Sets the setting to its minimum possible value.
:MAXimum
Sets the setting to its maximum possible value.
:STEP
This common child command steps (increases or decreases) the current setting. An optional integer argument can be used to specify the direction (increase or decrease value) and size of the change from the current value. Generally, positive integers decrease a value and negative integer increase a value, but confirm before using as these directions can be swapped for some commands. Depending on the setting, the value of the integer either selects either a fixed change from the current value or a change according to a 1, 2, 5 sequence. For fixed changes, each time that you sent the child command :STEP -1, the change would be the same. For example, a 1ns setting would change to 2 ns, 3 ns, and so forth with each command. For sequence changes, if a time span is set to 1 ns, sending the child command :STEP -1 would change the span to 2 ns. Sending the command a second time would set the span to 5 ns, and a third time to 10 ns and so forth.

 

Examples

For example, the :MEASure:RESPonse:BANDwidth querry has the following child commands:

				:MEASure:RESPonse:BANDwidth:COUNt?
				:MEASure:RESPonse:BANDwidth:MAXimum?
				:MEASure:RESPonse:BANDwidth:MEAN?
				:MEASure:RESPonse:BANDwidth:MINimum?
				:MEASure:RESPonse:BANDwidth:SDEViation?
				:MEASure:RESPonse:BANDwidth:STATus?
				:MEASure:RESPonse:BANDwidth:STATus:REASon?
			

You can also append the :STATus? and :STATus:REASon? child queries to the common statistical queries to determine the validity of those measurements. For example,

				:MEASure:RESPonse:BANDwidth:MAXimum:STATus?
				:MEASure:RESPonse:BANDwidth:MAXimum:STATus:REASon?
			

With Averaging Applied

If averaging is turned on (:ACQure:AVERaging), the Current, Mean, Minimum, Maximum, and standard deviation (Std Dev) measurements are an average of all previous response data acquisitions and are not available until the terminal acquisition Count has been reached (:ACQuire:AVERaging:COUNt). For example, in 16-count smoothing, the mean measurement is reported after the first 16 acquisitions have completed and the displayed Count value is then incremented from 0 to 1. Each subsequent acquisition increments the Count value.