Rogramming, Ommand, Ypes and – BNC 577 User Manual
Page 28: Ormat, Line termination, Ieee 488.2 common command format, Scpi command format, 5 programming command types and format

Model 577 Operating Manual
22
8.5 Programming Command Types and Format
The 577 Pulse Generator uses two types of programming commands: IEEE 488.2 Common Commands and
Standard Commands for Programmable Instruments (SCPI). The format is the same for all interfaces.
HyperTerminal (in Windows) or any other generic terminal program may be used to interactively test the
commands using the RS232 interface. The format of each type is described in the following sections
8.5.1
Line Termination
The pulse generator uses text-style line terminations. When a command is sent to the unit, the firmware is
programmed to read characters from a communication port until it reads the line termination sequence.
The command string is parsed and executed after reading these characters. These characters are the
“carriage
return” and “linefeed” (CR+LF). They are ASCII character set values 0D and 0A (13 and 10 in decimal, hex
0x0D0A or ‘\r\n’) respectively. All command strings need to have the appropriate characters appended.
When the pulse generator responds to a command, whether it is a query or a parameter change, it also appends
its return strings with these characters. Coded applications could use this behavior to know when to stop reading
from the unit. However, if the “echo” parameter is enabled, there will be two sets of line terminators, one following
the echoed command string, and one following the pulse generator’s response.
Note: The pulse generator will echo commands on the DB9 serial and USB ports only.
The pulse generator responds to every communication string. If the communication string is a query, the unit
responds with the queried response (or error code) followed by the line terminators. If the communication string is
a parameter change, the response is “ok” (or error code) followed by the line terminators. For this reason, it is not
recommended that multiple commands be stacked together into single strings as is common with some other
types of instruments. It is recommended that the coded application send a single command in a string and follow
immediately by reading the response from the unit. Repeat this sequence for multiple commands.
8.5.2
IEEE 488.2 Common Command Format
The IEEE 488.2 Common Commands control and manage generic system functions such as Reset, configuration
storage and Identification. Common commands always begin with the asterisk (*) character and may include
parameters. The parameters are separated from the command pneumonic by a space character. For Example:
*RST
*RCL 1
*IDN?
8.5.3
SCPI Command Format
The commands are shown as a mixture of upper and lower case letters. The upper case letters indicate the
minimum essential characters and an abbreviated spelling for the command. You may send either the
abbreviated version or the entire keyword. Upper and/or lower case characters are acceptable.
For example, if the command keyword is given as POLarity, then POL and POLARITY are both acceptable forms;
truncated forms such as POLAR will generate an error; polarity, pol, and PolAriTy are all acceptable as the pulse
generator is not case sensitive.
SCPI commands control and set instrument specific functions such as setting the Pulse Width, Delay and Period.
SCPI commands have a hierarchical structure composed of functional elements that include a header or
keywords separated with a colon followed by data parameters, and terminators. For example:
SCPI Format
:PULSE1:STATE ON
:PULSe1:WIDTh 0.000120