MOL81 485 1312/MOL81 485 1337
MOL81 485 1312-MOL81 485 1337-UM-1.4-EN
11/20
The maximum time allowable between the reception of two characters is a protocol parameter which allows a
slave to resynchronise to a frame-start, if transmission is interrupted. If this time is exceeded, the slave rejects
the frame currently being received.
For the MOL81 MODBUS this time is 2ms.
A general description for the two implemented MODBUS functions is given here. See the following chapters for
a more detailed description of each command.
Write n words (function code 16)
-
Command
2 bytes
2 bytes
1 byte
n bytes
2 bytes
Device address
10H command
nb of words
nb of characters
values *
CRC 16
* words to be written, in order
A word consists of two bytes, high-order byte first
-
Reply
2 bytes
2 bytes
2 bytes
Device address
10H command
nb of words
CRC 16
If the address is 00H, all the devices process the command without sending a reply.
Read n words (function code 3 or 4)
-
Command
2 bytes
2 bytes
Device address
03 command
nb of words
CRC 16
-
Reply
1 byte
n bytes
Device address
03
nb of characters read
†
values*
CRC 16
* bytes read, in order
†
number of characters read = 2 X number of words in Command (always even)
6.2 MODBUS Commands
These commands either perform an action (WRITE) or retrieve information (READ).
The following table contains all commands that can be sent to the device:
N°
Commands
Fct code
Command
(hex)
Data sent
Data received
1
Read status
3 or 4
0040
1 word status
nb words = 1
2
Read tag
3 or 4
0042
3 words
nb words = 3
3
Emission 125KHz
16
0043
1 word emission
4
Reset device
16
0045
1 byte ( 0 = reset )
5
Read firmware version
3 or 4
0049
1 word version
nb words = 1
6
Write Setup
16
004B
1 word config
7
Write Outputs
16
0052
1 word sortie
6.3 Command: Read last tag code
This command will retrieve the most recently read tag. The reply contains 3 words.