
28
TAB. 9: serial commands to read the conguration (models with analog
output)
Command Response Description
G0
See the
example
below
It reads the current conguration of the transmitter.
If the dip switch 1 is OFF, it returns the conguration
set via the serial port. If the dip switch 1 is set to ON, it
returns the conguration set by dip switch
GF
See the
example
below
It reads the conguration set by the serial port
GS
See the
example
below
It reads the conguration set by the dip switch
S? Response
time It reads the response time set for the analog outputs
The commands G0, GF and GS for reading the conguration return a string
consisting of:
• model
• full scale value set for the analog outputs
• polarity of the measuring range (U=unipolar, B=bipolar)
• range of the analog output current (0=0...20mA, 4=4...20 mA)
for example: the string“HD402T2 5.00mbar B40”indicates that the transmitter
model is HD402T2, the full scale set for the analog outputs is 5.00 mbar,
the measuring range is bipolar (-5.00…+5.00 mbar) and the analog current
output type is 4...20 mA. The last character of the string (0 in the example) is a
condential code.
CONFIGURATION OF THE MODELS WITH RS485 MODBUS-RTU OUTPUT
(HD402ST...)
RS485 Modbus address: each transmitter of the network is univocally identied
by an address between 1 and 247. Transmitters having the same address shall
not be present in the network. The transmitter Modbus address is equal to the
sum of the value set with the dip switches 2…6 (value settable from 0 to 31)
and the value set with the serial command WA (value settable from 1 to 216,
default = 1). By setting a dip-switch to ON (upwards), the following values are
added to the address:
Dip-switch
2
Dip-switch
3
Dip-switch
4
Dip-switch
5
Dip-switch
6
ON 16 8 4 2 1
OFF 00000
Example: if the dip-switches 2 and 4 are set to ON, and the dip-switches 3,5
and 6 are set to OFF, the value set with the dip-switches is 16+4=20. If the value
set with the serial command WA is 1 (default value), the transmitter Modbus
address is 20+1=21.
The dip-switches can be set even if the transmitter is powered, and the change
is eective immediately.
Conguration via the RS485 serial port (models HD402ST…)
The transmitters are preset by the factory. To change the settings, proceed as
follows:
• Connect the transmitter RS485 output to the PC RS232 (through a RS485/
RS232 converter) or USB (through a RS485/USB converter, for example the
RS48 cable) port. If a RS485/USB converter is used, install in the PC the
related USB drivers.
• To enable the conguration mode, set the dip-switch 1 (the one closest to
the terminal block) to ON (upwards), then power the transmitter.
Note: the dip-switch 1 can be changed from OFF to ON even when the
instrument is powered; in this case it is however necessary, after setting
the dip-switch to ON, to press briey (less than 0.5 seconds) the CAL
ZERO button to enable the conguration mode (the transmitter model
information appears on display, if present). Alternatively, power cycle the
transmitter.
• In the PC, run a serial communication software (e.g. Hyperterminal), set the
baud rate to 57600 and the communication parameters to 8N1.
• Send the CAL START command (the command is required to change the
conguratrion; to read the value of the parameters, the command is not
required).
• Send the commands given in table 10 to set or read the conguration
parameters of the transmitter.
TAB. 10: serial commands (models with RS485 Modbus RTU
output)
Command Description
Response time
AVGn
Set the response time of index n for the
measurement
n=0 ⇒0.125 s, n=1 ⇒1 s, n=2 ⇒2 s, n=4 ⇒4 s
AVG? Reads the response time set for the
measurement
Unit of measurement
DU0
Shows pressure in Pa (HD402ST1 and HD402ST2)
or kPa (HD402ST3, HD402ST4 and HD402ST5) on
display
DU1
Shows pressure in mmHO (HD402ST1 and
HD402ST2) or mmHg (HD402ST3, HD402ST4 and
HD402ST5) on display
DU2
Shows pressure in inchHO (HD402ST1 and
HD402ST2) or PSI (HD402ST3, HD402ST4 and
HD402ST5) on display
DU3 Shows pressure in mbar on display
Modbus parameters
WA n...n
Sets the Modbus base address to the value n…n
The value must be between 1 and 216
(default = 1)
Warning: the actual Modbus address of the
transmitter is equal to the base address set
with this command plus the value set with the
dip-switches.
Note: in the reply to the command, the previous
actual address appears; the new address will
appear in the replies to the next commands.
BAUD r...r
Sets the Modbus Baud Rate to the value r…r
The acceptable values are 9600 and 19200
(default = 19200) If the command is sent
without the parameter r…r, the current setting
is obtained
PAR p
Sets the Modbus communication parameters of
index p
p=O ⇒8O1 p=N ⇒8N2 p=E ⇒8E1
If the command is sent without the index p, the
current setting is obtained (default = 8E1).
Note: the replies of the transmitters with RS485 Modbus RTU output always
start with the address of the connected transmitter. For example, sending
the AVG2 command to a transmitter with Modbus address 1, the reply is “001:
averaging = 2 sec”.
To exit the conguration mode after sending the CAL START command, send
the CAL END command (the transmitter automatically exits the conguration
mode after 5 minutes from the last command sent).
MODBUS-RTU MODE
To operate with the Modbus-RTU protocol be sure that the dip-switch 1 (the
one closest to the terminal block) is set to OFF (downwards). The dip-switch
can be set to OFF even if the transmitter is powered, and the change is eective
immediately.
The measured values can be read in Modbus RTU mode by using the 04h
function code (Read Input Registers). Table 11 lists the Modbus Input Registers
available: