User manual

5 Universal (General-purpose communication)
138 © Copyright Reserved Autonics Co., Ltd.
5.5 Universal function example
5.5.1 01(Read Coils)
It reads contents of successive coil. There is no Broadcast (Station designation of Slave as 0).
Available address is 000000 to 65535, it accords slave UB00000 to UB4095F.
When reading 5 register data from UB0180 to UB0184 of GP/LP with station no.31
GP, LP
Station
Data
UB0180 ON
UB0181 OFF
UB0182 OFF
UB0183 ON
UB0184 ON
Query
Station
Function
code
Start address
The number of read
register
CRC
0x1F 0x01 0x01 0x20 0x00 0x05 0xFF 0X81
Item Description
Station
Slave station is 31, 31=(HEX)0X1F
Function code
01
Start address upper byte
Start address is UB180.
UB180(288) = Upper(Hex)0x01 + Lower(Hex)0x20
Start address lower byte
The number of read register
upper byte
Total number of byte on data area
Total number of data to write: 5, 5 = (Hex)0x05
The number of read register
lower byte
CRC lower byte
CRC upper byte
How to calculate integer 0 type address by UB address value of GP/LP
Displays as bleow after divided integer type address value by 16.
Device
display
Address/16 Quotient
Remainder(displays
hexadecimal)
UB Decimal Hexadecimal(4bit)