Modbus Protocol
Modbus Protocol
NC-2438
NC-2538
NC-2638
NC-2738
NC-2838
NIPPON
Contents
1
2
Data ............................................................................................................4
Error Check CRC.......................................................................................4
Abnormal Code..........................................................................................5
Message example of RTU mode ................................................................5
4.7.1
Reading ( Read PV from slave controller 1)..................................5
4.7.2
Setting (Set SV = 10.0 to slave controller 1) .................................5
4.7.3
Setting (Set SV = 10.0 and OUTL=100.0 to slave controller 1)....6
MODBUS ASCII Protocol.....................................................................................7
5.1
Message Configuration ..............................................................................7
5.2
ID Number(Slave Address)........................................................................7
5.3
Function Code............................................................................................7
5.4
Data ............................................................................................................7
5.5
Error Check LRC .......................................................................................7
5.6
Abnormal Code..........................................................................................8
5.7
6.7.1
Read ( Read PV from slave controller 1)..................................... 11
6.7.2
Modify ( Modify SV = 10.0 to slave controller 1)....................... 11
6.7.3
Write ( Write SV = 100.0 to slave controller 1) .......................... 11
Register Map........................................................................................................12
Press
Character
SET
Default
Protocol Selection
: MODBUS RTU Protocol
: MODBUS ASCII Protocol
: TAIE Protocol
Communication Bits
: Odd parity , Data bits = 8 , Stop Bit = 1
:Odd parity , Data bits = 8 , Stop Bit = 2
: Even parity , Data bits = 8 , Stop Bit = 1
: Even parity , Data bits = 8 , Stop Bit = 2
ID Number
Range : 0 ~ 255
Communication Baud rate
: 2400 bps
: 4800 bps
: 9600 bps
: 19200 bps
: 38400 bps
When parameter
or
was changed, always turn on the power
again. Otherwise, no communication is performed by using the changed value.
2 System Configuration
2.1 RS485 Communication System
HMI
PLC
Contoller
(RS-485)
Controller
IDNO : 2
IDNO : 3
Controller
IDNO : 4
Controller
IDNO : 32
Figure: 2.1-1
PLC
(RS-485)
Controller
IDNO : 1
Controller
IDNO : 2
Controller
IDNO : 3
Controller
IDNO : 32
Figure: 2.1-2
HOST COMPUTER
Controller
Controller
Controller
(RS-485)
IDNO : 1
IDNO : 2
IDNO : 3
Controller
IDNO : 32
Figure: 2.1-3
PC
Communication Converter
RS232
RS485
Controller
(RS-232)
IDNO : 1
Controller
IDNO : 2
Controller
IDNO : 3
Controller
Figure: 2.1-4
2.2 RS232 Communication System
PC
Controller
(RS-232)
IDNO : 1
Figure: 2.2-1
2
IDNO : 32
3 Wiring Connection
3.1 RS485 Communication Wiring
RS485 Converter
Controllers
Shield Wire
DX-
DCE
(T+)
(T-)
(R-)
DX+
MODEL : IC485SN
DX-
TxON
RxON
1
2
3
(R+) 4
DX+
Figure: 3.1-1
RS485 Converter
GND
Vs+
Controllers
DC24V
+
DX-
Shield Wire
DX+
DATADATA+
MODEL : EDAM-8520
DXDX+
Note:
Figure: 3.1-2
1. The length of shield wire should be less than 1200M.
2. Controllers in RS485 parallel connection should be less than 32 units
Controller
Shield Wire
3
2
5
RD
SD
SG
Note:
Function Code
1 Byte
Data
N Byte
CRC
2 Byte
Contents
03 (03H)
06 (06H)
16 (10H)
4.4 Data
Data depends on function code.
Request message from Master instrument is include register address, data count
and setting data.
Response data from Slave controller is include byte count, data and abnormal
code.
4.5 Error Check CRC
CRC16 generation polynomial: X 16 + X 15 + X 2 + X 1
CRC generation step is as below:
. CRC is initialized as FFFFH
. Calculate XOR with 1st data and the low byte of CRC. This is assumed as
.
.
.
.
.
4
Y(16bit).
Shift Y one bit to the right. This assumed as Y.
If a carry is generated at step 3, then calculate XOR with Y and A001H, else
jump to step 5.
Repeat step 3 and 4, until Y is shifting right 8 times.
Calculate XOR with next data and the low byte of Y. This is assumed as Y.
Repeat step 3 ~5.
NC-2438/2538/2638/2738/2838 COMMUNICATION MANUAL
Contents
01 (01H)
02 (02H)
03 (03H)
Function Code
(01H)
(03H)
Register
Address
(008AH)
Data Count
CRC
(0001H)
(A5E0H)
Function Code
(03H)
Byte Count
(02H)
Data
(03E8H)
CRC
(B8FAH)
Response from slave controller in abnormal status (Assumed as illegal data value)
ID Number
(01H)
Function Code
(83H)
Error Code
(03H)
CRC
(0131H)
Function Code
(01H)
(06H)
Register
Address
(0000H)
Setting Data
CRC
(0064H)
(8821H)
Function Code
(01H)
(06H)
Register
Address
(0000H)
Setting Data
CRC
(0064H)
(8821H)
Response from slave controller in abnormal status (Assumed as illegal data value)
ID Number
(01H)
Function Code
(86H)
Error Code
(03H)
CRC
(0261H)
Function
Code
(10H)
Register
Data
Address Count
(0000H) (0002H)
Byte
Count
(04H)
Data1
Data2
CRC
Response message from slave controller in normal status (When SV = 10.0 and
OUTL=100.0)
ID
Number
(01H)
Function
Code
(10H)
Register
Data
CRC
Address Count
(0000H) (0002H) (41C8H)
Function Code
(90H)
Error Code
(02H)
CRC
(C001H)
ID Number
(Function Code)
Data
LRC
2 Byte
2 Byte
2N Byte
2 Byte
Delimiter
(CR+LF)
2 Byte
Contents
03 (30H 33H)
06 (30H 36H)
16 (31H 30H)
5.4 Data
Data depends on function code.
Request message from Master instrument is include register address, data count
and setting data.
Response data from Slave controller is include byte count, data and abnormal
code.
5.5 Error Check LRC
LRC generation step is as below:
.
Convert all the messages to RTU mode (HEX code)
.
.
.
.
Add all the values from ID Number to the end of Data. This is assumed as
Y(8Bit).
Calculate 2s complement with Y.
Convert Y to ASCII characters (16 bit)
LRC=Y
Contents
01 (30H 31H)
02 (30H 32H)
03 (30H 33H)
Function
Register Address
Data Count
LRC
Delimiter
Code
(3AH)
(30H 31H) (30H 33H) (30H 30H 38H 41H) (30H 30H 30H 31H) (37H31H) (0DH 0AH)
Function
Byte Count
Data
LRC
Delimiter
Code
(3AH)
(30H 31H)
(30H 33H)
(30H32H)
(0DH 0AH)
Response from slave controller in abnormal status (Assumed as illegal data value)
Header ID Number
Function
Error Code
LRC
Delimiter
(30H 33H)
(37H 39H)
(0DH 0AH)
Code
(3AH)
5.7.1
(30H 31H)
(38H 33H)
Function
Register Address
Data
LRC
Delimiter
Code
(3AH)
(30H 31H) (30H 36H) (30H 30H 30H 30H) (30H 30H 36H 34H) (39H35H) (0DH 0AH)
Function
Register Address
Data
LRC
Delimiter
Code
(3AH)
(30H 31H) (30H 36H) (30H 30H 30H 30H) (30H 30H 36H 34H) (39H35H) (0DH 0AH)
Response from slave controller in abnormal status (Assumed as illegal data value)
Header ID Number
Function
Error Code
LRC
Delimiter
(30H 33H)
(37H 36H)
(0DH 0AH)
Code
(3AH)
(30H 31H)
(38H 36H)
Register Address
Data Count
Code
(3AH)
BYTE
Data1
Count
(30H 31H) (31H 30H) (30H 30H 30H 30H) (30H 30H 30H 32H) (30H 34H) (30H 30H 36H 34H)
Data2
LRC
Delimiter
Response message from slave controller in normal status (When SV = 10.0 and
OUTL=100.0)
Header ID Number Function
Register Address
Data Count
LRC
Delimiter
Code
(3AH)
(30H 31H) (31H 30H) (30H 30H 30H 30H) (30H 30H 30H 32H) (45H 44H) (0DH 0AH)
Function
Error Code
LRC
Delimiter
(30H 32H)
(36H 44H)
(0DH 0AH)
Code
(3AH)
(30H 31H)
(39H 30H)
6 ASCII Protocol
6.1 Message Configuration
Master Slave (7 Bytes):
Command
ID Number
1 Byte
1 Byte
Register
Address
2 Byte
Data
Check Sum
2 Byte
1 Byte
Header
(07H)
1 Byte
Command
(4DH)
1 Byte
ID Number
1 Byte
Register
Address
2 Byte
Data
Check Sum
2 Byte
1 Byte
6.2 Command
Command
Contents
R (52H)
M (4DH)
W (57H)
6.3 ID Number
Range: 1~255.
Master instrument identifies slave controllers by the ID Number of the requested
message. ID Number should be configuring in individual slave controller by setting
parameter IDNO in operation LEVEL 3.
6.4 Register Address
Register Address is including register address High byte and Low byte.
Totally, there are 2 bytes.
For detail, please check with Register Map(Page:12)
6.5 Data
Data is including setting data High byte and Low byte.
Totally, there are 2 bytes.
10
ID Number
(52H)
(01H)
Register
Address
(008AH)
Data
Check Sum
(0000H)
(DDH)
Command
ID Number
(07H)
(4DH)
(01H)
6.7.2
Register
Address
(008AH)
Data
Check Sum
(03E8H)
(C3H)
ID Number
(4DH)
(01H)
6.7.3
Register
Address
(0000H)
Data
Check Sum
(0064H)
(B2H)
Data
Check Sum
(03E8H)
(43H)
ID Number
(57H)
(01H)
Register
Address
(0000H)
7 Register Map
Register Address
Parameters
HEX
SV
Set Point
OUTL
Output Limit
AT
Auto Tuning
AL1
Program Pattern
DECIMAL
MODBUS
Function Code
0000
000
03/06/10H
0001
001
03/06/10H
0002
002
03/06/10H
0003
003
03/06/10H
0004
004
03/06/10H
0005
005
03/06/10H
0006
006
03/06/10H
0007H
007
03H
0008
008
03H
0009
009
03/06/10H
000A
010
03/06/10H
000B
011
03/06/10H
000C
012
03/06/10H
Setting Range
0 ~ 1000
0000H=NO
0001H=YES
0~2
SEG
Program Segment
Display
TIMR
Program Countdown
Display
SV_1
12
Register Address
Parameters
HEX
DECIMAL
MODBUS
Function Code
Setting Range
TM_2
000D
013
03/06/10H
000E
014
03/06/10H
000F
015
03/06/10H
0010
016
03/06/10H
0011
017
03/06/10H
0012
018
03/06/10H
0013
019
03/06/10H
0014
020
03/06/10H
0015
021
03/06/10H
0016
022
03/06/10H
0017
023
03/06/10H
0018
024
03/06/10H
(Pattern 1)
OUT2
Register Address
Parameters
HEX
DECIMAL
MODBUS
Function Code
Setting Range
TM_6
0019
025
03/06/10H
001A
026
03/06/10H
001B
027
03/06/10H
001C
028
03/06/10H
001D
029
03/06/10H
001E
030
03/06/10H
001F
031
03/06/10H
0020
032
03/06/10H
0021
033
03/06/10H
0022
034
03/06/10H
0023
035
03/06/10H
0024
036
03/06/10H
(Pattern 1)
OUT6
Register Address
Parameters
HEX
DECIMAL
MODBUS
Function Code
Setting Range
TM_22
0025
037
03/06/10H
0026
038
03/06/10H
0027
039
03/06/10H
0028
040
03/06/10H
0029
041
03/06/10H
002A
042
03/06/10H
002B
043
03/06/10H
002C
044
03/06/10H
002D
045
03/06/10H
002E
046
03/06/10H
002F
047
03/06/10H
0030
048
03/06/10H
(Pattern 2)
OUT22
Register Address
Parameters
HEX
DECIMAL
MODBUS
Function Code
Setting Range
TM_62
0031
049
03/06/10H
0032
050
03/06/10H
0033
051
03/06/10H
0034
052
03/06/10H
0035
053
03/06/10H
0036
054
03/06/10H
0037
055
03/06/10H
0038
056
03/06/10H
0039
057
03/06/10H
0~2000
003A
058
03/06/10H
0~3600
003B
059
03/06/10H
0~900
003C
060
03/06/10H
0~1000
003D
061
03/06/10H
003E
062
03/06/10H
(Pattern 2)
OUT62
Dead-band Time
ATVL
0~150
Register Address
Parameters
HEX
HYS1
OUT1 Hysteresis
P2
OUT2 Hysteresis
GAP1
DECIMAL
MODBUS
Function Code
Setting Range
003F
063
03/06/10H
0~1000
0040
064
03/06/10H
0~2000
0041
065
03/06/10H
0~3600
0042
066
03/06/10H
0~900
0043
067
03/06/10H
0~150
0044
068
03/06/10H
0~1000
0045
069
03/06/10H
0046
070
03/06/10H
0047
071
03/06/10H
Function Lock
0000H = 0000
1111H = 1111
0100H = 0100
0110H = 0110
0001H = 0001
0101H = 0101
0048
INP1
072
03/06/10H
0000H = K1
0001H = K2
0002H = K3
0003H = K4
0004H = K5
0005H = K6
0006H = J1
0007H = J2
0008H = J3
0009H = J4
000AH = J5
000BH = J6
000CH = R1
000DH = R2
Register Address
Parameters
HEX
0048
INP1
DECIMAL
072
MODBUS
Function Code
03/06/10H
Setting Range
000EH = S1
000FH = S2
0010H = B1
0011H = E1
0012H = E2
0013H = N1
0014H = N2
0015H = T1
0016H = T2
0017H = T3
0018H = W1
0019H = W2
001AH = PL1
001BH = PL2
001CH = U1
001DH = U2
001EH = U3
001FH = L1
0020H = L2
0021H = JP1
0022H = JP2
0023H = JP3
0024H = JP4
0025H = JP5
0026H = JP6
0027H = DP1
0028H = DP2
0029H = DP3
002AH = DP4
002BH = DP5
002CH = DP6
002DH = JP.1
002EH = JP.2
002FH = JP.3
0030H = JP.4
0031H = JP.5
18
Register Address
Parameters
HEX
0048
INP1
DECIMAL
072
MODBUS
Function Code
03/06/10H
Setting Range
0032H = JP.6
0033H = AN1
0034H = AN2
0035H = AN3
0036H = AN4
0037H = AN5
ANL1
0049
073
03/06/10H
004A
074
03/06/10H
Calibration
ANH1
0000H = 0000
DP
004B
075
03/06/10H
0001H = 000.0
0002H = 00.00
0003H = 0.000
LSPL
004C
076
03/06/10H
004D
077
03/06/10H
004E
078
03/06/10H
004F
079
03/06/10H
0050
080
03/06/10H
0051
081
03/06/10H
0052
082
03/06/10H
0053
083
03/06/10H
0054
084
03/06/10H
ANL2
0~19
0~19
0~19
Register Address
Parameters
HEX
ALT3
DECIMAL
MODBUS
Function Code
0055
085
03/06/10H
0056
086
03/06/10H
Setting Range
0000H=0000
0001H=0000
0010H=0010
0011H=0011
0100H=0100
0101H=0101
0110H=0110
0111H=0111
1000H=1000
1001H=1001
1010H=1010
1011H=1011
1100H=1100
1101H=1101
1110H=1110
1111H=1111
CLO1
0057
087
03/06/10H
0058
088
03/06/10H
0059
089
03/06/10H
005A
090
03/06/10H
005B
091
03/06/10H
005C
092
03/06/10H
005D
093
03/06/10H
005E
094
03/06/10H
RUCY
Register Address
Parameters
HEX
SETA
PSL
Protocol Selection
BITS
Communication Bits
IDNO
ID Number
BAUD
Baud rate
SVOS
SV Compensation
PVOS
PV Compensation
DECIMAL
MODBUS
Function Code
Setting Range
005F
095
03/06/10H
0060
096
03H
0~2
0061
097
03H
0~3
0062
098
03H
0~255
0063
099
03H
0~4
0064
100
03/06/10H
0065
101
03/06/10H
0000H=C
UNIT
Unit of PV and SV
0066
102
03/06/10H
0001H=F
0002H=A
PVFT
PV Filter
CASC
0067
103
03/06/10H
0068
104
03/06/10H
0069
105
03/06/10H
006A
106
03/06/10H
006B
107
03/06/10H
006C
108
03/06/10H
OUD
Heating / Cooling
selection
OPAD
Control Algorithm
HZ
Power Frequency
SET1
0 ~ 1000
0000H=HEAT
0001H=COOL
0000H=PID
0001H=FUZZY
0000H=60HZ
0001H=50HZ
0000H=0000
0001H=0000
0010H=0010
0011H=0011
0100H=0100
0101H=0101
0110H=0110
0111H=0111
Register Address
Parameters
HEX
006C
SET1
DECIMAL
108
MODBUS
Function Code
03/06/10H
Setting Range
1000H=1000
1001H=1001
1010H=1010
1011H=1011
1100H=1100
1101H=1101
1110H=1110
1111H=1111
SET2
006D
109
03/06/10H
SET3
Hide/ Display parameter
006E
110
03/06/10H
SET4
Hide/ Display parameter
006F
111
03/06/10H
SET5
Hide/ Display parameter
0070
112
03/06/10H
SET6
Hide/ Display parameter
0071
113
03/06/10H
SET7
Hide/ Display parameter
0072
114
03/06/10H
SET8
Hide/ Display parameter
0073
115
03/06/10H
SET9
Hide/ Display parameter
0074
116
03/06/10H
SET0
Hide/ Display parameter
0075
117
03/06/10H
INP2
Hide/ Display parameter
0076
118
03/06/10H
0~2
OUTY
Output mode selection
0077
119
03/06/10H
0~5
22
Register Address
Parameters
HEX
VER
Firmware Version
OUT%
Output percentage
OBIT
DECIMAL
MODBUS
Function Code
Setting Range
0086
134
03H
104
0087
135
03H
0~1000
0088
136
03H
Controller Information
215
Bit
20
CV
CT Current Value
PV
Process Value
0089
137
03H
0~999
008A
138
03H
-1999~9999
NIPPON
NC-2438/2538/2638/2738/2838 COMMUNICATION MANUAL