0% found this document useful (0 votes)
24 views4 pages

User Guide - MODBUS Protocol Firmware Version: 8420

Uploaded by

elektrocentar
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)
24 views4 pages

User Guide - MODBUS Protocol Firmware Version: 8420

Uploaded by

elektrocentar
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/ 4

Distributed I/O device

8 channels RTD inputs


Via monte Nero, 40/B – 21049 TRADATE (VA) ITALY on RS-485 network
Phone: +39 (0)331841070 Fax:+39 (0)331841950 - e-mail:[email protected] - www.datexel.it

User Guide – MODBUS protocol DAT 3019


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.

In the Modbus protocol, coils and registers are divided in banks:


0xxxx and 1xxxx = Coils (bits)
3xxxx and 4xxxx = Registers (words)

REGISTERS TABLE COILS TABLE


Register Description Access E 2P Coil Description Access E 2P
40001 Test R/W 00001 Open Detect #0 R
40002 Firmware Version R 00002 Open Detect #1 R
40003 R 00003 Open Detect #2 R
40004 Device Name R/W * 00004 Open Detect #3 R
40005 R/W * 00005 Open Detect #4 R
40006 Communication R/W * 00006 Open Detect #5 R
40007 Address R/W * 00007 Open Detect #6 R
40008 RX/TX Delay R/W * 00008 Open Detect #7 R
40009 Watchdog Timer R/W * 00009 Watchdog Enable R/W
40010 Coils R/W 00010 Watchdog Event R/W
40011 Input Type & R/W * 00011 PowerUp Event R/W
40012 Channel Enable R/W *
40013 --- reserved --- R/W
40014 --- reserved --- R/W
40015 Input # 0 R IMPLEMENTED MODBUS FUNCTIONS
40016 Input # 1 R
40017 Input # 2 R
40018 Input # 3 R Function Description
40019 Input # 4 R 01 Read multiple coils (0xxxx bank)
40020 Input # 5 R 02 Read multiple coils (1xxxx bank)
40021 Input # 6 R 03 Read multiple registers (4xxxx bank)
40022 Input # 7 R 04 Read multiple registers (3xxxx bank)
40023 Sync. value input # 0 R 05 Write single coil
40024 Sync. value input # 1 R 06 Write single register
40025 Sync. value input # 2 R 15 Write multiple coils
40026 Sync. value input # 3 R 16 Write multiple registers
40027 Sync. value input # 4 R 08 Diagnostic
40028 Sync. value input # 5 R
40029 Sync. value input # 6 R
40030 Sync. value input # 7 R NOTE:
40031 Offset # 0 R/W * For DAT3000 series devices, the bank 0xxxx is a mirror of bank
40032 Offset # 1 R/W * 1xxxx, as the 3xxxx bank is a mirror of bank 4xxxx, as for i.e. the
40033 Offset # 2 R/W * first register can be read indifferently as 30001 (with the function
40034 Offset # 3 R/W * 04) or 40001 (with the function 03)
40035 Offset # 4 R/W *
40036 Offset # 5 R/W *
40037 Offset # 6 R/W *
40038 Offset # 7 R/W *

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).

40002 / 40003 : FIRMWARE VERSION


Read-only 2-register field, that hold the manufacturer firmware identifier.
- Manufacturer default: 8420 (hex)

40004 / 40005 : DEVICE NAME


2-registers field (4 byte or 4 ASCII characters) user free, that can hold the device name or a function identifier. Each byte can be writed with each
value from 0 to 255, than ASCII characters too.
- Manufacturer default: “3019” (ASCII).

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

40011 / 40012 : INPUT TYPE CONFIGURATION & CHANNEL ENABLE


Specify the sensor type connected to the inputs. Each channels can be programmed independently; it is
suggested to disable the channels not used.
The code for each input type (4 bits), is indicated in the table.
- Manufacturer default: 05h (Pt100)
Write the programmation values in these registers as shown in the table below: Value Type Group
00h Disabled
01h 500 Ohm A
02h 2 Kohm B
Bit 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 00
05h Pt100 A
06h Ni100 A
40011 Input #3 type Input #2 type Input #1 type Input #0 type
07h Pt1000 B
08h Ni1000 B
40012 Input #7 type Input #6 type Input #5 type Input #4 type

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

40023 : SYNCHRONISM INPUT VALUE # 0


40024 : SYNCHRONISM INPUT VALUE # 1
40025 : SYNCHRONISM INPUT VALUE # 2
40026 : SYNCHRONISM INPUT VALUE # 3
40027 : SYNCHRONISM INPUT VALUE # 4
40028 : SYNCHRONISM INPUT VALUE # 5
40029 : SYNCHRONISM INPUT VALUE # 6
40030 : SYNCHRONISM INPUT VALUE # 7

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.

40031 : INPUT OFFSET # 0


40032 : INPUT OFFSET # 1
40033 : INPUT OFFSET # 2
40034 : INPUT OFFSET # 3
40035 : INPUT OFFSET # 4
40036 : INPUT OFFSET # 5
40037 : INPUT OFFSET # 6
40038 : INPUT OFFSET # 7

Introduces an offset over the measure for each analog channel. The value is expressed in the same format of the input registers.

COILS DESCRIPTION

00001 / 00008 : OPEN DETECT


When the sensor connected to one channel goes in break condition (sensor damage, unconnected wire or out-range), the corresponding coil is
forced to 1.

00009 : WATCHDOG ALARM ENABLE


Enable the WatchDog alarm. If the alarm is enabled and the device does not receive any command for a time longer than the time specified in the
40009 register, the WatchDog alarm Event coil is forced to 1 (see the “Procedures” section).
0 = Watchdog alarm disabled
1 = Watchdog alarm enabled

00010 : WATCHDOG ALARM EVENT


This coil indicates the condition of WatchDog Alarm. If the alarm is enabled and the device does not receive any command for a time longer than the
time specified in the 40009 register, this coil is forced to 1. To return from the alarm condition, set this coil to 0.
0 = Normal Condition
1 = Alarm Condition

00011 : POWER-UP EVENT


This coil is forced to 1 at each power-on of the device; this state indicates that the device has been switched off. It is possible to know if a reset of the
device is happened clearing this coil and monitoring its state.
0 = reset not happened
1 = reset happened

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:

- Connect to the RS485 net only the device to configure.


- Turn off the device.
- Connect the INIT pin (D) to the GND pin (C).
- Turn on the device.
- Ensures that the “PWR” green LED on the front of the enclosure is lighted.

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.

- Set the communication port to these values:


baud-rate = 9600 bps
parity = None
n° bits = 8
stop bits = 1
- The device now communicates at the address 01 with the RTU protocol.
- Read or program the desired settings on the registers:
40006 : “Communication” for the baud-rate setting
40007 : “Address” for the net address of the device
- Turn off the device.
- Disconnect the INIT pin from the GND pin.
- Turn on the device.
- Set the communication port at the baud-rate programmed in the 40006 register.
- The device now communicates with the addressprogrammed in the 40007 register.

NOTE: The default manufacturer programmation is the following:

- 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

You might also like