34
MODBUS
RS485/RS232 Communications Interface
Function Codes
Function codes are a single byte instruction to the Slave describing the action to perform.
The following communication functions are supported by Parker SSD Drives’ units:
Function Code
Function
01 or 02
Read n bits
03 or 04
Read n words
05
Write 1 bit
06
Write 1 word
08 Loopback
15
Write n bits
16
Write n words
Read n Bits
Function Code: 01 or 02, (01h or 02h)
Command:
Device Address Function Code
01 or 02
Address of
1st bit
Number of bits
to read
CRC
1 byte
1 byte
MSB
LSB
MSB
LSB
MSB
LSB
The maximum number of bits that may be read is 512.
Reply:
Device
Address
Function Code
01 or 02
Number
of bits to
read
First byte
of data
....
Last byte
of data
CRC
1 byte
1 byte
1 byte
1 byte
....
1 byte
MSB
LSB
The first data byte contains the status of the first 8 bits, with the least significant bit being the
first bit. The second data byte contains the status of the next 8 bits, etc. Unused bits are set to
zero.
Example
From the unit at device address 02, read 14 parameters, beginning at Tag 640:
Command:
Device Address Function Code
01 or 02
Address of
1st bit
Number of bits
to read
CRC
02 01
02
7F
00
0E
8D
97
Reply:
Device
Address
Function Code
01 or 02
Number of
bytes read
First byte
of data
Last byte
of data
CRC
02 01 02
27
03
A6
0D
An expansion of the data bytes illustrates the relationship between data and the parameter
addresses.
Data byte
1st byte (27h)
2nd byte (03h)
Param. address
647 646 645 644 643 642 641 640
653 652 651 650 649 648
Bit
values
0 0 1 0 0 1 1 1 0 0 0 0 0 0 1 1
Summary of Contents for 6513
Page 7: ......