background image

4. MODBUS COMMUNICATION PROTOCOL 
 
 
 
 
 

 
 

 

IMR02F04-E1 

38 

4.7 Caution for Handling Communication Data 

 

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. 

 

 

The Modbus protocol does not recognize data with decimal points during communication. 

Example:  When Measured value (PV) is 5.0 MPa,

   

5.0 is processed as 50, 
50 = 0032H 

 

Measured value (PV) 

 

High

 

00H 

 

Low

 

32H 

 

 

If data (holding register) exceeding the accessible address range is accessed, an error response 
message is returned. 

 

Read data of unused item is a default value.   

 

Any attempt to write to an unused item is not processed as an error. Data cannot be written into an 
unused item.   

 

If data range or address error occurs during data writing (Write Action), it is not processed as an error. 
Normal data is written in data register but data with error is not written; therefore, it is recommended 
to confirm data of changed items after the data setting. 

 

An attribute of the item for functions which are not in the indicator is RO (read only). If read action to 
this item is performed, the read data will be “0.” If write action to this item is performed, no error 
message is indicated and no data is written. 

 

Commands should be sent at time intervals of 30 bits after the master receives the response message. 

 

Summary of Contents for PG500

Page 1: ...IMR02F04 E1 PG500 Communication Instruction Manual RKC INSTRUMENT INC Pressure Indicator...

Page 2: ...ved Copyright 2014 RKC INSTRUMENT INC 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 resp...

Page 3: ...r 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 sp...

Page 4: ...r 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...

Page 5: ...ster 8 Connection to the USB of the host computer master 9 2 3 Setting 10 2 3 1 Display sequence 10 2 3 2 Description of each parameter 11 Function block 60 F60 Engineering mode 11 Setup setting mode...

Page 6: ...RKC communication Modbus 44 Gain setting and linearizing type Only our pressure sensor CZ 100P CZ 200P 53 5 3 The communication data which will be initialized or changed if the communication data are...

Page 7: ...ommunication function RS 485 or RS 422A is available only if the communication function is specified at the time of ordering In case of Modbus protocol frequently used communication data can be groupe...

Page 8: ...iguration Start bit 1 Data bit 7 or 8 Parity bit Without Odd or Even Stop bit 1 or 2 Protocol ANSI X3 28 1976 subcategories 2 5 and A4 RKC communication protocol Polling Selecting type Error control V...

Page 9: ...opback test 10H Preset multiple registers Error check method CRC 16 Error code 1 Function code error 2 When the mismatched address is specified 3 When the specified number of data items in the query m...

Page 10: ...olderless terminals Manufactured by J S T MFG CO LTD Circular terminal with isolation V1 25 MS3 M3 screw width 5 9 mm hole diameter 3 2 mm R Termination resistors Example 120 1 2 W If communication er...

Page 11: ...e PG500 Slave Screw Size M3 7 with 5 8 5 8 square washer Recommended tightening torque 0 4 N m 4 kgf cm Recommended solderless terminals Manufactured by J S T MFG CO LTD Circular terminal with isolati...

Page 12: ...converter COM K RKC product Connect to USB port USB cable COM K accessory Connect to USB connector of COM K The termination resistor is built in to the COM K 1 SG 2 4 3 5 T R A T R B Unused Unused Sc...

Page 13: ...e T B T A R B R A SG Shielded twisted pair wire 25 26 27 28 29 SG T B T A R B R A PG500 Slave 25 26 27 28 29 SG T B T A R B R A Screw size M3 7 with 5 8 5 8 square washer Recommended tightening torque...

Page 14: ...LECTRIC CO LTD when connector of host computer is D SUB 25 pin Maximum connections Up to 31 instruments Screw size M3 7 with 5 8 5 8 square washer Recommended tightening torque 0 4 N m 4 kgf cm Recomm...

Page 15: ...8 29 SG T B T A R B R A Screw size M3 7 with 5 8 5 8 square washer Recommended tightening torque 0 4 N m 4 kgf cm Recommended solderless terminals Manufactured by J S T MFG CO LTD Circular terminal wi...

Page 16: ...tion block 10 F10 8 Function block 60 F60 8 Function block 91 F91 8 To F10 To F91 Communication protocol CMP Return to F60 SET SET Press several times Press several times LCK Measured value PV Automat...

Page 17: ...is not possible when the address is 0 0 BPS bPS Communication speed 1 2 1200 bps 2 4 2400 bps 4 8 4800 bps 9 6 9600 bps 19 2 19200 bps 38 4 38400 bps Set the same communication speed for both the PG5...

Page 18: ...ou have locked the PG500 setting data so that it cannot be changed the lock must be released before configuring the communication settings To release the lock refer to Set lock level LCK of PG500 Oper...

Page 19: ...unction block 60 F60 until communication protocol is displayed Communication protocol F60 8 CMP Function block 60 F60 SET Press the key to set the communication protocol Setting range 0 RKC communicat...

Page 20: ...ET Store Press the key to set the communication speed Setting range 1 2 1200 bps 2 4 2400 bps 4 8 4800 bps 9 6 9600 bps 19 2 19200 bps 38 4 38400 bps As an example 38 4 38400 bps is set bPS 9 6 Commun...

Page 21: ...lock level 0050 LCK SET Store 11 Go to the Measured value PV Press and hold the key for 2 seconds or more until measured value PV is displayed Measured value PV LCK 28 Set lock level MONI 2 seconds or...

Page 22: ...ms max Response send time after PG500 receives NAK 3 ms max Response send time after PG500 sends BCC 1 ms max RKC communication Selecting procedure processing times Procedure details Time Response se...

Page 23: ...or the PG500 to process data In polling procedure Response wait time after the PG500 sends BCC In selecting procedure Response wait time after the PG500 sends ACK or NAK Fail safe A transmission error...

Page 24: ...eries and commands from the host The code use in communication is 7 bit ASCII code including transmission control characters The transmission control characters are EOT 04H ENQ 05H ACK 06H NAK 15H STX...

Page 25: ...fective so long as data link is not initialized by transmit and receive of EOT 2 Identifier 2 digits The identifier specifies the type of data that is requested from the PG500 Always attach the ENQ co...

Page 26: ...n method of BCC Exclusive OR all data and characters from STX through ETX not including STX Example STX M 1 0 1 0 0 0 ETX BCC 4DH 31H 30H 31H 30H 30H 2EH 30H 03H BCC 4DH 31H 30H 31H 30H 30H 2EH 30H 03...

Page 27: ...sends a negative acknowledgment NAK to the PG500 The PG500 will re send the same data when NAK is received This cycle will go on continuously until either recovery is achieved or the data link is cor...

Page 28: ...mputer send S T X 02H M 4DH 1 31H 0 30H 1 31H 0 30H 0 30H 2EH 0 30H E T X 03H E O T 04H Address Identifier Identifier Data Controller send Host computer send B C C E O T 04H 0 30H 0 30H M 4DH 1 31H E...

Page 29: ...uter send S T X 02H M 4DH 1 31H 0 30H 1 31H 0 30H 0 30H 2CH 0 30H E T X 03H N A K 15H Address Identifier Identifier Data Controller send Host computer send Error data B C C To 1 E O T 04H S T X 02H M...

Page 30: ...ing sequence 2 Sending selecting address from the host computer Host computer sends selecting address for the selecting sequence Address 2 digits This data is a device address of the PG500 to be selec...

Page 31: ...ts Within 6 digits Example When data send with 001 5 01 5 1 5 1 50 1 500 at the time of 1 5 PG500 can receive data When the host computer sends data containing a decimal point to an item without a dec...

Page 32: ...to the host computer Corrections such as re send must be made at the host computer The PG500 will send NAK in the following cases When an error occurs on communication the line parity framing error et...

Page 33: ...03H To 1 E O T 04H Host computer send Identifier Data Host computer send 2EH B C C S T X 02H A 41H 2 32H 0 30H 0 30H 5 35H 0 30H 0 30H E T X 03H Controller send A C K 06H 1 2CH E O T 04H 0 30H 0 30H...

Page 34: ...ont key panel of the controller For details refer to 2 3 Setting P 10 Although all connected slave units receive the query message sent from the master only the slave with the slave address coinciding...

Page 35: ...le register 8 8 8 8 08H Diagnostics loopback test 8 8 8 8 10H Preset multiple registers 11 255 8 8 4 3 Communication Mode Signal transmission between the master and slaves is conducted in Remote Termi...

Page 36: ...ponse 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 ob...

Page 37: ...lowing sequence 1 Load FFFFH to a 16 bit CRC register 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...

Page 38: ...right 1 bit Carry flag is 1 No Yes CRC Register A001H CRC Register n 1 n No Yes No Yes END CRC Register next byte of the message CRC Register Reverse with high order byte and low order byte of CRC reg...

Page 39: ...sage will probably contain NULL characters and so normal C string handling techniques will not work uint16 calculate_crc byte z_p unit16 z_message_length CRC runs cyclic Redundancy Check Algorithm on...

Page 40: ...2 state monitor are the read out from slave address 2 Query message Slave address 02H Function code 03H Starting No High 00H Low E0H Quantity High 00H Low 04H CRC 16 High 45H Low CCH Normal response...

Page 41: ...the holding register 00F4H Alarm 1 set value of slave address 1 Query message Slave address 01H Function code 06H Holding register number High 00H Low F4H Write data High 00H Low 32H CRC 16 High 49H...

Page 42: ...st 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 Normal response message Slave address 01H Function cod...

Page 43: ...address 1 Query message Slave address 01H Function code 10H Starting number High 00H Low F4H Quantity High 00H Low 02H Number of data 04H Data to first register High 00H Low order word Low 32H Data to...

Page 44: ...of unused item is a default value Any attempt to write to an unused item is not processed as an error Data cannot be written into an unused item If data range or address error occurs during data writi...

Page 45: ...gister address setting 3 Read write address 1502H 1002 4098 Alarm 2 state monitor 00E3 227 Register address setting 4 Read write address 1503H 1003 4099 Alarm output state monitor 00EC 236 1 The regis...

Page 46: ...ss setting 5 Read write address 1504H 1004 4100 RW 1 6 Register address setting 6 Read write address 1505H 1005 4101 RW 1 7 Register address setting 7 Read write address 1506H 1006 4102 RW 1 8 Registe...

Page 47: ...dress setting 6 1005H 1505 5381 7 Data specified by register address setting 7 1006H 1506 5382 8 Data specified by register address setting 8 1007H 1507 5383 Differs depending on data specified 9 Data...

Page 48: ...ommunication 3 Modbus register address Register addresses of each channel HEX Hexadecimal DEC Decimal 4 Attribute A method of how communication data items are read or written when viewed from the host...

Page 49: ...ta handling when non existing function is specified When the specified identifier is invalid RKC communication Polling The PG500 makes a timeout judgment after about 3 seconds sends EOT and ends the d...

Page 50: ...larm 4 state monitor AD 00E5 229 RO Unused 00E6 230 Unused 00E7 231 9 Peak hold monitor HP 00E8 232 RO Pressure display low to Pressure display high Varies with the setting of the Input decimal point...

Page 51: ...ate of Interlock release DI3 Bit 3 to Bit 15 Unused Data 0 Contact open 1 Contact closed Decimal number 0 to 7 15 Alarm output state monitor Q1 00EC 236 RO RKC communication Least significant digit Th...

Page 52: ...19 Hold reset HR 00F2 242 R W 0 Hold reset execution 1 Hold state When 0 is written the hold reset is performed When done the value reverts to 1 1 20 Interlock release IR 00F3 243 R W 0 Interlock rele...

Page 53: ...Display unit PU 00FC 252 R W 0 Kgf cm2 1 MPa 2 bar 3 psi 1 28 Input decimal point position XU 00FD 253 R W 0 No decimal place 1 One decimal place 2 Two decimal places 3 Three decimal places 0 29 Pres...

Page 54: ...ratio PR 0103 259 R W 0 500 to 1 500 The setting value varies depending on using pressure sensor Refer to Pressure sensor type and factory set value table 1 000 Unused 0104 260 Pressure sensor type a...

Page 55: ...1 to 10 0 seconds 0 1 37 PV display condition DU 0107 263 R W RKC communication 0 to 255 Decimal Set the bit data Refer to Modbus after converting it to decimal 0 Modbus Bit data Bit 0 Minus display o...

Page 56: ...ressure sensor 80 0 43 Transmission output scale high HV 010E 270 R W Transmission output scale low to Pressure display high Varies with the setting of the Input decimal point position 50 44 Transmiss...

Page 57: ...1 Forced alarm ON when temperature measured value exceeds the input error determination point high or low limit 0 53 Alarm 2 type XB 0118 280 R W 0 None 1 Process high 2 Process low Based on model cod...

Page 58: ...m ON when temperature measured value exceeds the input error determination point high or low limit 0 67 Alarm 4 type XD 0126 294 R W 0 None 1 Process high 2 Process low Based on model code When not sp...

Page 59: ...V 4 F 11 P 18 W 5 G 12 Q 19 X 6 H 13 R 20 Y The rated output value mV V of the CZ 100P CZ 200P is when the cable is at a length of 5 m When the cable is extended or a cable of a different manufacture...

Page 60: ...200P Explosionproof 1 500 Our CZ 100P CZ 200P Standard Loose nut 0 0 to 0 5 MPa Fixed nut 0 to 5 MPa 0 650 Our CZ 100P CZ 200P Explosionproof Loose nut 0 0 to 0 5 MPa Fixed nut 0 to 5 MPa 0 650 3 33...

Page 61: ...ssure display low 0 PV bias 0 PV ratio 1 000 Alarm 1 set value 50 Alarm 2 set value 0 Alarm 3 set value 50 Alarm 4 set value 50 Input error determination point high 53 Input error determination point...

Page 62: ...cation data will be changed to factory default values according to the new setting Name Factory set value Alarm 2 set value 0 Varies with the setting of the Input decimal point position Alarm 2 hold a...

Page 63: ...en changing Input decimal point position RKC communication XU Modbus 00FDH Name Measured value PV Peak hold monitor Bottom hold monitor Pressure display high Pressure display low PV bias Alarm 1 set v...

Page 64: ...display high In case the set value goes below the setting range Set to the Pressure display low Name Data range PV bias Input span to Input span Alarm 1 set value to Alarm 4 set value Pressure display...

Page 65: ...nication speed and data bit configuration with those of the host computer Confirm the settings and set them correctly Wrong address setting The communication settings device address communication spee...

Page 66: ...epair or replace the wrong one Mismatch of the setting data of communication speed and data bit configuration with those of the host computer Confirm the settings and set them correctly Wrong address...

Page 67: ...L DLE SP 0 P p 0 0 0 1 1 SOH DC1 1 A Q a q 0 0 1 0 2 STX DC2 2 B R b r 0 0 1 1 3 ETX DC3 3 C S c s 0 1 0 0 4 EOT DC4 4 D T d t 0 1 0 1 5 ENQ NAK 5 E U e u 0 1 1 0 6 ACK SYM 6 F V f v 0 1 1 1 7 BEL ETB...

Page 68: ...62 IMR02F04 E1 MEMO...

Page 69: ...The first edition JUN 2014 IMQ00...

Page 70: ...UN 2014 RKC INSTRUMENT INC HEADQUARTERS 16 6 KUGAHARA 5 CHOME OHTA KU TOKYO 146 8515 JAPAN PHONE 03 3751 9799 81 3 3751 9799 FAX 03 3751 8585 81 3 3751 8585 E mail info rkcinst co jp Website http www...

Reviews: