
26
Table 3.5 Write Registers Command Format
GAP
3.5
Char
Device
Address
Function
Code
# of First
Register to be
written to Hi
# of First
Register to be
written to Lo
# of Registers
to Write Hi
# of Registers
to Write Lo
Min
.
80h
10h
10h
00h
00h
04h
Byte
Count
Program Data for
First Register
Hi
Program Data for
First Register
Lo
Program Data for
Second Register
Hi
Program Data for
Second Register
Lo
08h
00h
01h
03h
60h
……
……
Program Data for
Last Register Hi
Program Data for
Last Register Lo
CRC
Lo
CRC
Hi
……
……
00
01
xx
xx
Table 3.6 Write Registers Response Format
GAP
3.5
Char
Device
Address
Function
Code
# of First
Register to be
written to Hi
# of First
Register to
be written to
Lo
# of
Registers
to Write
Hi
# of
Registers
to Write
Lo
CRC
Lo
CRC
Hi
Min
.
80h
10h
01h
00h
00h
04h
xx
xx
3.5.3 RS-485 Packet Format – Error Exception Response
When the master sends a command, the MSB bit in the Function Code is always clear. When
a slave responds to the command, the slave leaves the MSB bit in the Function Code clear if
the response is a normal response and sets MSB bit on if the response is an error exception
response.
GAP
= A gap in transmission of 3.5 character frames indicates to the slaves that a new packet
is to follow.
Byte 1
= Device Address: Address 0 is a broadcast address that all units respond to regardless
of programmed address. All other addresses can be programmed and used in this mode.
Byte 2
= Function Code: This byte will be the last command sent plus the MSB set on.
Exception Code
= Illegal Command = 01
Illegal Register = 02
Last 2 Bytes
= Error Checking CRC – Lo Byte & Hi Byte
Table 3.7 Error Exception Response Format
GAP
3.5
Char
Device
Address
Function
Code
Exception
Code
CRC
Lo
CRC
Hi
Min
.
80h
90h
02
xx
xx