Shinko BCS2 Communication Instruction Manual Download Page 9

9

5.3 Checksum Calculation

Checksum is used to detect receiving errors in the command or data.
Set the program for the master side as well to calculate the checksum of the response data from the slaves
so that communication errors can be checked.

The ASCII code (hexadecimal) corresponding to the characters which range from the address to that before
the checksum is converted to binary notation, and the total value is calculated.
The lower one byte of the total value is converted to 2’s complement, and then to hexadecimal numbers,
that is, ASCII code for the checksum.

• 1’s complement: Reverse each binary bit. 0 will become 1 and vice versa.
• 2’s complement: Add 1 to 1’s complement.

[Example of checksum calculation]

SV1 (0001H): 600

(0258H)

Address (instrument number): 0 (20H)

(Fig. 5.3-1)

20H
20H
50H
30H
30H
30H
31H
30H
32H
35H
38H

0010 0000
0010 0000
0101 0000
0011 0000
0011 0000
0011 0000
0011 0001
0011 0000
0011 0010
0011 0101
0011 1000

+

10 0010 0000

[Hexadecimal]

[Binary]

1101 1111

1

+

1110 0000

E

0

45H

30H

[1's complement]

[2's complement]

[Hexadecimal]

[ASCII]

Checksum

STX

ETX

P

0

0

0

1

0

2

5

8

02H

20H

20H

50H

30H

30H

30H

31H

30H

32H

35H

38H

03H

[Characters above are represented in ASCII.]

Checksum

Checksum calculation range

[e.g.]

E

45H 30H

0

Summary of Contents for BCS2

Page 1: ...le connector of the BCD2 BCR2 BCS2 When performing Console communication it is not required to remove the Serial communication cables However do not send a command from the master side 1 System Configuration 1 1 When Using USB Communication Cable CMC 001 1 sold separately Fig 1 1 1 1 2 When Using Communication Converter IF 400 sold separately Fig 1 2 1 USB communication cable CMC 001 1 sold separa...

Page 2: ...Be sure to ground the FG terminal Recommended cable OTSC VB 2PX0 5SQ made by Onamba Co Ltd or equivalent Use a twisted pair cable RXD TXD DCD DTR DSR RTS CTS 2 3 5 1 4 6 7 8 GND RI 9 CDM FG FG FG YA YB SG YA YB SG Shield wire 4 3 1 6 Host computer D sub 9 pin connector YA YB SG Shield wire Shield wire Communication converter IF 400 sold separately RS 232C RS 485 BCS2 BCR2 BCD2 YA YB SG YA YB SG YA...

Page 3: ...or The terminator is mounted at the end of the wire when connecting multiple peripheral devices to a personal computer The terminator prevents signal reflection and disturbance Do not connect a terminator to the communication line because each BCD2 BCR2 BCS2 has built in pull up and pull down resistors ...

Page 4: ...ng Range Communication protocol Selects communication protocol Selection item Shinko protocol Modbus ASCII Modbus RTU Shinko protocol JC command allocated Modbus ASCII JC command allocated Modbus RTU JC command allocated Instrument number Sets the instrument number The instrument numbers should be set one by one when multiple instruments are connected in Serial communication otherwise communicatio...

Page 5: ...PCD 33A with the SVTC Set value digital transmission option digital SV via the SVTC command can be received from programmable controllers Refer to Section 8 Set Value Digital Transmission on p 46 SV adds SVTC bias value to the value received by the SVTC command Setting range 20 of input span DC voltage current inputs 20 of scaling span Available only when Shinko protocol is selected in Communicati...

Page 6: ...an idle status mark status transmission period of 1 or more characters before sending the command to ensure synchronization on the receiving side Set the program so that the master can disconnect the transmitter from the communication line within a 1 character transmission period after sending the command in preparation for reception of the response from the slave To avoid collision of transmissio...

Page 7: ...H Command type 50H Data item Data Checksum Delimiter 03H 1 1 1 1 4 4 2 1 Write multiple pieces of data Header 02H Address Sub address 20H Command type 54H Data item Data Checksum Delimiter 03H 1 1 1 1 4 4 x n 2 1 n Amount of data 2 Read command Read a single piece of data Header 02H Address Sub address 20H Command type 20H Data item Checksum Delimiter 03H 1 1 1 1 4 2 1 Read multiple pieces of data...

Page 8: ... 54H Write multiple pieces of data Writes consecutive multiple pieces of data Amount of data Max 100 Notes about Reading Writing multiple pieces of data When reading writing multiple pieces of data as it takes time until slave sends response data the master determines no response time based on timeout period below after sending a command Timeout period calculation 6 ms x Amount of data Response de...

Page 9: ... hexadecimal numbers that is ASCII code for the checksum 1 s complement Reverse each binary bit 0 will become 1 and vice versa 2 s complement Add 1 to 1 s complement Example of checksum calculation SV1 0001H 600 0258H Address instrument number 0 20H Fig 5 3 1 20H 20H 50H 30H 30H 30H 31H 30H 32H 35H 38H 0010 0000 0010 0000 0101 0000 0011 0000 0011 0000 0011 0000 0011 0001 0011 0000 0011 0010 0011 0...

Page 10: ... command from the master when writing SV1 to 600 0258H Header 02H Address 21H Sub address 20H Command type 50H Data item 0001H 30H 30H 30H 31H Data 0258H 30H 32H 35H 38H Checksum 44H 46H Delimiter 03H 1 1 1 1 4 4 2 1 A response from the slave in normal status Header 06H Address 21H Checksum 44H 46H Delimiter 03H 1 1 2 1 3 Read Address 1 SV1 0001H Read command from the master Header 02H Address 21H...

Page 11: ... Step 2 SV 200 00C8H 1004H Step 2 time 120 minutes 2 00 0078H 1005H Step 2 wait value 0 0000H 1006H Step 3 SV 300 012CH 1007H Step 3 time 30 minutes 0 30 001EH 1008H Step 3 wait value 10 000AH 1009H Step 4 SV 300 012CH 100AH Step 4 time 60 minutes 1 00 003CH 100BH Step 4 wait value 0 0000H 100CH Step 5 SV 0 0000H 100DH Step 5 time 120 minutes 2 00 0078H 100EH Step 5 wait value 0 0000H Write comman...

Page 12: ...H 30H 30H 30H 1 1 1 1 4 Data 00C8003C000A00C800780000012C001E000A012C003C0000000000780000H 30H 30H 43H 38H 30H30H 33H 43H 30H 30H 37H 38H 30H 30H 30H 30H 60 4 x 15 Checksum 42H 36H Delimiter 03H 2 1 Response data becomes as follows Data Item Data Data Converted to Hexadecimal 1000H Step 1 SV 200 00C8H 1001H Step 1 time 60 minutes 1 00 003CH 1002H Step 1 wait value 10 000AH 1003H Step 2 SV 200 00C8...

Page 13: ...er transmission times Communication speed 38400 bps 750 s To transmit continuously an interval between characters which consist of one message must be within 1 5 character transmission times If an interval lasts longer than 1 5 character transmission times the BCx2 assumes that transmission from the master is finished which results in a communication error and will not return a response 6 3 Messag...

Page 14: ...ster sends request message setting 13H to the function code by mistake slave returns 93H by setting the MSB to 1 because the former is an illegal function For negative acknowledgement the exception codes below are set to the data of the response message and returned to the master in order to inform it of what kind of error has occurred Exception Code Contents 1 01H Illegal function Non existent fu...

Page 15: ...mitted The generation of a polynomial series is as follows Generation of polynomial series X16 X 15 X 2 1 1 Initialize the CRC 16 data assumed as X FFFFH 2 Calculate exclusive OR XOR with the 1st data and X This is assumed as X 3 Shift X one bit to the right This is assumed as X 4 When a carry is generated as a result of the shift XOR is calculated by X of 3 and the fixed value A001H This is assum...

Page 16: ...se message from the slave in exception error status When a value out of the setting range is set The function code MSB is set to 1 for the response message in exception error status 86H 38H 36H The exception code 03H 30H 33H Value out of the setting range is returned error Header 3AH Slave address 30H 31H Function code 38H 36H Exception code 03H 30H 33H Error check LRC 37H 36H Delimiter CR LF 0DH ...

Page 17: ...10 000AH 1003H Step 2 SV 200 00C8H 1004H Step 2 time 120 minutes 2 00 0078H 1005H Step 2 wait value 0 0000H 1006H Step 3 SV 300 012CH 1007H Step 3 time 30 minutes 0 30 001EH 1008H Step 3 wait value 10 000AH 1009H Step 4 SV 300 012CH 100AH Step 4 time 60 minutes 1 00 003CH 100BH Step 4 wait value 0 0000H 100CH Step 5 SV 0 0000H 100DH Step 5 time 120 minutes 2 00 0078H 100EH Step 5 wait value 0 0000...

Page 18: ...30H 31H Function code 30H 33H Number of response bytes 1EH 31H 45H 1 2 2 2 Data 00C8003C000A00C800780000012C001E000A012C003C0000000000780000H 30H 30H 43H 38H 30H 30H 33H 43H 30H 30H 37H 38H 30H 30H 30H 30H 60 Error check LRC 35H 41H Delimiter CR LF 0DH 0AH 2 2 Data in the response message becomes as follows Data Item Data Data Converted to Hexadecimal 1000H Step 1 SV 200 00C8H 1001H Step 1 time 60...

Page 19: ...ception error status When a value out of the setting range is set The function code MSB is set to 1 for the response message in exception error status and 86H is returned The Exception code 03H Value out of the setting range is returned error 3 5 idle characters Slave address 01H Function code 86H Exception code 03H Error check CRC 16 0261H 3 5 idle characters 1 1 1 2 3 Read Slave address 1 SV1 00...

Page 20: ...inutes 1 00 003CH 1002H Step 1 wait value 10 000AH 1003H Step 2 SV 200 00C8H 1004H Step 2 time 120 minutes 2 00 0078H 1005H Step 2 wait value 0 0000H 1006H Step 3 SV 300 012CH 1007H Step 3 time 30 minutes 0 30 001EH 1008H Step 3 wait value 10 000AH 1009H Step 4 SV 300 012CH 100AH Step 4 time 60 minutes 1 00 003CH 100BH Step 4 wait value 0 0000H 100CH Step 5 SV 0 0000H 100DH Step 5 time 120 minutes...

Page 21: ... address 01H Function code 03H Number of response bytes 1EH 1 1 1 Data 00C8003C000A00C800780000012C001E000A012C003C0000000000780000H 30 Error check CRC 16 F340H 3 5 idle characters 2 Data in the response message becomes as follows Data Item Data Data Converted to Hexadecimal 1000H Step 1 SV 200 00C8H 1001H Step 1 time 60 minutes 1 00 003CH 1002H Step 1 wait value 10 000AH 1003H Step 2 SV 200 00C8H...

Page 22: ...response message to the master When acknowledgement is returned the slave simply returns the original function code When negative acknowledgement is returned the MSB of the original function code is set as 1 for the response For example when the master sends request message setting 0FH to the sub function code by mistake slave returns ABH by setting the MSB to 1 because the former is a non existen...

Page 23: ...e List of Object length 1 Byte List of Object value Object length For the response message negative acknowledgement an exception code is set and returned Function code 1 Byte ABH Exception code 1 Byte 01H 02H 03H 4 Error check 16 bit data to detect communication errors Refer to Sections 6 3 Message Configuration 4 Error Check pp 14 15 6 5 2 Message Example Message example in RTU mode are shown bel...

Page 24: ... 2BH Sub function code 0EH 1 1 1 Data 048100000100185348494E4B4F20544543484E4F5320434F2E2C204C54442EH 31 Error check CRC 16 1C54H 3 5 idle characters 2 Data in the response message becomes as follows Data Read Device ID code 1 Byte 04H Conformity level 1 Byte 81H More Follows 1 Byte 00H Next Object ID 1 Byte 00H Number of Objects 1 Byte 01H List of Object ID 1 Byte 00H List of Object length 1 Byte...

Page 25: ... becomes as follows Data Read Device ID code 1 Byte 04H Conformity level 1 Byte 81H More Follows 1 Byte 00H Next Object ID 1 Byte 00H Number of Objects 1 Byte 01H List of Object ID 1 Byte 01H List of Object length 1 Byte 10 0AH List of Object value Object length B 42H C 43H D 44H 2 32H R 52H 0 30H 0 30H 2DH 0 30H 1 31H Response message from the slave in exception error status when Sub function cod...

Page 26: ... 0008H N 200 to 1300 0009H PL 0 to 1390 000AH C W Re5 26 0 to 2315 000BH Pt100 200 0 to 850 0 000CH JPt100 200 0 to 500 0 000DH Pt100 200 to 850 000EH JPt100 200 to 500 000FH K 328 to 2498 0010H K 328 0 to 752 0 0011H J 328 to 1832 0012H R 32 to 3200 0013H S 32 to 3200 0014H B 32 to 3308 0015H E 328 to 1472 0016H T 328 0 to 752 0 0017H N 328 to 2372 0018H PL 32 to 2534 0019H C W Re5 26 32 to 4199 ...

Page 27: ...T 0011H Pattern end output 0012H Output by communication command 20 24 50 54H 03 06 10H 0007H Event output EV2 allocation 1 0000H No event 0001H Alarm output High limit alarm 0002H Alarm output Low limit alarm 0003H Alarm output High Low limits alarm 0004H Alarm output High Low limits independent alarm 0005H Alarm output High Low limit range alarm 0006H Alarm output High Low limit range independen...

Page 28: ... value Set value Decimal point ignored 20 24 50 54H 03 06 10H 001EH Loop break alarm time Set value 20 24 50 54H 03 06 10H 001FH Loop break alarm span Set value Decimal point ignored 20 24 50 54H 03 06 10H 0020H Event input DI1 allocation 0000H No event 0001H Set value memory 0002H Control ON OFF 0003H Direct Reverse action 0004H Preset output 1 ON OFF 0005H Preset output 2 ON OFF 0006H Auto Manua...

Page 29: ...4DH Direct Reverse action 0000H Reverse Heating action 0001H Direct Cooling action 20 24 50 54H 03 06 10H 004EH Set value lock 0000H Unlock 0001H Lock 1 0002H Lock 2 0003H Lock 3 0004H Lock 4 0005H Lock 5 20 24 50 54H 03 06 10H 004FH Sensor correction coefficient Set value Decimal point ignored 20 24 50 54H 03 06 10H 0050H Sensor correction Set value Decimal point ignored 20 24 50 54H 03 06 10H 00...

Page 30: ...pends on hold after power is restored 20 24 50 54H 03 06 10H 006FH Program start temperature Set value Decimal point ignored 20 24 50 54H 03 06 10H 0070H Program control start type 0000H PV start 0001H PVR start 0002H SV start 20 24 50 54H 03 06 10H 0071H Number of repetitions Set value 20 24 50 54H 03 06 10H 0072H TS1 output step number Set value 20 24 50 54H 03 06 10H 0073H TS1 OFF time 12 Set v...

Page 31: ... Program control Holding Not holding 0000H Not holding 0001H Holding 20H 50H 03H 06H 00E4H Output by communication command B0 EV1 output 0 OFF 1 ON B1 EV2 output 0 OFF 1 ON 20H 50H 03H 06H 00E5H Manual control MV 4 Set value 20H 50H 03H 06H 00E6H AT Auto reset Perform Cancel 0000H AT AT on startup Auto reset Cancel 0001H AT Auto reset Perform 0002H AT on Startup Perform 20H 50H 03H 06H 00E7H Contr...

Page 32: ...H 03H 04H 010DH Status flag 1 B0 OUT1 output 0 OFF 1 ON B1 OUT2 output 0 OFF 1 ON B2 EV1 output 0 OFF 1 ON B3 EV2 output 0 OFF 1 ON B4 Reserved B8 Reserved B9 AT Auto reset AT on startup Perform Cancel 0 Cancel 1 Perform B10 AT Auto reset AT on startup 0 AT Auto reset 1 AT on startup B11 Heater burnout alarm 9 0 OFF 1 ON B12 Loop break alarm 0 OFF 1 ON B13 Overscale 9 0 OFF 1 ON B14 Underscale 9 0...

Page 33: ...served B5 Heater burnout alarm output Enabled Disabled 0 Disabled 1 Enabled B6 Heater burnout alarm output rated current 0 20 0 A 1 100 0 A B7 Serial communication Enabled Disabled 0 Disabled 1 Enabled B8 Heating Cooling control Enabled Disabled 0 Disabled 1 Enabled B9 Transmission output Enabled Disabled 0 Disabled 1 Enabled B10 External setting input Enabled Disabled 0 Disabled 1 Enabled B11 Ins...

Page 34: ...gnored 20 24 50 54H 03 06 10H 101AH Step 9 wait value Set value Decimal point ignored 20 24 50 54H 03 06 10H 101BH Reserved 2 20 24 50 54H 03 06 10H 102FH Reserved 2 1 If any action is changed at 0006H Event output EV1 allocation or 0007H Event output EV2 allocation EV1 alarm value EV2 alarm value etc will revert to factory default value For the items to be initialized Refer to Section 7 7 Items t...

Page 35: ...0 Hardware malfunction Error 20 AT or AT on startup has not been completed even if approx 4 hours has elapsed since starting For AT on startup PV slope and delay time cannot be measured normally for P I D calculation 9 If B13 or B14 is 1 ON B11 will also be 1 ON 10 Data item 163 digit 0 Fixed value control 1 Program control 162 to 160 digits Data item code serial number for each step 11 Step 1 SV ...

Page 36: ...oint ignored 20H 50H 03H 06H 0010H Loop break alarm time Set value 20H 50H 03H 06H 0011H Loop break alarm span Set value Decimal point ignored 20H 50H 03H 06H 0012H Set value lock 2 5 0000H Unlock 0001H Lock 1 0002H Lock 2 0003H Lock 3 20H 50H 03H 06H 0013H SV high limit 6 Set value Decimal point ignored 20H 50H 03H 06H 0014H SV low limit 6 Set value Decimal point ignored 20H 50H 03H 06H 0015H Sen...

Page 37: ...arm 0009H Alarm output High Low limits with standby alarm 20H 50H 03H 06H 0025H EV1 alarm hysteresis Set value Decimal point ignored 20H 50H 03H 06H 0026H EV2 alarm hysteresis Set value Decimal point ignored 20H 50H 03H 06H 0027H Not used 1 20H 50H 03H 06H 0028H Not used 1 20H 50H 03H 06H 0029H EV1 alarm delay time Set value 20H 50H 03H 06H 002AH EV2 alarm delay time Set value 20H 50H 03H 06H 002B...

Page 38: ... 0 000DH Pt100 200 to 850 000EH JPt100 200 to 500 000FH K 328 to 2498 0010H K 328 0 to 752 0 0011H J 328 to 1832 0012H R 32 to 3200 0013H S 32 to 3200 0014H B 32 to 3308 0015H E 328 to 1472 0016H T 328 0 to 752 0 0017H N 328 to 2372 0018H PL 32 to 2534 0019H C W Re5 26 32 to 4199 001AH Pt100 328 0 to 1562 0 001BH JPt100 328 0 to 932 0 001CH Pt100 328 to 1562 001DH JPt100 328 to 932 001EH 4 to 20 m...

Page 39: ...ied value 0 0 to 10 0 of OUT1 proportional band For reading 0005H OUT2 proportional band the controller internally calculates the multiplied value using OUT1 and OUT2 proportional bands and returns the result as response data Even if the multiplied value exceeds 10 0 the exceeding value will be returned as response data 4 If 000BH EV1 alarm value or 000CH EV2 alarm value is changed EVT1 high limit...

Page 40: ...hey are used negative acknowledgement will be returned or a random value will be written or read resulting in malfunction Modbus protocol uses Holding Register addresses The Holding Register addresses are created as follows A Shinko command data item is converted to decimal number and the offset of 40001 is added The result is the Holding Register address Using Data item 0001H SV1 as an example Da...

Page 41: ...reset Perform or 0002H AT on startup Perform is written at 00E6H AT Auto reset Perform Cancel during PI control or ON OFF control action While AT is performing during Fixed value control if 0001H AT Auto reset Perform or 0002H AT on startup Perform is written at 00E6H AT Auto reset Perform Cancel While AT is performing in Fixed value control and if 00E0H OUT OFF key function is written While AT is...

Page 42: ...key operation has been set to 1 Yes then write the 00FFH Key operation change flag clearing to 0001H Clear key operation change flag 2 Set the program depending on the acknowledgement or negative acknowledgement as follows When acknowledgement is returned Consider it as settings completed and read all set values When Error code 5 35H Shinko protocol or Exception code 18 12H Modbus protocol is retu...

Page 43: ... 600 its manufacturer and host link units PLC Manufacturer PLC Model Series Name Host Link Unit Model Mitsubishi Electric Corp MELSEC Q QnA series AJ71UC24 A1SJ71UC24 R2 R4 PRF A1SJ71C24 R2 R4 PRF QJ71C24 MELSEC FX series Omron Corp SYSMAC CJ series CS1W SCU21 V1 CJ1W SCU21 CJ1W SCU41 Keyence Corp KV KV L20V Yokogawa Electric Corp FA M3 F3LC11 2N F3LC11 1F F3LC12 1F Fuji Electric Co Ltd MICREX SX ...

Page 44: ... 006FH X X X EV1 alarm value 0012H X X EV1 high limit alarm value 0013H X X Loop break alarm time 001EH X X X Loop break alarm span 001FH X X X SVTC bias 0053H X X X Remote bias 0056H X X X EV2 alarm value 0014H X X EV2 high limit alarm value 0015H X X Transmission output high limit 000CH X X Transmission output low limit 000DH X X OUT2 proportional band 0047H X X X EV1 alarm value 0 Enabled Disab...

Page 45: ... bias 0047H X X OUT1 proportional band 0004H X X Scaling high limit 0018H X X Scaling low limit 0019H X X EV1 alarm value 000BH X Loop break alarm time 0010H X X Loop break alarm span 0011H X X EV2 alarm value 000CH X OUT2 proportional band 0005H X X EV1 alarm hysteresis 0025H X X EV1 alarm delay time 0029H X X EV1 alarm Energized De energized 0040H X X EV2 alarm hysteresis 0026H X X EV2 alarm del...

Page 46: ...e required PC 900 Check that Set value digital transmission is selected in Communication mode PCD 33A Check that Set value digital transmission is selected in Communication protocol in Auxiliary function setting mode 1 2 Setting the BCx2 Check the following items in Engineering mode 1 Refer to Section 3 Setting Communication Parameters pp 4 5 Shinko protocol has been selected in Communication prot...

Page 47: ... Shinko protocol Modbus ASCII Modbus RTU Selectable by keypad Data format Communication Protocol Shinko Protocol Modbus ASCII Modbus RTU Start bit 1 1 1 Data bit 7 8 Selectable 7 8 Selectable 8 Parity Even No parity Odd Selectable Even No parity Odd Selectable No parity Even Odd Selectable Stop bit 1 2 Selectable 1 2 Selectable 1 2 Selectable Number of connectable units Max 31 units to 1 host comp...

Page 48: ...s pp 4 5 The instrument number address of the slave does not correspond to that of the command Check the instrument number address of the slave and the command Refer to Section 3 Setting Communication Parameters pp 4 5 The instrument numbers addresses are duplicated in multiple slaves Check that each slave has a different instrument number address Refer to Section 3 Setting Communication Parameter...

Reviews: