RKC Instrument Inc CB900FJA3-M*NN-NN/A/Y, CB900FJ03-8*DN-N1/A/Y, CB900WK03-MM*AN-N1/A/Y, CB900FJA3-V*AN-N1/A/Y, CB100WJA3-MM*NN-N1/A/Y User manual

...
Page 1
Digital Controller
CB100/CB400 CB500/CB700
CB900
[Z-1021]
MODBUS
Communication
Instruction Manual
RKC INSTRUMENT INC.
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 2
Modbus is a registered trademark of Schneider Electric. Company names and product names used in this manual are the trademarks or registered trademarks of the respective companies.
All Rights Reserved, Copyright 1999, RKC INSTRUMENT INC.
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
Page 3
Thank you for purchasing the RKC instrument. In order to achieve maximum performance and ensure proper operation of your new instrument, carefully read all the instructions in this manual. Please place this manual in a convenient location for easy reference.
SYMBOLS
WARNING
CAUTION
!
: This mark indicates precautions that must be taken if there is danger of electric
shock, fire, etc., which could result in loss of life or injury.
: This mark indicates that if these precautions and operating procedures are not
taken, damage to the instrument may result.
: This mark indicates that all precautions should be taken for safe usage.
: This mark indicates important information on installation, handling and operating
procedures.
: This mark indicates supplemental information on installation, handling and
operating procedures.
: This mark indicates where additional information may be located.
WARNING
!
An external protection device must be installed if failure of this instrument could result in damage to the instrument, equipment or injury to personnel.
All wiring must be completed before power is turned on to prevent electric shock, fire or damage to instrument and equipment.
This instrument must be used in accordance with the specifications to prevent fire or damage to instrument and equipment.
This instrument is not intended for use in locations subject to flammable or explosive gases.
Do not touch high-voltage connections such as power supply terminals, etc. to avoid electric shock.
RKC is not responsible if this instrument is repaired, modified or disassembled by other than factory-approved personnel. Malfunction can occur and warranty is void under these conditions.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
i-1
Page 4
CAUTION
This is a Class A instrument. In a domestic environment, this instrument may cause radio interference, in which case the user may be required to take adequate measures. This instrument is protected from electric shock by reinforced insulation. Provide reinforced insulation between the wire for the input signal and the wires for instrument power supply, source of power and loads. This instrument is designed for installation in an enclosed instrumentation panel. All high­voltage connections such as power supply terminals must be enclosed in the instrumentation panel to avoid electric shock by operating personnel. All precautions described in this manual should be taken to avoid damage to the instrument or equipment. All wiring must be in accordance with local codes and regulations. To prevent instrument damage or failure, protect the power line and the input/output lines from high currents with a protection device such as fuse, circuit breaker, etc. Prevent metal fragments or lead wire scraps from falling inside instrument case to avoid electric shock, fire or malfunction. Tighten each terminal screw to the specified torque found in the manual to avoid electric shock, fire or malfunction. For proper operation of this instrument, provide adequate ventilation for heat dispensation. Do not connect wires to unused terminals as this will interfere with proper operation of the instrument. Turn off the power supply before cleaning the instrument. Do not use a volatile solvent such as paint thinner to clean the instrument. Deformation or discoloration will occur. Use a soft, dry cloth to remove stains from the instrument. To avoid damage to instrument display, do not rub with an abrasive material or push front panel with a hard object.
NOTICE
This manual assumes that the reader has a fundamental knowledge of the principles of electricity, process control, computer technology and communications. The figures, diagrams and numeric values used in this manual are only for purpose of illustration. RKC is not responsible for any damage or injury that is caused as a result of using this instrument, instrument failure or indirect damage. Periodic maintenance is required for safe and proper operation of this instrument. Some components have a limited service life, or characteristics that change over time. Every effort has been made to ensure accuracy of all information contained herein. RKC makes no warranty expressed or implied, with respect to the accuracy of the information. The information in this manual is subject to change without prior notice. No portion of this document may be reprinted, modified, copied, transmitted, digitized, stored, processed or retrieved through any mechanical, electronic, optical or other means without prior written approval from RKC.
i-2
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 5
CONTENTS
Page
1. OUTLINE ..............................................................................1
2. SPECIFICATIONS ................................................................2
3. WIRING.................................................................................3
4. COMMUNICATION SETTINGS............................................6
4.1 Communication Setting Mode .........................................................................6
4.2 Select Communication Parameters .................................................................7
4.3 Slave Address Setting .....................................................................................8
4.4 Communication Speed Setting......................................................................10
4.5 Data Configuration Setting ............................................................................12
4.6 Interval Time Setting .....................................................................................14
4.7 RS-485 Send/Receive Process Timing .........................................................17
5. MODBUS PROTOCOL.......................................................18
5.1 Message Format ...........................................................................................18
5.2 Function Code ...............................................................................................19
5.3 Communication Mode ...................................................................................19
5.4 Slave Response ............................................................................................20
5.5 Calculating CRC-16.......................................................................................21
6. MESSAGE FORMAT..........................................................23
6.1 Read Holding Registers [03H] .......................................................................23
6.2 Preset Single Registers [06H] .......................................................................24
6.3 Diagnostics (loopback test) [08H]..................................................................25
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
i-3
Page 6
Page
7. DATA CONFIGURATION....................................................26
7.1 Data Configuration ........................................................................................26
7.2 Data Processing Precautions ........................................................................27
7.3 Communication Data List ..............................................................................28
8. TROUBLESHOOTING .......................................................35
i-4
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 7
1. OUTLINE
This manual describes the specifications, wiring instructions and communication settings for CB100/CB400/CB500/CB700/CB900 Z-1021 with Modbus communication protocol.
Master side Slave side
Host computer
or PLC etc.
Host computer
or PLC etc.
RS-232C MODBUS
RS-485
or
RS-232C/RS-485 converter
BRA-100B-2BRA-100-2
Junction branch box
MODBUSMODBUS
MODBUS
MODBUS
MODBUS
CB100/CB400/CB500 CB700/CB900 (Slave address 1)
CB100/CB400/CB500 CB700/CB900 (Slave address 2)
CB100/CB400/CB500 CB700/CB900 (Slave address 3)
CB100/CB400/CB500 CB700/CB900 (Slave address 4)
CB100/CB400/CB500 CB700/CB900 (Slave address 31)
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
1
Page 8
2. SPECIFICATIONS
(1) Interface:
(2) Connection method:
(3) Protocol:
Based on RS-485, EIA standard
2-wire system, half-duplex multi-drop connection
Modbus
(4) Signal transmission mode: Remote Terminal Unit (RTU) mode
(5) Synchronous method: Start/stop synchronous type
(6) Communication speed: 2400 bps, 4800 bps, 9600 bps, 19200 bps
(Selectable)
(7) Data type:
bit)
(8) Function codes:
Data bit: 8 (Byte data corresponding to binary data or
Parity check : Without, Odd or Even (Selectable) Stop bit: 1
03H (Read holding registers) 06H (Preset single register) 08H Diagnostics (loopback test)
(9) Error check method:
CRC-16
(10) Error codes: 1: Function code error
(Designation of an unsupported function code)
2: When written to read only data
When any address other than 0000H to 0019H is specified, etc.
3: When the data written exceeds the setting range
When the specified number of data items in the query
message exceeds the maximum number of data items
available
4: Self-diagnostic error response
(11) Maximum connection: 32 instruments including a master
2
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 9
3. WIRING
WARNING
!
To prevent electric shock or instrument failure, turn off the power before connecting or disconnecting the instrument and peripheral equipment.
Terminal number and signal details
CB100/CB400/CB500/CB900
Terminal No. Signal name Name
13 SG Signal ground
14 T/R(A) Send data/Receive data
Slave Master
Signal direction
15 T/R(B) Send data/Receive data
CB700
Terminal No. Signal name Name
7 SG Signal ground
8 T/R(A) Send data/Receive data
9 T/R(B) Send data/Receive data
Signal direction
Slave Master
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
3
Page 10
3. WIRING
)
)
)
)
)
(
)
Connection to the RS-485 port of the master
The master has a built-in circuit to transfer send/receive data alternatively.
Paired wire
Master
SG T/R(A
T/R(B
SD (TXD) and RD (RXD): Negative logic
SG
T/R(A)
T/R(B
Slave
SG
T/R(A
T/R(B
Slave
31 max.
RS-485
Shielded twisted
pair wire
Use a terminal resistor with a combined resistance of 100 on the last controller.
Connection to the RS-232C port of the master
A RS-232C/RS-485 communication converter is requited.
Paired wire
RS-485
SD (TXD)Send data
RD(RXD)Receive data
Send/Receive transfer signal
SG
T/R(A)
T/R(B)
Slave
Shielded twisted
pair wire
Use a terminal resistor with a combined resistance of 100 on the last controller.
SG
T/R(A)
T/R(B)
RS-232C/RS-485
converter
RS-232C
Master
When the master uses Windows 95/NT, use a RS-232C/RS-485 converter with an automatic send/receive transfer function.
Recommended: CD485, CD485/V manufactured by Data Link, Inc. or equivalent.
4
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
Page 11
Connection with up to 31 slaves and one master
3. WIRING
Master
RS-232C
RS-485
BRA-100B-2
RS-485
3029 311 2 3 4
SlavesSlavesSlaves
Slave address example
Master
RS-485
BRA-100B-2
RS-232C/RS-485 converter
or
BRA-100B-2
For all pertinent details on the RS-232C/RS-485 converter and junction branch box (BRA­100B-2), see the respective instruction manuals.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
5
Page 12
4. COMMUNICATION SETTINGS
To establish communication parameters between master and slave, it is necessary to set the slave address, communication speed, data configuration and interval time on each slave in the communication mode. The CB900 controller will be used as an example, but the same instructions apply to all CB Series controllers with Modbus protocol.
4.1 Communication Setting Mode
1. When the power to the instrument is turned on, the input type, input range and PV/SV display mode will be automatically displayed in that order.
2. To go to the communication setting mode, you must be in either PV/SV display mode or the SV setting mode. Press and hold the SET key and press the <R/S key at the same time to initiate communication settings. The first parameter to be displayed will be the slave address, Add.
PV
SV
SET
ALM2ALM1AT OUT2OUT1
R/S
PV
SV
SET
ALM2ALM1AT OUT2OUT1
R/S
PV/SV display mode Communication setting mode
-Slave address setting
Add
The number segment being set will be brighter than the others in the SV display
To return to the PV/SV display mode, press and hold the SET key and press the <R/S key at the same time.
6
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 13
4. COMMUNICATION SETTINGS
4.2 Select Communication Parameters
To select parameters in communication setting mode, press the SET key. The parameters are displayed and sequenced in the order of slave address, Add, communication speed, bPS, data configuration, bIT and interval time set value, InT.
Display flowchart
Power On
Display changes automatically
Input type and input range display
PV/SV display mode
Communication setting mode
PV
SV
PV
SV
PV
SV
(Display for approx. 4 sec)
Press the SET key.
Press and hold the SET key and press the <R/S key at same time.
Slave address (Add)
Press the SET key.
Communication speed (bPS)
Press the SET key.
Data configuration (bIT)
SV setting mode
PV/SV display
mode
Press and hold the SET key and press the <R/S key at same time.
Press the SET key.
PV
Press the SET key.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
SV
www.GlobalTestSupply.com
Interval time set value (InT)
7
Page 14
4. COMMUNICATION SETTINGS
4.3 Slave Address Setting
The slave address must be set before Modbus communication can begin. The slave address number is set with numbers from 1 to 99. The factory set value is 0 and two-way communication is not possible when the address is 0.
Symbol Name Setting range Description
Slave address 1 to 99* Set the controller slave
address.
Add
* Two-way communication is not possible when the address is 0.
When the communication parameter is changed, turn the power on and off again to refresh and make the new value effective.
All slave address settings must be stored by pressing the SET key. If changes are made and the SET key is not pressed within one minute, the display will automatically return to the PV/SV display mode and the slave address will return to the value prior to set change.
Setting procedure
Example: Setting the slave address to 15
1. Go to the communication setting mode so that slave address, Add, is displayed.
Factory set
value
0
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
Slave address
8
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 15
2. Press the UP key to enter 5 at the first digit from the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
3. Press the <R/S key to high-light the second digit from the right.
4. COMMUNICATION SETTINGS
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
4. Press the UP key to enter 1 at the second digit form the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
5. Press the SET key to store the new slave address. The display automatically goes to the next communication parameter, bPS.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
9
Page 16
4. COMMUNICATION SETTINGS
4.4 Communication Speed Setting
The communication speed of 2400bps, 4800bps, 9600bps or 19200bps is set with numbers from 0 to 3. To change the number of the digit, press the UP or DOWN key.
Symbol Name Setting range Description
Communication speed
0 : 2400 bps 1 : 4800 bps
Select the communication speed
Factory set
value
2
2 : 9600 bps
bPS 3 : 19200 bps
Set the same communication speed for both the slave and the master.
When the communication parameter is changed, turn the power on and off again to refresh and make the new value effective.
All communication speed settings must be stored by pressing the SET key. If changes are made and the SET key is not pressed within one minute, the display will automatically return to the PV/SV display mode and the communication speed will return to the value prior to set change.
Setting procedure
Example: Setting the communication speed to 1: 4800 bps
1. Go to the communication setting mode so that slave address, Add, is displayed. Then, press the SET key once, so the communication speed symbol, bPS, appears.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
Communication speed
10
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 17
4. SETTING FOR COMMUNICATION
2. Press the DOWN key to enter 1 (4800 bps) at the first digit from the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET R/S
3. Press the SET key to store the new communication speed. The display automatically goes to the next communication parameter, bIT.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
11
Page 18
4. SETTING FOR COMMUNICATION
4.5 Data Configuration Setting
The data configuration shown below is set with numbers from 1 to 3. To change the number of the digit, press the UP or DOWN key.
Symbol Name Setting range Description
Data configuration
bIT Configuration
Data configuration table
Setting Data bit Parity bit Stop bit
0 8 None 1
1 to 5 Do not set 1 to 5. Malfunction may result.
6 8 Even 1
7 8 Odd 1
Set the same data configuration for both the slave and the master.
0, 6 or 7
See Data
Table
Select data configuration during communication
Factory set
value
0
12
When the communication parameter is changed, turn the power on and off again to refresh and make the new value effective.
All data configuration settings must be stored by pressing the SET key. If changes are made and the SET key is not pressed within one minute, the display will automatically return to the PV/SV display mode and the data configuration will return to the value prior to set change.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
Page 19
4. SETTING FOR COMMUNICATION
Setting procedure
Example: Setting the data configuration to 6: 8 data bits, even parity and 1 stop bit.
1. Go to the communication setting mode so that slave address, Add, is displayed. Press the SET key until the data configuration symbol, bIT, appears.
PV
SV
ALM2ALM1AT OUT2OUT1
SET R/S
Data configuration
2. Press the UP key to enter 6 at the first digit from the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
3. Press the SET key to store the new data configuration. The display automatically goes to the next communication parameter, InT.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
13
Page 20
4. SETTING FOR COMMUNICATION
4.6 Interval Time Setting
The interval time from 0 to 250 ms is set with numbers from 0 to 150. To shift the digit, press the <R/S key. To change the number of the digit, press the UP or DOWN key.
Symbol Name Setting range Description
Interval time set value
0 to 150* Set the value to set the interval
time
InT
* 0 to 250 ms can be set by using 0 to 150.
Formula to calculate interval time and interval time set value
Interval time = Interval time set value 1.666 ms Interval time set value = Interval time
1.666 ms
When the communication parameter is changed, turn the power on and off again to refresh and make the new value effective.
All interval times must be stored by pressing the SET key. If changes are made and the SET key is not pressed within one minute, the display will automatically return to the PV/SV display mode and the interval time will return to the value prior to set change.
Setting procedure
Example: Setting the interval time to 250 ms.
Factory set
value
5
1. Go to the communication setting mode so that slave address, Add, is displayed. Press the SET key until the communication speed, InT, appears.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
Interval time set value
14
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 21
4. SETTING FOR COMMUNICATION
2. Calculate the interval time set value by using the formula on the previous page. The interval time set value must be a whole number. If you get a number with a decimal fraction, round to the nearest whole number.
Interval time set value:
250 ms 1.666 ms 150 (Round to the nearest whole number) The actual interval time re-calculated by using the interval time set value, 150: 150 1.666 ms 249.9 (Approx. 250 ms)
Enter an interval time set value of 150, calculated as show above, on the controller.
3. Press the DOWN key to enter 0 at the first digit from the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
4. Press the <R/S key to high-light the second digit from the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
15
Page 22
4. SETTING FOR COMMUNICATION
5. Press the UP key to enter 5 at the second digit from the right.
PV
SV
SET
R/S
6. Press the <R/S key to high-light the third digit from the right.
ALM2ALM1AT OUT2OUT1
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
7. Press the UP key to enter 1 at the third digit from the right.
PV
SV
ALM2ALM1AT OUT2OUT1
SET
R/S
8. Press the SET key to store the new interval time. The display automatically goes back to the communication parameter, Add.
16
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 23
4. SETTING FOR COMMUNICATION
4.7 RS-485 Send/Receive Process Timing
The sending and receiving of RS-485 communication is conducted through two wires; consequently, the transmission and reception of data requires precise timing. The following processing times are required during data send/receive.
Slave process timing
Procedure details Time (ms)
Read holding registers [03H]
Response transmission time after the slave receives the query message
Preset single register [06H]
Response transmission time after the slave receives the query message
Diagnostics (loopback test) [08H]
Response transmission time after the slave receives the query message
13 ms max.
6 ms max.
6 ms max.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
17
Page 24
5. MODBUS PROTOCOL
The master controls communication between master and slave. A typical message consists of a request (query message) sent from the master followed by an answer (response message) from the slave. When master begins data transmission, a set of data is sent to the slave in a fixed sequence. When it is received, the slave decodes it, takes the necessary action, and returns data to the master.
5.1 Message Format
The message consists of four parts: slave address, function code, data, and error check code which are always transmitted in the same sequence.
Slave address
Function code
Data
Error check CRC-16
Message format
Slave address
The slave address is a number from 1 to 99 manually set at the front key panel of the controller. Although all connected slaves receive the query message sent from the master, only the slave with the slave address coinciding with the query message will accept the message.
Function code
The function codes are the instructions set at the master and sent to the slave describing the action to be executed. The function codes are included when the slave responds to the master. For details, see 5.2 Function Code.
Data
The data to execute the function specified by the function code is sent to the slave and corresponding data returned to the master from the slave. For details, see 6. MESSAGE FORMAT, 7. DATA CONFIGURATION and 7.3 Communication Data List.
Error check
An error checking code (CRC-16: Cyclic Redundancy Check) is used to detect an error in the signal transmission. For the calculation method of CRC-16, see 5.5 Calculating CRC-16.
18
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 25
5.2 Function Code
Function code contents
5. MODBUS PROTOCOL
Function code (Hexadecimal)
03H
06H
08H
Message length of each function (Unit: byte)
Function code Function (Hexadecimal)
03H
06H
08H
Read holding registers
Preset single register
Diagnostics (loopback test)
Read holding registers 8 8 7 255
Preset single register
Diagnostics (loopback test)
Function Contents
5.3 Communication Mode
Measured value (PV), alarm status, current transformer input, etc.
Set value (SV), alarm set value, PID constants, PV bias, etc. (For each word)
Diagnostics (loopback test)
Query message Response message
Min Max Min Max
8 8 8 8
8 8 8 8
Signal transmission between the master and slaves is conducted in Remote Terminal Unit (RTU) mode.
RTU mode
Items Contents
Data bit length 8 bit (Binary) Start mark of message Unused End mark of message Unused Message length Data time interval 24 bit's time or less* Error check CRC-16
* The data time intervals in one query message from the master must be 24 bit's time or less.
If the data time interval exceeds 24 bit's time, the slave regards the transmission as ended and because the message format is incomplete, the slave does not respond.
See 5.2 Function Code
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
19
Page 26
5. MODBUS PROTOCOL
5.4 Slave Responses
(1) Normal response
In the response message of the Read Holding Registers, the slave returns the read out data and the number of data items with the same slave address and function code as the query message. In the response message of the Preset Single Register, the slave returns the same message as the query message. In the response message of the Diagnostics (loopback test), the slave returns the same message as the query message.
(2) Defective message response
If the query message from the master is defective, except for transmission error, the slave returns the error response message without any action.
Slave address
Function code
Error code
Error check CRC-16
Error response message
If the self-diagnostic function of the slave detects an error, the slave will return an error response message to all query messages. The function code of each error response message is obtained by adding 80H to the function code of the query message.
Error code Contents
1
2
3
4
Function code error (Designation of an unsupported function code) When written to read only data When any address other than 0000H to 0019H is specified When PID constants or anti-reset windup (ARW) data are set to 0 and 1 is entered at self-tuning (ST) function When either one of PID constants and anti-reset windup (ARW) data are written during execution of the self-tuning (ST) function
When the data written exceeds the setting range When the specified number of data items in the query message exceeds the maximum number of data items available
Self-diagnostic error response
(3) No response
The slave ignores the query message and does not respond when:
The slave address in the query message does not coincide with any slave address settings. The transmission parameter of the master does not coincide with that of the slave. Transmission error such as overrun, framing, parity and etc., is found in the query message. Data time interval in the query message from the master exceeds 24 bit's time.
20
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 27
5. MODBUS PROTOCOL
5.5 Calculating CRC-16
The Cyclic Redundancy Check (CRC) is a 2 byte (16-bit) error check code. After constructing the data message, not including start, stop, or parity bit, the master calculates a CRC code and appends this to the end of the message. The slave will calculate a CRC code from the received message, and compare it with the CRC code from the master. If they do not coincide, a communication error has occurred and the slave does not respond.
The CRC code is formed in the following sequence:
1. Load a 16-bit CRC register with FFFFH.
2. Exclusive OR ( ) the first byte (8 bits) of the message with the CRC register. Return the result to
the CRC register
3. Shift the CRC register 1 bit to the right.
4. If the carry flag is 1, exclusive OR the CRC register with A001 hex and return the result to the
CRC register. If the carry flag is 0, repeat step 3.
5. Repeat step 3 and 4 until there have been 8 shifts.
6. Exclusive OR the next byte (8 bits) of the message with the CRC register..
7. Repeat step 3 through 6 for all bytes of the message (except the CRC).
8. The CRC register contains the 2 byte CRC error code. When they are appended to the message,
the low-order byte is appended first, followed by the high-order byte.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
21
Page 28
5. MODBUS PROTOCOL
The flow chart of CRC-16
START
FFFFH CRC Register
CRC Register next byte of the message CRC Register
0 n
Shift CRC Register right 1 bit
Carry flag is 1
Yes
CRC Register A001H CRC Register
n + 1 n
No
No
n 7
Yes
Is message complete ?
Yes
END
No
The symbol indicates an exclusive OR operation. The symbol for the number of data bits is n.
22
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 29
6. MESSAGE FORMAT
6.1 Read Holding Registers [03H]
The query message specifies the starting register address and quantity of registers to be read. The contents of the holding registers are entered in the response message as data, divided into two parts: the high-order 8 bits and the low-order 8 bits, arranged in the order of the register numbers.
Example: The contents of the three holding registers from 0000H to 0002H are the read out from slave address 2.
Query message
Slave address 02H
Function code 03H
Starting number High 00H
Low 00H
Quantity High 00H
Low 03H
CRC-16 High 05H
Low F8H
First holding register address
The setting must be between 1 and 125 (0001H and 007DH)
Normal response message
Slave address 02H
Function code 03H
Number of data 06H
First holding High 00H
register contents Low 64H
Next holding High 00H
register contents Low 00H
Next holding High 00H
register contents Low 00H
CRC-16 High 44H
Low 4DH
Error response message
Slave address 02H
80H Function code 83H
Error code 03H
CRC-16 High F1H
Low 31H
Number of holding registers 2
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
23
Page 30
6. MESSAGE FORMAT
6.2 Preset Single Register [06H]
The query message specifies data to be written into the designated holding register. The write data is arranged in the query message with high-order 8 bits first and low-order 8 bits next. Only R/W holding registers can be specified.
Example: Data is written into the holding register 0006H of slave address 1.
Query message
Slave address 01H
Function code 06H
Holding register High 00H
number Low 06H
Write data High 00H
Low C8H
CRC-16 High 68H
Low 5DH
Any data within the range
Normal response message
Slave address 01H
Function code 06H
Holding register High 00H
number Low C6H
Write data High 00H
Low 08H
CRC-16 High 68H
Low 5DH
Error response message
Slave address 01H
80H Function code 86H
Error code 02H
CRC-16 High C3H
Low A1H
Contents will be the same as query message data.
24
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 31
6. MESSAGE FORMAT
6.3 Diagnostics (Loopback Test) [08H]
The master's query message will be returned as the response message from the slave. This function checks the communication system between the master and slave.
Example: Loopback test for slave address 1
Query message
Slave address 01H
Function code 08H
Test code High 00H
Low 00H
Data High 1FH
Low 34H
CRC-16 High E9H
Low ECH
Test code must be set to 00
Any pertinent data
Normal response message
Slave address 01H
Function code 08H
Test code High 00H
Low 00H
Data High 1FH
Low 34H
CRC-16 High E9H
Low ECH
Error response message
Slave address 01H
80H Function code 88H
Error code 03H
CRC-16 High 06H
Low 01H
Contents will be the same as query message data.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
25
Page 32
7. DATA CONFIGURATION
7.1 Data Configuration
The numeric range of data used in Modbus protocol is 0000H to FFFFH. Only the set value within the setting range is effective.
FFFFH represents -1.
Data processing with decimal points
Data with decimal points
The Modbus protocol does not recognize data with decimal points during communication.
Data with one decimal place
Current transformer input 1 Heater break alarm 1 Current transformer input 2 Heater break alarm 2 (Z-168 specification) (Z-168 specification) Control loop break alarm
Example: When heater break alarm (HBA) 1 set value is 20.0 A; 20.0 is processed as 200, 200 = 00C8H
Heater break alarm 1 High 00H
Low C8H
Data without decimal points
Alarm 1 status Derivative time Alarm 2 status Anti-reset windup Burnout Heat-side proportioning cycle time LBA deadband Cool-side proportional band Autotuning (AT) Cool-side proportioning cycle time Self-tuning (ST) Set data lock function Integral time RUN/STOP function
Example: When integral time is 50 seconds, 50 is processed as 50, 50 = 0032H
Integral time High 00H
Low 32H
26
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 33
7. DATA CONFIGURATION
Data whose decimal point's presence and/or position depends on input range
The position of the decimal point changes depending on the input range type because the Modbus protocol does not recognize data with decimal points during communication. The following data can have one of three decimal point positions:
No decimal point One decimal place
Two decimal places The input range for voltage/current input is fixed at 0.0 to 100.0%. For details, see Input Range Table 2 on P.34.
Measured value (PV) Heat-side proportional band Set value (SV) Deadband Alarm 1 set value PV bias Alarm 2 set value
Example: When the temperature set value is -20.0 C; -20.0 is processed as -200,
-200 = 0000H - 00C8H = FF38H
Set value (SV) High FFH
Low 38H
7.2 Data Processing Precautions
For 03H (data read from the holding register), an error response message is returned when any address other than 0000H to 0019H is specified as the starting number.
For 06H (data write to the single holding register), an error response message is returned when data is written to any address other than 0000H to 0019H.
Read data of unused channel and undefined address is 0.
Any attempt to write to an unused channel is not processed as an error. Data can not be written into an unused channel.
If data range or address error occurs during data writing, the data written before error is in effect.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
27
Page 34
7. DATA CONFIGURATION
y
7.3 Communication Data List
The communication data list summarizes data addresses (holding register numbers), names, attributes, setting ranges and factory set values.
(Attribute RO: Read only R/W: Read and Write)
*1
Attrib-
ute
RO 0.0 to 100.0 A -
Data range or item description
Process alarm, deviation alarm, SV alarm:
-1999 to +9999 C [ F] or
-199.9 to +999.9 C [ F]
Deviation alarm: -span to +span (Within 9999) Process alarm, SV alarm: Within input range
(0.0 can not be set.)
0 to 9999 C [ F] Voltage/current inputs: 0 to 100 % of span
suspension 1: Autotuning (AT) start* *After AT is completed, setting will automatically change to 0
1: Self-tuning (ST) start
Continued on the next page.
Address Name
00H Measured value (PV) RO Within input range -
01H Current transformer input 1 RO 0.0 to 100.0 A -
02H Current transformer input 2
03H Alarm 1 status RO 0: OFF 1: ON -
04H Alarm 2 status RO 0: OFF 1: ON -
05H Burnout RO 0: OFF 1: ON -
06H Set value (SV) R/W Within input range 0
07H Alarm 1 set value R/W Temperature input:
08H Alarm 2 set value Voltage/current inputs:
09H Heater break alarm 1 R/W 0.0 to 100.0 A 0.0
0AH Heater break alarm 2 *2 R/W 0.0 to 100.0 A 0.0
0BH Control loop break alarm R/W 0. 1 to 200.0 min.
0CH LBA deadband R/W Temperature input:
0DH Autotuning (AT) R/W 0: Autotuning (AT) end or
0EH Self-tuning (ST) *3 R/W 0: Self-tuning (ST) suspension
Factor
set value
Temperature input: 50 or 50.0
Voltage/ current inputs:
5.0
8.0
0
0
0
28
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 35
Continued from the previous page.
y
Address Name
Attrib-
ute
7. DATA CONFIGURATION
(Attribute RO: Read only R/W: Read and Write)
Data range or item description
Factor
set value
0FH Heat-side proportional band
(P) *4
10H Integral time (I) *4 R/W 1 to 3600 sec (0: PD control)
11H Derivative time (D) *4 R/W 1 to 3600 sec (0: PI control)
12H Anti-reset windup (ARW)
13H Heat-side proportioning
cycle time
14H Cool-side proportional
band
15H Deadband R/W Temperature input:
16H Cool-side proportioning
cycle time
17H PV bias R/W -span to +span
R/W Temperature input: 1 (0.1) to span or
9999 (999.9) C [ F] Voltage/current inputs:
0.1 to 100.0 % of span (ON/OFF action control when set to 0 or 0.0.)
Can not be set while the self-tuning (ST) function is On
Can not be set while the self-tuning (ST) function is On
Can not be set while the self-tuning (ST) function is On
R/W 1 to 100 % of heat-side proportional
*4
R/W 1 to 100 sec (0 can not be set.)
R/W 1 to 1000% of heat-side proportional
R/W 1 to 100 sec (0 can not be set.)
band (0: Integral action OFF)
Can not be set while the self-tuning (ST) function is On
Can not be set if the control output is current output.
band (0 can not be set.)
-10 to +10 C [ F] or
-10.0 to +10.0 C [ F] Voltage/current inputs:
-10.0 to +10.0 % of span
Can not be set if the control output is current output.
However, temperature inputs:
-1999 to +1999 C [ F] or
-199.9 to 999.9 C [ F]
Continued on the next page.
Temperature input: 30 (30.0)
Voltage/ current inputs:
3.0
240
60
100
*5
100
0 or 0.0
*6
0 or 0.0
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
29
Page 36
7. DATA CONFIGURATION
y
Continued from the previous page.
(Attribute RO: Read only R/W: Read and Write)
Address Name
18H Set data lock function R/W 0 to 7 *7 0
19H RUN/STOP function R/W 0: RUN 1: STOP 0
*1 For the current transformer input 2 function, Z-168 specification is required.
*2 For a unit without Z-168 specification, the read data is 0.
*3 When heating proportional band (P), integral time (I), derivative time (D) or anti-reset windup
(ARW) is set to 0, self-tuning (ST) cannot be set to 1, self-tuning start. Error code 2 is sent.
*4 The heat-side proportional band (P), integral time (I), derivative time (D) and anti-reset windup
(ARW) cannot be set while the self-tuning (ST) function is being executed. Error code 2 is sent.
Attrib-
ute
Data range or item description
Factor
set value
*5 Relay contact output: 20 sec
Voltage pulse output, trigger output for triac driving, triac output: 2 sec
*6 Relay contact output: 20 sec
Voltage pulse output, triac output: 2 sec
*7 Details of set data lock selection.
Set data Set value (SV) Alarm setting set value
(Alarm 1, Alarm 2)
0 1 ­2 ­3 - ­4 ­5 - ­6 - ­7 - - -
(-) Unsettable-Data locked ( ) Settable-Data unlocked
The data lock function only prevents setting changes being made from the front keys. Setting changes can still be made through communication transmission.
Other setting items
Reading RO (read only) and R/W (read/write) unused data are not processed as an error at read holding registers, but read data will be 0.
Any attempt to write unused data is not processed as an error. Data can not be written into the slave.
30
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 37
7. DATA CONFIGURATION
Input Range Tables
Input Range Table 1
Input type Input range Code
Input Range
0 to 200 C K 01
0 to 400 C K 02
0 to 600 C K 03
0 to 800 C K 04
0 to 1000 C K 05
0 to 1200 C K 06
0 to 1372 C K 07
K 0 to 100 C K 13
0 to 300 C K 14
0 to 450 C K 17
0 to 500 C K 20
0 to 800 F K A1
0 to 1600 F K A2
0 to 2502 F K A3
20 to 70 F K A9
0 to 200 C J 01
0 to 400 C J 02
0 to 600 C J 03
0 to 800 C J 04
Thermocouple 0 to 1000 C J 05
(TC) J 0 to 1200 C J 06
0 to 450 C J 10
0 to 800 F J A1
0 to 1600 F J A2
0 to 2192 F J A3
0 to 400 F J A6
0 to 300 F J A7
0 to 1600 C *1 R 01
0 to 1769 C *1 R 02
R 0 to 1350 C *1 R 04
0 to 3200 F *1 R A1
0 to 3216 F *1 R A2
0 to 1600 C *1 S 01
S 0 to 1769 C *1 S 02
0 to 3200 F *1 S A1
0 to 3216 F *1 S A2
Continued on the next page.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
31
Page 38
7. DATA CONFIGURATION
Continued from the previous page.
Input type Input range Code
Input Range
0 to 800 C E 01
E 0 to 1000 C E 02
0 to 1600 F E A1
0 to 1832 F E A2
0 to 1200 C N 01
N 0 to 1300 C N 02
0 to 2300 F N A1
0 to 2372 F N A2
-199.9 to +400.0 C *2 T 01
-199.9 to +100.0 C *2 T 02
-100.0 to +200.0 C T 03
0.0 to 350.0 C T 04
T -199.9 to +752.0 F *2 T A1
-100.0 to +200.0 F *2 T A2
-100.0 to +400.0 F *2 T A3
Thermocouple 0.0 to 450.0 F T A4
(TC) 0.0 to 752.0 F T A5
0 to 1300 C A 01
0 to 1390 C A 02
PL II 0 to 1200 C A 03
0 to 2400 F A A1
0 to 2534 F A A2
-199.9 to +600.0 C *2 U 01
-199.9 to +100.0 C *2 U 02
U 0.0 to 400.0 C U 03
-199.9 to +999.9 F *2 U A1
-100.0 to +200.0 F *2 U A2
0.0 to 999.9 F U A3
0 to 400 C L 01
L 0 to 800 C L 02
0 to 800 F L A1
0 to 1600 F L A2
Continued on the next page.
32
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 39
7. DATA CONFIGURTION
Continued from the previous page.
Input type Input range Code
-199.9 to +649.0 C D 01
-199.9 to +200.0 C D 02
-100.0 to +50.0 C D 03
-100.0 to +100.0 C D 04
-100.0 to +200.0 C D 05
0.0 to 50.0 C D 06
0.0 to 100.0 C D 07
0.0 to 200.0 C D 08
0.0 to 300.0 C D 09
Pt100 0.0 to 500.0 C D 10
-199.9 to +999.9 F D A1
-199.9 to +400.0 F D A2
-199.9 to +200.0 F D A3
RTD -100.0 to +100.0 F D A4
-100.0 to +300.0 F D A5
0.0 to 100.0 F D A6
0.0 to 200.0 F D A7
0.0 to 400.0 F D A8
0.0 to 500.0 F D A9
-199.9 to +649.0 C P 01
-199.9 to +200.0 C P 02
-100.0 to +50.0 C P 03
-100.0 to +100.0 C P 04
JPt100 -100.0 to +200.0 C P 05
0.0 to 50.0 C P 06
0.0 to 100.0 C P 07
0.0 to 200.0 C P 08
0.0 to 300.0 C P 09
0.0 to 500.0 C P 10
*1 Accuracy is not guaranteed between 0 to 399 C (0 to 799 F). *2 Accuracy is not guaranteed between -199.9 to -100.0 C (-199.9 to -158.0 F).
Input Range
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
33
Page 40
7. DATA CONFIGURATION
Input Range Table 2
Input type Input range Code
Input Range
Voltage input DC 0 to 5 V 4 01
(V) DC 0 to 10 V* 5 01
DC 1 to 5 V 0. 0 to 100.0 % 6 01
Current input DC 0 to 20 mA 7 01
(mA) DC 4 to 20 mA 8 01
* For this voltage range, Z-1010 specification is required.
34
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
IMCB14-E1
Page 41
8. TROUBLESHOOTING
WARNING
!
To prevent electric shock or instrument failure, always turn off the system power before replacing the instrument.
To prevent electric shock or instrument failure, always turn off the power before mounting or removing the instrument.
To prevent electric shock or instrument failure, do not turn on the power until all the wiring is completed.
To prevent electric shock or instrument failure, do not touch the inside of the instrument.
All wiring must be performed by authorized personnel with electrical experience in this type of work.
This section lists some basic causes and solutions for Modbus communication problems. If you can not find a solution, contact your nearest RKC sales office or agent for additional information about replacement or repair.
Symptom Probable cause Solution
No response The controller power is not turned on Turn on the power
There communication cable is improperly connected
Breakage in the communication cable Replace the cable
Detachment of the communication cable Confirm the connection condition
Problems with the connectors or contacts Check and replace the wiring in the
The communication speed or bit structure settings are different
The address specification is different Confirm the address numbers
A transmission error (overrun error, framing error, parity error or CRC-16 error) is found in the query message
The time interval between adjacent data in the query message is too long, exceeding 24 bit's time
Instrument failure
Confirm the connection method
connector Confirm each setting
Re-transmit after time-out occurs or verify communication program
Replace instrument or return for repair
Continued on the next page.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
35
Page 42
8. TROUBLESHOOTING
Continued from the previous page.
Symptom Probable cause Solution
Error code 1 Function code error
(An unsupported function code was specified)
Error code 2 Written to read only data. Confirm the address of holding
Any address other than 0000H to 0019H is specified.
PID constants or anti-reset windup (ARW) data are set to 0 and 1 is entered at self-tuning (ST) function
Either one of PID constants and anti-reset windup (ARW) data are written during execution of the self-tuning (ST) function.
Error code 3 The data written exceeds the setting
range.
When the specified number of data items in the query message exceeds the maximum number of data items available.
Error code 4 Self-diagnostic error Turn off the power to the instrument.
Confirm the function code
register
Set the PID constants and anti-reset windup (ARW) data to any number other than 0.
Set the self-tuning (ST) function to 0.
Confirm the setting data
Re-set the data within the range of 1 to 125 (0000H to 007DH).
If the same error occurs when the power is turned back on, contact your nearest RKC sales office or agent.
36
Error codes 1 to 4 indicate that an error response message has been transmitted.
IMCB14-E1
Find Quality Products Online at: sales@GlobalTestSupply.com
www.GlobalTestSupply.com
Loading...