R S - 2 3 2 I n t e r f a c e – R e m o t e C o n t r o l
Pin
2
Tx data (data from instrument to external device)
3
Rx data (data from external device to instrument)
5
Ground (reference potential - connected via the
instrument power cord with protective earth)
9
+5V supply for external device (max. 400mA).
The maximum voltage swing at pin 2 and 3 is ± 12 Volt.
RS-232 protocol N-8-1 (no parity bit, 8 data bits, 1 stop bit)
Baud Rate Setting
After switching the instrument on, the default setting of the RS-232
port is always 4800 baud. It can be changed thereafter to 9600, 38400
or 115200 baud by a command listed below.
Data Communication
After switching on the instrument it always automatically transmits
HM5014-2 with 4800 baud. A data carrier with a program executable
under Windows 95, 98, Me, NT 4.0 (with actual service pack), 2000 and
XP is part of the delivery. Updates can be found on the Internet under
www.hameg.com.
Commands from PC to HM5014-2
General description: Each query/command must be introduced with „#"
[23 hex = 35 dec] followed by respective characters, i.e. TG for Tracking
Generator, and further followed by parameter, which are explained in
detail below. Each command is executed by pushing the „Enter" key
(hex: 0x0d). No differentiation is made between capital and lowercase
letters (i.e. TG = tg). Units of measurement are always defi nite (i.e. span
value given in MHz) and are therefore not indicated.
Setting Commands:
(E)
= stands for keyboard Enter
(CR)
= Carriage Return pushbutton
#kl0(E)
= Key-Lock off
#kl1(E)
= Key-Lock on (RM (Remote) -LED is lit)
The following commands are executed only if „kl1" has been sent
before, so that REMOTE is on.
#tg0(E)
= tracking generator off
#tg1(E)
= tracking generator on
#vf0(E)
= video fi lter off
#vf1(E)
= video fi lter on
#tl+01.0(E)
= tracking generator level of +1.0 dBm
#tl-50.0(E)
= up to -50.0 dBm in 0.2 dB steps
#rl-30.0(E)
= reference level of -30.0 dBm
#rl-99.6(E)
= up to -99.6 dBm, in 0.2dB steps
#at0(E)
= attenuator 0 (10, 20, 30, 40) dB
#bw1000(E)
= bandwidth 1000 (120, 9) kHz
#sp1000(E)
= Span 1000 MHz, selectable between
1000MHz and 1MHz in 1-2-5 sequence
#sp0(E)
= zero span
#db5(E)
= 5 dB/Div. scaling
#db10(E)
= 10 dB/Div. scaling
#cf0500.000(E)
= center frequency in xxxx.xxx MHz
#dm0(E)
= detect mode off (average, max. hld)
#dm1(E)
= detect mode on (average, max. hld)
#sa(E)
= stores signal A in memory B
#vm0(E)
= display signal A
#vm1(E)
= display signal B (stored signal)
#vm2(E)
= display A – B (A (actual) minus B
(stored signal))
#vm3(E)
= display average mode detected signal
#vm4(E)
= display max. hold mode detected signal
#br4800(E)
= baud rate 4800 (9600, 38400, 115200) Baud
26
Subject to change without notice
#bm1(E)
= signal data transfer in 2048 byte block,
2001 signal byte, 3 check sum byte and
hex: 0x0d
#rc0(E)
= recall (0 to 9) saved instrument settings
#sv0(E)
= save (0 to 9) instrument settings
Special commands for emc measurement (only possible in combina-
tion with zero span):
#es0(E)
= „1 second measurement" off
#es1(E)
= prepares for a „1 second measurement"
(1second measuring time; zero span
activated and suitable resolution band
width selected)
#ss1(E)
= starts a „1 second measurement" at cur-
rent center frequency and transfers data of
the previous measurement.
Note: After a command has been received and executed the spectrum
analyser returns „RD" (CR).
Example (emc measurement):
#es1(CR) (prepares for „1 second measurement), #cfxxxx.xxx(CR),
#ss1(CR) (1. measurement, data invalid), #cfxxxx.xxx(CR), #ss1(CR)
(2. measurement, transfer of 1. measurement data), #cfxxxx.xxx(CR),
#ss1(CR), .... , #es0(CR) (1 second measurement off).
Parameter Query (list of query commands):
The following queries are always answered even if the instrument is
not in remote condition (Remote Off; KL0).
Syntax:
#xx(E)
= transfer parameter (xx = tg, tl, rl, vf, at, bw,
sp, cf, db, kl, hm, vn, vm, dm, uc)
Note: With the exception of
#hm(E)
= query for instrument type
#vn(E)
= query for fi rmware version
#uc(E)
= query for measurement condition
(uncalibrated, calibrated)
other commands have been listed under „Setting Commands".
st
1
Example:
„#uc(E) (uncalibrated)": PC transmits #uc(CR). Instrument reply:
UC0(CR) (calibrated) or UC1(CR) (uncalibrated)
nd
2
Example:
„#tl(E)", PC query for tracking generator level: PC transmits #tl(CR).
Instrument reply: e.g. TL-12.4 (CR)
rd
3
Example:
„#vn(E)", PC query for fi rmware version: PC transmits #vn(CR). Instru-
ment reply: x.xx(CR) (e.g. x.xx = 1.23)
th
4
Example:
„#hm(E)", PC query for instrument type: PC transmits #hm(CR). In-
strument replies with:
5014-2 (CR) or 5012-2
th
5
Example:
PC transmits a command sequence to the analyzer:
#kl1(E)
= switch „Remote" on
#cf0752.000(E)
= sets center frequency to 752 MHz
#sp2(E)
= sets a span of 2 MHz
#bw120(E)
= selects a resolution bandwidth of 120 kHz
#kl0(E)
= switches from remote to manual operation
Unknown or unrecognised commands do not cause a response to the
PC.