
Section 4: Introduction to SCPI
Series 2230G Triple-Channel Power Supplies User's Manual
4-10
2230G-900-01 Rev. A / June 2018
Message exchange protocol
The following items summarize the message exchange protocol:
•
You must always tell the Series 2230G what to send to the computer.
The following steps must always be performed to send information from the instrument to a
computer:
1. Send the appropriate query commands in a program message.
2. Address the Series 2230G to talk.
•
The complete response message must be received by the computer before another program
message can be sent to the Series 2230G.
SCPI command completion
SCPI commands sent to the power supply are processed either sequentially or in parallel. Sequential
commands finish execution before a subsequent command begins. Parallel commands allow other
commands to begin executing while the parallel command is still executing. Commands that affect
trigger actions are among the parallel commands.
The
*WAI
,
*OPC?
, and
*OPC
common commands provide different ways of indicating when all
transmitted commands, including any parallel ones, have completed their operations. Some practical
considerations for using these commands are:
•
*WAI
: This command prevents the power supply from processing subsequent commands until all
pending operations are completed.
•
*OPC?
: This command places a 1 in the output queue when all pending operations have
completed. Because it requires your program to read the returned value before executing the next
program statement, the
*OPC?
command can be used to cause the controller to wait for
commands to complete before proceeding with its program.
•
*OPC
: This sets the operation complete (OPC) status bit when all pending operations have
completed. Since your program can read this status bit on an interrupt basis, the
*OPC
command
allows subsequent commands to be executed.
The trigger system must be in the idle state for the status OPC bit to be true; OPC is false whenever
the trigger system is in the initiated state.
Using device clear
You can send a device clear command at any time to abort a SCPI command that may be causing
the GPIB interface to become responsive. The status registers, error queue, and all configuration
states are left unchanged when a device clear message is received. Device clear performs the
following actions:
•
Clears the input and output buffers of the power supply.
•
Prepares the power supply to accept a new command string.