0% found this document useful (0 votes)
195 views19 pages

Hameg: Description of Interface Commands

The document describes interface commands for HAMEG oscilloscopes. It explains that a 9-conductor serial interface cable is required to connect the oscilloscope to an external instrument. It also details how to set the baud rate by sending specific characters after powering on, and lists the available baud rates. The document provides information on data transmission formats and defines characters used in commands. It includes tables listing interrogation and set commands along with their parameters and acknowledgment codes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
195 views19 pages

Hameg: Description of Interface Commands

The document describes interface commands for HAMEG oscilloscopes. It explains that a 9-conductor serial interface cable is required to connect the oscilloscope to an external instrument. It also details how to set the baud rate by sending specific characters after powering on, and lists the available baud rates. The document provides information on data transmission formats and defines characters used in commands. It includes tables listing interrogation and set commands along with their parameters and acknowledgment codes.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

HAMEG

Instruments

Description of interface commands

Date: 15th September 2003

Valid for oscilloscopes:


HM305-2, HM404, HM404-2, HM407, HM1004-2, HM1004-2A, HM1004-3, HM1505-2, HM1507,
HM1507-2, HM1507-3, HM2005.

RS-232 cable

A 9 conductor serial interface cable (1:1 connection, i.e. without crossed pin connections ) will be required to
connect the oscilloscope to an external instrument.

Setting the baud rate

The RS 232 interface must be initialized before use. This is effected by the first transmission of SPACE CR
(20 hex., 0D hex.) after POWER UP (switching on). This will automatically set the baud rate. The following
baud rates will be recognized:

110 Baud 4800 Baud


150 Baud 9600 Baud
300 Baud 19200 Baud
600 Baud 38400 Baud (1.19
1200 Baud 56700 Baud (1.19
2400 Baud 115200 Baud (1.19

Data transmission format: No parity, data length 8 bits,


2 stop bits, RTS/CTS handshake.

If the PC has a COM interface with FIFO buffer, then the maximum depth of the send buffer must be set to
8 bytes.
The baud rate set will remain operative until POWER DOWN (switch off) or until the remote mode is disabled
with the command ‘RM0’, or until the pushbutton LOCAL (AUTOSET button) is activated, assuming this is
not inhibited (LK=0).
Once the remote mode is disabled, the data transmission can be only restored by again sending SPACE CR.
If the oscilloscope does not recognize SPACE CR as first characters, or if Low-level exists on the RTS line
longer than for about 2 seconds, then the oscilloscope exits the remote mode and sets the TxD Low for about
0.3s and thus generates a frame error.
The oscilloscope answers with a RETURNCODE (0 CR LF) if it has recognized SPACE CR and has set the
baud rate.
The scope sends ‘ESC RMLK=0’ (ESC=1B hex.) and exits the Remote state if the button LOCAL is activated
in Remote-ON state. The time between the reception of the RETURNCODE Remote-OFF and Remote-ON must
be at least

tmin= 2*(1/Baudrate) + 60µs

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Data transmission

After successfully setting the baud rate, the oscilloscope is in Remote state and is ready to accept commands.
The commands can be in capital or lower case. The commands can be divided into two basic groups:

Interrogation of parameters

This group of commands is distinguished by a question mark at the end of the command. When such a command
is transmitted to the scope, it answers by repeating the syntax followed by a colon and the parameters asked for.
These can be binary or ASCII data depending on the command. The number of data bytes to be received is
dependent on the command and can be seen from the command description.

Example: Command to the scope: VERS?


Answer: VERS:FC1.01 DG1.02

Set parameter

The parameters of the scope can be influenced with this command. Here commands with and without parameter
can be differentiated.

Example: Command to the scope: LK=1


Answer: RETURNCODE

Example: Command to the scope: RES


Answer: RETURNCODE

All commands are answered either with parameters or with a RETURNCODE in ASCII format (see description
of commands). One must wait for all parameters or RETURNCODE for the previous command before a new
command can be sent to the scope.
WORD-parameters require first the low byte and then the high byte. The setting of the scope is effected over the
instrument data field (Device Data Field DDF) as binary array. Each byte of this data field can also be accessed
by individual commands.

The following tables show the build up of the instrument data field and the corresponding individual
commands.

Definition of characters for the commands

Interrogation ? Interrogates for parameters


Assign = Set parameter
State : Gives current parameter
Binary data b Data field is binary data of 1 byte
ASCII data a Data field is ASCII data of 1 Byte
WORD (2 bytes) w Data field consists of 2 bytes (low and high bytes)
ASCII data ARRAY Data field is ASCII data
Binary data array Data field is binary data
Terminating character CR LF Carriage return and/or Line feed
RETURNCODE R ASCII parameter
Parameter x x stands for A or B
Parameter z z stands for 1 or 2

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Table of commands:

Command: Acknowledgment Description


PC -> Scope Scope -> PC
AUTOSET (R CR LF) AUTO SET function will be carried out

AVRNM? (3 AVRNM:(b) AVERAGE NUMBER OF ACQUISITIONS


Delivers the number of acquisitions carried out for averaging
b = 01 hex.: 2^1 = 2 acquisitions
b = 02 hex.: 2^2 = 4 acquisitions
...
b = 09 hex.: 2^9 = 512 acquisitions

AVRNM=(b) (3 (R CR LF) AVERAGE NUMBER OF ACQUISITIONS


Sets the number of acquisitions to be carried out for averaging

AVRNMSW? (3 (5 AVRQTSW:(a) AVERAGE NUMBER OF ACQUISITIONS SWITCH


Delivers the function of the Store Up/Down buttons
a = 0: Store Up/Down buttons change Store Mode
a = 1: Store Up/Down buttons change Average Number of
Acquisitions

AVRNMSW=(a) (R CR LF) AVERAGE NUMBER OF ACQUISITIONS


(3 (5
Sets Average Number of Acquisition Switch

BELL=(a) (R CR LF) Tone output


a = 0: Buttons OK tone
a = 1: Buttons ERROR tone
a = 2: ERROR (longer tone)
a = 3: 2 short tones
a = 4: 3 short tones
a = 5: 6 short tones

CH<z>? CH<z>:(b) Delivers CH1/2 settings


see table of instrument fields DDF

CH<z>=(b) (R CR LF) Sets CH1/2 settings


see table of instrument fields DDF

CH<z>VAR? CH<z>VAR:(b) Delivers CH1/2 VARI-GAIN setting


b = FF hex.: CH<z> (1 or 2) calibrated

CH<z>VAR=(b) (R CR LF) Sets CH1/2 VARI-GAIN setting

CTRLBP? CTRLBP:(a) Delivers CONTROL BEEP setting


a = 0: Off (key activation without control tone)
a = 1: On

CTRLBP=(a) (R CR LF) Sets CONTROL BEEP setting

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
CURCFG? CURCFG: (array) Delivers CURSOR CONFIGURATION
(3.24 (3
Activates and deactivates single cursor functions.
(Bit = 1 activates the function)

function readout dimension

1. Byte: D0 frequency f Hz
D1 delta t ∆t s
D2 time cursor CX s
D3 amplitude cursor CY V
D4 amplitude difference ∆Y V
D5 amplitude maximum Y? V
D6 amplitude minimum Y? V
D7 amplitude peak to peak Ypp V

2. Byte: D0 dc voltage Y= V
D1 ac voltage Y˜ V
D2 rms value Y V
D3 – D7 reserved

3. to 6. Byte: reserved
CURCFG= (array) (R CR LF) Sets CURSOR CONFIGURATION
(3.24 (3

CURMOD1? CURMOD1: Delivers CURSOR MODE1 and measuring values


(3.24 (3
(array)
function readout dimension

1. Byte: 01 frequency f Hz
02 delta t ∆t s
03 time cursor CX s
04 amplitude cursor CY V
05 amplitude difference ∆Y V
06 amplitude maximum Y? V
07 amplitude minimum Y? V
08 amplitude peak to peak Ypp V
09 dc voltage Y= V
0A ac voltage Y˜ V
__
0B rms value Y V
0C voltage CH1 ∆V1 V
0D voltage CH2 ∆V2 V

2. to 16. Byte: Measuring values in ASCII format.


The measuring value relates to the channel used as the trigger
source.
ASCII code for special characters:
01 hex : ˜ 13 hex : µ
05 hex : ∆ 14 hex : fill character
11 hex : ? 17 hex : Y
12 hex : ?
CURMOD1= (b) (R CR LF) Sets CURSOR MODE1
(3.24 (3
b : see CURMODE 1st byte

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
CURSET= (array) (R CR LF) Readout CURSOR SET
(3.09
Activates cursors and sets them for Vpp or period measurement
(depends on bit D10/12 in RODDF). In analog mode only Vpp is
available. The measurement relates to the signal used as the trigger
source.
1. Byte = 00 Cursors are set on the signal used for triggering.
01 to FF reserved

2. Byte = 01 Cursor mode RODDF bit D10/12 determines the


automatical cursor setting. In analog mode only Vpp is available.
02 to FF reserved
DCREF? DCREF: (a) Delivers DC REFERENCE display
(4.06
a = 0 : DC reference display disabled
a = 1 : DC reference display enabled
DCREF= (a) (R CR LF) Sets DC REFERENCE display
(4.06

DDF? DDF:(array) Delivers DEVICE DATA FIELD


see table of instrument fields
(4 bytes of commands + 14 bytes of parameters )

DDF=(array) (R CR LF) Sets new DEVICE DATA FIELD


see table of instrument fields DDF

DDF1? DDF1:(array) Delivers DEVICE DATA FIELD1


see table of instrument fields DDF1
(5 bytes of commands + 16 bytes of parameters. )

DDF1=(array) (R CR LF) Sets new DEVICE DATA FIELD1


see table of instrument fields DDF1

DELPOS? DELPOS:(w) Delivers DELAY POS.(12 Bit)


w = 000 hex.: Shortest DELAY time

DELPOS=(w) (R CR LF) Sets DELAY POS.(12 bit)

ERRBP? ERRBP:(a) Delivers ERROR BEEP setting


a = 0: Off (no error tone output)
a = 1: On (with error tone output)

ERRBP=(a) (R CR LF) Sets ERROR BEEP

ERRMSGE? ERRMSGE:(a) Delivers ERROR MESSAGE setting


a = 0: Off (Error messages are only sent to the interface)
a = 1: On (Error messages are displayed with Read out and also
sent to the interface)

ERRMSGE=(a) (R CR LF) Sets ERROR MESSAGE setting

FCCMD? (1.1 FCCMD:(a) FRONT CONTROLLER COMMAND


Informs whether the scope has been manually operated.
Will be reset after each interrogation..
a = 0: Scope has not been manually operated.
a = 1: Scope has been operated manually (in the mean time).
HLD<z>POS? (3 HLD<z>POS:(b) Delivers HOLD 1/2 POSITION
Y-offset carried out after HOLD referred to Store position.
b = 00 hex.: Position shifted maximum upwards.

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
HLD<z>POS=(b)(3 (R CR LF) Sets HOLD 1/2 POSITION

HOLDOFF? HOLDOFF:(b) Delivers HOLD OFF value


b = 00 hex.: Shortest Hold off time

HOLDOFF=(b) (R CR LF) Sets HOLD OFF value

HORMODE? HORMODE:(b) Delivers HORIZONTAL MODE setting


see table of instrument fields DDF

HORMODE=(b) (R CR LF) Sets HORIZONTAL MODE setting


see table of instrument fields DDF

HLDWFM? (3 HOLDWFM:(a) HOLD WAVE FORM


Delivers HOLD function setting in Store mode
a = 0: Off (HOLD switched off)
a = 1: On (HOLD switched on)

HLDWFM=(a) (3 (R CR LF) HOLD WAVE FORM


Sets HOLD setting

ID? ID: IDENTIFICATION (Hardware)


(ARRAY)(CR LF) Delivers instrument name and hardware identification bytes
(3 bytes of commands + 27 bytes of parameters)

INT<x>? INT<x>:(b) Delivers INTENS A/B (9 value


b = 00 hex.: Trace blank time base <x> (A or B(9)

INT<x>=(b) (R CR LF) Sets INTENS A/B (9 value

INTRO? INTRO:(b) Delivers INTENS READ OUT value


b = 00 hex.: Read out blanked

INTRO= (b) (R CR LF) Sets INTENS READ OUT value

LK? LK:(a) Delivers the function of LOCAL LOCK OUT key (AUTO SET)
a = 0: Locked
a = 1: Free (The Remote mode will be exited on activation of the
AUTOSET button and ‘RMLK=0’ will be sent to the
interface)

LK=(a) (R CR LF) Setting the LOCAL LOCK OUT function

MEANVAL? MEANVAL: (a) Delivers MEAN VALUE display


(4.06
a = 0 : mean value disabled
a = 1 : mean value enabled
MEANVAL = (a) (R CR LF) disables or enables the MEAN VALUE display
(4.06

PSINT? PSINT:(a) Delivers PULSE SWITCH INTENS


function of the rotary control: INTENS
a = 0: INT A (Intensity trace A)
a = 1: INT RO (Intensity Read out)
a = 2: INT B (Intensity trace B) (9

PSINT=(a) (R CR LF) Sets PULSE SWITCH INTENS


function of the rotary control: INTENS

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
PSY1POS? PSY1POS:(a) Delivers PULSE SWITCH Y 1 POSITION
function of the rotary control: Y-POS. I
a = 0: Y1 Position setting
a = 3: Y Position setting of time base B (Trace sep.) in
alternating time base mode (9

PSY1POS=(a) (R CR LF) Sets PULSE SWITCH Y 1 POSITION


(function of the rotary control: Y-POS. I)

PSY2POS? PSY2POS: Delivers PULSE SWITCH Y 2 POSITION


(a CR LF) function of the rotary control: Y-POS. II
a = 0: Y2 Position setting
PSY2POS=(a) (R CR LF) Sets PULSE SWITCH Y 2 POSITION
function of the rotary control: Y-POS. II

PSTB? PSTB:(a) Delivers PULSE SWITCH TB


function of the rotary control: TIME/DIV.
a = 0: COARSE (1-2-5 sequence)
a = 1: FINE (variable, depending on the time base mode A or B)

PSTB=(a) (R CR LF) Sets PULSE SWITCH TB


function of the rotary control: TIME/DIV.

PSCH<z>? PSCH<z>:(a) Delivers PULSE SWITCH CH1/2 function of the rotary control:
VOLTS/DIV (CH I or CH II)
a = 0: CHI or II COARSE (1-2-5 sequence)
a = 1: CHI or II FINE (variable)

PSCH<z>=(a) (R CR LF) Sets PULSE SWITCH CH1/2 function of the


rotary control: VOLTS/DIV (CH I or CH II)

QUICKST? (1.05 QUICKST:(a) Delivers QUICK START MODE


a = 0: QUICK START off
a = 1: QUICK START on

QUICKST=(a) (1.05 (R CR LF) Sets QUICK START MODE

RDWFM<z>: RDWFM<z>: READ WAVE FORM 1/2


(w w)(3 (7 (W W array) (7 Delivers signal data of channel <z> (1 or 2), from Offset address
1st WORD Offset (first WORD) with the given length (second WORD)
hex. (2 Kbytes) Offset + length max. 2 Kbytes
2nd WORD length
hex. (2 Kbytes) Complete transmission from channel 1: Offset = 0,
length = 2048 dec. (2 Kbytes)
‘RDWFM1:00000008’ (figures in hex.)

Data from the right half of the signal of channel 2:


Offset = 1024 dec., length = 1024 dec.
’RDWFM2:00040004’ (figures in hex.)

READOUT? READOUT:(a) Delivers READ OUT setting


a = 0: Read out off
a = 1: Read out on

READOUT=(a) (R CR LF) Sets READ OUT setting

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
RDREF<z>: RDREF<z>: READ REFERENCE 1/2
(w w)(3 (7 (W W array) (7 Delivers Signal data from Reference store <z> (1 or 2), from Offset
1st WORD Offset address (first WORD) with given length (second WORD)
hex. (2 Kbytes) Offset + length max. 2 Kbytes
2nd WORD length
hex. (2 Kbytes) See ‘RDWFM<z>’

RECDF=(a) (R CR LF) RECALL DDF


Reads instrument data field of „SAVE/ RECALL-Store“
(a = 1 ... 9) and sets the scope accordingly.

REF<z>POS? (3 REF<z>POS:(b) Delivers REF 1/2 POSITION


Y Position of the reference traces in Digital mode
b = FF hex. REF<z> shifted max. upwards

REF<z>POS=(b)(3 (R CR LF) Sets REF 1/2 POSITION

REF<z>PRE? (3 REF<z>PRE: REFERENCE 1/2 PREAMBLE


(array) Sets the scope in the state in which the reference traces were stored.

Besides, information will be sent to the PC.


array:
1st WORD: Memory address at the time of triggering
2nd WORD: X resolution = 200 bit/DIV
3rd WORD: Y resolution = 25 bit/DIV
4th WORD: Y1 standardized position based on the value
of WORD 3 (Integer value)
5th WORD: Y2 standardized position based on the value
of WORD 3 (Integer value)
RES(CR LF) (2 (R CR LF) Sets RESET function in SINGLE mode

RM0(CR LF) (R CR LF) REMOTE


Exit remote mode

RREFPRE (3 (R CR LF) RECALL REFERENCE PREAMBLE


Sets the scope in the state in which the current acquisition was
stored as reference.

(HM1507/1507-2: The REF1 preamble will be loaded if both traces


are switched on.)

RODDF? RODDF:(array) Delivers READ OUT DEVICE DATA FIELD


(RO device data field)
(6 bytes of commands + 10 bytes of parameters )
See table read out data field RODDF

RODDF=(array) (R CR LF) Sets new READ OUT DEVICE DATA FIELD


(RO device data field)

SAVEDF=(a) (R CR LF) SAVE DEVICE DATA FIELD


Stores the current instrument settings in the „SAVE/RECALL-
Store“ in memory position a (a = 1 ... 9)

SAVREF<z> (R CR LF) SAVE REFERENCE 1/2


(CR LF) (3 In STORE MODE, stores the current signal data in reference store
<z> (1 or 2)

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
STRMODE? (3 STRMODE:(b) Delivers STORE MODE
see table of instrument fields DDF

STRMODE= (b) (3 (R CR LF) Sets STORE MODE


see table of instrument fields DDF

TB<x>? (R CR LF) TIMEBASE A/B


Sets time base A/B setting
see table of instrument fields DDF

TB<x>= (b) TB<x>:(b) TIMEBASE A/B


Delivers time base A/B setting
see table of instrument fields DDF

TB<x>VAR? TB<x>VAR:(w) Delivers TIMEBASE A/B VAR setting (10 bits)


w = 000 hex.: TB<x> (A or B) calibrated
w = 001 .. 3FF hex.: TB<x> uncalibrated

TB<x>VAR= (w) (R CR LF) Sets TIMEBASE A/B VAR setting (10 bit)

TRIG? TRIG:(b) Delivers TRIGGER parameter


see table of instrument fields DDF

TRIG= (b) (R CR LF) Sets TRIGGER parameter


see table of instrument fields DDF

TRIGPOSx? (3.24 TRGPOSx: (w) Delivers TRIGGER POSITION A/B


1000 Bit/Div in two`s complement, related to graticule center.
Not for :
HM200x: HF-, NR-, TV-, LINE-Trigger Coupling and alternating
and external Trigger Source.
HM200x: HF-, TV-, LINE-Trigger Coupling and alternating and
external Trigger Source.
(4.06
TRGS? TRGS: (a) Delivers TRIGGER SYMBOL display
a = 0 : trigger symbol disabled
a = 1 : trigger symbol enabled
(4.06
TRGS= (a) (R CR LF) Sets TRIGGER SYMBOL display
TRSEP? (9 TRSEP:(b) Delivers TRACE SEP.
Y position of the timebase B referred to the Y position of the
time base A

b = 00 hex.: B maximum above A


b = FF hex.: B maximum below A
b = 80 hex.: Y position of B = Y position of A

TRSEP=(b) (9 (R CR LF) Sets TRACE SEP.

TRGSTA? TRGSTA:(b) Delivers TRIGGERSTATUS


TRGSTA:(a) (1.17
a(or b) = 0: Instrument does not trigger
a(or b) = 1: Instrument triggers
a(or b) = 2: Instrument is in SINGLE RESET MODE or,
acquisition not yet terminated.

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
TRGSTA(CR LF) (R CR LF) TRIGGERSTATUS
Reset Automatic mono flop (≈ 200ms)
Enables immediate interrogation with ‘TRGSTA?’.

TRGVAL? TRGVAL:(array) TRIGGERVALUE


Delivers trigger signal voltage value (measured at the trigger
amplifier)

array: 16 Bit INTEGER;


1st WORD: Positive peak value
2nd WORD: Negative peak value
3rd WORD: Peak to peak value
4th WORD: DC trigger working point (reference value)

Weighting :
- WORD 1-3 : ca. 20mV/LSB
- WORD 4 : ca. 5mV/LSB and 250mV/DIV
(2.00:
1st WORD: Positive peak value
2nd WORD: Negative peak value
3rd WORD: Mean arithmetic value
4th WORD: Reserved

Weighting: 1000 Bit/DIV

TRGLEV<x>? TRGLEV<x>:(w) Delivers TRIGGER-LEVEL A/B setting (10 bits)


w = 3FF hex.: max. positive (right limit)
w = 000 hex.: max. negative (left limit)

TRGLEV<x>=(w) (R CR LF) Sets TRIGGER-LEVEL A/B setting (10 bits)

VERMODE? VERMODE:(b) Delivers VERTICAL MODE (vertical setting )


see table of instrument fields DDF

VERMODE=(b) (R CR LF) Sets VERTICAL MODE (vertical setting)


see table of instrument fields DDF

VERS? VERS:(ARRAY) Delivers SOFTWARE VERSION


5 bytes of commands + 15 bytes of parameters

WFMPRE? (3 WFMPRE:(array) WAVE FORM PREAMBLE


Delivers Data for the stored traces

array:
1st WORD: Memory address at the time of trigger
2nd WORD: X resolution = 200 bit/DIV
3rd WORD: Y resolution = 25 bit/DIV
4th WORD: Y1 position standardized on the value of
WORD 3 (integer value)
5th WORD: Y2 position standardized on the value of
WORD 3 (integer value)

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Command: Acknowledgment Description
PC -> Scope Scope -> PC
WRREF<z>: (3 (6 (7 (R CR LF) WRITE REFERENCE 1/2
(w w array) writes signal data into the reference store <z> (1 or 2), from offset
1st WORD Offset address (first WORD) with given length (second WORD)
hex. (2 Kbytes) Offset + length max. 2 Kbytes
2nd WORD length
hex. (2 Kbytes) See ‘RDWFM<z>’

XPOS? XPOS:(w) Delivers X-POSITION setting


(10 bits)
w = 3FF hex.: „right limit“
w = 000 hex.: „left limit “
(1.1:
16 Bit INTEGER value in two's complement referred to
graticule center (1000 bits/DIV) (10

XPOS=(w) (R CR LF) Sets X-POSITION setting


(10 Bit )
(1.1:
(16 Bit INTEGER)

Y<z>POS? Y<z>POS:(w) Y 1/2 POSITION


Delivers CH<z> (1 or 2) position setting (10 bits)
w = 3FF hex.: Y position maximum upwards
w = 000 hex.: Y position maximum downwards
(1.1:
16 Bit INTEGER value in twos complement referred to
graticule center (1000 bits/DIV) (10

Y<z>POS=(w) (R CR LF) Y 1/2 POSITION


Sets CH<z> (1 or 2) position setting (10 bits)
(1.1:
(16 Bit INTEGER)

All commands will be internally checked for any conflicts and protocolled in RETURNCODE.
The following RETURNCODES (ASCII characters) have been implemented:

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
0 = no error
1 = syntax error
2 = data error
3 = buffer overflow
4 = bad data set
5 = adjustment error
6 = timing error (internal data transmission FC /STORE)

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Instrument data field (DDF)

D7 D6 D5 D4 D3 D2 D1 D0
CH1 GND AC INV1 ON VOLT/DIV - Counter 0-13
HM200x Counter 0 – 11 (1mV/DIV – 5V/DIV)
0000(1mV/DIV)...1101(20V/DIV)
CH2 GND AC INV2 ON VOLT/DIV - Counter 0-13

VERMODE Alt.- Probe BWL CHOP ADD Probe TR-SOURCE


TRG CH1: (2.00 0 = OFF CH2: (2.00 00 = CH1
0 = 1:1 1 = ON 0 = 1:1 01 = CH2
(13
1 = 10:1 1 = 10:1 1x = EXT
TBA Z Input 0 ANA MODE TIME/DIV – Counter
SING Analog: 00hex. - 15hex.{SEA:11hex}
50ns/DIV - 0,5s/DIV{SEA:20ms}
0 = ON DIGI Store:(3 04 {03(8} hex. - 1Chex
1 = OFF SING 1µs {500ns(8}/DIV - 100s/DIV
(12.00 (2.02 (3
Store XY: 06 {05(8} hex. - 1Chex
40MS {100MS(8}/s - 2S/s
(3
Store ROLL: 12hex. - 1Chex
50mS/s - 100S/s
TBB B +/- B-TR 0 MODE TIME/DIV – Counter
(1=neg. Analog: 00hex. – TBA (max.11hex.)
Trigger- 50ns – TBA (max.20ms/DIV)
edge) Store:(3 04 {03(8} hex. – TBA (max.11hex.)
1µs {500ns(8}/DIV –TBA (max.20ms/DIV)
(3
HORMODE CT XY x10 STORE PP detect TB-MODE
(Compo- 0 = OFF HM1004-2/-3/1505-2 HM305-2
nent 1 = ON HM1507/-2/-3 HM404/-2
Tester) HM2005 HM407
only 000: TBA TBA
HM1507 001: TBA + TBB reserv.
from (3.24 010: TBA alt.TBB SEARCH
011: TBB DELAY
TRIG +/- 0 P-P NORM 0 Kopplung 0-7
(1=neg HM1004-2/-3/1505-2 HM305-2
Trigger- HM1507/-2/-3 HM404/-2
edge) HM2005 HM407
000: AC AC
001: DC DC
010: HF HF
011: NR LF
100: LF TVLine
101: TVLine TVField
110: TVField LINE
111: LINE reserv.
STRMODE(3 REF2 REF1 PRE TRIGGER STOREMODE
000 = -75% 001 = -50% 000 = REF
010 = -25% 011 = 0% 001 = SGL (2.02 reserv.
100 = 25% 101 = 50% 010 = ROL (TB=100s..50ms)
110 = 75% 111 = 100% 011 = ENV
100 = AVR
CH2 VAR 8-BIT
CH1 VAR 8-BIT
TRSEP (9 8-BIT
HOLD OFF 8-BIT
INTENS A 8-BIT
INT B (9 8-BIT

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Instrument data field 1 (DDF1)

D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0

TR A LEV 0 0 0 0 0 0 X X X X X X X X X X
TB A VAR 0 0 0 0 0 0 X X X X X X X X X X
X POS X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1

Y2 POS X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1

Y1 POS X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1

TR B LEV 0 0 0 0 0 0 X X X X X X X X X X
TB B VAR 0 0 0 0 0 0 X X X X X X X X X X
DEL POS X X X X X X X X X X X X X X X X
(4.0 (4.0 (4.0 (4.0 (4.0 (4.0

Read out data field (RODDF)

D15 D14 D13 D12 D11 D10 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0

CURSOR 1= 0= 1= 0=X 1= 0dt 0 1=


TRG CH1 DC 1=Y Trk 1=f (14.0 Crs
MODE
Crs 1= REF On I N T - R O U T
EN CH2 EN
(3.0 (3.0

CURSOR X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1
XI
CURSOR X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1
X II
CURSOR X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1
Y I (11
CURSOR X X X X X X X X X X X X X X X X
(1.1 (1.1 (1.1 (1.1 (1.1 (1.1
Y II (11

(1.05
from FC-Version 1.05
(1.1
from FC-Version 1.10
(1.17
from FC-Version 1.17
(1.19
from FC-Version 1.19
(2.00
from FC-Version 2.00
(2.02
from FC-Version 2.02
(3.0
from FC-Version 2.02
(3.09
from FC-Version 2.02
(3.24
from FC-Version 2.02
(4.0
from FC-Version 2.02
(2
RES = 1 arms the trigger unit in combination with SINGLE and Analog mode
RES = 1 starts a new data recording and arms the trigger unit in combination with SINGLE and Digital
mode
RES = 1 starts a new data recording in Digital mode
(3
Only in Analog / Digital Scope
(4
The data will be loaded in an EEPROM. This consists of only a limited number (≥ 1 000 000) of
programming cycles. Therefore this command should not be used unless absolutely necessary.
(5
This function will be reset after a counter has run down (ca. 5s). Each further output before the end of the
interval sets the counter anew and thus prolongs the time until reset.
(6
The maximum interval permitted between the transmission of each trace byte is 2s, otherwise the scope
will exit the remote state.
(7
Valid for FC-Versions lower 1.05:
For (w w) stands (w,w); comma as ASCII character.
For (w w array) stands (w,w:array); comma and colon as ASCII character.

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
(8
Only HM1507 and HM1507-2
(9
Only for instruments with 2 time bases.
(10
16 Bit INTEGER value in two's complement based on the graticule center (1000 bit/DIV).
Ex. 1: Set Y position to graticule center Output: 0 dec. = 0 hex.
Ex. 2: Set Y position to +1 division Output: 1000 dec. = 3E8 hex.
Ex. 3: Set Y position to -1 division Output: 64536 dec. = FC18 hex.
(11
400 bit/DIV, since FC 2.09: 1000 bit/DIV
(12
only HM40x since FC 3.17 and HM200x
(13
only HM200x
(14
if D9 is set, D10 becomes invalid. Then “CURMOD1?” must be used for Cursor Mode query.

Examples

Some examples, with detailed explanations regarding the command, are given below.
Most of the commands are terminated with CR (ENTER)= 0Dhex and LF = 0Ahex. Also, the scope terminates
each acknowledgment string with these characters.
The command parameters (given in brackets) may be ASCII characters (a), or binary values (b).

BELL=(a)

Explanation: This command outputs the tone 2.

String to scope: BELL=2 CR

Character sequence in hex representation: 42 45 4C 4C 3D 32 0D

Answer from scope: 0 CR LF

Answer from scope in hex representation: 30 0D 0A

CH1=(b)

Explanation: This command switches the channel on, with 5mV and AC.
See also byte 1 of DDF.

String to scope: CH1= (52hex) CR

Character sequence in hex representation: 43 48 31 3D 52 0D

Answer from scope: 0 CR LF

Answer from scope in hex representation: 30 0D 0A

ERRBP?

Explanation: This command interrogates the status of the control tone


for error. 1 means Error beep is switched on, 0 corresponds to off.

String to scope: ERRBP? CR

Character sequence in hex representation: 45 52 52 42 50 3F 0D

Answer from scope: ERRBP:1

Answer from scope in hex representation: 45 52 52 42 50 3A 31

RDWFM1:(ww)

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Explanation : Read signal trace from channel 1.

Parameter 1: Start address in acquisition store = 0 dec. = (00 00)hex.

Parameter 2: Number of bytes to be read = 2048 = (08 00) hex. When transmitting word data, note that
the low byte must be output first.
It is possible to read only a part of the acquired signal by transmitting other values for the
start address and the number of bytes to read.

String to scope: RDWFM1:(00hex)(00hex)(00hex)(08hex) CR

Character sequence
in hex representation: 52 44 57 46 4D 31 3A 00 00 00 08 0D

Answer from scope


in hex representation: 52 44 57 46 4D 31 3A 08 00 00 08 XX XX ...
... XX ;(2048 Byte XX)

WFMPRE?

String to scope: WFMPRE?

Answer from scope


in hex representation: 57 46 4D 50 52 45 3A XX XX C8 00 19 00 YY YY ZZ ZZ

Explanation: Byte 1 to 7: WFMPRE:


Byte 8 & 9: Number of the byte at trigger
Byte 10 & 11: Resolution in X direction per Div. (200)
Byte 12 & 13: Resolution in Y direction per Div. (25)
Byte 14 & 15: (YY YY) Y1 position as 16 bit integer variable standardized on 25
per Div., where the value 0 signifies no shift, 25 shifted one division
up and -25 shifted one division down.
Byte 16 & 17: (ZZ ZZ) Y2 position standardized on 25 per Div.

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
Calculating the voltage of the sampled signal form:

Given: UN : Voltage value of the Nth sample


25 : Y resolution per Div. (see WFMPRE?)
Y1Pos : Y1 position of the signal form (see WFMPRE? YY YY)
ByteN : Value of the signal form byte ( see RDWFM1 XX)
V/Div : Attenuator setting (e.g.: 5mV)

Calculation without taking the Y1 position into account:

UN = (ByteN - 128)/25 * V/Div

With this method it is only possible to evaluate the voltage difference of the acquired signal, since there is no
reference (Zero voltage). In order to calculate the absolute voltage of the sample one should include the Y
position in the calculations.

UN = (ByteN - 128 - Y1Pos)/25 * V/Div

The deflection coefficient (V/DIV) is obtained from the DDF byte 1 or with the command CH1?.

TRGVAL?

With this command it is possible to evaluate the peak value and the arithmetical mean value of the measured
signal. This is shown in the following example.

Scope setting: Channel 1 on; 5mV deflection sensitivity; DC input coupling; probe 1:1; 1kHz calibration;
probe in the calibration socket; trigger source - channel 1; AC Trigger coupling; Timebase A
set to 200µs; analog mode.

A positive square wave signal with an amplitude of 4 div. can be seen on the oscilloscope display.

String to scope: TRGVAL?

Answer from scope


in hex representation: 54 52 47 56 41 4C 3A D0 07 30 F8 D0 07 XX XX

Explanation: Byte 1 to 7: String TRGVAL:


Byte 8 and 9: Positive peak value (signal)
Byte 10 & 11: Negative peak value (signal)
Byte 12 & 13: Arithmetic mean value (signal)
Byte 14 & 15: Reserved (value undefined)

Positive and negative peak values are integer values referred to the mean value with the weighting of 1000/div.

Then follows: 07D0 hex. = +2000 decimal


F803 hex. = - 2000 decimal

Mean value: Um = 2000/1000 * 5mV = 10mV

positive peak value: Upp+ = 2000/1000 * 5mV + Um = 20mV

negative peak value: Upp- = -2000/1000 * 5mV + Um = 0mV

Since the trigger amplifier is not calibrated there can be a deviation from the values.

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2
SOURCE FILE: TERM9X_D.TXT /CHEMNITZ /04.DEC.1994

Remote control with the Term9X program of NORTON COMMANDER


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

1. Settings
^^^^^^^^^^^^^^^^^
1.1 term90.exe
^^^^^^^^^^^^^^

Under ' Settings \ Interface': Port: Your free serial port, e.g. COM2.
Baud rate: recommended 19200.
Data bits: 8 BITS
Parity: None
Stop bits: 2 BITS
Data exchange: Xon/Xoff to off.
RTS/CTS/ to on.

Under 'Settings \ Terminal' mark the 'ANSI' .


Under 'Settings \ ' mark the option 'Echo'.

1.2 term95.exe
^^^^^^^^^^^^^^^

Under 'Settings \ Driver' mark the option 'Standard'.


Under 'Settings \ Line...': Port: Your free serial port, e.g. COM2.
Baud rate: Recommended 19200.
Data bits: 8 BITS
Parity: None
Stop bits: 2 BITS
Data exchange: Xon/Xoff to off.
RTS/CTS/ to on.

Under 'Settings \ Terminal Emulation' mark the option 'ANSI'.


Under 'Settings \ Terminal settings' mark the option 'Echo'.

2. Remote control
^^^^^^^^^^^^^^^^

The transmission can be started after all settings have been correctly set,.

Remote On: Enter one after the other a SPACE and ENTER.
The instrument goes into remote mode, which is evident from the Remote LED.
Now you can enter any desired command such as, for example, 'vers?'.

Example: Switch on channel 2 of the instrument and at the same time set it to 5mV.
Enter 'ch2=', press the key "Alt Gr" and simultaneously enter from the number keyboard one
after the other the numbers 0,1 and 8. After releasing the "Alt Gr" key, the instrument will be
set.
The RETURNCODE will be displayed behind the transmitted command.

The value 0 ("Alt Gr" 000) will not be transmitted.

Interface commands for HM305-2, HM404, HM407, HM1004-2, HM1505-2, HM1507, HM1507-2

You might also like