Sunteți pe pagina 1din 7

<<Contents>> <<Index>>

General Specifications
GS 11B3G1-02E

GC1000 and Analyzer Server Communication Function MODBUS Communication

1. General
The MODBUS protocol can be used for DCS communication for the GC1000 and analyzer server. This communication protocol was first established for the Programmable Logic Controller (PLC) made by Gould, Inc., and is now used as the universal communication protocol between different systems. Here the specification of Modbus communication which is applied for GC1000 and Analyzer server is introduced. Regarding the general specification of Modbus, refer to Modbus Protocol Reference Guide. 1.1 MODBUS Configuration MODBUS was started as a method to allow a master device to control multiple slave devices. Each device with a device number is connected to a master.
Master
(DCS)

2. Specifications
2.1 Communication Transmission Modes
There are two modes for signal transmission between the master and slave; RTU (Remote Terminal Unit) mode and ASCII mode. The analyzer server supports the RTU mode only, however, the analyzer supports both modes.
Item Number of data bits Message starting character Message ending character Message length Time interval of data Error detection ASCII mode 7 bits (ASCII) Colon : RTU mode 8 bits (binary) None

Carriage return/line feed None <cr><lf> 2N+1 1 second or shorter LRC (logical redundancy check) N 24 bit-time or shorter CRC-16 (cyclic redundancy check)
T01.EPS

MODBUS

2.2 Message Configuration


Slave 1 Slave 2 Slave 3 Slave 4
F1_1.EPS

A message consists of four fields: device number, function, data, and error check. It is always sent in this sequence. In ASCII mode, a colon : is the starting character and carriage return/line feed <cr><lf> is the message ending string. The portion between the starting character and ending string is the message body. The communication message is entirely ASCII codes. The message excluding the starting character and ending string consists of 0 to 9 and A to F representing hexadecimal numbers. In RTU mode, the message consists of binary codes and can be transmitted faster than in ASCII mode. If the signal interval is more than 24 bit-time in the transmission line, the start of a new message is identified. In this system, time-out is 10 ms regardless of the transmission speed.
Device number Function Data Error check
F2_3.EPS

Figure 1.1 MODBUS configuration

The master device (master) can send a query (i.e. poll) or command to a slave device (slave) on a regular basis or when required. In either case, the master starts signal transmission then the slave responds.
Master Device number Function Data Error check Command message Response message Slave Device number Function Data Error check
F1_2.EPS

Figure 1.2 Master-slave command and response cycle

A message transmitted between devices contains the device number, function, data, and error check code. The function is encoded depending on the message characteristics and data type. The error check code checks the validity of the entire message.

Figure 2.3 Message configuration

(1) Device number The device number is set in advance for each slave and ranges from 1 to 254. This number is same as Analyzer ID. The ranges from 1 to 240 is assigned as GC1000, 241 to 254 as Analyzer server. The master performs signal transmission to each slave simultaneously. Each slave checks the device number in the message to determine whether the received

Yokogawa Electric Corporation 2-9-32, Nakacho, Musashino-shi, Tokyo, 180 Japan Tel.: 81-422-52-5694 Fax.: 81-422-52-0622

GS 11B3G1-02E Copyright Jan. 1998(YG) 1st Edition Jan. 1998(YG)

<<Contents>> <<Index>> message is directed to the slave itself and returns a response message. For some functions, 0 can be specified as the device number. In this case, all slaves execute the receiving process of the same command message at the same time. However, the response message is not sent back. Device number 0 is supported by the analyzer server only. For the analyzer, device number 0 results in a device number error. (2) Functions The master specifies the function to be executed by the slave. The analyzer or analyzer server supports the following functions in the MODBUS protocol.
Function No. Function Description Reads the ON/OFF status of a series of coils. Reads the ON/OFF status of a series of input relays. Reads the current value of a series of holding registers. Reads the current value of a series of input registers. Forcibly changes the status of a coil.

2
write, and loop function, the same message as the command message is sent back. For the read function, the device number plus function added with the read data are sent back as the response message. If an address to which data is not allocated is read, an error is not generated but zero (0) is responded as the read data. (2) Error response If the command message is faulty, the slave does not execute the command but sends back an error response. The master can check whether the command is accepted successfully by checking the function in the response message. If an error is identified, the details can be checked from the error code.
Device number Error function (command function + 128) Error code Error check
F2_4.EPS

01 Coil status read 02 Input relay status read 03 04 05 06 Holding register content read Input register content read Single coil status change

Figure 2.4 Response to a faulty command message


Error code Description

01 Function code error (non-existent function) 02 Coil, input relay, or register number error (more than 8000) 03 04 Number of coils, input relays, or registers error (registers: more than 125, coils/input relays:more than 2000) An unrecoverable error occurred on the slave while the command message was being executed.

Single holding register Writes a value to a holding write register. Sends back the same message as the command message.
T02.EPS

08 Loopback test

11 Set data error (out of range)


T04.EPS

(3) Data There are two types of data coil/relay in bits and register as 16-bit data. The coil uses two values (ON/OFF or 0/1), while the register ranges from 0 to 65535. Up to 8000 coils/ relays or registers can be accessed and 1 to 8000 addresses are assigned.
MODBUS name Device R/W Contact R R/W Data R Input register 3XXXX Measured value
T03.EPS XXXX : 0001 to 8000

(3) No response In the following cases, the slave ignores the command message and does not send back a response (no response). If the device number is 0 (broadcasting), all slaves execute the command but do not send back a response. 1. When a transmission error (overrun, framing error, parity error, or CRC error) is detected in the command message 2. When the device number in the command message does not match the slave number assigned to the slave

Address

Application Analyzer number

Device number Coil Input relay Holding resistor 0XXXX 1XXXX 4XXXX

Command Status Set value

3. Communication Specifications
For MODBUS communication, the DCS communication port of the GC1000 or analyzer server is used. The analyzer has a DCS communication port, while the analyzer server has up to three DCS communication ports. Communication standard: RS-422 (GC1000 output)/RS-232C (output) Start-stop synchronization: Start bit 1, data bit 7/8, parity bit 1, stop bit 1 Communication speed: 1200, 2400, 4800, 9600 bps (selectable) Error detection: Odd number parity, even number parity, none (selectable) Transmission mode: ASCII mode (GC1000)/RTU mode

(4) Error check A message is followed by an error check code to detect a message error (i.e. bit changes) caused by signal transmission. In ASCII mode, an error check code according to LRC (logical redundancy check) is used. In RTU mode, an error check code according to CRC-16 (cyclic redundancy check) is used. 2.3 Slave Response When the slave receives a command from the master, it performs an error check then sends back a normal response if the command is normal, or an error response if the command is abnormal. (1) Normal response For the single coil status change, single holding register
All Rights Reserved. Copyright 1998, Yokogawa Electric Corporation

GS 11B3G1-02E

1st Edition Jan.05, 1998-00

<<Contents>> <<Index>>

3
5. Communication Data
5.1 Coil (command contact)
(1) Run command Commands the start of continuous analysis to the GC1000. (2) Stop command Commands the stop of continuous analysis to the GC1000. (3) Time setting request Requests the GC1000 to set the system clock. (4) Change to main pattern request Requests of changing the appointed operational pattern as the main pattern.
DCS

4. System Configuration
(1) GC1000 For the communication port, an RS-422 standard serial port is used. This standard is converted into the RS-232C standard via a communication converter (K9404LD) then connected to the DCS. This communication converter has a protection feature that automatically disconnects communication if the explosion-proof feature of the GC1000 cannot be maintained.
Field Panel/office

GC1000 analyzer

RS422

Communication converter K9404LD Note RS232C

(5) Interrupt pattern execution request Requests of changing the appointed operational pattern as an interrupt pattern.
Note 1: Coil reset the status from 1 to 0 automatically when the message is accepted by GC1000. Note 2: The command regarding the operation executes after the analysis finished. Note 3: It is needed to use the input relay if the command is accepted or not.

Power off signal Note : Dedicated communication line (RS-422) 0.75 mm2 twisted pair x 3, cable outside diameter 10 to 15.9 mm, up to 1 km (*) Flameproof packing cable must be constructed on the analyzer side. Refer to "GC1000 Installation Manual (TI 11B3A103E)." * Parts, cables, and construction materials must be prepared by the customer.

F4_1.EPS

5.2 Input Relay (status contact)


(1) Analyzer normal The GC1000 is normal. If there is no alarm of alarm level 1 (critical failure) or level 2 (minor failure), 1 is displayed.

Figure 4.1 GC1000

(2) Analyzer Server


RS232C Note Analyzer server HUB DCS Control room

(2) Analyzer failure The GC1000 is faulty. If there is at least one alarm of alarm level 1 (critical failure), 1 is displayed. (3) Analyzer server failure The analyzer server is faulty. If there is at least one alarm of alarm level 1 (critical failure), 1 is displayed. (4) Alarm status change The alarm status to the GC1000 is changed. After a new alarm occurs, when the alarm status change is read, 1 is read. Then, when at least one alarm status is read, the status is reset to 0. (5) Measuring (run mode) The GC1000 is measuring. In RUN mode, 1 is displayed. Otherwise, 0 is displayed. (6) Stop (ready mode) The GC1000 stops. In READY mode, 1 is displayed. Otherwise, 0 is displayed. (7) Maintenance (other modes) If the GC1000 is in MANUAL, LAB, or PAUSE mode, 1 is displayed. Otherwise, 0 is displayed. (8) Executing the operational pattern The corresponding pattern is being executed. (9) Data update New data can be acquired for each task. After new data arises, when data update is read, 1 is read. Then, at least one analysis value is read, and the status is reset to 0.

HUB

HUB

Field

GC1000

GC1000

GC1000

GC1000

Note : Analyze Server is connected to DCS with the cable of RS232C D-sub 25 pin straight.

F4_2.EPS

Figure 4.2 Analyzer server

All Rights Reserved. Copyright 1998, Yokogawa Electric Corporation

GS 11B3G1-02E

1st Edition Jan.05, 1998-00

<<Contents>> <<Index>> (10) Data valid Data is valid for each analysis value. The requirements for validity are that the analysis value is between the upper and lower limits, the retention time is at or below the upper limit, and for operation data, the data to be used for operation is valid. (11) Alarm status The alarm status of the GC1000 and analyzer server is displayed for each alarm number. If an alarm occurs, 1 is displayed. Otherwise, 0 is displayed. The alarm number is 1 to 99 for level 1 alarms of the analyzer, 101 to 199 for level 2 alarms, and 201 to 249 of analyzer server alarms. The analyzer bus regular cycle communication off alarm is assigned to 249. (12) Calibration factor update Whether a new calibration factor is updated is displayed for each task. After the calibration factor is updated, when calibration factor update is read, 1 is read. Then, if at least one calibration factor is read, the status is reset to 0.
Starting peak number = 25

4
(2) Starting peak number The starting peak number assigned to each task is displayed. The number of analysis values is 255 or fewer (including the peaks of all tasks). The number is 0 if no peak is assigned. (3) Peak number Peak number assigned to each task is displayed. See the figure below. Example: The peak number of Task 2, Peak 3 is 7
Starting peak number = 1 Task 1 Starting peak number = 5 Task 2 Starting peak number = 15 Task 3 Number of peaks = 10 Number of peaks = 10 Number of peaks = 4

255
F5_2.EPS

5.3 Holding Register (set data)


(1) Time setting value This is a set of four registers used by the DCS to set the analyzer clock. When the time setting request is made, this setting value is set in the analyzer system clock. These registers are also used for the coil time setting request. When Analyzer Server is set the time and date all GC1000 connected to Analyzer Server is set the same time and date.
Example: September 25, 1996, 15:23:10 Year Month Hour Minute Second Day 07CC (Hexadecimal) 0919 (Hexadecimal)
*1 000F (Hexadecimal)

Figure 5.2 Example of peak allocation

(4) Sampling time This register contains the sampling time for each task. Hour and minute are stored.
Example: 15: 23 Hour Minute 0F17 (Hexadecimal)
F5_3.EPS

(5) Analysis value This register contains each analysis value. The value is represented by a fraction to the full scale or by a real number (floating point format). The full scale is set in advance for each analysis value. As the scaling factor, either 9999 or 65535 can be selected. The real number format conforms to the IEEE standard and requires two registers per data. Fraction format: (Analysis value * Scaling factor)/Full scale value For example, the analysis result is 5 ppm (0-20 ppm range), in this case, reading value to use scaling factor 9999 is 5 20 9999 = 2499 (09C3) F5_4.EPS For the real number format, units (such as %, ppm, etc.) are considered. For example, the floating point value converted from 1.5 can be read for 1.5 %. (6) Retention time This register contains the retention time for each analysis value. The unit is in seconds. (7) Calibration factor This register contains the calibration factor for each analysis value. 0.000 to 9.999 are multiplied by 1000 and displayed (i.e. 0000 to 9999).

170A (Hexadecimal)
F5_1.EPS

Figure 5.1 Time register configuration

(2) Task change The DCS sets the starting task number of a operational pattern on the GC1000. If the objected operational pattern set a single task, continuous measurement can be performed by specifying the flow path. (3) Analysis value Same data as the analysis value in the input register can be read but cannot be written.

5.4 Input Register (measured data)


(1) Task number The currently selected task number is displayed. In stop or MANUAL mode, the task number is 0. In LAB mode, the task number is 32.

All Rights Reserved. Copyright 1998, Yokogawa Electric Corporation

GS 11B3G1-02E

1st Edition Jan.05, 1998-00

<<Contents>> <<Index>>

5
6.3 Mapping Feature
The analyzer server has 512 mapping registers that can be set by the user for each of the Coil, Input relay, Holding register, and Input register. The device number and address of the GC1000 connected can be set in the mapping register. The mapping register address ranges from X7001 to X7512. With the device mapping feature, data required by the DCS can be selected from the data prepared by the GC1000 at a time and can be transferred to the DCS continuously.
Analyzer Mapping register X7001 X7002 X7003 Analyzer

6. Addressing
6.1 General Rules
In this system, the process control system is positioned as the master device, and the GC1000 or analyzer server as the slave device. The GC1000 ID number corresponds to the device number. However, since the analyzer server controls multiple GC1000s, an analyzer server has multiple device numbers corresponding to these GC1000s. The operation command is assigned to the coil, the status flag to the input relay. The set value corresponds to the holding register, and the measured value such as the analysis result to the input register. Up to 8000 coils/relays or registers are available. Addresses 1 to 8000 are assigned for access from the master. The GC1000 data is for each analyzer, each operational pattern, each task, or for each peak. The relationship between the data and address is defined as shown below.
Address Each analyzer Each operational pattern Each t as k Each peak 000X Application X: Item number (1 to 9)

DCS

X7512
F6_1.EPS

Figure 6.1 Mapping feature


00XP 0XTT XCCC X: Item number (1 to 9), P: Pattern number (1 to 4) X: Item number (1 to 9), TT: Task number (1 to 32) X: Item number (1 to 6), CCC: peak number (1 to 255)
T05.EPS

6.2 Exceptions
Analyzer server normal/error of the Input relay shows the analyzer server status. Therefore, the same information is displayed for all GC1000 device numbers connected to an analyzer server. The alarm status of the Input relay is displayed as 1 or 0 by checking the GC1000 alarm status against the address and alarm number. In this case, the alarm status is not for each peak but addresses 12001 to 12249 are used. (The number from the place of 100 is the alarm number.) For the analysis value of the Input register, either the fraction format or real number format can be selected. In the real number format, two registers are required per data, so the address is twice as large as the peak number. For example, addresses of data #1, #2, and #3 in the real number format are 31001-2, 31003-4, and 31005-6.

All Rights Reserved. Copyright 1998, Yokogawa Electric Corporation

GS 11B3G1-02E

1st Edition Jan.05, 1998-00

<<Contents>> <<Index>>

7. Address Table
7.1 Address Table (general)
Name Run command Stop command Time setting request Coil Change to main pattern request Interrupt pattern execution command Analyzer normal Analyzer error Analyzer status change Measuring Stop Maintenance Input relay Analyzer server normal Analyzer server error Executing pattern Data update Calibration factor update Data valid Alarm status Time setting request Holding register Task change Analysis value Task number Starting peak number Number of peaks Input register Sampling time Analysis value Retention time Calibration factor YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES YES Unit YES YES YES YES YES Pattern Task Component Address 00001 00002 00003 0001P 0002P 10001 10002 10003 10004 10005 10006 10008 10009 1001P 101TT 102TT 11CCC 12AAA 4000140004 4001P 41DDD 30001 301TT 302TT 303TT 31CCC/31DDD 32CCC 33CCC Peak starting position for each task Number of peaks for each task Hour/minute Analysis value (CCC: Peak number), DDD=CCC*2-1 for the real number Second Analysis value (CCC: Peak number)
T06.EPS

Description When the message is received, the slave is reset. Same as above. Same as above. Same as above. Same as above.

Reset when the alarm status is read after alarm status change is read.

Reset when the analysis value is read after data update is read. Reset when the calibration factor is read after calibration factor update is read. AAA: Alarm number (1 to 245) Year (40001), month/day (40002), hour (40003), minute/second (40004) Read only. Write disabled.

All Rights Reserved. Copyright 1998, Yokogawa Electric Corporation

GS 11B3G1-02E

1st Edition Jan.05, 1998-00

<<Contents>> <<Index>>

7.2 Address Table (MODBUS mapping)


Name Time setting request Unit YES Pattern Task Peak Address 00001 Description When the message is received, the slave is reset.

Coil

MODBUS mapping

07XXX

Same as above. XXX: 001 to 512

Analyzer server normal Analyzer server error Alarm status change Input Relay

YES YES YES

10001 10002 10003 Reset when the alarm status is read after alarm status change is read. AA: Alarm number (1 to 49) XXX: 001 to 512

Alarm status MODBUS mapping

YES YES

101AA 17XXX

Time setting request

YES

4000140004

Year (40001), month/day (40002), hour (40003), minute/second (40004)

Holding Register

MODBUS mapping

47XXX

XXX: 001 to 512

Input Register

MODBUS mapping

37XXX

XXX: 001 to 512

T07.EPS

All Rights Reserved. Copyright 1998, Yokogawa Electric Corporation

GS 11B3G1-02E

1st Edition Jan.05, 1998-00

S-ar putea să vă placă și