Yokogawa M Series User Manual

User’s Manual
M Series Digital Limit Alarms Communication Functions
IM 77J04J11-01E
IM 77J04J11-01E
1st Edition
<Toc> <Ind> <Rev>

Introduction

This user's manual describes the communication functions of the M Series digital limit alarms (hereinafter simply referred to as M Series) and contains information on how to create communication programs.
Read the manual carefully to understand the communication functions of the M Series.
The M Series have the following communication protocols.
PC link communication protocol
MODBUS communication protocol
Ladder communication protocol
Note that the M Series cannot communicate with a higher-level device with a communica­tion protocol other than these.
You are required to have background knowledge of the communication specifications of higher-level devices, their communication hardware, language used for creating communi­cation programs, and so on.
i
Intended Readers
This manual is intended for people familiar with the functions of the M Series, control engineers and personnel in charge of maintaining instrumentation and control equipment.
Related Documents
The following user's manuals all relate to the communication functions of the M Series. Read them as necessary.
Model MVHK Digital Limit Alarm (DC Input Type) Document number: IM 77J04H31-01E
Model MVRK Digital Limit Alarm (RTD Input Type) Document number: IM 77J04R31-01E
Model MVTK Digital Limit Alarm (Thermocouple Input Type) Document number: IM 77J04T31-01E
The user's manuals above describe mounting, wiring, and how to operate the digital limit alarms.
Media No. IM 77J04J11-01E (MO) 1st Edition : 2006.08.25 (YK) All Rights Reserved Copyright © 2006, Yokogawa Electric Corporation
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <Rev>

Documentation Conventions

Symbols
The following symbols are used in this manual.
Symbols Used in the Main Text
CAUTION
Draws attention to information that is essential for understanding the operation and/or features of the product.
TIP
Gives additional information to complement the present topic.
See Also
ii
Gives reference locations for further information on the topic.
Description of Displays
(1) Some of the representations of product displays shown in this manual may be exag-
gerated, simplified, or partially omitted for reasons of convenience when explaining them.
(2) Although, figures and illustrations representing the digital limit alarm's displays may
differ from the real displays in regard to the position and/or indicated characters (upper-case or lower-case, for example), the extent of difference does not impair a correct understanding of the functions and the proper operations and monitoring of the system.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <Rev>

Notices

Regarding This User's Manual
(1) This manual should be passed on to the end user. Keep the manual in a safe place. (2) Read this manual carefully to gain a thorough understanding of how to operate this
product before you start using it.
(3) This manual is intended to describe the functions of this product. Yokogawa Electric
Corporation (hereinafter simply referred to as Yokogawa) does not guarantee that these functions are suited to the particular purpose of the user.
(4) Under absolutely no circumstance may the contents of this manual, in part or in whole,
be transcribed or copied without permission.
(5) The contents of this manual are subject to change without prior notice. (6) Every effort has been made to ensure accuracy in the preparation of this manual.
Should any errors or omissions come to your attention however, please contact your nearest Yokogawa representative or our sales office.
iii
Regarding Protection, Safety, and Prohibition Against Unauthorized Modification
(1) In order to protect the product and the system controlled by it against damage and
ensure its safe use, be certain to strictly adhere to all of the instructions and precau­tions relating to safety contained in this document. Yokogawa does not guarantee safety if products are not handled according to these instructions.
(2) The following safety symbols are used on the product and/or in this manual.
Symbols Used on the Product and in This Manual
CAUTION This symbol on the product indicates that the operator must refer to an explanation in
the user's manual in order to avoid the risk of injury or death of personnel or damage to the instrument. The manual describes how the operator should exercise special care to avoid electric shock or other dangers that may result in injury or loss of life.
Protective Grounding Terminal This symbol indicates that the terminal must be connected to ground prior to operating
the equipment.
Functional Grounding Terminal This symbol indicates that the terminal must be connected to ground prior to operating
the equipment.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <Rev>
Force Majeure
(1) Yokogawa does not make any warranties regarding the product except those men-
tioned in the WARRANTY that is provided separately.
(2) Yokogawa assumes no liability to any party for any loss or damage, direct or indirect,
caused by the use or any unpredictable defect of the product.
(3) Be sure to use the spare parts approved by Yokogawa when replacing parts or
consumables. (4) Modification of the product is strictly prohibited. (5) Reverse engineering such as the disassembly or decompilation of software is strictly
prohibited. (6) No portion of the software supplied by Yokogawa may be transferred, exchanged,
leased or sublet for use by any third party without the prior permission of Yokogawa.
iv
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Int> <Ind> <Rev>
M Series Digital Limit Alarms Communication Functions

CONTENTS

Introduction........................................................................................................... i
Documentation Conventions ...............................................................................ii
Notices .................................................................................................................iii
1. Setup ....................................................................................................... 1-1
1.1 Setup Procedure ............................................................................................. 1-1
1.2 Notes on Setting Parameters ......................................................................... 1-2
2. Communication Specifications.............................................................. 2-1
2.1 RS-485 Communication Specifications ......................................................... 2-1
Toc-1
IM 77J04J11-01E 1st Edition
3. PC Link Communication ........................................................................ 3-1
3.1 Overview.......................................................................................................... 3-1
3.1.1 Configuration of Command ............................................................... 3-2
3.1.2 Configuration of Response ............................................................... 3-3
3.1.3 Response Error Codes ..................................................................... 3-4
3.1.4 Specifying Broadcast ........................................................................ 3-5
3.2 Commands ...................................................................................................... 3-6
3.2.1 List of Commands ............................................................................. 3-6
BRD Reads I relays on a bit-by-bit basis ......................................... 3-7
BWR
Writes data into I relays on a bit-by-bit basis ........................... 3-8
BRR Reads I relays on a bit-by-bit basis in random order ................ 3-9
BRW
Writes data into I relays on a bit-by-bit basis in random order ..
BRS Specifies I relays to be monitored on a bit-by-bit basis ........... 3-11
BRM Monitors I relays on a bit-by-bit basis .................................... 3-12
WRD
Reads D registers and I relays on a word-by-word basis ....... 3-13
WWR
Writes data into D registers and I relays on a word-by-word
basis..................................................................................... 3-14
WRR
Reads D registers and I relays on a word-by-word basis in
random order ........................................................................ 3-15
WRW
Writes data into D registers and I relays on a word-by-word
basis in random order ........................................................... 3-16
WRS
Specifies D registers and I relays to be monitored on a word-
by-word basis ....................................................................... 3-17
WRM
Monitors D registers and I relays on a word-by-word basis.... 3-18
INF Reads the model, range code number, number of alarms and
revision ................................................................................. 3-19
3-10
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Int> <Ind> <Rev>
4. Ladder Communication.......................................................................... 4-1
5. MODBUS Communication...................................................................... 5-1
Toc-2
3.3 Communication with Higher-level Devices ................................................. 3-20
3.3.1 Example of Communication Program Created Using Visual Basic .. 3-21
3.3.2 Communication with UT Link Module .............................................. 3-25
3.3.3 Communication with Touch Panel ................................................... 3-26
4.1 Overview.......................................................................................................... 4-1
4.2 Commands/Responses at the PLC ................................................................ 4-2
4.2.1 Configuration of Command/Response .............................................. 4-2
4.2.2 Reading Parameters......................................................................... 4-3
4.2.3 Writing Parameters ........................................................................... 4-4
4.2.4 Response Error Codes ..................................................................... 4-5
5.1 Overview.......................................................................................................... 5-1
5.1.1 Configuration of Message ................................................................. 5-2
5.1.2 Specifying D Registers...................................................................... 5-3
5.2 Function Codes ............................................................................................... 5-4
5.2.1 List of Function Codes ...................................................................... 5-4
03 Reads data from multiple D registers ...................................... 5-5
06 Writes data into a D register.................................................... 5-7
08 Performs loop back test .......................................................... 5-9
16 Writes data into multiple D registers ...................................... 5-10
5.2.2 Response Error Codes ................................................................... 5-12
5.2.3 Specifying Broadcast ...................................................................... 5-13
6. Functions and Usage of D Registers ..................................................... 6-1
6.1 Overview of D Registers ................................................................................. 6-1
6.2 Interpretation of D Register Map Table .......................................................... 6-1
6.3 D Register Map Table ...................................................................................... 6-2
6.3.1 Contents of D Registers .................................................................... 6-3
7. Functions and Usage of I Relays ........................................................... 7-1
7.1 Status............................................................................................................... 7-2
Appendix Table of ASCII Codes (Alphanumeric Codes).........................App.-1
Revision Information ............................................................................................ i
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <1. Setup >

1. Setup

This chapter describes the setup procedure required to use the communication functions (PC link, Ladder and MODBUS) and the communication parameters of the M Series.

1.1 Setup Procedure

Set up the communication functions on the M Series as follows:
Set up the communication function parameters of the M Series. (See section 1.2.)
Connect a higher-level device and a M Series. (See the connection diagram below.)
Create communication programs for the higher-level device to perform communication.
Note: Refer to the documentation of each higher-level device when creating communication programs.
Connection
PLC
B (+)
A (-)
Terminating resistor
220 1/4 W
M Series M Series
B (+)
A (-)
1
2
B (+)
A (-)
1
2
1-1
Terminating resistor
220 1/4 W
SG
Shielded
JIS Class D grounding (grounding resistance of 100 or less)
PC or PLC
(straight cable)
(RS-232C/RS-485 converter)
RS-232C
ML2
B (+)
4
A (-)
3
5
SG
JIS Class D grounding (grounding resistance of 100 or less)
3
JIS Class D grounding (grounding resistance of 100 or less)
M Series M Series
B (+)
1
A (-)
2
3
JIS Class D grounding (grounding resistance of 100 or less)
COMCOM
B (+)
A (-)
COMCOM
3
1
2
Terminating resistor
3
220 1/4 W
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <1. Setup >

1.2 Notes on Setting Parameters

This section describes the setting parameters for using the communication func­tions and their setting ranges.
CAUTION
The details of M Series communication functions need to be the same as those of the communication functions of the higher-level device to be connected. Check the communi­cation parameters of the higher-level device first, then set up those of the M Series.
Table 1-1 Parameters to be Set for Communication Functions
1-2
Parameter Name
Protocol selection Without checksum (0)
Address Baud rate Parity Stop bit Data length
*1: When "Ladder communication" is selected in protocol selection, the data length is fixed to 8.
When "MODBUS communication" is selected, the data length is fixed to 7 for ASCII mode and to 8 for RTU mode.
Symbol
PSL
ADR
BPS
PRI STP DLN
Setting Range
PC link communication
With checksum (1)
MODBUS communication ASCII mode (3)
RTU mode (4)
Ladder (2)Ladder communication
1 to 99
1.2 (0), 2.4 (1), 4.8 (2), 9.6 (3) kbps NON (0), EVN (1), ODD (2)
1, 2
7, 8 (*1)
PC link communication
without checksum
Protocol selection (PSL)
Set the communication protocol identical to that of the higher-level device to be connected.
Default
(0)
1
9.6 (3)
EVN (1)
1 8
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <1. Setup >
Address number (ADR)
Set the address number of the M Series itself. An address number of 1 to 99 can be as­signed in any order. Note that the number of M Series that can be connected to a single communication port is limited to 31.
Example of connecting four M Series to a higher-level device by setting address numbers of 1, 5, 10 and 20
PC
A maximum of 1200 m; up to 31 slave stations
1-3
ADR=1 ADR=20ADR=10ADR=5
Baud rate (BPS)
Set the baud rate identical to that of the higher-level device to be connected. (Otherwise, proper communication cannot be achieved.) The unit of the baud rate is kbps (kbits per second).
Parity (PRI)
Set the handling of parity to be carried out when data is sent or received. Set the parity bit state identical to that of the higher-level device to be connected.
Stop bit (STP)
Set the stop bit identical to that of the higher-level device to be connected.
Data length (DLN)
Set the data length identical to that of the higher-level device to be connected. (When Ladder or MODBUS communication is selected in protocol selection, the data length is fixed.)
IM 77J04J11-01E 1st Edition : 2006.08.25-00
Blank Page
<Toc> <Ind> <2. Communication Specifications >

2. Communication Specifications

The RS-485 communication interface has the PC link communication, Ladder com­munication and MODBUS communication protocols.
Table 2-1 M Series Communication Specifications
2-1
Communication Hardware Terminal
Communication Protocol Specifications
Maximum Baud Rate
Table 2-2 Types of Devices to be Connected
Connected Device
PC PC, touch panel and PLC
(FA-M3 UT link module)
PLC (sequencer) (FA-M3 ladder communication module)
2-wire RS-485 communication system Two-piece connector on the front panel: 1, 2, 3
PC link communication without checksum PC link communication with checksum MODBUS communication (ASCII mode) MODBUS communication (RTU mode) Ladder communication
9600 bps
Communication Protocol
MODBUS communication PC link communication
Ladder communication
Example of Connected Device
General-purpose PC General-purpose PC, FA-M3
and GP Series
General-purpose PLC (sequencer)

2.1 RS-485 Communication Specifications

Table 2-3 RS-485 Communication Interface
Item
Compliant standard EIA, RS-485 Maximum number of devices to be connected 31 Communication system Synchronization Asynchronous (start-stop)
Maximum communication distance 1200 m Baud rate 1200, 2400, 4800, 9600
2-wire, half duplex
No handshakingCommunication method
Specifications
IM 77J04J11-01E 1st Edition : 2006.08.25-00
Blank Page
<Toc> <Ind> <3. PC Link Communication >

3. PC Link Communication

3.1 Overview

The use of PC link communication enables the M Series to communicate with a device such as a PC, graphic panel and FA-M3 UT link module easily. In this commu­nication, you can use such device to read/write data from/into D registers or I relays, both of which are internal registers of the M Series.
PC
A maximum of 1200 m; up to 31 slave stations
3-1
Figure 3-1 Example of Connection for PC Link Communication
Hereafter, PCs etc. are generically called "higher-level devices."
See Also
Chapters 6 and 7 for information on the D registers and I relays.
In PC link communication, a higher-level device identifies each M Series with an address number, which ranges from 01 to 99.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <3. PC Link Communication >

3.1.1 Configuration of Command

Commands sent from a higher-level device to the M Series consist of the following ele­ments.
3-2
Number of Bytes 1 2 2 1 3 2 1 1
Element STX Address
number
(ADR)
(1) (2) (3) (4) (5) (7) (8) (9)(6)
CPU
number
01
Time to wait
for response
0
Command Data
Variable length
Checksum ETX CR
corresponding
to command
(1) STX (Start of Text)
This control code indicates the start of a command. The ASCII code is 02 in hexadeci­mal.
(2) Address Number (01 to 99)
Adress numbers are used by a higher-level device to identify the M Series at the communication destination. (Identification numbers specific to individual M Series.)
(3) CPU Number
This is fixed to 01.
(4) Time to Wait for Response
This is fixed to 0.
(5) Command (See subsection 3.2.)
This specifies a command to be issued from the higher-level device.
(6) Data Corresponding to Command
This specifies an internal register (D register or I relay), number of data pieces and others.
(7) Checksum
This converts the ASCII codes of texts between the character next to STX and the character immediately before the checksum into hexadecimal values and adds them byte by byte. It then fetches the single lowermost byte of the added results as the checksum.
This column is only required for PC link communication with checksum. PC link communication without checksum does not require this 2-byte space of ASCII code.
(8) ETX (End of Text)
This control code indicates the end of a command string. The ASCII code is 03 in hexadecimal.
(9) CR (Carriage Return)
This control code indicates the end of a command. The ASCII code is 0D in hexadeci­mal.
CAUTION
The control codes STX, ETX and CR are essential for commands when you create a communication program for PC link communication. Omission of any of them or incorrect order of them results in communication failure.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <3. PC Link Communication >

3.1.2 Configuration of Response

Responses from the M Series with respect to a command sent from the higher-level device consist of the following elements, which differ depending on the condition of communica­tion; normal or failure.
1) Normal Communication
If communication succeeded, a character string "OK" is returned with the data correspond­ing to a command.
Number of Bytes Variable length12 22 211
Element STX Address
number
(ADR)
CPU
number
01
2) In the Event of Failure
If communication failed, a character string "ER" is returned with error codes (EC1 and EC2). (See subsection 3.1.3, "Response Error Codes.")
No response is returned in case of an error in address number specification or CPU number specification.
If ETX in a command cannot be received, a response may not be returned.
Note: As a countermeasure, provide a timeout process in the communication functions of the higher-level device or in
communication programs.
Number of Bytes 1 2 2 2 2 2 3 2 1 1
Element STX ER EC1 EC2 Command Checksum ETX CRAddress
number
(ADR)
CPU
number
01
OK Parameter data Checksum ETX CR
3-3
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <3. PC Link Communication >

3.1.3 Response Error Codes

See Also
3.1.2, "Configuration of Response", for the structure of response in the event of error.
The error codes (EC1) and detailed error codes (EC2) of responses are as follows.
Table 3-1 List of Error Codes EC1
Error Code Meaning Cause(s)
02
03
04
05
Command error
Register specification error
Out of setpoint range
Out of data count range
No command exists.
Command not executable
No register number exists.
Invalid specification of bit register (I relay) when it is used on a word basis
Any character other than 0 or 1 is used for bit setting.
A value other than 0000 to FFFF has been specified in word specification.
The position of a start for a data load is out of the address range.
The specification of the number of bits, words, etc. is out of the range of
use.
The number of data specified and that of parameters for registers and others are not consistent.
3-4
06 An attempt was made to execute monitoring without specifying the
43 Internal buffer overflow 44 The end-of-data or end-of-text character has not been received.
Monitor error
Sum error
Character reception interval timeout
monitor (BRS or WRS).
An illegal parameter is set. 08 Parameter error
The sum does not match the expected value. 42
A data value greater than the specified was received.
Table 3-2 List of Detailed Error Codes EC2
Error Code (EC1)
03 04 05
08 Parameter error An illegal parameter is set.
Register specification error Out of setpoint range Out of data count range
Meaning
Detailed Error Code (EC2)
Parameter number where error occurred (HEX) This is the sequence number of a parameter that first resulted in an error when counted from the leading parameter.
e.g.: Register specification error
[STX]01010BRR02I0001,D0001[ETX][CR]
Parameter numbers
[STX]0101ER0303BRR[ETX][CR]
1 2 3
For error codes other than those noted as EC1, there is no EC2 meaning.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <3. PC Link Communication >

3.1.4 Specifying Broadcast

Broadcast addressing allows the corresponding multiple M Series to receive the command. (1) To use this function, specify BM for the address number in a command. (2) Broadcast addressing works independently of the address number. (3) Broadcast addressing is only applicable to write commands. (4) No response is returned if broadcast addressing is used.
Higher-level device (master)
Broadcast data.
* No response from slaves
A maximum of 1200 m; up to 31 slave stations
3-5
For the M Series communication, D registers and I relays are used.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <3. PC Link Communication >

3.2 Commands

3.2.1 List of Commands

The following shows lists of commands available in PC link communication. Their details are explained in the description of each command.
(1) Bit-basis Access Commands Dedicated to I Relays
Command Description Number of Bits to be Handled
BRD BWR Bit-basis write 1 to 256 bits
BRR Bit-basis random read BRW Bit-basis random write 1 to 32 bits
BRS Specifies registers to be monitored on a bit-by-bit basis.
BRM
(2) Word-basis Access Commands
Command Description Number of Words to be Handled
WRD
WWR
WRR
WRW
WRS
WRM
Bit-basis read
Bit-basis monitoring
Word-basis read Word-basis write
Word-basis random read Word-basis random write Specifies registers to be monitored on a word-by-word basis. Word-basis monitoring
1 to 256 bits
1 to 32 bits
1 to 32 bits
1 to 64 words 1 to 64 words
1 to 32 words 1 to 32 words 1 to 32 words
3-6
(3) Information Command
Command Description Number of Units to be Handled
INF1Reads model, input range code, number of alarms
and revision.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
<Toc> <Ind> <3. PC Link Communication >
BRD Reads I relays on a bit-by-bit basis
Function
Reads the ON/OFF statuses of a sequence of contiguous I relays by the specified number of bits, starting at a specified I relay number.
The number of bits to be read at a time is 1 to 256.
For the format of response in the event of failure, see subsection 3.1.2.
The command shown below includes the checksum function.
When performing communication without checksum, do not include the 2-byte checksum element in the command.
Command/Response (for normal operation)
Number of Bytes 1 2 2 1 3 5 1 3 2 1 1
Command
element
STX Address
number
(ADR)
CPU
number
01
0 BRD ETX CRI relay
number
Comma
or space
Number
of bits
(n)
Checksum
3-7
Number of Bytes
element
Responses 0 and 1 indicate OFF and ON respectively.
dn: read data of the specified number of bits (n=1 to 256)
dn=0 (OFF)
dn=1 (ON)
1 2 2 2111 1 2 1 1
CPU
STX Address
number
(ADR)
number
OK d1 d2 d3 ETX CRResponse
01
Example:
Reading the status of alarm 1 of the M Series with address number 01. The following command reads the status of alarm 1 (
[Command]
[STX]01010BRDI0001,00191[ETX][CR]
The following response is returned with respect to the above command. (Alarm 1 is ON.)
[Response]
[STX]0101OK18D[ETX][CR]
• • •
• • • dn Checksum
I0001) of address number 01.
Alarm has been ON since 1 was returned.
IM 77J04J11-01E 1st Edition : 2006.08.25-00
Loading...
+ 49 hidden pages