Remote Control Basics > SCPI Command Structure > SCPI Parameters
SCPI Parameters

Many commands are supplemented by a parameter or a list of parameters. The parameters must be separated from the header by a "white space" (ASCII code 0 to 9, 11 to 32 decimal, e.g. blank). Allowed parameters are:

  • Numeric values
  • Special numeric values
  • Boolean parameters
  • Text
  • Character strings
  • Block data

The parameters required for each command and the allowed range of values are specified in the command description.

Numeric values

Numeric values can be entered in any form, i.e. with sign, decimal point and exponent. Values exceeding the resolution of the instrument are rounded up or down. The mantissa may comprise up to 255 characters, the exponent must lie inside the value range -32000 to 32000. The exponent is introduced by an "E" or "e". Entry of the exponent alone is not allowed. In the case of physical quantities, the unit can be entered. Allowed unit prefixes are G (giga), MA (mega), MOHM and MHZ are also allowed), K (kilo), M (milli), U (micro) and N (nano). If the unit is missing, the basic unit is used.

Example:SENS:FREQ:STOP 1.5GHz = SENS:FREQ:STOP 1.5E9

Units

For physical quantities, the unit can be entered. Allowed unit prefixes are:

  • G (giga)
  • MA (mega), MOHM, MHZ
  • K (kilo)
  • M (milli)
  • U (micro)
  • N (nano)

If the unit is missing, the basic unit is used.

Example: 

SENSe:FREQ:STOP 1.5GHz = SENSe:FREQ:STOP 1.5E9

Some settings allow relative values to be stated in percent. According to SCPI, this unit is represented by the PCT string.

Example: 

HCOP:PAGE:SCAL 90PCT

Special numeric values

The texts listed below are interpreted as special numeric values. In the case of a query, the numeric value is provided.

  • MIN/MAX
    MINimum and MAXimum denote the minimum and maximum value.
  • DEF
    DEFault denotes a preset value which has been stored in the EPROM. This value conforms to the default setting, as it is called by the *RST command.
  • UP/DOWN
    UP, DOWN increases or reduces the numeric value by one step. The step width can be specified via an allocated step command for each parameter which can be set via UP, DOWN.
  • INF/NINF
    INFinity, Negative INFinity (NINF) represent the numeric values 9.9E37 or -9.9E37, respectively. INF and NINF are only sent as instrument responses.
  • NAN
    Not A Number (NAN) represents the value 9.91E37. NAN is only sent as a instrument response. This value is not defined. Possible causes are the division of zero by zero, the subtraction of infinite from infinite and the representation of missing values.
Example: 

Setting command: SENSe:LIST:FREQ MAXimum

Query: SENS:LIST:FREQ?, Response: 3.5E9

Queries for special numeric values

The numeric values associated to MAXimum/MINimum/DEFault can be queried by adding the corresponding mnemonics to the command. They must be entered following the quotation mark.

Example: SENSe:LIST:FREQ? MAXimum

Returns the maximum numeric value as a result.

Boolean Parameters

Boolean parameters represent two states. The "ON" state (logically true) is represented by "ON" or a numeric value 1. The "OFF" state (logically untrue) is represented by "OFF" or the numeric value 0. The numeric values are provided as the response for a query.

Example: 

Setting command: HCOPy:DEV:COL ON

Query: HCOPy:DEV:COL?

Response: 1

Text parameters

Text parameters observe the syntactic rules for mnemonics, i.e. they can be entered using a short or long form. Like any parameter, they have to be separated from the header by a white space. In the case of a query, the short form of the text is provided.

Example: 

Setting command: HCOPy:PAGE:ORIentation LANDscape

Query: HCOP:PAGE:ORI?

Response: LAND

Character strings

Strings must always be entered in quotation marks (' or ").

Example: 

HCOP:ITEM:LABel "Test1" or HCOP:ITEM:LABel 'Test1'

Block data

Block data is a format which is suitable for the transmission of large amounts of data. A command using a block data parameter has the following structure:

Example: 

FORMat:READings:DATA #45168xxxxxxxx

The ASCII character # introduces the data block. The next number indicates how many of the following digits describe the length of the data block. In the example the 4 following digits indicate the length to be 5168 bytes. The data bytes follow. During the transmission of these data bytes all end or other control signs are ignored until all bytes are transmitted.

#0 specifies a data block of indefinite length. The use of the indefinite format requires a NL^END message to terminate the data block. This format is useful when the length of the transmission is not known or if speed or other considerations prevent segmentation of the data into blocks of definite length.

 


Imprint | Statement of Privacy | Terms & Conditions© 2016 ROHDE & SCHWARZ