User’s Manual VJ Series Communication Functions IM 77J01J11-01E IM 77J01J11-01E 3rd Edition
Blank Page
i Introduction This instruction manual describes the communication functions of the VJ Series signal conditioners and contains information on how to create communication programs. Read the manual carefully to understand the communication functions of the VJ Series. The VJ Series signal conditioners have the following communication protocols.
ii Documentation Conventions ■ Symbols This manual uses the following symbols. ● 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 Gives reference locations for further information on the topic.
iii Notices ■ Regarding This Instruction 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.
iv ■ Force Majeure (1) Yokogawa does not make any warranties regarding the product except those mentioned 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.
Toc-1 VJ Series Communication Functions IM 77J01J11-01E 3rd Edition CONTENTS Introduction........................................................................................................... i Documentation Conventions ...............................................................................ii Notices .................................................................................................................iii 1. 2. Setup .............................................
Toc-2 4. 5. Ladder Communication .......................................................................... 4-1 4.1 Overview .......................................................................................................... 4-1 4.2 Commands/Responses at the PLC ................................................................ 4-2 Command/Response Component Elements ..................................... 4-2 4.2.2 Reading Parameters ...........................................
1. 1-1 <1. Setup > Setup This chapter describes the setup procedure required to use the communication functions (PC link, Ladder, and MODBUS) and the communication parameters of the VJ Series. 1.1 Setup Procedure Set up the communication functions on the VJ Series as follows: Set up the communication function parameters of the VJ Series. (See section 1.2.) Connect a higher-level device and a VJ Series. (See the connection diagram below.
1.2 1-2 <1. Setup > Notes on Setting Parameters This section describes the setting parameters for using the communication functions and their setting ranges. CAUTION The details of VJ Series communication functions need to be the same as those of the communication functions of the higher-level device to be connected. Check the communication parameters of the higher-level device first, then set up those of the VJ Series using the Handy Terminal or setting tool (VJ77).
<1. Setup > 1-3 ● Address number (ADDRESS) Set the address number of the VJ Series itself. An address number of 1 to 99 may be assigned in any order. However, there is a limitation - the number of VJ Series to be connected to a single communication port is limited to 31.
Blank Page
2. 2-1 <2. Communication Specifications > Communication Specifications The RS-485 communication interface has the PC link communication, Ladder communication, and MODBUS communication protocols.
Blank Page
<3. PC Link Communication > 3. PC Link Communication 3.1 Overview 3-1 The use of PC link communication enables the VJ Series to communicate with a device such as a PC, graphic panel, or FA-M3's UT link module. Such a device can be used in communication to read data from D registers or I relays, both of which are internal registers of the VJ Series signal conditioners. PC Maximum overall cable length of 1200 m for a maximum of 31 substations 030101E.
3.1.1 3-2 <3. PC Link Communication > Configuration of Command Commands sent from a higher-level device to VJ Series signal conditioners, consist of the following elements. Number of Bytes 1 2 2 Element STX Address number (ADDRESS) CPU number 01 (1) (2) (3) 1 3 Time to wait Command for response 0 (4) Variable length 2 1 1 Data corresponding to command Checksum ETX CR (6) (7) (8) (9) (5) 030102E.
3.1.2 3-3 <3. PC Link Communication > Configuration of Response Responses from the VJ Series with respect to a command sent from the higher-level device consist of the elements shown below, which differ depending on the condition of communication; normal or failure. 1) Normal Communication When communication completes normally, the VJ Series returns a character string "OK" and data corresponding to a command.
3.1.3 3-4 <3. PC Link Communication > 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 Command error • No command exists. • Command not executable 03 Device specification error • No register number exists.
<3. PC Link Communication > 3.2 Commands 3.2.1 List of Commands 3-5 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 Bit-basis read 1 to 256 bits BRR Bit-basis random read 1 to 32 bits BRS Specifies I relays to be monitored on a bit basis. 1 to 32 bits BRM Bit-basis monitoring 030201E.
3.2.2 3-6 <3. PC Link Communication > BRD Reading I Relays on a Bit-by-bit Basis ● Function Reads a sequence of contiguous ON/OFF statuses 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.
3.2.3 3-7 <3. PC Link Communication > BRR Reading I Relays on a Bit-by-bit Basis in a Random Order ● Function Reads the ON/OFF statuses of I relays by the specified number of bits in a random order. • The number of bits to be read at a time is 1 to 32. • For the format of response in the event of failure, see subsection 3.1.2. • The command shown below includes the checksum function.
3.2.4 3-8 <3. PC Link Communication > BRS Specifying I Relays to be Monitored on a Bit-by-bit Basis ● Function Specifies the numbers of I relays to be monitored on a bit-by-bit basis. Note that this command simply specifies I relays. Actual monitoring is performed by the BRM command after the I relay numbers are specified.
3.2.5 3-9 <3. PC Link Communication > BRM Monitoring I Relays on a Bit-by-bit Basis ● Function Reads the ON/OFF statuses of I relays that have been specified in advance by the BRS command. • Before executing this command, the BRS command must always be executed to specify which I relays are to be monitored. If no relay has been specified, error code 06 is generated. • For the format of response in the event of failure, see subsection 3.1.2.
3.2.6 3-10 <3. PC Link Communication > WRD Reading D Registers/I Relays on a Word-by-word Basis ● Function Reads a sequence of contiguous register information starting at the specified register number on a word-by-word basis, by the specified number of words. • The number of words to be read at a time is 1 to 64. • For the format of response in the event of failure, see subsection 3.1.2. • The command shown below includes the checksum function.
3.2.7 3-11 <3. PC Link Communication > WRR Reading D Registers/I Relays on a Word-by-word Basis in a Random Order ● Function Reads the statuses of specified registers on a word-by-word basis in a random order. • The number of words to be read at a time is 1 to 32. • For the format of response in the event of failure, see subsection 3.1.2. • The command shown below includes the checksum function.
3.2.8 3-12 <3. PC Link Communication > WRS Specifying D Registers/I Relays to be Monitored on a Word-by-word Basis ● Function Specifies the numbers of registers to be monitored on a word-by-word basis. Note that this command simply specifies registers. Actual monitoring is performed by the WRM command after the register numbers are specified.
3.2.9 3-13 <3. PC Link Communication > WRM Monitoring D Registers/I Relays on a Word-by-word Basis ● Function Reads the information of registers that have been specified in advance by the WRS command. • Before executing this command, the WRS command must always be executed to specify which registers are to be monitored. If no register has been specified, error code 06 is generated. • For the format of response in the event of failure, see subsection 3.1.2.
3-14 <3. PC Link Communication > 3.2.10 INF Reading the Model, Presence/Absence of Options, and Revision ● Function Returns the model number of a VJ Series signal conditioner, whether any options are included, and the version and revision numbers. • For the format of response in the event of failure, see subsection 3.1.2.
3.3 <3. PC Link Communication > 3-15 Communication with Higher-level Devices Higher-level devices are those capable of using the PC link communication protocol. As an example of a communication program, the Basic program created using Microsoft Visual Basic is given in subsection 3.3.1. Further, communications with an FA-M3's UT link module or graphic panel can be achieved without creating a complex program. Examples of communication with them are given in subsections 3.3.2 and 3.3.3.
3.3.1 <3. PC Link Communication > 3-16 Example of Communication Program Created Using Visual Basic This subsection shows a sample program created using Microsoft Visual Basic 6.0. Operation verification environment: PC/AT compatible machine + Windows NT 4.0 (SP4), Windows 95 PC/AT is a product of International Business Machine Corp. Visual Basic is a registered trademark of Microsoft Corporation.
<3. PC Link Communication > 3-17 Label1.Caption = "[stx]" + strSend + "[etx][cr]" Label2.Caption = "" MSComm1.PortOpen = True Timer1.Enabled = True Command1.Enabled = False fSend = True 'Open port 'Start timer for detecting timeout 'Disable the Command button temporarily 'Set sending flag 'Send MSComm1.
<3. PC Link Communication > 3-18 'Initialize label control that displays character strings sent and received Label1.Caption = "" Label2.Caption = "" End Sub -------------------------------------------------------------------------------'This processing starts each time 1 byte is received Private Sub MSComm1_OnComm() Dim strBuf0 As String Select Case MSComm1.CommEvent Case comEvReceive strBuf0 = MSComm1.
<3. PC Link Communication > strReceive = "Time Out!" fSend = False 3-19 'Receiving is regarded as being ended End Sub IM 77J01J11-01E 3rd Edition : Oct.
3.3.2 <3. PC Link Communication > 3-20 Communication with UT Link Module Communication with FA-M3 is achieved by simply connecting the VJ Series to a UT link module using the PC link communication protocol. Set the communication conditions of the VJ Series signal conditioners identical to those of the UT link module. Model of UT link module: F3LC51-2N FA-M3 Maximum overall cable length of 1200 m for a maximum of 31 substations 030401E.
3.3.3 3-21 <3. PC Link Communication > Communication with Graphic Panel Communication with a graphic panel is achieved using the PC link communication protocol. Set the communication conditions of the VJ Series signal conditioners identical to those of the graphic panel. Graphic panel Maximum overall cable length of 1200 m for a maximum of 31 substations 030501E.EPS For more information, refer to the instruction manual of the graphic panel to be connected.
Blank Page
<4. Ladder Communication > 4. Ladder Communication 4.1 Overview 4-1 Communication with a sequencer (PLC) is achieved using a ladder program. Specifying the register numbers of D registers of the VJ Series signal conditioners in the ladder program allows the registers to be read using the BCD codes (0 to 9). Ladder communication module FA-M3 Maximum overall cable length of 1200 m for a maximum of 31 substations 040101E.
4.2 4-2 <4. Ladder Communication > Commands/Responses at the PLC The PLC sends commands and receives responses to commands. The commands and responses that can be used are as follows. 4.2.1 Command/Response Component Elements Commands sent from the PLC to the VJ Series signal conditioners are configured as shown below.
4.2.2 4-3 <4. Ladder Communication > Reading Parameters Parameters from the PLC are read in the VJ Series signal conditioners in the following configuration. (The maximum number of data items to be read is 64.
4.2.3 4-4 <4. Ladder Communication > Response Error Codes Data that the master station (PLC) will receive in the event of an error and the description of errors are given in the table below. 0101/0103/0000/0001/CR/LF Read data 0, 5th digit, 0, and +/Parameter number Address number and CPU number 040206E.EPS Note: Slashes (/) in the following send and receive data examples are used for explanatory purposes only, and are not part of the actual data string.
5-1 <5. MODBUS Communication > 5. MODBUS Communication 5.1 Overview The use of MODBUS communication allows the VJ Series signal conditioners to communicate with a PC. In this communication, a PC reads data from D registers, internal registers of the VJ Series. Hereafter, PCs are generally called "higher-level devices." PC Maximum overall cable length of 1200 m for a maximum of 31 substations 050101E.
5.1.1 5-2 <5. MODBUS Communication > Configuration of Message Messages sent from the higher-level device to the VJ Series consist of the following elements. Element Start of Message Mark Address Function Code Number (ADDRESS) Data Error Check End of Message Mark Number of bytes in RTU mode None 1 1 2n 2 None Number of bytes in ASCII mode 1 2 2 4n 2 2 (1) (2) (3) (4) (5) (6) 050103E.EPS (1) Start of Message Mark This mark indicates the start of a message.
5.1.2 <5. MODBUS Communication > 5-3 Specifying D Registers Specification of D registers using commercially available SCADA or other software and specification of D registers for messages used in a customer-created communication program are different. Take note of this. 1) When using commercially available SCADA or other software, specify a "reference number" in which "D," the first character of a D register number, is replaced by "4.
5-4 <5. MODBUS Communication > 5.2 Function Codes 5.2.1 List of Function Codes Function codes are command words used by the higher-level device to obtain the D register information of the VJ Series signal conditioners. Table 5-2 List of Function Codes Code Number Function Description 03 Reads data from multiple D registers. Capable of reading data from a maximum of 64 successive D registers between D0001 and D0128. 08 Performs a loop back test. See subsection 5.2.
5-5 <5. MODBUS Communication > 03 Reads data from multiple D registers. ● Function This function code reads the contents of successive D registers by the specified number of them starting at a specified D register number. • The maximum number of D registers to be read at a time is 64. • For the format of responses in the event of failure, see subsection 5.2.2.
<5. MODBUS Communication > 5-6 ● Example: Reading the statuses of alarms-1 and -2 from the VJ Series signal conditioner with communication address 1. The following message reads two successive D registers starting at alarm-1 (D0014) and communication address 1 in the ASCII mode.
5-7 <5. MODBUS Communication > 08 Performs a loop back test. ● Function This function code is used to check the connection for communication. • For the format of responses in the event of failure, see subsection 5.2.2. • The element marked with * is "00" (fixed). • Any value can be selected to send data.
5.2.2 5-8 <5. MODBUS Communication > Response Error Code[Response] ● Message Format in the Event of Error If there are any inconsistencies other than communication errors in a message, a VJ Series signal conditioner does nothing, but returns the following message. Element Address Number (ADDRESS) Function Code (*1) Error Code Error Check [CR] [LF] Number of bytes in RTU mode 1 1 1 2 None Number of bytes in ASCII mode 2 2 2 2 2 050220E.
5.3 <5. MODBUS Communication > 5-9 Example of Setting up Commercially Available SCADA Software The MODBUS protocol is widely supported by commercially available SCADA and other software. This section shows examples of settings when using WonderWare's SCADA software, or “InTouch”, and MODBUS DDE Server. See Also The documentation of each software for more information on DDE and SCADA software.
<5. MODBUS Communication > 5-10 ● Example of setting the tag variable of InTouch In setting "DDE Access Name (D)..." for definition of the tag variable, define the DDE application/server name to be used and the DDE topic name. For the topic name, enter "N01" which was defined in the MODBUS DDE. For the item name, enter value "40002," obtained by replacing D-register number "D0002" with the MODBUS reference number. "S" indicates that read data is handled with a sign assigned to it. 050302J.
<6. Functions and Usage of D Registers > 6. Functions and Usage of D Registers 6.1 Overview of D Registers 6-1 This section describes the functions and usage of D registers. The D registers store the input and output values, statuses, and others that are handled by the VJ Series signal conditioners.
6.3 <6. Functions and Usage of D Registers > 6-2 D Register Map Table D-Register Data Area D-Reg No. Ref No. H No.
6.3.1 <6. Functions and Usage of D Registers > 6-3 Contents of D Registers ● D0001: Bit configuration of status The D0001 register represents errors and parameter data by a combination of bits in the register. In the table below, if any of the events shown occurs, the corresponding bit is set to "1." The bit remains set to "0" if the event has not occurred yet. Note that blank fields indicate bits not used, which are in "0.
<6. Functions and Usage of D Registers > 6-4 ● D0002, D0003: INPUT1_L, INPUT1_H (input value: engineering unit) D0002 shows a numeric value and D0003 shows the number of digits below the decimal point. Input Units Number of digits belowdecimal point mA, mV, V 2 ⬚C, K 1 060301E.EPS ● D0004: input value (ratio of input value to input span is indicated as a percentage) ● D0008: output value (percentage indication) Example 1: When the input value (engineering unit) is 680.
7. <7. Functions and Usage of I Relays > 7-1 Functions and Usage of I Relays This chapter describes the functions and usage of the I relays. The I relays contain information on errors, alarm statuses, and others of the VJ Series signal conditioners. The higher-level device can read data from I relays using PC link communication. IM 77J01J11-01E 3rd Edition : Oct.
7.1 <7. Functions and Usage of I Relays > 7-2 Status The following table shows how the I relays are classified. I Relay Number 1 to 16 Type of Status On-off Description Error information (same contents as those of D0001) 17 to 256 User area (that is used in some devices such as graphic panels) 070101E.EPS CAUTION • The I relays numbered 1 to 16 store on-off status information. Generally, this area can be accessed to read the on-off status.
App.-1 Appendix Table of ASCII Codes (Alphanumeric Codes) In order to implement PC link communication, create a transmission/receiving program by referring to the Table of ASCII Codes below.
Blank Page
i Revision Information ● Title : VJ Series Communication Functions ● Manual No. : IM77J01J11-01E Aug. 1999/1st Edition Newly published June 2004/2nd Edition Change of the company name. Oct. 2007/3rd Edition Revised Written by Yokogawa Electric Corporation Published by Yokogawa Electric Corporation 2-9-32 Nakacho, Musashino-shi, Tokyo 180-8750, JAPAN IM 77J01J11-01E 3rd Edition : Oct.
Blank Page