
14
HAMEG Instruments GmbH • Industriestr. 6 • D-63533 Mainhausen • Deutschland
Subject to change without notice
Tel.: +49 (0) 6182 800 0 • Fax: +49 (0) 6182 800 100 • E-Mail: [email protected]
Geschäftsführer: Dipl.-Ing. Holger Asmussen, Dipl.-Ing. Andre Vander Stichelen • AG Offenbach am Main HRB 41200
1
1
HAMEG Instruments GmbH • Industriestraße 6 • D-63533 Mainhausen
Subject to change without notice
Tel.: +49 (0) 6182 800 0 • Fax: +49 (0) 6182 800 100 • E-Mail: [email protected]
Geschäftsführer: Dipl.-Ing. Holger Asmussen • AG Offenbach am Main HRB 41200
Firmware Version: 01.020 and later
English
S C P I P r o g r a m m e r s M a n u a l
H M S S e r i e s
1
HAMEG Instruments GmbH • Industriestraße 6 • D-63533 Mainhausen
Subject to change without notice
Tel.: +49 (0) 6182 800 0 • Fax: +49 (0) 6182 800 100 • E-Mail: [email protected]
Geschäftsführer: Dipl.-Ing. Holger Asmussen • AG Offenbach am Main HRB 41200
Firmware Version: 01.020 and later
English
S C P I P r o g r a m m e r s M a n u a l
H M S S e r i e s
HMO352x, HMO2524
HMO72x ... HMO202x
Firmware Version: 03.00 and later
English
:ACQuire
:CHAN1OFFSet
:DISPlay
:HCOPy
*ESR?
*OPC?
:LOGic:SIZE
:MEASure
:POD1
:SYSTem
*SRE?
S C P I P r o g r a m m e r s M a n u a l
H M O S e r i e s
SCPI Commands HMC8012
*OPC? with short timeout
1. Send the overlapped command without *OPC, *OPC? or *WAI
2. Poll the operation complete state periodically (by means of a timer) using the sequence:
‹
short timeout
›
; *OPC?
3. A return value (LSB) of 1 indicates that the overlapped command has finished. In case of a timeout, the operation is
ongoing.
4. Reset timeout to former value
5. Clear the error queue with
SYStem:ERRor?
to remove the „-410, Query interrupted“ entries.
Using several threads in the controller application
As an alternative, provided the programming environment of the controller application supports threads, separate
threads can be used for the application GUI and for controlling the instrument(s) via SCPI.
A thread waiting for a *OPC? thus will not block the GUI or the communication with other instruments.
1.6
Status Reporting System
The status reporting system stores all information on the current operating state of the instrument, and on errors
which have occurred. This information is stored in the status registers and in the error queue. Both can be queried via
GPIB bus or LAN interface (
STATus
... commands).
1.6.1 Structure of a SCPI Status Register
Each standard SCPI register consists of 5 parts. Each part has a width of 16 bits and has different functions. The
individual bits are independent of each other, i.e. each hardware status is assigned a bit number which is valid for all
five parts. Bit 15 (the most significant bit) is set to zero for all parts. Thus the contents of the register parts can be
processed by the controller as positive integers.
Description of the five status register parts (please refer to page 20)
The five parts of a SCPI register have different properties and functions:
– CONDition
The
CONDition
part is written into directly by the hardware or the sum bit of the next lower register. Its contents reflect
the current instrument status. This register part can only be read, but not written into or cleared. Its contents are not
affected by reading.
– EVENt
The
EVENt
part indicates whether an event has occurred since the last reading, it is the „memory“ of the condition part.
It only indicates events passed on by the transition filters. It is permanently updated by the instrument. This part can
only be read by the user. Reading the register clears it. This part is often equated with the entire register.
– ENABle
The
ENABle
part determines whether the associated
EVENt
bit contributes to the sum bit (see below). Each bit of the
EVENt part is „ANDed“ with the associated ENABle bit (symbol ‚&‘). The results of all logical operations of this part are
passed on to the sum bit via an „OR“ function (symbol ‚+‘).
ENABle
bit = 0: the associated
EVENt
bit does not contribute to the sum bit
ENABle
bit = 1: if the associated
EVENt
bit
is „1“, the sum bit is set to „1“ as well. This part can be written into and read by the user as required. Its contents are
not affected by reading.
Sum bit
The sum bit is obtained from the
EVENt
and
ENABle
part for each register. The result is then entered into a bit of the
CONDition
part of the higher-order register.
The instrument automatically generates the sum bit for each register. Thus an event can lead to a service request
throughout all levels of the hierarchy.