Yokogawa TC10 Operating Manual

Serial communication protocol
Modbus® for TC10
Document number: IM 05C01E81-03EN
Third edition: Feb. 2018
Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL 1
Yokogawa Electric Corporation TC10 Communication Protocol
TC10 COMMUNICATION PROTOCOL
1 Preface ...................................................................................................................3
2 Physical connection ..............................................................................................3
2.1 Interface ................................................................................................................................3
2.2 Line ........................................................................................................................................ 3
3 Communication protocol ...................................................................................... 3
3.1 Function code 3: read multiple registers (max. 16 registers for TC10) .................................. 4
3.2 Function code 6: write a single word (one location) ..............................................................5
3.3 Function code 16: preset multiple registers (maximum 16 registers for TC10) .....................5
3.4 The exception reply ...............................................................................................................6
3.5 Cyclic redundancy check (CRC) ...........................................................................................6
4 Data exchange ....................................................................................................... 8
4.1 Some definitions .................................................................................................................... 8
4.2 Memory zones ....................................................................................................................... 8
4.3 Variables zones .....................................................................................................................8
4.4 Most important changes ........................................................................................................ 8
2 Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL
Yokogawa Electric Corporation TC10 Communication Protocol

1 PREFACE

TC10 uses Modbus® RTU communication protocol. Modbus is a royalty free protocol and is easy to be implemented. For Modbus RTU a vast literature is available also in internet.
The Modbus protocol represent all data in hexadecimal format. All communication string finish with a check sum type CRC (cyclic redundancy check).
Each device on a line must have different address. The protocol allows one master only and up to 255 slaves
Only the Master unit can start the transmission by sending the address of the unit and the command to be executed. Only the unit having the correct address will answer to the master.
The transmission characteristics are usually programmable:
Device address: From 1 to 255.
Baud rate: bit per second.
byte format:
– 1 start bit;
– 8 data bitis;
– 2 final bits composed as follows:
1 parity bit (even or odd); 1 stop bit; or no parity bit; 2 stop bits.
The TC10 allows to configure:
– address (1 to 254);
– Baud rate (1200 – 2400 – 9600 – 19200 – 38400).
The byte format is fixed: 8 bits without parity and 1 stop bit.
This document is intended to describe the TC10 controllers using the Modbus protocol in their communication capability and is mainly directed to technicians, system integrators and software developers.

2 PHYSICAL CONNECTION

2.1 Interface

TC10 controllers are provided with a RS485 serial communication interface, insulated so that any problem arising from ground potential is removed.
While at rest, the instruments are in a receive condition and are revert to transmission after a correct message has been decoded that matches the configured address.

2.2 Line

The instruments are equipped with 2 terminals named A and B.
The connection between TC10s has to be carried on in parallel, i.e. all A terminals have to be connected between them so as B terminals.
A termination resistor of 120W is required to maintain the quiescent condition on the line.
Adopted baud rates range 1200 to 38400 baud, that is very satisfactory for application performances, yet very slow for RS485 interface. This fact allows the wiring of the line with a medium quality twisted pair cable: total capacity of the line should not exceed 200 nF.
The line can be up to 1000 meters in length.

3 COMMUNICATION PROTOCOL

The protocol adopted by protocol, so that connections are easy for many commercial PLCs and supervisory programs.
For users needing to develop their own communication software, all information is available as well as implementation hints.
The Modbus RTU (JBUS) communication functions implemented in TC10 series are:
Function 3 Read n register; Function 6 Preset one register; Function 16 Preset multiple registers.
These functions allow the supervisory program to read and modify any data of the controller. The communication is based on messages sent by the master station (host) to the slave stations (TC10) and viceversa. The slave station that recognises the message as sent to it, analyses the content and, if it is formally and semantically correct, generates a reply message directed back to the master.
TC10
is a subset of the widely used Modbus RTU (JBUS, AEG Schneider Automation, Inc. registered trade mark)
Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL 3
Yokogawa Electric Corporation TC10 Communication Protocol
The communication process involves five types of messages:
From master to slave From slave to master
Function 3: read n registers request Function 3: read n registers reply
Function 6: preset one register request Function 6: preset one register reply
Function 16: preset multiple registers request Function 16: preset multiple registers reply
Exception reply (as reply to all functions in abnormal conditions)
All messages contain four fields:
Slave address (from 1 to 255): Modbus RTU (JBUS) reserves address 0 for broadcasting messagesand it is implemented in the TC10 series;
Function code: contains 3, 6 or 16 for specified functions;
Information field: contains data like word addresses and word values as required by function in use;
Control word: a cyclic redundancy check (CRC) performed with particular rules for CRC16.
The characteristics of the asyncronous transmission are 8 bits, no parity, one stop bit.

3.1 Function code 3: read multiple registers (max. 16 registers for TC10)

This function code is used by the master to read a group of sequential registers present in the slave.
Master request Slave reply
Data Byte Data Byte
Slave address (1 to 255) 1 Slave address (1 to 255) 1
Function code (3) 1 Function code (3) 1
First register address (MSB = Most Significant Byte)
First register address (LSB = Less Significant Byte)
Number of requested registers (MSB) 1 CRC-16 (LSB) 1
Number of requested registers (LSB) 1 CRC-16 (MSB) 1
CRC-16 (LSB) 1
CRC-16 (MSB) 1
In the “Data(s)” fild the values of the requested registers are presented in word format [2 byte]: the first byte represent the MSB (Most Significant Byte) while the second byte represent the LSB (Less Significant Byte). This mode will be the same for all requested locations.
Example: The master requires to the address 1 the value of the locations 25 and 26 (0x19 and 0x1A).
1 Byte number (n) 1
1 Data(s) n
Master request Slave reply
Data Byte (Hex) Data Byte (Hex)
Slave address 01 Slave address 01
Function code (3 = read) 03 Function code (3 = read) 03
First register address (MSB)
First register address (LSB)
Number of requested registers (MSB) 00 Value of the first register (LSB) 0A
Number of requested registers (LSB) 02 Value of the second register (MSB) 00
CRC-16 (LSB) 15 Value of the second register (LSB) 14
CRC-16 (MSB) CC CRC-16 (LSB) DA
The slave replay means: The value of the location 25 = 10 (0x000A hexadecimal) The value of the location 26 = 20 (0x0014 hexadecimal)
00 Byte number 04
19 Value of the first register (MSB) 00
CRC-16 (MSB) 3E
4 Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL
Yokogawa Electric Corporation TC10 Communication Protocol

3.2 Function code 6: write a single word (one location)

Master request Slave reply
Data Byte (Hex) Data Byte (Hex)
Slave address 01 Slave address (1-255) 1
Function code (6) 06 Function code (6) 1
Register address (MSB)
Register address (LSB)
Value to write (MSB) 00 Written value (MSB) 1
Value to write (LSB) 0A Written value (LSB) 1
CRC-16 (MSB) A8 CRC-16 (MSB) 1
CRC-16 (LSB) 49 CRC-16 (LSB) 1
Example: The master unit asks to the slave 1 to write in the memory location 770 (0x302) the value 10 (0x0A).
Master request Slave reply
Data Byte (Hex) Data Byte (Hex)
Slave address 01 Slave address 01
Function code (6) 06 Function code (6) 06
Register address (MSB)
Register address (LSB)
Value to write (MSB) 00 Written value (MSB) 00
Value to write (LSB) 0A Written value (LSB) 0A
CRC-16 (MSB) A8 CRC-16 (MSB) A8
CRC-16 (LSB) 49 CRC-16 (LSB) 49
03 Register address (MSB) 1
02 Register address (LSB) 1
03 Register address (MSB) 03
02 Register address (LSB) 02

3.3 Function code 16: preset multiple registers (maximum 16 registers for TC10)

This function code allows to preset 16 registers at a time.
Master request Slave reply
Data Byte (Hex) Data Byte (Hex)
Slave address (1-254) 1 Slave address (1-254) 1
Function code (16) 1 Function code (16) 1
First register address (MSB)
First register address (LSB)
Number of requested registers (MSB) 1 Number of written registers (MSB) 1
Number of requested registers (LSB) 1 Number of written registers (LSB) 1
Byte count 1 CRC-16 (LSB) 1
Values n CRC-16 (MSB) 1
CRC-16 (LSB) 1
CRC-16 (MSB) 1
Example: The master unit requires to the slave 1 to write in the registers 10314 (0x284A) and 10315 (0x284B) the values 100 (0x64) and
200 (0xC8)
1 First register address (MSB) 1
1 First register address (LSB) 1
Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL 5
Yokogawa Electric Corporation TC10 Communication Protocol
Master request Slave reply
Data Byte (Hex) Data Byte (Hex)
Slave address 01 Slave address 01
Function code (16) 10 Function code (16) 10
First register address (MSB) 28 First register address (MSB) 28
First register address (LSB) 4A First register address (LSB) 4A
Number of requested registers (MSB) 00 Number of written registers (MSB) 00
Number of requested registers (LSB) 02 Number of written registers (LSB) 02
Byte count 04 CRC-16 (LSB) 69
Value 1 (MSB) 00 CRC-16 (MSB) BE
Value 1 (LSB) 64
Value 2 (MSB) 00
Value 2 ((LSB) C8
CRC-16 (LSB) C9
CRC-16 (MSB) A8

3.4 The exception reply

TC10 replies with an exception when the request is formally correct, but cannot be satisfied standing particular situations; the reply contains a code indicating the cause of the missing regular reply, the frame is:
Exception replay
Data Byte (Hex)
Slave address 1
Function code 1
Error code 1
CRC-16 (LSB) 1
CRC-16 (MSB) 1
TC10 adopts a subset of Modbus RTU (JBUS) exception code:
– unknown function code 1
– invalid memory address 2
– invalid data field 3
– controller not ready 6

3.5 Cyclic redundancy check (CRC)

CRC is a check word that permits to verify the integrity of a message. Every message, sent or received, has in the two last characters the CRC check word.
After receiving a request, the controller checks the validity of the received message comparing the received CRC with the calculated one. When a reply is ready the controller calculates the CRC word and adds two characters to the prepared message. CRC calculation is performed on every character of the message, excluding the last two.
6 Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL
Yokogawa Electric Corporation TC10 Communication Protocol
Being Modbus RTU (JBUS) compatible, TC10 controllers adopt an identical algorithm for CRC calculation, sketched in following diagram:
CRC = FFFF hex
next character
CRC = CRC exor char
n = 0
Shift on the left of
CRC in the carry
Carry = 1?
NO
n = n + 1
YES
N < 8?
YES
Other
character?
The CRC
calculation
is finished
YES
CRC = CRC exor POLY
NO
NO
The polinomial adopted by Modbus RTU (JBUS) is 1010 0000 0000 0001. Note: The first transmitted character of the CRC word is the least significant between calculated bytes.
A subrutine made with “C” able to calculate the CRC-16 follows.
/* --------------------------------------------------------------­crc_16 Calculation of CRC-16
Input parameters: buffer: character string to compute the CRC-16 length: number of bytes in the string
This function returns the value of the CRC-16
--------------------------------------------------------------- */ unsigned int crc_16 (unsigned char *buffer, unsigned int length) { unsigned int i, j, temp_bit, temp_int, crc; crc = 0xFFFF; for (i = 0; i < length; i++){ temp_int = (unsigned char) *buffer++; crc ^= temp_int; for (j = 0; j < 8; j++) { temp_bit = crc & 0x0001; crc >>= 1; if (temp_bit != 0) crc ^= 0xA001; } }
return (crc);
}
Note: All numerical values in the format 0x.... are expressed in hexadecimal format.
Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL 7
Yokogawa Electric Corporation TC10 Communication Protocol

4 DATA EXCHANGE

This section contains informations about data exchanged with TC10 series controllers concerning numerical and not numerical data, with their formats and limits.
4.1 Some definitions
All exchanged data are in the form of 16 bit words.
Two types of data are distinguished: numerical and symbolic (or not numerical).
Numerical data represents the value of a quantity (e.g. the measured variable, the set point).
Symbolic data represents a particular value in a set of values (e.g. the thermocouple type in the set of available ones: J, K, S, etc.).
Both types are coded as integers number: signed numbers for numerical and unsigned numbers for symbolic.
A numerical data, coded as an integer, is coupled with appropriate number of decimal digits to represent a quantity with the same engineering units adopted aboard the instrument.
Numerical data are in fixed point representation; however we make a distinction between two kind of data:
The first kind has determined and unmodifiable decimal point position;
The second has programmable decimal point position (dP parameter).

4.2 Memory zones

All readable and writable data appear to be allocated as 16 bit words in the memory of the instrument.
The memory map has three zones:
Varaibles,
Parameters,
Instrument identification code.
Following parameters explore the characteristics of each zone.

4.3 Variables zones

In this zone there is a collection of main TC10 controller variables, it is a group of frequently computed or updated data residing in volatile memory.

4.4 Most important changes

A) During parameter modification by push-button, the serial interface continue to operate without any “limit” (you can see
by serial link the value of all parameters and you can set it also). B) When you write a value in a location the instrument will operate as follows: B.1) If you write a value within parameter range, the instrument will accept it; the new value will be memorized and the
instrument will send back the standard answer. B.2) If you try to write a value OUT of parameter range, the instrument will refuse the new value; the new value will NOT be
memorized and the instrument will send an exception message to the master.
8 Yokogawa Electric Corporation - TC10 - PROTOCOL MANUAL
Loading...
+ 16 hidden pages