PEL-60-60-10 - Physical Instruments
PEL-60-60-10 - Physical Instruments
PEL-60-60-10 - Physical Instruments
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
OVER VIEW SCPI LANGUAGE<br />
The SCPI language uses a hierarchical structure in its programming syntax similar to an inverted tree. The<br />
command is organized with root level commands positioned at the top, with multiple sub commands below<br />
each root-level command. For example, VOLTage, which is a branch of SOURce, is a command mnemonic<br />
and it forms a subtree of its own. VOLTage has three sub-level commands: LEVel, SLEW, TLEVel. At the<br />
end of a sub-level command, you can attach a parameter, a question mark (for query), a colon (command<br />
mnemonics separator), a semicolon (for multiple commands in a message) or an end of line terminator. To<br />
execute a sub-level command, you must specify the complete path from root-level. Each command statement<br />
is simply I/O ASCII data strings incorporated within high-level programming language (GW-BASIC, HP<br />
BASIC, Quick Basic, Pascal, etc.).<br />
Command Mnemonics<br />
Data<br />
Message Terminator<br />
Query Indicator<br />
VOLT:LEV <strong>10</strong>;TLEV 15;:RES:TLEV? <br />
Command Statement<br />
Root Specifier<br />
Command Statement Separator<br />
Command Message<br />
Syntax Overview<br />
Use of the Colon (:)<br />
A colon is used to separate command mnemonics. It indicates a move down in branch level of the<br />
command tree. The command follows a colon is a sub command of the command immediate before the<br />
colon. When colon precedes the first command mnemonic of a message unit, it becomes root specifier.<br />
Its action places the parser (decoder) at the root of the command tree. Parser can only travel downward<br />
the command tree. If another command at different branch needs to be executed, a root specifier (colon)<br />
is required to place parser at origin and a complete path from root level should also be defined.<br />
Use of the Semicolon (;)<br />
A semicolon is used to separate two command statements with the same command message string. The<br />
semicolon does not change location of the parser in the command tree. Only command statements that<br />
are in the current path of the first command statement can be combined to form a command message.<br />
Use of the Space ( )<br />
A white space is used to separate a parameter (data) from a command mnemonic. When a command<br />
statement includes parameter, data always follows the last keyword of a command.<br />
Use of the Comma (,)<br />
A comma is used to separate adjacent parameters if a command requires more than one parameter.<br />
Use of the Query (?)<br />
A query command is used to instruct the instrument to send a response message. Queries return either<br />
measured values or internal instrument setting. When a keyword is followed by a question mark, it<br />
becomes a query. The ? follows the last keyword of a command statement. You should read back the<br />
result of first query before you send out another query or command. Otherwise, returned data will be<br />
lost.<br />
Common Commands:<br />
Commands starting with a * and three-letter mnemonic are called common commands. They are<br />
generally not related to specific device operation but to perform the identical function for all instruments<br />
that are compliant with the IEEE-488.2 interface standard. Common commands can be mixed in with<br />
48