User Guide - MODBUS Protocol Firmware Version: 8420
User Guide - MODBUS Protocol Firmware Version: 8420
PRELIMINAR DESCRIPTION
All the data variables shared by a Modbus module are shown in tables, where each data is linked to one address.
Each data can be of two types:
- “COIL”, composed by a single bit, can be associated to digital input (switch), digital outputs (relays), logic states (alarms).
- “REGISTER”, composed by 2 bytes (16 bits), can be associated to analog input or outputs, variables, set-point, etc...
A register can also include the image of more coils, for example the 16 digital inputs of a device can be read and write as bit, one by one, addressing
the relative coil , or they can be read or write as a single 16-bit port addressing the associated register, where for example the last significant bit will
respond to the first coil.
NOTE:
The registers marked with ' * ' in the ' E2P ' column are saved in
EEPROM each time they are written, to be automatically reloaded
to each power-on of the device.
pag 1/4
REGISTER DESCRIPTION
40001 : TEST
This register is used to perform the following functions:
- Analog inputs calibration (see the “Procedures” section).
- Synchronized sampling (see the “Procedures” section).
40006 : COMMUNICATION
Set the bits of this register as shown in the following table, to set the baud-rate, the bit number, the parity type and the protocol type.
- Manufacturer default:38400 bps, RTU mode
Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Desc. - - - - - - - - - M P1 P0 N B2 B1 B0
Mode M BaudRate B2 B1 B0
ASCII 0 1200 0 0 0
RTU 1 2400 0 0 1
4800 0 1 0
Parity P1 P0 9600 0 1 1
Mark 0 0 19200 1 0 0
Even 0 1 38400 1 0 1
Odd 1 0 --- 1 1 0
Space 1 1 --- 1 1 1
N°bit N
7 bit 0
8 bit 1
NOTES:
- the bit number is ignored, as for in ASCII mode it is fixed to 7 and in RTU mode it is fixed to 8.
- In RTU mode the parity is ignored (parity NONE)
40007 : ADDRESS
Specify the net address of the device; there are allowed the address from 1 to 255.
Each device connected to the same net must have a unique address.
The address 255 is used for broadcast functions (i.e. synchronized sampling)
- Manufacturer default: 01
40008 : RX/TX DELAY
Specify the value of the delay between the reception of a command and the response transmission, indicated in milliseconds.
- Manufacturer default: 1 (1 ms.)
40009 : WATCHDOG TIMER
Specify the value of the WatchDog Timer (see the “Procedures” section), indicated in steps of 0.5 seconds.
- Manufacturer default: 10 (5 sec.)
40010 : COILS
This register is a mirror of the coils table: each bit of this register corresponds to a coil, as shown in the following table.
Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
Coil 08 07 06 05 04 03 02 01 - - - - - 11 10 09
NOTE: The channels can be programmed as different input types, provided that they are of the same group (see table).
For example, if the channel 0 is set as Pt100 (group A), the other channels can be set as 500 ohm but not as Pt1000 (group B).
pag 2/4
40015 : INPUT VALUE # 0
40016 : INPUT VALUE # 1
40017 : INPUT VALUE # 2
40018 : INPUT VALUE # 3
40019 : INPUT VALUE # 4
40020 : INPUT VALUE # 5
40021 : INPUT VALUE # 6
40022 : INPUT VALUE # 7
These registers contain the measure value for each input channel, converted in engineering
units: the values are expressed in Ohm (for resistance) or °C (for RTD inputs).
The format is a 16bit signed integer, with 1 decimal point
When the device receive the Sync command (see the “Procedures” section), the actual input values in the 40015÷40018 registers are saved in these
registers, channel by channel, to be read in a following time.
Introduces an offset over the measure for each analog channel. The value is expressed in the same format of the input registers.
COILS DESCRIPTION
pag 3/4
PROCEDURES
HOW TO USE THE “INIT” FUNCTION
If the exact configuration of a module is unknown, it can result impossible to establish a communication with it.
The “INIT” function gives a solution to this throuble:
If not, control the voltage supply connections ( I and J pins ) and RS485 net connections ( A and B pins).
If the supply connection is right, and the led still unlighted, it can be necessary to invert the RS485 pins connection.
- Address : 01
- Baud-rate : 38400 bps
- Protocol : RTU
WATCHDOG
The modules has been provided of a Host Watchdog timer which, when it is enabled, makes to start the alarm each time the communication between
the module and the host is inactive for a period time greater then the programmed one. When the alarm goes on, the values of the outputs are
automatically converted to the values set as ‘safety value’, that corresponding to the state in which the outputs must be putted, and therefore the
actuators are putted, to avoid damages to the system in case of failure. Moreover, under the alarm condition the green LED on the front of the
enclosure is blinking and the “Watchdog Event” coil is forced to 1.
To return from the alarm condition, reset the coil “Watchdog Event” coil: the LED stop blinking and it is possible to set the outputs.
There is also a Module Watchdog timer that monitor the internal CPU work and is active when the CPU don't function correctly for any reason, and
resets the module. After the reset, all outputs will assume their initial default value (“power up value”), that may be different to the output value after the
reset.
SYNCHRONISM
The Synchronism function is performed by a command sent to all devices connected on the net. When the devices receive the Sync command, all
input states are saved in the relative register, to be read after time. Doing this, it is possible to read the value of all inputs at the Sync command time.
To send the synchronism command, write the value 10 in the “Test” register (40001) at the address 255.
NOTE: The sync values are not saved in EPROM.
RIF. FW : 8420
ED.03.08 REV.02
Datexel reserves its right to modify the characteristics of its products totally or in part without notice at any time. pag 4/4