Advanced Videographic Recorder
SM2000
Appendix B – Modbus Guide
110
IM/SM2000
Issue 11
Appendix B – Modbus Guide
B.1 Introduction
This instrument is fitted with a Modbus/RS485 serial
communications link as standard.
The instrument can be configured to act as either a Remote
Terminal Unit (RTU) slave when communicating with a master
(host) system, or as a Modbus master device, enabling it to
collect data from RTU slaves into its 24 Comms Analog and 24
Comms Digital Channels.
B.2 Setting Up
To set up the instrument on a Modbus network:
1. Connect the instrument to a Modbus link – see Section
2. Set the RS485 configuration parameters – see Section
3. Add the instrument to the link configuration on the host
system – refer to information supplied with the host
system.
B.3 Modbus Commands Supported
The following Modbus commands are supported:
B.4 Modbus Exception Responses
If the instrument detects one of the errors listed in Table A2.1
while receiving a message from the host system, it replies with a
response message consisting of the instrument's Modbus
address, the function code, the error code and error check
fields.
B.5 Operating Mode Modbus Coils
Tables A2.2 to A2.14 detail the contents of each Modbus coil.
Each coil is assigned a register that can have one of two values:
0000 and 0001.
01
Read Coil Status
– reads the on/off status of 16
consecutive digital states, starting at a specified address.
The instrument returns zeros for points which do not contain
defined data
03
Read Holding Registers
– reads 8 consecutive analog
values, starting from a specified address. The instrument
returns zeros for registers which do not contain defined
data.
05
Force Single Coil
– sets the value of a single coil (digital
signal) at the specified address. The data value must be
FF00
Hex
to set the signal ON and zero to turn it OFF. The
instrument returns an exception response if the register is
not currently writable.
06
Preset Single Register
– sets the value of a single register
(analog value) at the specified address. The instrument
returns an exception response if the register is not currently
writable. Limits defined in configuration are applied to the
value before storage.
08
Loopback Diagnostic Test
– used to test the integrity of
Modbus transmissions. The instrument returns the message
received.
15
Force Multiple Coils
– the instrument carries out updates
that are valid and returns an exception response if any of the
coils are not currently writable.
16
Preset Multiple Registers
– the instrument carries out
updates that are valid and generates an exception response
if any of the registers are not currently writable.
Note.
Negative numbers are represented in '2's
complement' format, e.g 1000 = 03E8 (Hex), -1000 =
FC18 (Hex)
The instrument cannot accept a new message until
the current message has been processed and a reply
sent to the master (maximum response time 50ms).
The instrument monitors the elapsed time between
receipt of characters from the host. If the elapsed time
between two characters is 3.5 character times, the
slave assumes the second character received is the
start of a new message.
Code
Name
Definition
01
Illegal Function
The message function received is not
an allowable action
02
Illegal Data
Address
The address reference in the data field
is not an allowable address
03
Illegal Data Value
The value referenced in the data field
is not allowable in the addressed slave
07
Negative
Acknowledgment
Received message error
08
Memory Parity
Error
Parity check indicates an error in one
or more of the characters received
Table B.1 Modbus Exception Responses
Analog
Input
Modbus Coil
(Read Only)
0 = Input OK
1 = Input failed
Analog
Input
Modbus Coil
(Read Only)
0 = Input OK
1 = Input failed
A1
0001
B1
0007
A2
0002
B2
0008
A3
0003
B3
0009
A4
0004
B4
0010
A5
0005
B5
0011
A6
0006
B6
0012
Reserved
0013 to 0050
Table B.2 Analog Input Fail States