Chpater 6 MODBUS Communication
- 116 -
RTU mode: Sleep interval of at least 4 bytes transmission time
(
automatically changed according to
different communication speed
)
.
ADR
ADR
ADR
ADR
(
communication
communication
communication
communication address
address
address
address
)
Valid communication address
:
1 to 254
For example: communicate with the servodrive which address is 32
(
20 in hex
):
ASCII mode
:
ADR=‘2’
,
‘0’=
>
‘2’=32
H
,
‘0’=30
H
RTU mode
:
ADR=20H
CMD
CMD
CMD
CMD
(
command
command
command
command reference
reference
reference
reference
)
and
and
and
and DATA
DATA
DATA
DATA
(
data
data
data
data
)
Data structure is determined by command code. Regular command code is shown as follows:
Command code: 03H
,
read N words(word)
,
N
≦
20.
For example: read 2 words starting from 0200
H
from the servodrive which address is 01 H.
ASCII
ASCII
ASCII
ASCII mode
mode
mode
mode
:
Reference information
:
Response information
:
STX
“
:
”
ADR
‘0’
‘1’
CMD
‘0’
‘3’
Data start address
‘0’
‘2’
‘0’
‘0’
Data number
(count as word
)
‘0’
‘0’
‘0’
‘2’
LRC checking
‘F’
‘8’
End 1
(0D
H
)(CR)
End 0
(0A
H
)(LF)
STX
“
:
”
ADR
‘0’
‘1’
CMD
‘0’
‘3’
Data number
(
count as byte
)
‘0’
‘4’
Content
of
data
start address 0200
H
‘0’
‘0’
‘B’
‘1’
Content of second
data address 0201
H
‘1’
‘F’
‘4’
‘0’
LRC checking
‘E’
‘8’
End 1
(0D
H
)(CR)
End 0
(0A
H
)(LF)