EasyManua.ls Logo

ComAp InteliGen NTC - Examples of Modbus Communication; Battery Voltage - Reading (Read Multiple Registers)

ComAp InteliGen NTC
141 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Communication Guide, ©ComAp – March 2014 131
IGS-NT Communication Guide 03-2014.pdf
Examples of Modbus Communication
In this chapter are some examples, how does communicate controller via Modbus.
Battery voltage – reading (read multiple
registers)
Request: 01 03 00 0C 00 01 44 09
01 = Controller address
– see your controller settings
03 = Modbus function code (Read Multiple Registers)
00 0C = Register address: Register number (Ubat => 40013)
– 40013 - 40001 = 12 DEC => 000C HEX
– see your Cfg Image or list of dedicated communication objects
A part of Cfg Image (Modbus Register …)
00 01 = Number of registers
– 40013, it is one register = 01 DEC => 0001 HEX
– you have to calculate number of register which you want read
09 44 = CRC
–CRC has to be written LSB then MSB ! See how to calculate CRC. or
implementation in C language – page 118.
Response: 01 03 02 00 DC B9 DD
01 = Controller address
– see your controller settings
03 = Modbus function code (Read Multiple Registers)
02 = Length of read data in Bytes (in HEX)
– 02 HEX => 2 DEC
– define the length of data
00 DC = Value of battery voltage
– DC HEX => 220 DEC => Batt. voltage is represented with 1 decimal => 22,0
VDC
– convert the data from hex to dec. Use the multiplication factor (In this case
0.1) !
DD B9 = CRC
– check with your CRC, because of data validity
A part of Cfg Image (Modbus Register …)

Table of Contents