Remote interface reference – American Magnetics 286 Multi-Sensor Liquid Level Instrument (CE-Marked) User Manual
Page 75

61
Remote Interface Reference
SCPI Introduction
5.2 Programming Overview
The Model 286 conforms to the SCPI (Standard Commands for
Programmable Instruments) IEEE standard. The SCPI standard is an
ASCII-based specification designed to provide a consistent command
structure for instruments from various manufacturers.
The Model 286 also implements a status system for monitoring the state of
the Model 286 through the Standard Event, Alarm, and Status Byte
registers.
5.2.1
SCPI Language Introduction
SCPI commands conform to a tree structure where commands are grouped
according to common keywords. For example, commands associated with
an alarm setting begin with the keyword
ALARm
. The keywords are shown
in upper case and lower case to indicate acceptable abbreviations. For the
example keyword
ALARm
, the user may send either the abbreviated form of
ALAR
, or the entire keyword
ALARM
. Any other form of the keyword is
illegal and will generate an error.
Some commands also require multiple keywords to traverse the tree
structure of the entire Model 286 command set. For example, commands
associated with the channel 1 alarm register require the prefix of
CH1:STATus:ALARm
. Note that a colon (
:
) separates the keywords. No
spaces are allowed before or after the colon. Values must be separated
from the command keyword(s) by at least one space.
5.2.2
SCPI Status System
The Model 286 status system reports various conditions of the instrument
in three register groups shown in Figure 5-1. The register groups consist of
a condition and/or event register, and an enable register which controls the
actions of specific bits within the condition or event registers.
A condition register continuously monitors the state of the instrument.
The bits of a condition register are updated in real time. A condition
register is read-only and is not cleared when you read the register. A query
of a condition register returns a decimal value in the appropriate output
buffer which corresponds to the binary-weighted sum of all bits set in the
register.
An event register latches various events. An event register is not buffered,
therefore once a bit is set, further occurrences of that event are ignored.
Once a bit is set in an event register, the bit remains set until the register
is read (
*ESR?
) or a
*CLS
(clear status) command is issued. A query of an
event register returns a decimal value in the appropriate output buffer
which corresponds to the binary-weighted sum of all bits set in the
register.