Owner's manual
IM 01R04B08-00E-E 1st edition February 15, 2012 -00
All Rights Reserved. Copyright © 2012, Rota Yokogawa
<8. TECHNICAL DETAILS OF MODBUS COMMUNICATION>
8-1
8. TECHNICAL DETAILS OF MODBUS
COMMUNICATION
8.1 Range check
AccordingtotheModbusspecicationerrorbitandexceptioncodesareonlydenedforphysical
transmissionerrors.Thereforethereisnopossibilitytosignallogicalerrorslikeviolationofdatarangesor
invalidselectionsatthetimewhenaregisterisbeingwritten.
ROTAMASS3SeriesModbuscommunicationtypewillcheckallvalueswrittenviaModbus.Valueswhich
areinvalidoroutofrangewillnotbestoredandthepreviouscontentoftheregisterwillbekeptand
returnedtothehost.Thereforethemasterwillhavetocheckthedataintheresponseofthewritecommand.
However,thiswillnotworkforvalueswhichconsistoftwoormoreregisterslikeoatvalues.Whenwriting
multiple registers the data will not be returned and as a consequence the master will not be able to check
it.Thereforetomakesureifthesevaluesareacceptedandstoredinthedevicetheonlysolutionistoread
backthevalueafterwritingusinganotherreadcommand!
For details of Modbus communication refer to the specication
http://www.modbus.org/docs/Modbus_Application_Protocol_V1_1b.pdf
8.2 Byte order of transmission
Thissectiondescribesthetransmissionofoatvalueswhichconsistoftworegisters.Incaseofdifferences
inthememorymodelofROTAMASS3SeriesModbuscommunicationtypeandthehostsystemitmightbe
necessary to swap registers and/or single bytes.
ThefollowingillustrationshowsthestorageofaoatvalueintheIEE-754formatandtheorderof
transmission in Modbus protocol on a typical example.
Themassowvalueinuserunit(holdingregister528/529decimalor210/211hex)shouldbereadusing
Modbus command 3:
Storage in registers:
Floatvalue 44.996628
Byte number Byte 3 Byte 2 Byte 1 Byte 0
Valuesinhexin
IEEE-754 notation
42 33 FC 8C
Register no. 529 dec.
(211 hex)
528 dec.
(210 hex)
TransmissionviaModbus(allvaluesinhex):
Request
from
host
Device
address
Modbus
command
Start
address
Numberof
registers
Checksum
01 03 02 10 00 02 C4 76
Response
from
ROTAMASS
Device
address
Modbus
command
Number
of bytes
Data Checksum
01 03 04 44.996628 7B 3D
Byte 1 Byte 0 Byte 3 Byte 2
FC 8C 42 33
Reg. 528 dec.
(Reg. 210 hex)
Reg. 529 dec.
(Reg. 211 hex)
Becauseoftheorderoftransmissiontheregisterseventuallyneedtobeswappedtogettheoatvaluein
thestandardIEEE-754format.Commerciallyavailablesoftwaremightdothisautomatically.However,those
users who intend to write their own communication software must be aware of the order of transmission when
readingmultipleregistersandswapregistersand/orbytesifnecessary!