Standard Commands for Programmable Instruments![]() ![]() The Standard Commands for Programmable Instruments (SCPI; often pronounced "skippy") defines a standard for syntax and commands to use in controlling programmable test and measurement devices, such as automatic test equipment and electronic test equipment.[3] OverviewSCPI was defined as an additional layer on top of the IEEE 488.2-1987 specification "Standard Codes, Formats, Protocols, and Common Commands".[4] The standard specifies a common syntax, command structure, and data formats, to be used with all instruments. It introduced generic commands (such as The physical hardware communications link (physical layer) is not defined by SCPI.[5] While it was originally created for the IEEE-488.1 (GPIB) bus,[5] SCPI can also be used with RS-232, RS-422, RS-485, USB, Ethernet, VXIbus, HiSLIP, etc.[5] SCPI commands are ASCII textual strings,[5] which are sent to the instrument over the physical layer.[5] Commands are a series of one or more keywords, many of which take parameters. In the specification, keywords are written The SCPI specification consists of four volumes: Volume 1: "Syntax and Style", Volume 2: "Command Reference", Volume 3: "Data Interchange Format", Volume 4: "Instrument Classes". The specification was originally released as non-free printed manuals, then later as one free PDF file that includes all four volumes.[3] SCPI historyFirst released in 1990,[3][6] SCPI originated as an additional layer for IEEE-488. IEEE-488.1 specified the physical and electrical bus, and IEEE-488.2 specified protocol and data format, but neither specified instrument commands. Different manufacturers, and even different models, of the same type of instrument would use different command sets. SCPI created a standard which could be common across all manufacturers and models. It requires use of the IEEE-488.2 data formats, but does not mandate the IEEE-488.1 bus.[7] In 2002-2003, the SCPI Consortium voted to become part of the IVI Foundation (Interchangeable Virtual Instruments).[7] IEEE 488.2 historyIn 1987, IEEE introduced IEEE 488.2-1987 specification "Standard Codes, Formats, Protocols, and Common Commands", it was later revised in 1992 as IEEE 488.2-1992.[8] While IEEE 488.2 provided a device-independent syntax, there was still no standard for instrument-specific commands. Commands to control the same class of instrument, e.g., multimeters, would vary between manufacturers and even models. The United States Air Force,[9] and later Hewlett-Packard, recognized this problem. In 1989, HP developed their TML language[10] which was the forerunner to SCPI. The IEC developed their own standards in parallel with the IEEE, with IEC 60625-2-1993 (IEC 625). In 2004, the IEEE and IEC combined their respective standards into a "dual logo" IEEE/IEC standard IEC 60488-2-2004, Part 2: Codes, Formats, Protocols and Common Commands,[11] replaces IEEE 488.2-1992 and IEC 60625-2-1993.[12] Command syntaxSCPI commands to an instrument may either perform a set operation (e.g. switching a power supply on) or a query operation (e.g. reading a voltage). Queries are issued to an instrument by appending a question-mark to the end of a command. Some commands can be used for both setting and querying an instrument. For example, the data-acquisition mode of an instrument could be set by using the Similar commands are grouped into a hierarchy or "tree" structure.[3] For example, any instruction to read a measurement from an instrument will begin with " :MEASure :VOLTage :DC? :AC? :CURRent :DC? :AC? ... CaseThough the command syntax above shows commands in mixed case, SCPI is not case sensitive.
Abbreviating commandsThe command syntax shows some characters in a mixture of upper and lower case. Abbreviating the command to only sending the upper case has the same meaning as sending the upper and lower case command.[3]
The only valid commands are the short form and long form of each command, all other subset variations are invalid.
Concatenating commandsMultiple commands can be issued to an instrument in a single string. They are made of simple commands separated by a semicolon character (
Simple commands which start with a colon ( :SOURce:FREQuency:STARt 100;STOP 200 is a shorthand for the message :SOURce:FREQuency:STARt 100;:SOURce:FREQuency:STOP 200 ArgumentsSome commands accept or require one or more additional arguments. Arguments are given after the command, and are separated from the command using a space.[11] For example, the command to set the trigger mode of an instrument to "normal" may be given as " Integer argumentsFor commands that accept integer arguments, values may be specified in multiple computer number formats: decimal, hexadecimal, octal, binary. The last three formats are defined by IEEE 488.2,[11] which SCPI is based upon.[3] Decimal numbers (radix 10) aren't prefixed, hexadecimal numbers (radix 16) are prefixed with The following argument examples are numerically equivalent:
488.2 commandsSince SCPI was defined as an additional layer on top of the IEEE 488.2 specification, a SCPI compliant device should recognize various 488.2 commands too.[3] These commands might also be known unofficially as asterisk commands (or star commands), because they all start with the asterisk According to section 4.1.1 of Volume 1 of SCPI, all SCPI devices must implement the following 488.2 commands.[3] In the real world some low-end devices may only support a subset of these 488.2 commands, or may even accept the commands but not perform any operation. A user should check the official programmers manual for each device before assuming all of these 488.2 commands are supported.
According to section 4.1.2 of Volume 1 of SCPI, all other 488.2 commands not listed above are considered optional and not required by SCPI.[3]
See also
References
External linksWikimedia Commons has media related to Standard Commands for Programmable Instruments.
Programming Manual Examples
|
Portal di Ensiklopedia Dunia