No.JC3CE11 2013.01 This manual contains instructions for the communication functions, operations and notes when operating the JCS, JCM, JCR and JCD-33A series. To prevent accidents arising from the misuse of this controller, please ensure the operator receives this manual.
Warning
Turn the power supply to the instrument off before wiring or checking it. Working on or touching the terminal with the power switched on may result in severe injury or death due to electric shock.
1. System Configuration
2. Wiring
When using communication converter IF-400 • D-sub 9-pin connector: Connect only one end of the shielded wire to the FG terminal so that current cannot flow to the shielded wire. (If both ends of the shielded wire are connected to the FG terminal, the circuit will be closed between the shielded wire and the ground. As a result, current will run through the shielded wire, and this may cause noise.) 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.) Terminator (Terminal resistor) Communication converter IF-400 (sold separately) has a built-in terminator. The terminator is mounted at the end of the wire when connecting a personal computer with multiple peripheral devices. The terminator prevents signal reflection and disturbance. Do not connect the terminator to the communication line because each JCx-33A has built-in pull-up and pull-down resistors instead of a terminator.
3. Communication Settings
Press the   key for approx. 3 seconds while holding down the   key. The unit enters Auxiliary function setting mode 1.
4. Communication Procedure Communication starts with command transmission from the host computer (hereafter Master) and ends with the response of the JCx-33A (hereafter Slave). • Response with data Slave Maşter When the master sends the reading command, the slave Command responds with the corresponding set value or current status. Data • Acknowledgement When the master sends the setting command, the slave Command responds by sending acknowledgement after processing is terminated. Acknowledgement • Negative acknowledgement When the master sends a non-existent command or value Command out of the setting range, the slave returns a negative Negative acknowledgement. • No response The slave will not respond to the master in the following cases: • Global address (Shinko protocol) is set. Command • Broadcast address (Modbus protocol) is set. • Communication error (framing error, parity error) No response • Checksum error (Shinko protocol), LRC discrepancy (Modbus ASCII mode), CRC-16 discrepancy (Modbus RTU mode) (Fig.4-1) Communication timing of the RS-485 (C5 option) Master side (Take note while programming) 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 the collision of transmissions between the master and the slave, send the next command after carefully checking that the master has received the response. If a response to the command is not returned due to communication errors, set the Retry Processing to send the command again. (Retry twice or more is recommended.) Slave side When the slave starts transmission through the RS-485 communication line, the slave is arranged so as to provide an idle status (mark status) transmission period of 1 or more characters before sending the response to ensure synchronization on the receiving side. The slave is arranged so as to disconnect the transmitter from the communication line within a 1 character transmission period after sending the response. Shinko protocol is composed of ASCII codes. Hexadecimal (0 to 9, A to F), which is divided into high order (4-bit) and low order (4-bit) out of 8-bit binary data in command is transmitted as ASCII characters. Data format Start bit:  1 bit Data bit:  7 bits Parity: Even Stop bit:  1 bit Error detection: Checksum 5.2 Command configuration All commands are composed of ASCII. The data (set value, decimal number) is represented by hexadecimal numbers. Negative numbers are represented in 2's complement. Numerals written below the command represent number of characters.
Header: Control code to represent the beginning of the command or the response. ASCII codes are used. Setting command, Reading command: STX (02H) fixed Response with data, Acknowledgement:  ACK (06H) fixed Negative acknowledgement: NAK (15H) fixed Address (Instrument number): Numbers by which the master discerns each slave. Instrument number 0 to 94 and Global address 95. ASCII codes (20H to 7FH) are used by adding 20H to instrument numbers 0 to 95 (00H to 5FH). 95 (7FH) is called the Global address, which is used when the same command is sent to all the slaves connected. However, a response is not returned. Sub address: 20H fixed Command type:  Code to discern Setting command (50H) and Reading command (20H). Data item: Data classification of the command object. Composed of hexadecimal 4 digits, using ASCII. (Refer to “7. Communication command table”.) Data: The contents of data (set value) differs depending on the setting command. Composed of hexadecimal 4 digits, using ASCII. (Refer to “7. Communication command table”.) Checksum: 2-character data to detect communication errors. (Refer to "5.3 Checksum calculation".) Delimiter: Control code to represent the end of command. ASCII code ETX (03H) fixed. Represents an error type with ASCII codes. Error code: 1 (31H)----Non-existent command 2 (32H)-----Not used 3 (33H)----Set value outside the setting range 4 (34H)----Status unable to be set (e.g. AT is performing.) 5 (35H)----During setting mode by keypad operation 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 any 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 2-digits of the total value are converted to 2’s complement, and then to hexadecimal figures, that is, ASCII code for the checksum. Checksum calculation example SV1: 600°C  (0258H)
1101 1111
45H 44 6.1 Transmission mode There are 2 transmission modes (ASCII and RTU) in Modbus protocol. 6.2 ASCII mode Hexadecimal (0 to 9, A to F), which is divided into high order (4-bit) and low order (4-bit) out of 8-bit binary data in command is transmitted as ASCII characters. Data format Start bit:  1 bit Data bit:  7 bits Even/Odd/No parity (Selectable) Parity: Stop bit:  1 bit/2 bits (Selectable) Error detection : LRC (Longitudinal Redundancy Check) Data interval: 1 second or less (1) Message configuration ASCII mode message is configured to start by Header [: (colon)(3AH)] and end by Delimiter [CR
(2) Slave address Slave address is an individual instrument number on the slave side, and is s et within the range 0 to 95 (00H to 5FH). The master identifies slaves by the slave address of the requested message. The slave informs the master which slave is responding to the master by placing its own address in the response message. [Slave address 0 (00H, broadcast address) can identify all the slaves. However slaves do not respond.] (3) Function code The function code is the command code for the slave to undertake one of the following actions (Table 6.2-1).
(negative acknowledgement) has occurred when the slave returns the 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 s et as 1 for the response. (For example, when the master sends request message setting 10H for the function code by mistake, slave returns 90H by setting the MSB to 1, because the former is an illegal function.) For negative acknowledgement, the exception codes (Table 6.2-2) 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.
Data differs depending on the function code. A request message from the master is composed of a data item, amount of data and setting data. A response message from the slave is composed of a number of bytes, data and exception codes in negative acknowledgements. The effective range of data is −32768 to 32767 (8000H to 7FFH). (5) Error check of ASCII mode After calculating LRC (Longitudinal Redundancy Check) from the slave address to the end of data, the calculated 8-bit data is converted to two ASCII characters and are appended to the end of the message. How to calculate LRC ① Create a message in RTU mode. ②  Add all the values from the slave address to the end of data. This is assumed as X. ③  Make a complement for X (bit reverse). This is assumed as X. ④ Add a value of 1 to X. This is assumed as X. ⑤ Set X as an LRC to the end of the message. ⑥  Convert the whole message to ASCII characters. Numerals written below the command represent the number of characters. ① Reading (Slave address 1, SV) • A request message from the master Amount of data means how many data items are to be read. It is fixed as (30H 30H 30H 31H).
• Response message from the slave in normal status [When SV=600˚C  (0258H)] The number of response bytes means the number of bytes of data which has been read. It is fixed as (30H 32H).
• Response message from the slave in exception (error) status (When a data item has been mistaken) The function code MSB is set to 1 for the response message in exception (error) status (83H). The exception code (02H: Non-existent data address) is returned.
• Response 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). The exception code (03H: Value out of the setting range) is returned.
8-bit binary data in command is transmitted as it is. Data format Start bit:  1 bit Data bit: 8 bits Even/Odd/No parity (Selectable) Parity: Stop bit:  1 bit/2 bits (Selectable) Error detection : CRC-16 (Cyclic Redundancy Check) Data interval: 3.5 characters transmission time or less (1) Message configuration RTU mode is configured to start after idle time is processed for more than a 3.5 character transmissions and end after idle time is processed for more than a 3.5 character transmissions. 3.5 idle
characters (2) Slave address Slave address is an individual instrument number on the slave side and is set within the range 0 to 95 (00H to 5FH). The master identifies slaves by the slave address of the requested message. The slave informs the master which slave is responding to the master by placing its own address in the response message. Slave address 00H (broadcast address) can identify all the slaves connected. However slaves do not respond. (3) Function code The function code is the command code for the slave to undertake one of the following actions (Table 6.3-1). (Table 6.3-1)
Function code is used to discern whether the response is normal (acknowledgement) or if any error (negative acknowledgement) has occurred when the slave returns the 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 10H for the function code by mistake, slave returns 90H by setting the MSB to 1, because the former is an illegal function.) For negative acknowledgement, the exception codes (Table 6.3-2) below are set to the data of response message and returned to the master in order to inform it of what kind of error has occurred.
Data differs depending on the function code. A request message from the master side is composed of a data item, amount of data and setting data. A response message from the slave side is composed of a number of bytes, data and exception code in negative acknowledgement. The effective range of data is −32768 to 32767 (8000H to 7FFFH). (5) Error check of RTU mode After calculating CRC-16 (Cyclic Redundancy Check) from the slave address to the end of the data, the calculated 16-bit data is appended to the end of the message in sequence from low order to high order. How to calculate CRC-16 In the CRC-16 system, the information is divided by the polynomial series. The remainder is added to the end of the information and transmitted. The generation of a polynomial series is as follows. (Generation of polynomial series: X 16 + X 15 + X 2 + 1) ① Initialize the CRC-16 data (assumed as X) (FFFH). ② Calculate exclusive OR (XOR) with the 1st data and X. This is assumed as X. ③ Shift X one bit to the right. This is assumed as X. ④ When a carry is generated as a result of the shift, XOR is calculated by X of  ③  and the fixed value (A001H). This is assumed as X. If a carry is not generated, go to step  ⑤. ⑤ Repeat steps  ③ and  ④ until shifting 8 times. ⑥ XOR is calculated with the next data and X. This is assumed as X. ⑦ Repeat steps  ③ to  ⑤. ⑧ Repeat steps  ③ to  ⑤ up to the final data. ⑨  Set X as CRC-16 to the end of message in sequence from low order to high order. (6) Message example of RTU mode Numerals written below the command represent number of characters. ① Reading (Slave address 1, SV) • A request message from the master Amount of data means how many data items are to be read. It is fixed as 0001H.
• Response message from the slave in normal status [When SV=600°C  (0258H)] The number of response bytes means the number of bytes of data which have been read. It is fixed as 02H.
• Response message from the slave in exception (error) status (When a data item is mistaken) The function code MSB is set to 1 for the response message in exception (error) status (83H). The exception code (02H: Non-existent data address) is returned.
range is set) The function code MSB is set to 1 for the response message in exception (error) status (86H). The exception code (03H: Value out of the setting range) is returned.
Notes about setting, reading command • The data (set value, decimal) is converted to hexadecimal figures. A negative number is represented by 2's complement. • When connecting multiple slaves, the address (instrument number) must not be duplicated. • Do not use undefined Data items. If they are used, negative acknowledgement will be returned or a random value will be set or returned, 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: Data item in the sending message is 0001H, however, Modbus protocol Holding Register address is 40002 (1 + 40001). • Up to 1,000,000 (one million) entries can be stored in memory. If the number of settings exceeds the limit, the data will not be saved. So frequent transmission via communication is not recommended. (If a value the same as a previously set value is set, it will not be written in the non-volatile IC memory.) • Setting range of each item is the same as that of keypad operation. • When the data (set value) has a decimal point, a whole number (hexadecimal) without a decimal point is used. • If the alarm type is changed during selections of Data items 0023H (A1 type) or 0024H (A2 type), the alarm value will default to “0”. Alarm output status will also be initialized. • Settings via software communication are possible while in set value lock status. If Lock 3 is selected, data will not be saved in the memory. This is why data returns to its previous value after power-off. • Although the options are not ordered, setting the items for options is possible using the setting command. However, they will not function. • The Instrument Numbers and Communication Speed of the slave cannot be set by software communication. • When sending a command by Global address [95 (7FH)], the same command is sent to all the slaves connected. However, the response is not returned. • When the data (set value) has a decimal point, a whole number (hexadecimal) without a decimal point is used for a response.
How to speed up the scan time When monitoring multiple units of JCx-33A, set the program so that the requisite minimum pieces of data such as PV (0080H), OUT1 MV (0081H), status flag (0085H), etc. can be read, and for other data, set the program so that they can be read only when their set value has changed. This will speed up the scan time. How to read the set value change by the front keypad operation If any set value is changed by keypad operation, the JCx-33A sets the [Status flag (0085H) 2¹5: Change in key operation] to [Yes (1)]. There are 2 methods of reading the set value change by the front keypad as follows. Reading method 1 (1) On the software side, check that [Status flag (0085H) 2¹5: Change in key operation] has been set to [Yes (1)], then read all set values. (2) Clear the [Status flag (0085H) 215: Change in key operation], by setting the [Key operation change flag clearing (0070H)] to [Clear all (0001H)]. If [Key operation change flag clearing (0070H)] is set to [Clear all (0001H)] during the setting mode of the JCx-33A, Error code 5 (35H, Shinko protocol) or Exception Code 18 (12H, Modbus protocol) will be returned as a negative acknowledgement. And [Status flag (0085H) 2¹5: Change in key operation] cannot be cleared. Set a program so that all set values can be read until acknowledgement is returned. (3) Read all set values again after acknowledgement is returned. Reading method 2 (1) On the software side, check that [Status flag (0085H) 2 15 : Change in key operation] has been set to [Yes (1)], then set the [Key operation change flag clearing (0070H)] to [Clear all (0001H)]. (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 returned as a negative acknowledgement: Consider it as still in setting mode, and read the requisite minimum pieces of data such as PV (0080H), OUT1 MV (0081H), status flag (0085H), etc., then return to step (1). Thus, programs which do not affect the scan time can be created using the methods described above, even if set values on the monitoring software will not be updated until settings are complete. How to read PID parameters after AT (auto-tuning) finishes The JCx-33A sets [Status flag (0085H) 2 11 : AT/Auto-reset] to [During AT/Auto-reset (1)] while AT is performing. After AT is finished, PID parameters are updated. On the software side, read the parameters such as P, I, D, ARW after checking that [Status flag (0085H) 2 11 : AT/Auto-reset] has been set to [OFF (0)]. • When changing alarm types during A1 type selection (0023H) or A2 type selection (0024H), alarm value will revert to “0”. First, send the selected alarm type, then send the alarm value. • When changing input types during Input type selection (0044H), the set values such as SV, OUT1 propor- tional band, A1 value, etc. will be initialized. First, send the selected input type, then send other set values. 11
● When communicating with a PLC To communicate with a PLC, use a Shinko PLC Interface Unit SIF-400. No programming is needed for connection. Cable length: Max. communication distance: 1.2km Cable resistance: Within 50Ω (Terminator is not necessary, but if used, use 120Ω or more on one side.) Communication line: EIA RS-485 Communication method:  Half-duplex communication 9600bps (2400, 4800, 9600, 19200bps) Selectable by keypad Communication speed: Synchronization method:  Start-stop synchronization Code form: ASCII, binary Command request repeat system Error correction: Error detection: Parity, checksum (Shinko protocol), LRC (Modbus ASCII), CRC-16 (Modbus RTU)
If any malfunctions occur, refer to the following items after checking that power is being supplied to the master and the slave.
For all other malfunctions, please contact our main office or dealers.
81-72-727-6100 81-72-727-7006