-11-
(Table 2. Function code table)
Code Function Unit
MODBUS original function
(Reference)
01
Reading digital (ON/OFF) settings
value
1 bit Reading the status of coil
02 Reading the digital input data 1 bit
Reading the input relay status
03
60
62
Reading the analog setting value 16 bits
Reading the contents of
maintenance register
04 Reading the analog input data 16 bits
Reading the contents of input
register
05 Writing digital setting value 1 bit Changing the status of single coil
06 Writing analog setting value 16 bits
Writing to single maintenance
register
08
Sending the reception data (For
examination)
Loop back test
16
61
63
Writing multiple analog setting value
Writing to multiple maintenance
register
5.3.3 Data part
Data structure differs depending on the function code. In case of requests from the master, it is made
up of, code number (Relative number calculated from reference number mentioned hereafter) of the
target data to be read and data count etc. Response from the slave consists of data etc. that is
requested.
Basic data of MODBUS is on a whole an integer of 16 bits and existence of a mark is decided for each
data. Hence put the decimal point at a different place and make it an integer value or keep the position
of the decimal fixed, and display formally using the upper and lower limit of the scale. In LE5000 there
is a method of assigning a decimal point at a different position.
5.3.4 Reference number
There is a number called “Reference number” assigned to the data in RD5100, and this number is
necessary for reading and writing the data. Data in RD5100 is categorized as “Digital setting value”,
“Digital input data”, “Analog input data” and “Analog setting value” depending on its type. Number
specification in the message is done by “Relative number” that corresponds to the respective reference
number.
(Table 3. Reference number and relative number)
Data type Reference number Relative number
MODBUS original
(Reference)
Digital setting value 1 to 1000 Reference number-1 Coil
Digital input data 10001 to 20000 Reference number-10001 Input relay
Analog input data 30001 to 40000 Reference number-30001 Input register
Analog setting value 40001 to 50000 Reference number-40001 Maintenance register
Example) “100”becomes the relative number of channel 1 data of “Reference number 30101”.
In the data part, specific numeric value such as input data is assigned as the error data.
When using this data, first does error decision for the data, then combine the decimal point data.
If you combine the decimal point data first, the error data is mistaken as the normal data.
Caution