51
|
www.lakeshore.com
If multiple commands are provided in a given message, the teslameter will process
the commands in the order in which they were received. Subsequently, if multiple
queries are included in chained message, the teslameter will respond to the queries in
the order in which they were received.
As an example:
SENS:FIEL:RANG:AUTO 1;:UNIT:FIEL GAUS;:FETC:FIEL:DC? X;*OPC?
This command sets autorange to on, sets the field units to Gauss, requests a DC field
measurement on the X channel, and then waits for an operation complete query
response. The result that is returned might look like the following:
0.140850828588;1
4.2.6.1 Commands Within the Same Subsystem
Referring to the subsystem tree shown in section 4.2.1.2, if multiple commands
within the same level of the SCPI tree are sent in the same chained message, the colon
does not need to be included in order to reset the SCPI header path. An example of this
is the RANGe and MODE headers within the SENSe subsystem.
As an example:
SENS:FIEL:RANG 0;MODE DC
This command sets the instrument to the smallest range, which also turns off auto-
ranging, and then sets the mode to DC. Both of these commands are in the Sense sub-
system.
4.2.7 Terminators
All data in a given SCPI message is encoded in the American Standard Code for Infor-
mation Interchange (ASCII) format. A special ASCII character, the line feed (hex 0A,
decimal 10), is required by the instrument to know where the SCPI message ends. The
instrument also allows an optional carriage return (hex 0D, decimal 13) to precede
the line feed.
4.2.8 Message Flow
Control
It is important to remember that the user program is in charge of SCPI communica-
tion at all times, independent of the communications bus used to control the instru-
ment. The instrument cannot initiate communication, determine which device
should be transmitting at a given time, or guarantee timing between messages. All of
this is the responsibility of the user program.
Most commands sent to the F71/F41 teslameter will execute within 100 ms of the
last character being transmitted. However, the SCPI command protocol does not
specify that an instrument return an acknowledge message when a given command
is finished executing. Because of this, a user program could potentially flood and
overload the instruments SCPI buffer.
Therefore, it is highly recommended to append the Operation Complete Query
(*OPC?) to the end of any given command string. The operation complete query is a
SCPI mandated IEEE 488.2 query that will cause the instrument to send a “1” back to
the user program when all commands have been processed. This scheme closes the
timing loop and provides the proper balance for a user program to maximize com-
mand throughput yet not risk overrunning the instrument SCPI buffer. *OPC? can be
appended onto a single command or a chained SCPI message.
As an example:
SENS:FIEL:MODE DC;AVER:COUN 10;:UNIT:FIEL TESL;*OPC?
This command sets the field mode to DC, sets the averaging window count to 10
(100 ms), sets the field units to Tesla, and then waits for an operation complete query
response. The result that is returned is:
1