UT Link Module
Transcription
UT Link Module
User’s Manual UT Link Module IM 34M6H25-01E IM 34M6H25-01E Yokogawa Electric Corporation 1st Edition i Applicable Product: ● Range-free Multi-controller FA-M3 Model Name : : F3LC51-2N UT Link Module The document number and document model code for this manual are given below. Refer to the document number in all communications; also refer to the document number or the document model code when purchasing additional copies of this manual. Document No. Document Model Code Media No. IM 34M6H25-01E (CD) 1st Edition : Nov. 2001 (AR) All Rights Reserved Copyright 2001, Yokogawa Electric Corporation : : IM 34M6H25-01E DOCIM IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 ii Important About This Manual - This Manual should be passed on to the end user. Before using the controller, read this manual thoroughly to have a clear understanding of the controller. This manual explains the functions of this product, but there is no guarantee that they will suit the particular purpose of the user. Under absolutely no circumstances may the contents of this manual be transcribed or copied, in part or in whole, without permission. The contents of this manual are subject to change without prior notice. Every effort has been made to ensure accuracy in the preparation of this manual. However, should any errors or omissions come to the attention of the user, please contact the nearest Yokogawa Electric representative or sales office. Safety Precautions when Using/Maintaining the Product - The following safety symbols are used on the product as well as in this manual. Danger. This symbol on the product indicates that the operator must follow the instructions laid out in this instruction manual to avoid the risk of personnel injuries, fatalities, or damage to the instrument. The manual describes what special care the operator must exercise to prevent electrical shock or other dangers that may result in injury or the loss of life. Protective Ground Terminal. Before using the instrument, be sure to ground this terminal. Function Ground Terminal. Before using the instrument, be sure to ground this terminal. Alternating current. Indicates alternating current. Direct current. Indicates direct current. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 iii The following symbols are used only in the instruction manual. WARNING Indicates a “Warning”. Draws attention to information essential to prevent hardware damage, software damage or system failure. CAUTION Indicates a “Caution” Draws attention to information essential to the understanding of operation and functions. TIP Indicates a “TIP” Gives information that complements the present topic. SEE ALSO Indicates a “SEE ALSO” reference. Identifies a source to which to refer. - - - - For the protection and safe use of the product and the system controlled by it, be sure to follow the instructions and precautions on safety stated in this manual whenever handling the product. Take special note that if you handle the product in a manner other than prescribed in these instructions, the protection feature of the product may be damaged or impaired. In such cases, Yokogawa cannot guarantee the quality, performance, function and safety of the product. When installing protection and/or safety circuits such as lightning protection devices and equipment for the product and control system as well as designing or installing separate protection and/or safety circuits for fool-proof design and fail-safe design of processes and lines using the product and the system controlled by it, the user should implement it using devices and equipment, additional to this product. If component parts or consumable are to be replaced, be sure to use parts specified by the company. This product is not designed or manufactured to be used in critical applications which directly affect or threaten human lives and safety — such as nuclear power equipment, devices using radioactivity, railway facilities, aviation equipment, air navigation facilities, aviation facilities or medical equipment. If so used, it is the user’s responsibility to include in the system additional equipment and devices that ensure personnel safety. Do not attempt to modify the product. Exemption from Responsibility - - Yokogawa Electric Corporation (hereinafter simply referred to as Yokogawa Electric) makes no warranties regarding the product except those stated in the WARRANTY that is provided separately. Yokogawa Electric assumes no liability to any party for any loss or damage, direct or indirect, caused by the user or any unpredictable defect of the product. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 iv Software Supplied by the Company - Yokogawa Electric makes no other warranties expressed or implied except as provided in its warranty clause for software supplied by the company. Use the software with one computer only. You must purchase another copy of the software for use with each additional computer. Copying the software for any purposes other than backup is strictly prohibited. Store the original media, such as floppy disks, that contain the software in a safe place. Reverse engineering, such as decompiling of the software, is strictly prohibited. No portion of the software supplied by Yokogawa Electric may be transferred, exchanged, or sublet or leased for use by any third party without prior permission by Yokogawa Electric. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 v General Requirements for Using the FA-M3 Controller ● Avoid installing the FA-M3 controller in the following locations: - Where the instrument will be exposed to direct sunlight, or where the operating temperature exceeds the range 0°C to 55°C (0°F to 131°F). Where the relative humidity is outside the range 10 to 90%, or where sudden temperature changes may occur and cause condensation. Where corrosive or flammable gases are present. Where the instrument will be exposed to direct mechanical vibration or shock. Where the instrument may be exposed to extreme levels of radioactivity. ● Use the correct types of wire for external wiring: - Use copper wire with temperature ratings greater than 75°C. ● Securely tighten screws: - Securely tighten module mounting screws and terminal screws to avoid problems such as faulty operation. Tighten terminal block screws with the correct tightening torque as given in this manual. ● Securely lock connecting cables: - Securely lock the connectors of cables, and check them thoroughly before turning on the power. ● Interlock with emergency-stop circuitry using external relays: - Equipment incorporating the FA-M3 controller must be furnished with emergencystop circuitry that uses external relays. This circuitry should be set up to interlock correctly with controller status (stop/run). ● Ground for low impedance: - For safety reasons, connect the [FG] grounding terminal to a Japanese Industrial Standards (JIS) Class D Ground*1 (Japanese Industrial Standards (JIS) Class 3 Ground). For compliance to CE Marking, use cables such as twisted cables which can ensure low impedance even at high frequencies for grounding. *1 Japanese Industrial Standard (JIS) Class D Ground means grounding resistance of 100Ω max. ● Configure and route cables with noise control considerations: - Perform installation and wiring that segregates system parts that may likely become noise sources and system parts that are susceptible to noise. Segregation can be achieved by measures such as segregating by distance, installing a filter or segregating the grounding system. ● Configure for CE Marking Conformance: - For compliance to CE Marking, perform installation and cable routing according to the description on compliance to CE Marking in the “Hardware Manual” (IM34M6C11-01E). IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 vi ● Keep spare parts on hand: - Stock up on maintenance parts including spare modules, in advance. ● Discharge static electricity before operating the system: - Because static charge can accumulate in dry conditions, first touch grounded metal to discharge any static electricity before touching the system. ● Never use solvents such as paint thinner for cleaning: - Gently clean the surfaces of the FA-M3 controller with a cloth that has been soaked in water or a neutral detergent and wringed. Do not use volatile solvents such as benzine or paint thinner or chemicals for cleaning, as they may cause deformity, discoloration, or malfunctioning. ● Avoid storing the FA-M3 controller in places with high temperature or humidity: - - Since the CPU module has a built-in battery, avoid storage in places with high temperature or humidity. Since the service life of the battery is drastically reduced by exposure to high temperatures, take special care (storage temperature should be from –20°C to 75°C). There is a built-in lithium battery in a CPU module and temperature control module which serves as backup power supply for programs, device information and configuration information. The service life of this battery is more than 10 years in standby mode at room temperature. Take note that the service life of the battery may be shortened when installed or stored at locations of extreme low or high temperatures. Therefore, we recommend that modules with built-in batteries be stored at room temperature. ● Always turn off the power before installing or removing modules: - Failing to turn off the power supply when installing or removing modules, may result in damage. ● Do not touch components in the module: - In some modules you can remove the right-side cover and install ROM packs or change switch settings. While doing this, do not touch any components on the printed-circuit board, otherwise components may be damaged and modules may fail to work. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 vii Waste Electrical and Electronic Equipment Waste Electrical and Electronic Equipment (WEEE), Directive 2002/96/EC (This directive is only valid in the EU.) This product complies with the WEEE Directive (2002/96/EC) marking requirement. The following marking indicates that you must not discard this electrical/electronic product in domestic household waste. Product Category With reference to the equipment types in the WEEE directive Annex 1, this product is classified as a “Monitoring and Control instrumentation” product. Do not dispose in domestic household waste. When disposing products in the EU, contact your local Yokogawa Europe B. V. office. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 viii Introduction Overview of this Manual This manual explains the UT Link Module, which can be used to configure an FA-M3 system. How to Read this Manual If you are a first-time reader of this manual, read chapters 1 to 4. For efficiency, read only the relevant remaining chapters, as required. A “$” symbol preceding a numeric value indicates a hexadecimal number. Other Manuals The manuals to refer depend on the CPU module used. Read the following manuals as required. F3SP28 F3SP38 F3SP53 F3SP58 For information on functions of sequence CPU - Sequence CPU Modules - Functions (for F3SP28, F3SP38, F3SP53, F3SP58) (IM34M6P13-01E) For creating ladder programs - FA-M3 Programming Tool WideField (IM34M6Q14-01E) FA-M3 Programming Tool WideField - Application (IM34M6Q14-02E) F3SP05 F3SP21 F3SP25 F3SP35 For information on functions of sequence CPU - Sequence CPU Modules - Functions (for F3SP21, F3SP25, F3SP35) (IM34M6P12-02E) For creating ladder programs - FA-M3 Programming Tool WideField (IM34M6Q14-01E) - FA-M3 Programming Tool WideField - Application (IM34M6Q14-02E) or - Ladder Diagram Support Program M3 (IM34M6Q13-01E) Common for all sequence CPU modules For information on functions of sequence CPU - Sequence CPU Modules - Instructions (IM34M6P12-03E) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 ix For information on BASIC CPU Module and YM-BASIC/FA Program Syntax - BASIC CPU Module and YM-BASIC/FA Programming Language (IM34M6Q22-01E) For information on the specifications and configuration*1, installation and wiring, test runs, maintenance and inspection of the FA-M3, and system-wide restrictions on module installation *1: Hardware Manual (IM34M6C11-01E) For product specifications of products other than power supply modules, base modules, I/O modules, cables and terminal block units, see their respective manuals. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 x Copyrights and Trademarks Copyrights Copyrights of the programs and online manual included in this CD-ROM belong to Yokogawa Electric Corporation. This online manual may be printed but PDF security settings have been made to prevent alteration of its contents. This online manual may only be printed and used for the sole purpose of operating this product. When using a printed copy of the online manual, pay attention to possible inconsistencies with the latest version of the online manual. Ensure that the edition agrees with the latest CD-ROM version. Copying, passing, selling or distribution (including transferring over computer networks) of the contents of the online manual, in part or in whole, to any third party, is strictly prohibited. Registering or recording onto videotapes and other media is also prohibited without expressed permission of Yokogawa Electric Corporation. Trademarks The trade names and company names referred to in this manual are either trademarks or registered trademarks of their respective companies. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 TOC-1 FA-M3 UT Link Module IM 34M6H25-01E 1st Edition Content Applicable Product ....................................................................................i Important ...................................................................................................ii Introduction............................................................................................viii Copyrights and Trademarks ....................................................................x 1. 2. Overview ....................................................................................... 1-1 1.1 Overview................................................................................................... 1-1 1.2 External Instruments that can be Connected....................................... 1-1 Specifications ............................................................................... 2-1 2.1 Model Names and Specification Codes ................................................ 2-1 2.2 Compatibility with CPU Modules ........................................................... 2-1 2.3 Function Specifications.......................................................................... 2-1 2.4 Components and their Functions .......................................................... 2-2 2.5 External Dimensions and Weight .......................................................... 2-3 2.6 Connecting to External Instruments ..................................................... 2-4 2.7 Setting Communication Conditions ...................................................... 2-6 2.8 3. 5. Recommended Communication Conditions ................................ 2-6 2.7.2 Setting Up the UT Link Module .................................................... 2-6 2.7.3 Self Diagnosis .............................................................................. 2-8 Attaching and Detaching Modules....................................................... 2-10 Types of Communication Methods ............................................. 3-1 3.1 4. 2.7.1 Automatic Mode, Manual Mode and Command Communication ....... 3-1 3.1.1 Automatic Mode and Manual Mode ............................................. 3-1 3.1.2 Command Communication .......................................................... 3-3 3.2 Register Configuration and Signal Path of the UT Link Module ........ 3-4 3.3 Sample D Register Map of an External Instrument.............................. 3-7 Refresh Station Designation in Automatic Mode and Manual Mode ................................................................................ 4-1 4.1 When Refresh Station Designation is Not Performed in Automatic Mode....................................................................................... 4-1 4.2 Refresh Station Designation .................................................................. 4-2 Details of Automatic Mode .......................................................... 5-1 5.1 Startup Procedure ................................................................................... 5-1 5.2 Input/Output Relays Used in Automatic Mode ..................................... 5-2 5.3 Reading and Writing Data in Automatic Mode ..................................... 5-4 IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 TOC-2 5.4 6. 7. Details of Manual Mode................................................................ 6-1 6.1 Startup Procedure.................................................................................... 6-2 6.2 Input/Output Relays Used in Manual Mode........................................... 6-3 6.3 Setting Mode Registers (Communication Conditions) ....................... 6-5 6.4 Configuration Setup (Communication Range) ..................................... 6-7 6.5 Reading and Writing Data in Manual Mode ......................................... 6-10 6.6 Sample Program .................................................................................... 6-11 Details of Command Communication ......................................... 7-1 7.1 Startup Procedure.................................................................................... 7-2 7.2 Input/Output Relays Used in Command Communication ................... 7-3 7.3 Setting Mode Registers (Communication Conditions) ........................ 7-4 7.4 Command and Response........................................................................ 7-5 7.5 8. 9. Sample Program ...................................................................................... 5-5 7.4.1 Data Areas Used in Command Communication........................... 7-5 7.4.2 Formats of Commands and Responses....................................... 7-6 Sample Program .................................................................................... 7-10 Accessing the UT Link Module.................................................... 8-1 8.1 Accessing Using Ladder Sequence Instructions ................................. 8-1 8.2 Accessing Using BASIC Statements ..................................................... 8-3 8.2.1 Declaring Use of Module .............................................................. 8-4 8.2.2 Reading and Writing Mode Registers........................................... 8-4 8.2.3 Reading and Writing Data Registers ............................................ 8-5 8.2.4 Reading and Writing Input and Output Relays ............................. 8-6 Errors and Troubleshooting ........................................................ 9-1 9.1 Error Handling.......................................................................................... 9-1 9.1.1 Module Error................................................................................. 9-3 9.1.2 Refresh Communication Error...................................................... 9-4 9.1.3 Command Communication Error.................................................. 9-7 9.1.4 Error Response ............................................................................ 9-8 9.2 Troubleshooting Flowchart When 'RDY' LED Is Not On .................... 9-10 9.3 Troubleshooting Flowchart When Communication Fails .................. 9-11 9.4 Troubleshooting Errors that Occur during Refresh Operation......... 9-12 9.5 Troubleshooting Errors that Occur during Command Communication...................................................................................... 9-14 Appendix........................................................................................ Appx.-1 Appendix 1. Configuration Data Area ....................................................... Appx.-1 Appendix 2. Refresh Communication Data Area ..................................... Appx.-2 Appendix 3. Examples on Performance ................................................... Appx.-3 Appendix 4. Increasing Ladder Program Speed ...................................... Appx.-5 Index................................................................................................Index-1 Revision Information ................................................................................ i IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 1-1 1. Overview 1.1 Overview The UT Link Module (F3LC51-2N) connects and communicates with external instruments, which support the FA-M3 personal computer link protocol. Section 1.2, “External Instruments that can be Connected” lists some instruments which support the PC link protocol. Connecting these to the UT link module allows users to exchange data without knowledge of communications protocols and commands. 1.2 External Instruments that can be Connected The following products are some external instruments, which can be connected to the UT Link module. Products of Yokogawa M&C Corporation - The range of instruments that can be accessed using the UT Link Module is given below. z Temperature Controllers UT100 Series Instrument Name Temperature controller Model Name UT130, UT150 UT152/UT155 Automatic Mode (Read) D Registers D0001 to D0009 Manual Mode, Command Communication (Read and Write) D Registers I Relays D0001 to D0420 I0001 to I0048 *: For more information on automatic mode, manual mode and command communication, see Chapter 3, “Types of Communication Methods”. z Digital Indicating Controllers GREEN Series Instrument Name Digital indicating controller Program controller Digital indicator with alarms Model Name UT320,UT350 UT420,UT450 UT520,UT550,UT750 US1000 UP350 UP550,UP750 UM330,UM350 Automatic Mode (Read) D Registers D0001 to D0008 Manual Mode, Command Communication (Read and Write) D Registers I Relays D0001 to D1300 I0001 to I0784 D0001 to D0025 D0001 to D1700 I0001 to I2048 D0001 to D0008 D0001 to D0025 D0001 to D1300 D0001 to D3300 I0001 to I0784 I0001 to I2048 D0001 to D0008 D0001 to D1300 I0001 to I0784 *: For more information on automatic mode, manual mode and command communication, see Chapter 3, “Types of Communication Methods”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 1-2 z Signal Conditioner JUXTA JV V3 Series Instrument Name Universal temperature converter Isolator Distributor Potentiometer transmitter Pulse rate converter Pulse/analog transmitter Analog/pulse transmitter Universal computing unit Model Name Automatic Mode (Read) D Registers Manual Mode, Command Communication (Read and Write) D Registers I Relays VJU7 VJH7 VJA7 VJS7 VJP8 VJQ8 VJQ7 VJX7 D0001 to D0015 D0001 to D0128 I0001 to I0256 *: For more information on automatic mode, manual mode and command communication, see Chapter 3, “Types of Communication Methods”. CAUTION - The information herein may be modified without notification. For details on the external instruments, contact Yokogawa M&C Corporation. When performing configuration, note that communication functions of many external instruments for connecting to the UT link module are given only as supplementary specifications. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 1-3 - The documents related to the communication functions are listed below. z Temperature controllers UT100 Series Instrument Name Temperature controller Model Name UT130,UT150 UT152/UT155 Document No. *1 IM 5C1E12-10E Document Name UT100 Series Communication Functions Manual *1: The document is not provided with the product and must be purchased separately. z Digital Indicating Controllers GREEN Series Instrument Name Digital indicating controller Model Name UT320,UT350 UT420,UT450 UT520,UT550 UT750 IM 05G01B02-01E*2 IM 05G01B02-02E*2 US1000 IM 5D1A01-10E*3 Program controller UP350 UP550,UP750 Digital indicator with alarms UM330,UM350 Document No. IM 05G01B02-01E*2 IM 05G01B02-02E*2 Document Name GREEN Series Communication Functions Manual GREEN Series Communication Reference US1000 Digital Controller Communication Functions Manual GREEN Series Communication Functions Manual GREEN Series Communication Reference *2: An electronic version of the document is included on the CD-ROM shipped with the product. A printed hardcopy of the document may be purchased separately. z Signal Conditioner JUXTA JV V3 Series Instrument Name Universal temperature converter Isolator Distributor Potentiometer transmitter Pulse rate converter Pulse/analog transmitter Analog/pulse transmitter Universal computing unit Model Name Document No. Document Name VJU7 VJH7 VJA7 VJS7 VJP8 VJQ8 VJQ7 VJX7 IM 77J1J11-01E*3 VJ Series Communication Functions Manual *3: The document is not provided with the product and must be purchased separately. CAUTION - The information herein may be modified without notification. For details on external instruments, contact Yokogawa M&C Corporation. When performing configuration, note that communication functions of many external instruments for connecting to the UT link module are given only as supplementary specifications. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 1-4 CAUTION - - Instrument names of the external instruments are represented as D registers and I relays. These are separate from the D registers and I relays of the FA-M3 sequence CPU. They are clearly differentiated in this manual and should not be confused during reading. Registers of the UT link module are represented as numbers, known as “device position numbers”. Registers of the UT link module and external instruments consist of 1 word (16 bits) per register. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-1 2. Specifications 2.1 Model Names and Specification Codes Table 2.1 Model Names and Specification Codes of the UT Link Module Basic Specification Code -2N Model Name F3LC51 2.2 Style Code Specification Code Suffix ….. ….. Remarks RS-422-A/RS-485 1 port Compatibility with CPU Modules The UT Link Module (F3LC51-2N) can be used with the following CPU modules. Table 2.2 The list of CPU modules that are compatible with the UT Link Module and the maximum number of units that can be installed BASIC CPU F3SA30-0N *1 F3SP21-0N F3SP25-2N F3SP35-5N F3SP28-3N F3SP38-6N F3SP53-4H F3SP58-6H F3FP36-3N F3BP20-0N F3BP30-0N F3MP30-0N F3LC51-2N F3SA20-0N *1 UT Link Module F3SP30-0N *1 CPU F3SP20-0N *1 Sequence CPU 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 *1: For F3SP20-0N, F3SP30-0N, F3SA20-0N, F3SA30-0N CPU modules, the ROM must be of version 6 or later and the UT Link Module must be installed in the main unit. For other CPU modules, the UT Link Module may be installed in either the main unit or the sub unit. 2.3 Function Specifications Table 2.3 Function Specifications of the UT Link Module Item Interface Transmission mode Synchronization Transmission speed (bps) Transmission media Transmission distance Number of connected stations Terminating resistor Number of ports Data format Error detection Xon/Xoff control Ending character Setup items Current consumption External connection Description EIA RS-422-A/RS-485 Compliant Half-duplex, two-wire or four-wire Asynchronous 300/600/1200/2400/4800/9600/19200/31250/38400 Shielded twisted-pair cable (AWG 20 to 16) 1200 m max. *1 *2 Setting Switch Factory Setting { 9600 { { { 8 Even 1 { no { yes 32 stations max. *1 220Ω (built-in, termination is specified using a switch) 1 port (insulated) Start bit: 1 Data length: 7/8 Parity bit: none / even / odd Stop bit: 1/2 Parity check Checksum: yes / no None Yes / no Transmission speed, data format, checksum and ending character 290 mA 6-point terminal block, M3.5 screw *1: The specifications of the external instruments may impose further constraints. *2: Items marked with ‘{’ may be defined by the user using switches. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-2 2.4 Components and their Functions T Front View RDY Display: Lit when the internal circuitry is functioning normally. RDY LC51-2N UT LINK TERMINATOR 2- Terminating resistor switch: Specify a 4-wire or 2-wire system to terminate. 4-WIRE OFF SD A SD B RD A RS-422-A/RS-485 terminal block (6 terminals, M3.5 screws) RD B SG SHIELD Figure 2.1 Front View of the UT Link Module T Right Side View Front Rear This figure shows the appearance when the panel cover is removed Transmission speed switch 2 3 4 7 8 2 3 4 5 6 9 0 1 6 9 5 0 1 O F F 1 2 3 4 5 6 Data format switch: Defines the format of the communication data 7 8 7 8 Communication mode switch Figure 2.2 Right Side View of the UT Link Module IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-3 2.5 External Dimensions and Weight Table 2.4 External Dimensions of the UT Link Module *: Width 28.9mm Height 100.0mm Depth 83.2mm Weight 110gf All dimensions exclude any protrusions. Unit: mm 83.2 12.1 28.9 2 100 Figure 2.3 External Dimensions of the UT Link Module IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-4 2.6 Connecting to External Instruments The UT link module allows external instruments to be connected through an RS-422-A/ RS-485 terminal block. T RS-422-A/RS-485 Terminal Block This terminal block uses M3.5 screws. SD A SD A Send Data A → SD B SD B Send Data B → 7.1mm 8.2mm RD A RD A Receive Data A ← RD B RD B Receive Data B ← SG SG SHIELD Grant Signal SHIELD Figure 2.4 RS-422-A/RS-485 Terminal Block T Recommended Cables and Crimp-on Terminals Table 2.5 Recommended Cables and Crimp-on Terminals Crimp-on Terminals Connection type Applicable cables Crimp-on terminals Tightening torque Applicable crimp-on terminals Terminal block Type: Shielded twisted-pair cable Number: 3 pairs Size: 0.5 to 1.25 mm2 AWG No. 20 to AWG No.16 recommended Example: CO-SPEV-SB (A) 3Px0.5 SQ from Hitachi Cable, Ltd. For 3.5 mm screws 0.8N.m Example: Type V1.25-M3 (from Japan Solderless Terminal Mfg. Co., Ltd.) or RAV1.25-3.5 (from Nippon Tanshi Co., Ltd.) T Wiring the UT Link Module to External Instruments Use a two- or four-wire system for connecting the UT link modules to external instruments F3LC51-2N External device (1) External device (2) SD A SD A (−) SD B (+) SD A (−) SD B (+) RD A (−) RD A (−) RD B (+) RD B (+) SD B RD A RD B SG SHIELD (SD A) (SD B ) (RD A) (RD B) (SG) SG SHIELD 220Ω 220Ω SG SHIELD Set terminating switch to 4-wire. Figure 2.5 Wiring Diagram (four-wire system) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-5 F3LC51-2N SD A SD B RD A External instrument (1) External instrument (2) RS A (−) RS A (−) RS B (+) RS B (+) (SD A) (SD B) 220Ω RD B SG SHIELD (SG) SG SG SHIELD SHIELD Set terminating switch to 2-wire. Figure 2.6 Wiring Diagram (two-wire system) Tip Use the built-in terminating resistor in the module on the F3LC51-2N side. On the external instrument side, some external instruments may also have a built-in terminating resistor. CAUTION *: On some external instruments, the signal polarities (A/B, +/-) may be reverse to what is shown above. If a framing error occurs during communication, try to change the connections appropriately for reversed polarities. On some external instruments, the terminal markings may be different from what is shown above. Perform the connections accordingly. Signal polarities and terminal markings are not defined in the RS-422/485 standard. T Setting Terminating Resistors Set the terminating resistor to terminate a UT link module if the module is installed at the end of a daisy chain network. For a four-wire system, set the switch to “4-WIRE”; for a two-wire system, set it to “2-WIRE”. If the UT link module is not installed at either end of a daisy chain network, set the switch to “OFF”. TERMINATOR 4-WIRE 2OFF F_UT51_1.VS D Figure 2.7 Setting the Terminating Resistor Switch IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-6 2.7 Setting Communication Conditions 2.7.1 Recommended Communication Conditions Communication conditions should suit all external instruments to be connected. The recommended communication conditions given below (also the factory setting of the UT Link Module) suit most external instruments. However, you should double-check the communication conditions for an external instrument in the following situations: - when connecting external instruments with different functions to a single UT Link Module when connecting old product models Table 2.6 Recommended Communication Conditions (the same as the factory setting of the UT Link Module) Item Transmission speed Data length Parity Start bit Stop bit Ending character Checksum Setting up the UT Link Module Parameters such as the data format and transmission speed can be set using switches on the right side of the module. At power on, the UT Link Module reads the switch positions and sets the communication conditions and automatic/manual mode accordingly. CAUTION Always turn off the power to the module before attaching or detaching the module. Front Rear This figure shows the appearance when the panel cover is removed Transmission speed switch 5 0 1 4 6 9 7 8 2 3 7 8 9 4 5 0 1 2 3 6 2.7.2 Value 9600bps 8 bits Even 1 bit 1 bit Yes No O F F 1 2 3 4 5 6 Data format switch: Defines the format of the communication data 7 8 Communication mode switch Figure 2.8 Right Side View of the Module IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-7 T Data Format Switch Sets the data transmission format. Set the 8-bit DIP switch by sliding each switch to the ON or OFF position. Leave DIP Switch 8 unchanged at its factory setting. O F F 1 No. 2 1 2 3 4 5 6 3 4 5 6 7 7 8 8 Setup Item Data length Parity Stop bit Checksum Ending character Automatic/ Manual mode Unused OFF Factory setting ON ON ON OFF OFF ON ON 7 bit No Odd 1 bit No No 8 bit Yes Even 2 bit Yes Yes Manual mode Automatic mode ON Unused Unused OFF F_UT51_1.VS D Figure 2.9 Data Format Switch Setting T Transmission Speed Switch Set the transmission speed using the decimal rotary switch. Insert a small flat-blade screwdriver into the arrow slot and change the setting by changing the direction of the arrow. Do not use setting 9. 4 5 6 7 8 9 0 1 2 3 Setting 0 1 2 3 4 5 6 7 8 9 Transmission speed (bps) 300 600 1200 2400 4800 9600 19200 31250 38400 (Unused) Remarks Factory Setting Figure 2.10 Transmission Speed Switch Setting IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-8 T Communication Mode switch Set the communication mode using the decimal rotary switch. Insert a small flat-blade screwdriver into the arrow slot and change the setting by changing the direction of the arrow. Setting “0” is used for self-diagnosis. Do not use setting values other than 0 and 7. 4 5 6 7 8 9 0 1 2 3 Setting 0 1 2 3 4 5 6 7 8 9 Communication mode Module diagnosis (Unused) (Unused) (Unused) (Unused) (Unused) (Unused) Normal operation (Unused) (Unused) Remarks Self diagnosis Factory setting Figure 2.11 Communication Mode switch Setting Self Diagnosis The UT link module features self-diagnostic functions for checking the module hardware. To perform self-diagnosis, follow the steps below: (1) Turn off the FA-M3 power supply. (2) Detach the UT link module from the base module. (3) Change the communication mode switch on the right side of the module from 7 to 0. (4) Set the transmission speed switch to 9600 bps (position 5). (5) Attach the module to the base module with wiring as shown in Figure 2.13. (6) Turn on the power supply of the FA-M3 to start self-diagnosis. Front Rear Transmission speed switch 0 1 9 0 1 9 0 1 4 5 7 8 Communication mode switch 2 3 9 0 1 6 9 8 78 7 8 5 2 3 4 5 6 7 4 6 6 4 O F F 1 5 5 2 3 2 3 4 7 8 2 3 6 2.7.3 F_UT51_1.VSD Figure 2.12 Communication Mode Switch Setting IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-9 UT Link Module SD A SD B RD A RD B SG SHIELD Figure 2.13 Wiring for Self-Diagnosis The self-diagnosis test results are reflected on the UT link module RDY LED as shown in Table 2.7. Tale 2.7 Self Diagnosis RDY LED Self Diagnosis Test Results Lights up Flashes or turns off Normal Error CAUTION After completing the self-diagnosis test, be sure to set the communication mode switch to “7” and restore the transmission speed switch to its original position. Then, turn on the power to start-up the system. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-10 2.8 Attaching and Detaching Modules T Attaching the Module Figure 2.14 shows how to attach this module to the base module. First hook the anchor slot at the bottom of the module to be attached onto the anchor pin on the bottom of the base module. Push the top of this module towards the base module until the yellow anchor/release button clicks into place. CAUTION Always switch off the power before attaching or detaching a module. Base module Anchor pin This module F01.VSD Figure 2.14 Attaching/Detaching the Module CAUTION DO NOT bend the connector on the rear of the module by force during the above operation. If the module is pushed with improper force, the connector may bend causing an error. T Detaching the Module To remove this module from the base module, reverse the above operation. Press the yellow anchor/release button on the top of this module to unlock it and tilt the module away from the base module. Then lift the module off the anchor pin at the base. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 2-11 ■ Attaching Modules in Intense Vibration Environments If the module is used in intense vibration environments, fasten the module with a screw. Use screws of type listed in the table below. Insert these screws into the screw holes on top of the module and tighten them with a Phillips screwdriver. Screw Required M4-size binder screw 12 to 15 mm long (Or 14 to 15 mm if fitted with a washer) F02R1.VSD Figure 2.15 Tightening the Module IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page 3-1 3. Types of Communication Methods 3.1 Automatic Mode, Manual Mode and Command Communication The UT Link Module supports two types of communication modes and command communication. This chapter gives an overview of these two modes and command communication. For more details, read the individual chapters. Table 3.1 Operation of UT Link Module Usage Automatic mode Manual mode Command communication Communication Items Fixed items of the external instrument (Not user-definable) Regular communication (Refresh operation) User specified items of the external instrument Communicate when required Automatic Mode Communication Method Manual Mode Fixed communication items for each external instrument type. Simple user program Mode selection User-specified communication items. Slightly complicated user program Command Communication User-specified communication items. Complicated user program. Regular communication (Refresh operation) Communicate as and when required F_UT51_1.VS Figure 3.1 Operation of the UT Link Module 3.1.1 Automatic Mode and Manual Mode The UT Link Module supports an automatic mode for simple communications as well as a manual mode for accessing any data of the external instrument. You can select to use either of these modes using the data format switch*1. The UT Link Module operates connected external instruments according to the mode selected. Both these modes perform cyclical regular communications, known as a “refresh operation”. *1: See Figure 2.9, “Data Format Switch Setting”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 3-2 T Automatic Mode Using the automatic mode requires only a simple FA-M3 user program. In automatic mode, the communication items are determined for each series of the external instrument. Except for some instrument series, the communication items of the external instrument are designed to be read-only by the UT Link Module. Depending on the series of the external instrument, the number of communication items ranges from 8 to 25 In automatic mode, all communications items are read to the UT Link Module. A user program can then read any number of these items from the UT Link Module. External instrument of different series may be connected to the same communication line. Furthermore, automatic mode can be used together with command communication. - Contact the manufacturer of an external instrument for information on the communication items in automatic mode. CAUTION When using automatic mode together with command communication, start command communication after the status bit for the station in the Remote Station Status storage area (data position numbers: 3839, 3840*1) has turned on. Starting command communication before the refresh station initial check for this station has been completed in automatic mode*2 will disallow subsequent automatic mode communication to this station. *1: For details, see Figure 9.2, “Remote Station Status Register Configuration” *2: See Section .4.1, “When Refresh Station Designation is Not Performed in Automatic Mode”. When the initial check for a station is completed, its status bit in the Remote Station Status storage area (data position numbers: 3839, 3840) turns on. T Manual Mode Manual mode allows reading and writing to most of the data in the external instruments. The manual mode is convenient although the FA-M3 user program increases in size as the number of communication items and the number of external instrument stations increase. The D register map of an external instrument (which is separate from the D registers of the FA-M3 sequence CPU) describes what kind of data is allocated and the communication items are selected from the allocated data. Manual mode can be used together with command communication. - Contact the manufacturer of an external instrument for information on the D register map of an external instrument. CAUTION - The D register map of an external instrument contains read-only areas and access prohibited areas. Do not write to or access these areas. Up to 25 contiguous devices can be read or written for each station in manual mode. Non-contiguous device numbers may not be specified. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 3-3 3.1.2 Command Communication T Command Communication Command communication allows the user to communicate with external instruments as and when required. Using command communication for communication items with low access frequencies reduces reduction in the overall communication speed. Since the communication items, external instrument station number and communication timing is no longer transparent, the FA-M3 user program is more complicated. Refresh communication during automatic mode or manual mode may be interrupted by command communication. The D register map of an external instrument (which is separate from the D registers of the FA-M3 sequence CPU) describes what kind of data is allocated and the communication items are selected from the allocated data. - Contact the manufacturer of an external instrument for information on the D register map of an external instrument. CAUTION - The D register map of an external instrument contains read-only areas and access prohibited areas. Do not write to or access these areas. Up to 64 contiguous devices can be read or written for each station in command communication mode. For non-contiguous device numbers, up to 24 devices may be specified. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 3-4 3.2 Register Configuration and Signal Path of the UT Link Module T Register Configuration The UT Link Module has various input output relays and registers as shown in table 3.2 for transmitting data between external instruments and the FA-M3 user program. For more details, see the table or figure numbers indicated within parenthesis. See Chapter 8, “Accessing the UT Link Module” on how to access the input/output relays and the various registers. Read Section 5.4, “Sample Program”, Section 6.6, “Sample Program”, and Section 7.5, “Sample Program” too. Table 3.2 Register Configuration of the UT Link Module Data position number 1 50 51 Input/Output relay Relays for exchanging data between the FA-M3 user program and the UT Link Module Mode register Stores the communication parameter values. (Table 6.2) 562 563 566 567 570 571 3770 3771 3840 3841 3940 3941 4040 Data Registers*2 564 565 *1 Configuration data area Holds the communication data count, device type and first device number for each external instrument station number in manual mode. (Table Appx. 1)*1 Refresh station designation CPU1 Performs refresh communication for stations whose bit is set to 1. (1 bit per station, total 32 stations) (Figure 4.1) *1 Refresh station designation CPU2 Used for communication when the external instrument has two CPUs. (It is normally set to 0). (Figure 4.1) *1 Reserved Refresh communication data area Holds the read/write data in refresh communication. User programs read or write this data. (Table Appx. 2) *1 External instrument status data area Holds the detailed error codes for each station of the external *1 instrument. (Figure 9.2) Command register command area Area for writing the command in command communication. (Figures *1 7.4 to 7.8) Command register response area Stores data and error response received from the external instrument *1 during command communication. (Figures 7.9 to 7.10) *1: Details are given in the table or figure indicated within parenthesis. *2: When accessing a data register from a BASIC program, access the data position number by subtracting 50 from the data position number given in table 3.2. CAUTION Note the following when accessing data registers from BASIC programs. Registers of the UT Link Module are classified into mode registers and data registers. When accessing data registers from a BASIC program, access data position numbers obtained by subtracting 50 from the data position numbers given in Table 3.2, “Register Configuration of the UT Link Module”. For mode registers, access the data position numbers as given in Table 3.2. Data position numbers given henceforth should be handled similarly. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 3-5 T Slot Number Input/output relays of the UT Link Module are identified using relay symbols (X, Y), slot numbers and relay numbers. Example: XVVVnn VVV: slot number, nn: relay number Registers of the UT Link Module are identified using slot numbers and data position numbers. Example: READ sl n1 d k sl : Slot number of the module (3 digits) n1 d k : First data position to read : First device number for storing data read : Transfer data count The slot number indicates the slot position where the module is installed. It is a 3-digit integer defined as follows. Slot number VVV Slot position, counting from the right of the power supply module towards the right end of the base module: 01 to 16 Unit number Main unit: 0 Sub unit : 1 to 7 IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 3-6 T Signal Path The UT Link Module transmits signals between the user program and external instruments via the following signal paths. External Instrument FA-M3 CPU Module UT Link Module User program Firmware Firmware D registers Output relays Request to refresh Input relays Refreshing I/O relays Write instruction Read instruction Write data Configuration info. data Read data RS-422-A/ RS-485 communication Refresh communication data area External instrument status data area Command register command area Command register response area Figure 3.2 Signal Path for the Refresh Operation External Instrument FA-M3 CPU Module UT Link Module User program Output relays Input relays Write instruction Read instruction Request to transmit command Receive response completed Write data Read data RS-422-A /RS-485 communication Firmware Firmware I/O relays D registers Configuration info. data Refresh communication data area External instrument status data area Command register command area Command register response area Figure 3.3 Signal Path for Command Communication IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 3-7 3.3 Sample D Register Map of an External Instrument The following example shows the D register map of the Green Series Controller (UT350/UT320) manufactured by Yokogawa M&C Corporation. The D register map of an external instrument varies with the instrument model and its contents may be modified. When creating a user program, check with the manufacturer of the external instrument on the contents of the D register map and the signals. Table 3.3 Sample D Register Map for an External Instrument PROCESS PROGRAM MODE/PAR No. +0 +100 +200 1 ADERROR 2 ERROR 3 PV 4 CSP 5 OUT 6 HOUT 7 COUT 8 Omitted hereafter SPNO MOD Omitted hereafter Indicates read-only items CAUTION The D register map of an external instrument contains read-only areas and access prohibited areas. Do not write to or access these areas. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page 4-1 4. Refresh Station Designation in Automatic Mode and Manual Mode The UT Link Module can be connected to up to 32 stations of external instruments (This may be further constrained by the specifications of the external instruments). It has registers (Refresh Station Designation CPU1/CPU2 register, data position numbers 563 to 566 *1) for defining which parts of these 32 stations are to be refreshed during refresh communication. Set the bits for stations to be refreshed to 1 in the Refresh Station Designation register. Stations with bit information 0 are not accessed. - - In automatic mode, it is recommended that you perform refresh station designation even though the module is designed to allow communication to start even if refresh station designation is not performed. In manual mode, communication is not allowed if refresh station designation is not performed. In command communication, communication is allowed regardless of the setup of the Refresh Station Designation register. The Refresh Station Designation register for CPU2 is used when the external instrument has two CPUs. Most external instruments, however, has only CPU1. Here, we assume that the Refresh Station Designation register for CPU2 is set to all zeroes. The following sections explain how the Refresh Station Designation register works. *1: See Figure 4.1, “Refresh Station Designation Register”. 4.1 When Refresh Station Designation is Not Performed in Automatic Mode Initial Check At power on, the bit information for all 32 stations in the Refresh Station Designation register is automatically set to 1. Subsequently, each station, regardless of whether an external instrument is connected, is polled in turn. Time out occurs if no response is received from an unconnected station after approximately 100 ms. After polling has completed for all 32 stations, refresh communication begins. If refresh communication begins with only one external instrument connected, there is a total time out delay for 31 stations (approximately 3100 ms). To avoid this time out delay, perform refresh station designation. Subsequent Check Even though there is no response from an external instrument, which is switched off, the external instrument may subsequently become accessible once its power is switched on. To check for this, the UT Link Module polls each unconnected station in turn during each refresh communication. As a result, each unconnected station will cause a time out delay of approximately 100 ms during each refresh communication. To avoid this time out delay, perform refresh station designation. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 4-2 4.2 Refresh Station Designation In manual mode, all bits of the Refresh Station Designation register are automatically set to 0 at power on. Therefore, communication in manual mode cannot proceed if refresh station designation is not performed. In automatic mode, specifying the refresh stations avoid time out delays (delay*1 at communication start and delay*2 at each refresh communication) caused by unconnected stations. *1: *2: approximately 100 ms × the number of unconnected stations approximately 100 ms Corresponding station number (1=refresh, 0=do not refresh) Data position number 563 564 565 566 MSB LSB Refresh station designation CPU1 (01-16) 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 Refresh station designation CPU1 (17-32) 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 Refresh station designation CPU2 (01-16) Set these two words to zero as they are normally not used. Refresh station designation CPU2 (17-32) Figure 4.1 Refresh Station Designation Register z Converting refresh station designation information to hexadecimal To convert the refresh station designation information into a hexadecimal number, first, divide the 16 bits into 4-bit segments. Overlay the bits with the numbers 8, 4, 2 and 1, starting from the most significant bit position, as shown in Figure 4.2. Multiply the overlay numbers with the 1-bit positions and add the results. Append a ‘$’ sign at the beginning of the sum. MSB Bit overlay → Bit state → 0 0 1 0 ↓ ↓ ↓ ↓ × × × × 8 0 4 0 2 1 ↓ ↓ ↓ 1 If the sum is 10 or more, represent it with letters A to F. (10=A, 11=B, 12=C, 13=D, 14=E, 15=F) 0 ↓ 0 + 0 + 2 + 0 → $2 Figure 4.2 Converting Refresh Station Designation Information to Hexadecimal IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 4-3 z Example of refresh station designation Example: where stations 01 to 04 and 06 of CPU1 are to be refreshed Corresponding station number Data position number 563 MSB 16 15 0 0 14 13 12 11 10 09 08 07 06 05 04 03 02 LSB 01 0 0 0 0 0 0 0 0 1 0 1 1 1 1 $0 $0 $2 $F $002F → $2F Data position number 564 MSB 32 31 0 0 30 29 28 27 26 25 24 23 22 21 20 19 18 LSB 17 0 0 0 0 0 0 0 0 0 0 0 0 0 0 $0 $0 $0 $0 $0000 → $0 Figure 4.3 Example for Converting Refresh Station Designation Information to Hexadecimal Table 4.1 Signal Name Assignment Table Signal Name ONEpls LCslot Address M00035 D00033 I/O Comments ON for 1 scan at operation start LC51 slot * Example of refresh stations designation (Normally executed during power-on processing) * file: KYOKUSET Set slot location where UT51 is installed. Set station numbers 01 to 16 Set station numbers 17 to 32 Set CPU2 data areas to 0 Set CPU2 data areas to 0 Table 4.4 Sample Program for Specifying Refresh Stations CAUTION Any attempt to specify refresh stations during refresh communication will be ignored. Stop refresh communication before changing the refresh stations. To stop refresh communication, turn off the Request to Refresh relay (YVVV36). If the refresh stations are specified during power-on processing, the above consideration does not apply. Tip To monitor the communication status of each station number, use the information in the Remote Station *1 Status storage area . *1: See Figure 9.2, “Remote Station Status Register Configuration”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page 5-1 5. Details of Automatic Mode 5.1 Startup Procedure The startup procedure for automatic mode is given below. See Also: Setup conditions for communication with the external instrument. The external instrument should be setup with the same set of conditions. Setup communication conditions 2.8 Attaching and Detaching Modules Install module to base module Connect to external instruments Designate refresh stations? 2.7 Setting Communication Conditions 2.6 Connecting to External Instruments NO It is recommended that refresh station designation be performed. YES See sample programs for details on the following steps. Designate refresh stations Turn on Request to Refresh relay YVVV36 4.2 Refresh Station Designation 5.4 Sample Programs Read data Communication error? NO YES Replace read data Replace with data that identifies an error. Figure 5.1 Startup Procedure for Automatic Mode IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 5-2 5.2 Input/Output Relays Used in Automatic Mode To start communication in automatic mode, turn on the Request to Refresh relay (YVVV36). When this relay is on, the UT Link Module performs refresh operation of the external instruments. During the refresh operation, the Refreshing relay (XVVV04) turns on. Access the Request to Refresh relay (YVVV36) and Refreshing relay (XVVV04) using a FA-M3 user program (ladder sequence or BASIC program). Other I/O relays that can be used in automatic mode include relays for managing error information. A complete list of the relays is given in Table 5.1. For error handling, see Chapter 9, “Errors and Troubleshooting". Table 5.1 Input/Output Relays Used in Automatic Mode I/O Relay Number Signal Name XVVV04 Refreshing XVVV05 Clear remote station status register completed XVVV06 Refresh communication error XVVV07 Module error YVVV36 Request to refresh YVVV37 Clear remote station status register XVVV38 Clear refresh communication error relay Description Relation to Other Relays Turns on when the refresh operation is started by turning on YVVV36 (Refresh request). It remains on during the refresh operation. Turns on when clearing of the error information (stations where error has occurred, error details code) for remote stations, started by turning on YVVV37, is completed Turns on when communication error occurs in automatic mode or manual mode. Turns on when module error occurs (when there is an error in module setting). Turning on this relay performs refresh communication. Turning off this relay stops refresh communication. Turning on this relay clears the error information (stations where error has occurred and error details code) of the Remote Station Status register and XVVV06 (Refresh Communication Error relay). Turning on this relay clears only XVVV06 (Refresh Communication Error relay). The error Information (station where error has occurred, error details code) remains unchanged. Turning off YVVV36 stops the refresh operation and turns off XVVV04. Turning off YVVV37 turns off XVVV05. Turning on either YVVV37 or YVVV38 turns off XVVV06. Turning off YVVV36 turns off XVVV07. When XVVV07 is turned on, turn off YVVV36 after checking the error information. Turn off YVVV37 after confirming that XVVV05 has turned on. Turn off YVVV38 after confirming that XVVV06 has turned on. *: Replace VVV with the slot number where the UT Link Module is installed. CAUTION When using automatic mode together with command communication, start command communication to a station after its status bit in the Remote Station Status storage area (data position numbers: 3839, 3840*1) has turned on. Starting command communication before the refresh station initial check*2 for a station has been completed in automatic mode will disallow subsequent automatic mode communication to the station. *1: For details, see Figure 9.2, “Remote Station Status Register Configuration”. *2: See Section .4.1, “When Refresh Station Designation is Not Performed in Automatic Mode”. When the initial check for a station is completed, its status bit in the Remote Station Status storage area (data position numbers: 3839, 3840) turns on. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 5-3 z Operation of the input/output relays I/O relays XVVV04 Refreshing ON Communication interrupted over all stations Key: User program processing UT Link Module internal processing Communication in progress OFF XVVV05 Clear remote station register completed XVVV06 Refresh communication error XVVV07 Module error YVVV36 Request to refresh YVVV37 Clear remote station status register YVVV38 Clear refresh communication error relay time Normal communication Module error Refresh communication error Clear remote station status register Figure 5.2 Operation of Input/Output Relays in Automatic Mode IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 5-4 5.3 Reading and Writing Data in Automatic Mode Data for automatic mode are stored in the Refresh Communication Data Area (data position numbers 571 to 3770)*1 of the UT Link Module. The Refresh Communication Data Area holds data for 32 stations (a total of 3200 registers) with 25 CPU1 read data areas, 25 CPU1 write data areas and similarly, 25+25 CPU2 areas per station. The content of the stored data depends on the instrument type of the connected external instrument. For example, if an external instrument with readable registers D1 to D8 is connected to station 1 in automatic mode, when refresh communication starts, data will be read and stored in the read area data position numbers 571 to 578 in the Refresh Communication Data Area. A user program can obtain the data of the external instrument by reading any part of the data in data position numbers 571 to 578. When there is data to be written to the external instrument and assuming that the instrument is connected as station 1, data can be transmitted to the external instrument by writing the required data to the write area of the Refresh Communication Data Area, starting from position number 596 using a user program. The Refresh Communication Data Area for CPU2 is used when the external instrument has two CPUs. Most external instruments, however, have only one CPU. Accessing an external instrument with two CPUs is the same as accessing an external instrument with one CPU, except for the difference in the data position numbers. *1: Table 5.2 shows an example. See Table Appx. 2, “Refresh Communication Data Area” for a complete map of the storage area. Table 5.2 Refresh Communication Data Area Example Station Number 1 2 3 : 32 *: Data Position Numbers for CPU1 Read Area Write Area Data Position Numbers for CPU2 Read Area Write Area 571 to 595 671 to 695 771 to 795 596 to 620 696 to 720 796 to 820 621 to 645 721 to 745 821 to 845 646 to 670 746 to 770 846 to 870 3671 to 3695 3696 to 3720 3721 to 3745 3746 to 3770 Numbers in the table represent data position numbers of the UT Link Module. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 5-5 Sample Program This section describes a sample program that is created with the following conditions. - - Specify refresh stations. : Stations 1 and 2 Slot number where the UT Link Module is installed : 5 External instrument for station 1 : Reads D1 to D8 every second *1 External instrument for station 2 : Reads D1 to D9 every second *1 On communication error : Sets read data for the error station to –99. Automatically restarts communication if system recovers from the communication error. (Determine the error using Remote Station Status register*2) If a module error occurs, check the program. Signal name assignments are as shown in Table 5.3. *1: The user program reads the refresh communication data area of the UT Link Module every second. The external instrument and UT Link Module communicates asynchronously to the user program. *2: See Figure 9.2, “Remote Station Status Register Configuration”. Slot position 1 2 3 4 5 6 Power 5.4 UT Link Module Station number 1 Station number 2 Communication items: D1 to D8 D1 to D9 Figure 5.3 System Configuration Diagram CAUTION Remember to switch to automatic mode*1. *1: See Figure 2.9., “Data Format Switch Setting”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 5-6 Table 5.3 Signal Name Assignment Table Signal Name RefReq Address I/O Comments Y00536 Request to refresh I00049 I00050 Remote station status 01 Remote station status 02 ONEpls Sec1 M00035 M00040 On for 1 scan at operation start 1-second clock LCslot Data10 *2 Data20 *2 D00033 D00049 D00065 LC51 slot First data for station 1 First data for station 2 stats01 stats02 *1 *1: 16 bits starting from stats01 are used for reading the status of stations 1 to 16 and hence cannot be used for other purposes. *2: 8 words starting from Data10 and 9 words starting from Data20 are used for reading data and hence cannot be used for other purposes. Tip The sample program is coded using signal names assigned to devices. Although the program can be coded using only device names, using signal names improves program readability and maintainability. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 5-7 ** Sample Program for Automatic Mode ** * Designate refresh station (stations 1and 2) * Set slot position where UT51 is installed Set stations 01 to 16 Set stations 17 to 32 Set CPU2 data areas to 0 Set CPU2 data areas to 0 Request to refresh * Read remote station status and data * Remote station status Read station 01 Read station 02 * On communication error, set data to -99 * Station 01 Station 02 Figure 5.4 Sample Program for Automatic Mode Tip - In the sample program, data for station 1 is stored in eight contiguous words starting from signal name Data10 (device: D00049). Similarly, data for station 2 is stored in nine words starting from Data20. - Purpose of the timer: During communication to multiple stations, when communication to a station is interrupted and subsequently restored, the status of the other stations communicating normally may become 0 for an instantaneous moment. When monitoring the communication status, communication is considered interrupted if the status maintains a value of 0 for about 10 seconds. After downloading the program, switch off and then switch on the power supply to the FA-M3 before use. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page 6-1 6. Details of Manual Mode When performing refresh communication of the UT Link Module and the external instruments in manual mode, the information that can be refreshed are all the registers of the external instruments that allows refreshing. The user specifies which registers, among these, can be refreshed. To actually perform refresh communication of the data in the external instruments, the user manually: - selects the external instruments to be refreshed and specifies the first register and the number of registers of each external instrument to be refreshed This manual selection of the devices of the external instrument to be refreshed is known as configuration. When compared to the automatic mode, the manual mode allows shortening of the refresh time by selecting only the registers that require refreshing. CAUTION Manual mode cannot operate until refresh station designation has been performed. For details on how to specify the refresh stations, see Section 4.2, “Refresh Station Designation”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-2 6.1 Startup Procedure The startup procedure in manual mode is given below. See Also: Set up conditions for communication with the external instrument. The external instrument should be set up with the same set of conditions. Setup communication conditions Install module to base module Connect to external instruments 2.8 Attaching and Detaching Modules 2.6 Connecting to External Instruments 4.2 Refresh Station Designation Designate refresh stations NO Set up mode registers? 2.7 Setting Communication Conditions YES When using the communication conditions defined by the switch setting on the side of the module, there is no need to set up the mode registers. 6.3 Setting Mode Registers (Communication Conditions) Set up mode registers 6.4 Configuration Setup (Communication range) Set up configuration See the sample program for details on the following steps. Turn on Request to Refresh relay YVVV36 6.6 Sample Program Read data Write data Communication error? NO Figure 6.1 YES Replace read data Replace with data that identifies an error. Startup Procedure for Manual Mode IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-3 6.2 Input/Output Relays Used in Manual Mode To start communication in manual mode, perform configuration setup, refresh station designation and then turn on the Request to Refresh relay (YVVV36). When this relay is on, the UT Link Module performs refresh operation of the external instruments. During the refresh operation, the Refreshing relay (XVVV04) turns on. Access the Request to Refresh relay (YVVV36) and Refreshing relay (XVVV04) using a FA-M3 user program (ladder sequence or BASIC program). Other I/O relays that can be used in manual mode include relays for managing error information and relays for reading the configuration information. A complete list of the relays is given in Table 6.1. For error handling, see Chapter 9, “Errors and Troubleshooting". Table 6.1 Input/Output Relays used in Manual Mode I/O Relay Number Signal Name XVVV01 Set mode register completed XVVV02 Read configuration completed XVVV04 Refreshing XVVV05 Clear remote station status register completed XVVV06 Refresh communication error XVVV07 Module error YVVV33 Request to set mode register YVVV34 Request to read configuration YVVV36 Request to refresh YVVV37 Clear remote station status register XVVV38 Clear refresh communication error relay Relation to Other Relays Description Turns on when setting of the contents written in the mode register to this module is completed. Turns on when the read configuration operation is completed. Turns on when the refresh operation is started by turning on YVVV36 (Request to refresh). It remains on during the refresh operation. Turns on when clearing of the error information (stations where error has occurred, error details code) for remote stations, started by turning on YVVV37, is completed Turns on when communication error occurs in automatic mode or manual mode. Turns on when module error occurs (when there is an error in module setting). Turning on this relay sets the internal parameters of this module according to the contents of the mode registers. Turning on this relay starts a request to read the configuration information. Turning on this relay performs refresh communication. Turning off this relay stops refresh communication. Turning on this relay clears the error information (stations where error has occurred and error details code) of the Remote Station Status register and the XVVV06 (Refresh Communication Error relay). Turning on this relay clears only XVVV06 (refresh communication error relay). The error Information (station where error has occurred, error detailed code) remains unchanged. Turning off YVVV33 turns off XVVV01. Turning off YVVV34 turns off XVVV02. Turning off YVVV36 stops the refresh operation and turns off XVVV04. Turning off YVVV37 turns off XVVV05. Turning on either YVVV37 or YVVV38 turns off XVVV06. Turning off YVVV33 or YVVV34 or YVVV36 turns off XVVV07. Turn off YVVV33 only after checking that XVVV01 or XVVV07 has turned on. Turn off YVVV34 only after checking that XVVV02 or XVVV07 has turned on. When XVVV07 is turned on, turn off YVVV36 after checking the error information. Turn off YVVV37 after confirming that XVVV05 has turned on. Turn off YVVV38 after confirming that XVVV06 has turned on. *: Replace VVV with the slot number where the UT Link Module is installed. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-4 z Operation of the input/output relays I/O relays Key: User program processing UT Link Module internal processing XVVV01 Setup mode register completed XVVV04 Refreshing ON Communication interrupted over all stations Communication in progress OFF XVVV05 Clear remote station status register completed XVVV06 Refresh communication error XVVV07 Module error YVVV33 Request to set up mode register YVVV34 Request to read configuration YVVV36 Request to refresh YVVV37 Clear remote station status register YVVV38 Clear refresh communication error relay time Normal communication Module error Refresh communication error Clear remote station status register Set up mode registers YVVV02 Read configuration completed YVVV34 Request to read configuration time Read configuration Figure 6.2 Operation of Input/Output Relays in Manual Mode IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-5 6.3 Setting Mode Registers (Communication Conditions) When the communication conditions are set using the switches on the side of the module and the module is used with these conditions unchanged, it is not necessary to set the mode registers and you may skip this section. However the following setup can only be done using mode registers. - Response waiting time This is the timer value for monitoring a response from an external instrument during refresh communication. - Number of communications retries The communication conditions such as the transmission speed is read from the positions of the DIP switches on the side of the module and written to the mode registers when power to the module is switched on. A user program can check and change the current communication conditions by reading and writing to the mode registers. Writing to a mode register from a user program overwrites the current value. When changing a mode register value, write your user program so that it checks that the Set Mode Register Completed relay (XVVV01)*1 has turned on after changing the mode register, before starting communication. See Table 6.2, “List of Mode Registers” for more details. *1: See Table 6.1, “Input/Output Relays Used in Manual Mode”. CAUTION Writing to mode registers is allowed in manual mode and command communication. Writing to mode registers in automatic mode is ignored. Table 6.2 List of Mode Registers Data position number Type*1 1 R/W 2 3 4 5 6 R/W R/W R/W R/W R/W 7 R/W 8 R/W 31 R 32 R 33 R Initial value Description Transmission speed (bps) Data length Parity Stop bit length Checksum Ending character Response waiting time*3 Number of communication retries Module error details EC1*4 Module error details EC2*4 Automatic mode / manual mode 0: 300 3: 2400 6: 19200 0: 7 bits 0: none 0: 1 bit 0: no 0: none 1: 600 4: 4800 7: 31250 1: 8 bits 1: odd 1: 2 bits 1: yes 1: CR($OD) 2: 1200 5: 9600 8: 38400 *2 2: even *2 *2 *2 *2 10 to 32760 (ms) 0 to 255 (times) *2 5000 0: No retry 15 Error code 1 15 Error code 2 (EC1) (EC2) 3 0 0 0: manual mode 1: automatic mode *2 *1: R/W: Both Read/Write are allowed, R: Read only *2: The initial values are obtained from the hardware switch setting. *3: Monitors the refresh time. As the time required for refreshing vary with every external instrument, set the value to accommodate the external instrument which has the longest internal processing time among all the external instruments to be refreshed. *4: See “Module Error Details Information” in Table 9.2. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-6 T Sample Program To change the number of communication retries, write the new value to mode register data position 8. Figure 6.3 shows a sample program for changing the number of retries from the initial value of 3 to 2, with signal names as defined in Figure 6.3, “Signal Name Assignment Table”. If a module error occurs, check the program. The program assumes that the UT Link Module is installed in slot 5. Table 6.3 Signal Name Assignment Table Signal Name ModeStE ModuErr ModeSet ONEpls LCslot Address X00501 X00507 Y00533 M00035 D00033 I/O Comments Set mode register completed *1 Module error Request to set mode register *1 On for 1 scan at operation start LC51 slot *1: See Table 6.1, “Input/Output Relays Used in Manual Mode”. * Changing communication retries to 2 (Normally executed during power-on processing) * file: RETRY Set slot location where UT51 is installed. Number of retries Request to set mode register * Set mode register completed Reset request to set mode register Figure 6.3 Sample Program for Changing the Number of Retries Tip The sample program is coded using signal names assigned to devices. Although the program can be coded using only device names, using signal names improves program readability and maintainability. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-7 6.4 Configuration Setup (Communication Range) Configuration setup in manual mode defines the reading/writing range for external instruments and the access targets of external instruments (D registers or I relays *2) in the Configuration Data Area*1 of the UT Link Module using a user program. *1: See Table Appx. 1, “Configuration Data Area”. *2: Although the I relays of external instruments are also accessible, their content is almost the same as the D registers. Therefore, the following explanation shall assume that access is to the D registers. Defining the reading and writing range of external instruments is known as configuration setup. In configuration setup, the following information is defined for each external instrument. T Setting the Configuration Data Area - - - Data Count Defines the number of read or write data starting from the first device number of the external instrument. Device Type Specifies the target device type of the external instrument for reading or writing. Specify $4 for D registers of the external instrument and $9 for I relays of the external instrument. (Table 6.4) First Device Number Specifies the device number (without the prefix symbol D or I) of the first device of the external instrument to read or write. The setting area consists of 2 words, but the lower order number should always be set to 0. Table 6.4 Numeric Values for Setting the “Device Type” in the Configuration Data Area Access Target Value D register I relay $4 $9 Remarks Normally, D registers are accessed. CAUTION - Up to 25 contiguous devices can be read or write per station in manual mode. Specifying non-contiguous device numbers is not allowed. To access more than 25 devices in the external instrument, access devices with low access frequencies using command communication. For details on command communication, see Chapter 7, “Details of Command Communication”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-8 The configuration data area*1 contains data for 32 stations. The area for each station contains data for 2 CPUs; each CPU area is further divided into a setup area for reading and a setup area for writing. Table 6.5 shows an example of a configuration data area. The configuration data area for CPU2 is used only if the external instrument has 2 CPUs. Most external instruments, however, has only CPU1. Therefore, the following description shall assume that no setup is performed for the CPU2 area. *1: See Table Appx. 1, “Configuration Data Area”. Station Number Table 6.5 Configuration Data Area Example 1 2 : 32 Data Position Numbers for CPU1 Setup Area for Reading Setup Area for Writing Data Device First Device Data Device First Device Count Type Number Count Type Number 51 52 53-54 55 56 57-58 67 68 69-70 71 72 73-74 547 548 549-550 551 552 553-554 Data Position Numbers for CPU2 Setup Area for Reading Setup Area for Writing Data Device First Device Data Device First Device Count Type Number Count Type Number 59 60 61-62 63 64 65-66 75 76 77-78 79 80 81-82 555 556 559 557-558 560 561-562 *: Numbers in the table represent UT Link Module data position numbers. T Configuration Data Setup Example An example setup for reading two D registers with numbers D2 and D3*1 and writing one D register with number D215*2 is shown below. *1: If the external instrument is a Green Series Controller UT350/UT320 manufactured by Yokogawa M&C Corporation, D2 and D3 are the ERROR and PV. *2: If the external instrument is a Green Series Controller UT350/UT320 manufactured by Yokogawa M&C Corporation, D215 is the CRSP. Table 6.6 Configuration Data Area Setup Example Station Number 1 Example preset value *1: *2: *3: *4: *5: Data Count 51 2 *1 Data Position Numbers for CPU1 Setup Area for Reading Setup Area for Writing Device Data Device First Device Number First Device Number Type Count Type 52 53 to 54 55 56 57 to 58 $4 *2 Always 0 2 *3 1 *4 $4 *2 Always 0 215 *5 Two data items to read: D2 and D3 $4 for reading D registers ($9 for reading relays). Value is 2 since the first device number to read is D2. One data item to write: D215 Value is 215 since the first device number to write is D215. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-9 T Sample Program The following sample program illustrates Table 6.6, “Configuration Data Area Setup Example” . Normally, configuration setup is performed only once during power-on processing. Table 6.7 Signal Name Assignment Table Signal Name ONEpls LCslot Address M00035 D00033 I/O Comments On for 1 scan at start of operation LC51 slot ** Sample Program to Setup Configuration (Manual Mode) ** * Set up read area for station 1 * Read data count is 2 Specify D register Always 0 Start reading from D2 * Set up write area for station 1 * Write data count is 1 Specify D register Always 0 Start writing from D215 Figure 6.4 Sample Program for Configuration Setup Tip You can also read the current configuration information. Turn on the Request to Read Configuration relay (YVVV34) described in Table 6.1, “Input/Output Relays Used in Manual Mode”. When the Read Configuration Completed relay (XVVV02) turns on, the data read is stored in the configuration data area. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-10 6.5 Reading and Writing Data in Manual Mode In manual mode, data is stored in the Refresh Communication Data Area (data position numbers 571 to 3770)*1 of the UT Link Module (in the same area as in automatic mode). The Refresh Communication Data Area holds data for 32 stations (a total of 3200 registers) with 25 CPU1 read data areas, 25 CPU1 write data areas and similarly, 25+25 CPU2 areas per station. The content of the stored data depends on the configuration data. For example, in Table 6.6, “Configuration Data Area Setup Example”, we set up the configuration for station 1 to read registers D2 and D3 and write to D215 of the external instrument in station 1 in manual mode. When refresh communication starts, data that is read is stored into read area data position numbers 571 and 572 in the Refresh Communication Data Area. Data written by the user program in write area data position number 596 is written to D215 of the external instrument. The user program can obtain the data of the external instrument by reading data position numbers 571 and 572. The Refresh Communication Data Area for CPU2 is used when the external instrument has two CPUs. Most external instruments, however, have only one CPU. Accessing an external instrument with two CPUs is the same as accessing an external instrument with one CPU, except for differences in the position data numbers. *1: Table 6.8 shows an example. See Table Appx. 2, “Refresh Communication Data Area” for a complete map of the storage area. Table 6.8 Refresh Communication Data Area Example Station number 1 2 3 : 32 *: Data Position Numbers for CPU1 Read Area Write Area 571 to 595 596 to 620 671 to 695 696 to 720 771 to 795 796 to 820 3671 to 3695 3696 to 3720 Data Position Numbers for CPU2 Read Area Write Area 621 to 645 646 to 670 721 to 745 746 to 770 821 to 845 846 to 870 3721 to 3745 3746 to 3770 Numbers in the table represent UT Link Module data position numbers. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-11 Sample Program This section describes a sample program that is created with the following conditions. - Designate refresh stations : Station 1 Slot number where the UT Link Module is installed: 5 Communication conditions unchanged from the setting of the DIP switches on the side of the module. - Read data of external instrument at station 1 : Reads D2 and D3 every second*1 - Write data to external instrument at station 1 : Write data to D215 every second*1 - On communication error : Sets read data to –99. Restart communication automatically if system recovers from a communication error (As there is only one communication station, determine the error from the Refresh Communication Error*2 relay. - If a module error occurs, check the program. - Ladder signal name assignments are as shown in Table 6.9. *1: The user program reads and writes to the refresh communication data area of the UT Link Module every second. The external instrument and UT Link Module communicate asynchronously to the user program. *2: See Figure 9.2, “Remote Station Status Register Configuration”. Slot position → 1 2 3 4 5 6 Power 6.6 UT Link Module Station 1 Communication items: D1, D2 read D215 write Figure 6.5 System Configuration Diagram CAUTION Remember to switch to manual mode*1. *1: See Figure 2.9, “Data Format Switch Setting”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-12 T Ladder Program Table 6.9 Signal Name Assignment Table Signal Name Refsh RefReq ONEpls Sec1 LCslot Data10 *1 Data30 Address I/O Comments X00504 Y00536 M00035 M00040 D00033 D00049 D00081 Refreshing Request to refresh On for 1 scan at operation start 1-second clock LC51 slot First data for station 1 First write data for station 1 *1: 2 words starting from Data10 are used for reading data and hence cannot be used for other purposes. ** Sample Program for Manual Mode ** * Specify refresh station (station 1only) * Set slot position where UT51 is installed Set stations 01 to 16 Set stations 17 to 32 Set CPU2 data areas to 0 Set CPU2 data areas to 0 * Setup configuration (manual mode) * * Set up read area for station 1 * Read data count is 2 Specify D register Always 0 Start reading from D2 Figure 6.6 Sample Program for Manual Mode (1/2) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-13 * Set up write area for station 1 * Write data count is 1 Specify D register Always 0 Start writing from D215 Request to refresh Write data * Read and write data * Read station 01 Write station 01 * On communication error, set data to -99 * Station 01 Figure 6.7 Sample Program for Manual Mode (2/2) Tip - In the sample program, data for station 1 (D2, D3) is stored in 2 contiguous words starting from signal name Data10 (device D00049). Data stored in Data30 (device D00081) is transmitted to station 1 and written to D215 of the external instrument. - When connecting multiple stations, it is necessary to determine when communication error has occurred using the Remote Station Status register. See Section 5.4, “Sample Program” in the chapter on automatic mode for details. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-14 T YM-BASIC/FA Sample Program 1000 ! ******************************************************* 1010 ! Manual Mode Sample Program file:LC51smpl.sa 1020 ! ******************************************************* 1030 ! 1040 ! ************************************ 1050 ! Declarations 1060 ! ************************************ 1070 DEFINT I,L,S :! Integer type declaration 1080 OPTION BASE 1 1090 DIM ISET(12),IDATA10(2),IDATA30(1) :! Array declaration 1100 SL = 5 :! Slot position 1110 ASSIGN LC51= SL :! Module declaration 1120 ! 1130 ! ************************************ 1140 ! Specify refresh stations (station 1 only) 1150 ! ************************************ 1160 ISET(1) = $1 :! Set stations 01 to 16 1170 ISET(2) = 0 :! Set stations 17 to 32 1180 ISET(3) = 0 :! Set CPU2 side to 0. 1190 ISET(4) = 0 :! Set CPU2 side to 0. 1200 ! 1210 ! ************************************ 1220 ! Configuration setup 1230 ! Set up station 1 read area 1240 ! ************************************ 1250 ISET(5) = 2 :! Set read data count to 2 1260 ISET(6) = $4 :! Specify type as D register 1270 ISET(7) = 0 :! Always 0 1280 ISET(8) = 2 :! First D2 1290 ! 1300 ! ************************************ 1310 ! Set up station 1 write area 1320 ! ************************************ 1330 ISET(9) = 1 :! Set write data count to 1 1340 ISET(10)= $4 :! Specify type as D register 1350 ISET(11)= 0 :! Always 0 1360 ISET(12)= 215 :! First D215 1370 ! 1380 IDATA30(1)=400 :! Write data 1390 ! 1400 ! ************************************ 1410 ! Write to data register 1420 ! ************************************ 1430 ! *** Specify refresh stations *** 1440 FOR IREG = 563 TO 566 1450 OUTPUT SL,(IREG - 50) NOFORMAT;ISET(IREG - 562) 1460 NEXT IREG 1470 ! IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-15 1480 ! *** Station 1 configuration area *** 1490 FOR IREG = 51 TO 58 1500 OUTPUT SL,(IREG - 50) NOFORMAT;ISET(IREG - 46) 1510 NEXT IREG 1520 ! 1530 IDAT = 101 :! Data position 1540 CONTROL SL,IDAT;$8,$8 :! Turn on Request to Refresh relay 1550 ! 1560 ! ************************************ 1570 ! Timer interrupt declaration, MAIN 1580 ! ************************************ 1590 ON TIMER #1,1000 GOSUB DATRD@ 1600 ! 1610 ! *** MAIN *** 1620 WHILE ISTOP = 0 1630 WAIT 1640 END WHILE 1650 ! 1660 STOP 1670 ! 1680 ! ************************************ 1690 DATRD@ ! Read and write data 1700 ! ************************************ 1710 STATUS SL,IDAT;IRELAY 1720 IREFSH = BINAND(IRELAY,$8) :! Refreshing 1730 IREFERR = BINAND(IRELAY,$20) :! Refresh communication error 1740 IMODUERR = BINAND(IRELAY,$40) :! Module error 1750 ! 1760 IF IREFSH THEN 1770 ENTER SL,(571 - 50) NOFORMAT;IDATA10(1) :! Read station 1, D2 1780 ENTER SL,(572 - 50) NOFORMAT;IDATA10(2) :! Read station 1, D3 1790 OUTPUT SL,(596 - 50) NOFORMAT;IDATA30(1) 1800 CONTROL SL,IDAT;$0;$32 :! Write station 1, D215 :! Turn off Clear Refresh Communication Error Relay 1810 ENDIF 1820 ! 1830 ! ***** On error: set to -99 ***** 1840 IF IREFERR OR IMODUERR THEN 1850 IDATA10(1) = -99 : IDATA10(2) = -99 1860 ! 1870 ! *** Clear refresh communication error *** 1880 IF IREFERR THEN 1890 CONTROL SL,IDAT;$32;$32 :! Turn on Clear Refresh Communication Error Relay 1900 ENDIF 1910 ! 1920 ! *** Stop program on module error *** 1930 IF IMODUERR THEN 1940 CONTROL SL,IDAT;$0;$8 :! Turn off Request to Refresh relay 1950 ISTOP = 1 :! Stop program IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 6-16 1960 ENDIF 1970 ENDIF 1980 ! 1990 ! *** For checking the reading operation *** 2000 PRINT "IDATA10(1)=";IDATA10(1);" IDATA10(2)=";IDATA10(2) 2010 ! 2020 RETURN 2030 ! 2040 END IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-1 7. Details of Command Communication In addition to the two regular (refresh operation) communication modes (automatic and manual modes), the UT Link Module also provides command communication for communication as and when required. In command communication, the UT Link Module sends a command to an external instrument and receives a response from the external instrument. Command communication can be used even during refresh operations in automatic mode or manual mode. In command operation, a user program has to be created to perform the following tasks: - start communication - read and write data - end communication - manage errors, etc. CAUTION Using command communication during data access in automatic mode or manual mode will cause a temporary delay in the data access because the data access operation is temporarily interrupted to execute the command communication. Frequent command communications of the same content should be implemented as data access in automatic mode or manual mode instead. CAUTION When using automatic mode together with command communication, start command communication after the status bit for the station in the Remote Station Status storage area (data position numbers: 3839, 3840*1) has turned on. Starting command communication before the refresh station initial check*2 has been completed in automatic mode will disallow subsequent automatic mode communication to this station. *1: For details, see Figure 9.2, “Remote Station Status Register Configuration” *2: See Section .4.1, “When Refresh Station Designation is Not Performed in Automatic Mode”. When the initial check for a station is completed, its status bit in the Remote Station Status storage area (data position numbers: 3839, 3840) turns on. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-2 7.1 Startup Procedure The startup procedure for command communication is given below. See Also: Setup conditions for communication with the external instrument. The external instrument should be setup with the same set of conditions. Setup communication conditions Install module to base module Connect to external instruments Set up mode registers? 2.7 Setting Communication Conditions 2.8 Attaching and Detaching Modules 2.6 Connecting to External Instruments NO YES When using the communication conditions defined by the switch setting on the side of the module, there is no need to setup the mode registers. 7.3 Setting Mode Registers (Communication Conditions) Set up mode registers. See the sample program for details on the following steps. Create command 7.4 Commands and Responses 7.5 Sample Program Turn on Request to Transmit Command relay YVVV35 Turn on Response Receive Completed relay XVVV03 Turn off Request to Transmit Command relay YVVV35 Read data Communication error? NO YES Replace read data Replace with data that identifies an error. End Figure 7.1 Startup Procedure for Command Communication IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-3 7.2 Input/Output Relays Used in Command Communication In command communication, the user creates a command and turns on the Request to Transmit Command relay (YVVV35). To receive the response, the user checks that XVVV03 has turned on before reading the data from the response area. Reading the data requires knowledge of the response formats (Figures 7.9 and 7.10). Table 7.1 shows a list of the input/output relays used in command communications. For details on error handling, see Chapter 9, “Errors and Troubleshooting". Table 7.1 Input/Output Relays used in Command Communication I/O Relay Number Signal Name XVVV03 Receive response completed XVVV07 Module error XVVV08 Command communication error YVVV35 *: Request to transmit command Relation to Other Relays Description Turns on when a normal response to the transmitted command is received from the external instrument and stored in the response area. Turns on when a module error (setup error) occurs. Turns on when a communication error occurs during command communication. Turning on this relay transmits a command and performs monitoring until a response is received. Turning off YVVV35 turns off XVVV03. Turning off YVVV35 turns off XVVV07. Turning off YVVV35 turns off XVVV08. Turn off YVVV35 after confirming that one of the following relays has turned on: YVVV03, YVVV07 or YVVV08 Replace VVV with the slot number where the UT Link Module is installed. z Operation of the Input/Output Relays I/O Relay XVVV03 Response receive completed ON Key: : User program processing : UT Link Module internal processing OFF X XVVV07 Module error XVVV07 Command communication error XVVV35 Request to transmit command time Normal communication Command communication error Module error Figure 7.2 Operation of the Input/Output Relays in Command Communication IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-4 7.3 Setting Mode Registers (Communication Conditions) When the communication conditions are set using the switches on the side of the module and the module is used with these conditions unchanged, it is not necessary to set the mode registers and you may skip this section. However the following setup can only be done using mode registers. - Response waiting time This is the timer value for monitoring a response from an external instrument during refresh communication - Number of communication retries If it is required to change the above two parameter values or to read or write communication parameters such as the transmission speed from a user program, read Section 6.3, “Setting Mode Registers (Communication Conditions)”. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-5 7.4 Command and Response 7.4.1 Data Areas Used in Command Communication The data areas in the UT Link Module that are used in command communication are called command registers. The command registers consist of the following 2 areas: - Command area: The area where a user program writes the command to an external instrument. Response area: The area where a user program reads the response from an external instrument. Data position number 3841 Command area (100 words) 3940 3941 Response area (100 words) 4040 Figure 7.3 Command and Response IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-6 7.4.2 Formats of Commands and Responses Table .7.2, “Commands and Responses” shows a list of command numbers used in the UT Link Module, together with the function description, command format numbers and response format numbers. Table 7.3, “Numeric Values for Setting the “Device Type” in the Response Format” shows device types that can be specified in a command format. Some commands do not require designation of the device type. To transmit a command, follow instructions given in Chapter 8, “Accessing the UT Link Module” using command formats described in this section. When a command-related parameter error occurs, a module error results, the Module Error relay (XVVV07) turns on and an error code is stored in the Module Error Details register at data position numbers 31 and 32 of the mode registers*1. For more information on error details, see Chapter 9, “Errors and Troubleshooting”. *1: See Section 6.3, “Setting Mode Registers (Communication Conditions)”. z Creating a Command - - The command format depends on the command number. Create a command according to the command format number given in Table 7.2, “Commands and Responses”. Figures 7.4 to 7.8 show the actual command format for each command format number. Set the station number field in the command format to the station number of the external instrument with a user program (station numbers 1 to 32). The CPU number field in the command format is normally set to 1. For external instruments with two CPUs, it may be set to 1 or 2. Set the command number to the hexadecimal value as given in Table 7.2, “Commands and Responses” with a user program. Set the device type to the device type of the external instrument to be accessed. (Table 7.3). Set the device number to a register or relay number (without the prefix character, such as ‘D’ or ‘I’) of the external instrument to be accessed. The device number area in the command format contains 2 words. The high-order word is reserved for future expansion and should be set to 0. Specify the device number in the low order word. Example: To specify device number $8 using command format C1, Data position number 3845 (high order word) = $0 Data position number 3846 (low order word) = $8 z Response Format - - There are 2 types of response formats. Figures 7.9 to 7.10 show the actual response format for each response format number. When there is an error in the response for a command, an error code is stored in the response area of the command register. For details on errors, see Chapter 9, “Errors and Troubleshooting”. To read a response, follow instructions given in Chapter 8, “Accessing the UT Link Module”, using response formats described in this section. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-7 Table 7.2 Commands and Responses Command Number (in hexadecimal) $01 $02 $04 $05 $06 $07 $11 $12 $14 $15 $16 $17 $51 Description Bit read Bit write Bit random read Bit random write Bit monitoring device designation Bit monitor Word read Word write Word random read Word random write Word monitoring device designation Word monitor Test (Command Return) Number of Processing Points per Communication Command Format Number Response Format Number 1 to 64 bits 1 to 64 bits 1 to 32 bits 1 to 24 bits C1 C2 C3 C4 R2 R1 R2 R1 1 to 32 bits C3 R1 1 to 64 words 1 to 64 words 1 to 32 words 1 to 24 words C5 C1 C2 C3 C4 R2 R2 R1 R2 R1 1 to 32 words C3 R1 C5 C5 R2 R1 Table 7.3 Numeric Values for Setting the “Device Type” in the Response Format Access Target D register I relay Value $4 $9 Remarks Normally, D registers are accessed. z Command Format Data Position Number 3841 3842 3843 3844 3845 3846 3847 Station number CPU number Command number Device type $0 Device number Number Number of points to read Data Position Number 3841 3842 3843 3844 3845 3846 3847 3848 Station number CPU number Command number Device type $0 Device number Number Number of points to write Data 3940 Figure 7.4 Command Format: C1 Data Position Number 3841 3842 3843 3844 3845 Station number CPU number Command number Number of points Figure 7.5 Command Format: C2 Device type $0 Device number Number Device type $0 Device number Number 3940 Figure 7.6 Command Format: C3 IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-8 Data Position Number 3841 3842 3843 3844 Station number CPU number Command number Number of points to write 3845 Device type $0 Device number Number Data Device type Device $0 number Number Data 3940 Figure 7.7 Command Format: C4 Data Position Number 3841 3842 3843 Station number CPU number Command number Figure 7.8 Command Format: C5 z Response Format (See Chapter 9, “Errors and Troubleshooting” for details on EC1 and EC2) Data Position Number 3941 3942 EC1 EC2 Register count=0 Figure 7.9 Response Format: R1 Data Position Number 3941 3942 3943 3944 - EC1 EC2 Register count = n Data 1 Data 2 Data n The number of data items should be the same as the number of points specified in the command. Figure 7.10 Response Format: R2 IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-9 Sample Program for Creating a Command (for Reading) This section describes a sample program for creating a command with the following conditions: - Station number : 1 - CPU number : 1 - Command number : $11 (Word read) Uses command format C1 according to Table 7.2, “Commands and Responses” - Device type : D register - Device number : D1 of the external instrument as the first device to read - Number of points to read : 16 points Table 7.4, “Signal Name Assignment Table”, shows an example of signal name assignments to the sequence devices. Table 7.4 Signal Name Assignment Table Signal Name Start LCslot KyokuNo CPU CodNo DevKd Zero DevNo Qty Address I00033 D00033 D00129 D00130 D00131 D00132 D00133 D00134 D00135 I/O Comments Start command creation LC51 slot Station number CPU number Command number Device type Always 0 Device number Number of points * Sample program to create command * Set slot position where UT51 is installed Station number CPU number Command no. for word read command Set device type as D register Always 0 First device number to read Number of points to read Batch write to command area Figure 7.11 Sample Program for Creating a Command Tip This sample program assigns various preset values to the D registers and uses a WRITE instruction to perform a batch write of the values to the UT Link Module. To achieve that, create the signal assignment table so that the addresses of the D registers follow the same order as the elements in the command format. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-10 7.5 Sample Program Figure 7.12, “Sample Program for Command Communication (Reading)” includes the entire sample program shown in Figure 7.11, “Sample Program for Creating a Command” which configures the input and output relays. In addition, the sample program in Figure 7.12 sets the receive data (16 words starting from Data10) to –99 when an error occurs in the response. Table 7.5 shows an example of signal name assignments to the sequence devices. CAUTION When using automatic mode together with command communication, start command communication after the status bit for the station in the remote station status storage area (data position numbers: 3839, 3840*1) has turned on. Starting command communication before the refresh station initial check*2 for a station has been completed in automatic mode will disallow subsequent automatic mode communication to the station. This sample program describes a circuit, which takes this point into consideration and another circuit, which does not allow concurrent usage with automatic mode. Use either circuit as required. *1: For details, see Figure 9.2, “Remote Station Status Register Configuration”. *2: See Section 4.1, “When Refresh Station Designation is Not Performed in Automatic Mode”. When the initial check for a station is completed, its status bit in the Remote Station Status storage area (data position numbers: 3839, 3840) turns on. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-11 T Sample Program (Reading) Table 7.5 Signal Name Assignment Table Signal Name ResRcv ModuErr Address I/O Comments X00503 X00507 Receive response completed Module error Command communication error Request to transmit command Start command creation Self lock Remote station status 01 LC51 slot First data for station 1 Station number CPU number Command number Device type Always 0 Device number Number of points CodErr X00508 CodReq Y00535 Start iLock stats01 *1 LCslot Data10 *2 KyokuNo CPU CodNo DevKd Zero DevNo Qty I00033 I00034 I00049 D00033 D00049 D00129 D00130 D00131 D00132 D00133 D00134 D00135 These data items should have the same order as data fields in the command format. *1: 16 bits starting from stas01 are used for reading the status of stations 1 to 16 and hence cannot be used for other purposes. *2: 16 words starting from Data10 are used for reading data and hence cannot be used for other purposes. * Sample program to read 16 data using command communication * Set slot position where UT51 is installed Station number CPU number Command no. for Word Read command Set device type as D register Always 0 First device number to read Number of points to read Batch write to command area Figure 7.12 Sample Program for Command Communication (Reading) (1/2) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-12 * Circuit to be used when command communication is inter-mixed with automatic mode * Self lock Check remote station status Request to transmit command Release lock * Circuit to be used when command communication is not intermixed with automatic mode * Request to transmit command * Receive and read response. On error, set data to –99 * Read response On error, set data to -99 Request to transmit command Figure 7.13 Sample Program for Command Communication (Reading) (2/2) Tip - The Start contact is on before entering the sample program and is reset within the sample program. - This sample program does not read the error and register count (data position numbers 3941, 3942) in the response format (R2). It reads starting from the data area (data position number 3943). IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-13 T Sample Program (Writing) This section describes a sample program for creating a command with the following conditions: - Station number : 1 - CPU number : 1 - Command number : $12 (Word write) Uses command format C2 according to Table 7.2, “Commands and Responses” - Device type : D register - Device number : D215*1 of the external instrument as the first device to access - Number of points to write : 1 point *1: If the external instrument is a Green Series Controller UT350/UT320 manufactured by Yokogawa M&C Corporation, D215 is the C.RSP. Table 7.6 shows an example of signal name assignments to the sequence devices. Table 7.6 Signal Name Assignment Table Signal Name ResRcv ModuErr Address I/O Comments X00503 X00507 Receive response completed Module error Command communication error Request to transmit command Start command creation Self lock Communication alarm Remote station status 01 LC51 slot First data for station 1 Station number CPU number Command number Device type Always 0 Device number Number of points Write data CodErr X00508 CodReq Y00535 Start iLock Alarm stats01*1 LCslot Data10 KyokuNo CPU CodNo DevKd Zero DevNo Qty COMdat I00033 I00034 I00035 I00049 D00033 D00049 D00129 D00130 D00131 D00132 D00133 D00134 D00135 D00136 These data items should have the same order as data fields in the command format. *1: 16 bits starting from stats01 are used for reading the status of stations 1 to 16 and hence cannot be used for other purposes. Tip This sample program assigns various setup values to the D registers and uses a WRITE instruction to perform a batch write of the values to the UT Link Module. To achieve that, create the signal assignment table so that the addresses of the D registers (Table 7.6, D00129 to D00136) follow the same order as the elements in the command format. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-14 * Sample program to write 1 data with command communication * Set slot position where UT51 is installed Station number CPU number command no. of Word Write command Set device type as D register Always 0 Device number to write Number of points to write Write data Batch write to command area * Circuit to be used when command communication is inter-mixed with automatic mode * Self lock Check remote station status Request to transmit command Release lock * Circuit to be used when command communication is not intermixed with automatic mode * Request to transmit command Figure 7.14 Sample Program for Command Communication (Writing) (1/2) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 7-15 * Reset start contact * * Receive response. On error, raise an alarm. Alarm on error Request to transmit command Figure 7.15 Sample Program for Command Communication (Writing) (2/2) Tip - The Start contact is turned on before entering the sample program and is reset within the sample program. - The program turns on the internal relay (Alarm) when a communication error occurs. Add a circuit for transmitting the alarm to the external and resetting the internal relay (Alarm). IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page 8-1 8. Accessing the UT Link Module 8.1 Accessing Using Ladder Sequence Instructions For sample programs that access registers and input/output relays of the UT Link Module using a ladder sequence, see Section 5.4, “Sample Program”, Section 6.6, “Sample Program” and Section 7.5, “Sample Program”. z Accessing Registers Reading Registers (Special Module Read Instruction) READ sl n1 d k sl n1 d : Slot number of UT Link Module (3 digits) : First data position number to read : First device number for storing the read data k : Transfer data count - Writing to Registers (Special Module Write Instruction) WRITE s sl n2 k s sl n2 k : First device number for write data : Slot number of UT Link Module (3 digits) : First data position number to start writing : Transfer data count CAUTION Use special module instructions intended for 16-bit (1 word) data to access the registers of the UT Link Module. The following 4 instructions can be used: - Special Module Read (READ) - Special Module Write (WRITE) - Special Module High-Speed Read (HRD) - Special Module High-Speed Write (HWR) Special module instructions intended for reading and writing 32-bit (2 words) long-word data cannot be used. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 8-2 z Accessing input/output relays - For accessing input relays of the UT Link Module, XVVVnn VVV nn - : Slot number : Relay number For accessing output relays of the UT Link Module, YVVVnn VVV : Slot number nn : Relay number See Also See the following manual for details on the ladder program instructions. Sequence CPU Manual (Instructions) (IM34M6P12-03E) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 8-3 8.2 Accessing Using BASIC Statements For sample programs that access the UT Link Module from a FA-M3 BASIC CPU, see Section 6.6, “Sample Program”. BASIC Statements that can be Used in a UT Link Module BASIC statements shown in Table 8.1 can be used to access the UT Link Module. Operation is not guaranteed when BASIC statements other than those in Table 8.1 is used to access the module. Table 8.1 BASIC Statements that can be Used in the UT Link Module Function Declare use of module Read mode register Write to mode register Read data register Write to data register Read input relay Write to output relay Statement Syntax ASSIGN LC51=SL SL : Slot number STATUS SL, n; I SL : Slot number n : Data position number I : Integer variable name or integer array variable name for storing the read data CONTROL SL, n; I SL : Slot number n : Data position number I : Integer type variable name or integer array variable name storing the write data ENTER SL, n NOFORMAT; I SL : Slot number n : Data position number I : Integer variable name or integer array variable name for storing read data OUTPUT SL, n, NOFORMAT;I SL : Slot number n : Data position number I : Integer type variable name or integer array variable name storing the write data STATUS SL, n; P SL : Slot number n : Data position number (always 101) P : Variable for storing the read value. CONTROL SL, n; P, M SL : Slot number n : Data position number (always 101) P : Output data M : Mask pattern Explanation Defines the slot number where the UT Link module is installed Reads data position number n of the mode register of the module installed in slot number SL, and stores the data in variable I. Stores the contents of variable I in data position n of the mode register of the module installed in slot number SL. Reads data position number n of the data register of the module installed in slot number SL, and stores the data in variable I. Stores the contents of variable I in data position n of the data register of the module installed in slot number SL. Reads an input relay of the module installed in slot number SL, and stores the data in variable P. Outputs the value of variable P to the output relay of the module installed in slot number SL. By using a mask pattern, you can write only to specific relays. CAUTION Note the following when accessing data registers from BASIC programs. Registers of the UT Link Module are classified into mode registers and data registers. When accessing data registers from a BASIC program, access data position numbers obtained by subtracting 50 from the data position numbers given in Table 3.2, “Register Configuration of the UT Link Module”. For mode registers, access the data position numbers as given in Table 3.2. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 8-4 8.2.1 Declaring Use of Module The ASSIGN statement declares the use of the module. Always execute the ASSIGN statement before using other BASIC statements in this module. The ASSIGN statement defines the slot number where the module is installed. ASSIGN LC51=SL SL : Slot number. Number or numeric variable. 8.2.2 Reading and Writing Mode Registers z Reading mode registers To read a mode register, specify the slot number where this module is installed and a data position number. The mode register value read is stored in the specified integer variable or integer array variable. STATUS SL, n ; I SL : Slot number n : Data position number I : Integer variable name or array variable name for storing the read data z Writing to mode registers To write to a mode register, specify the slot number where this module is installed and a data position number. Before writing, store the mode register value to be written in the specified integer variable or integer array variable. CONTROL SL, n ; I SL : Slot number n : Data position number I : Integer variable name or array variable name storing the write data IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 8-5 8.2.3 Reading and Writing Data Registers z Reading data registers To read a data register, specify the slot number where this module is installed and a data position number. The data register value read is stored in the specified integer variable or integer array variable. ENTER SL, n NOFORMAT ; I SL : Slot number n : Data position number - 50 *1 I : Integer variable name or array variable name for storing the read data *1: See ‘CAUTION’ below. z Writing to data registers To write to a data register, specify the slot number where this module is installed and a data position number. Before writing, store the data register value to be written in the specified integer variable or integer array variable. OUTPUT SL, n NOFORMAT ; I SL : Slot number n : Data position number - 50 *1 I : Integer variable name or array variable name storing the write data *1: See ‘CAUTION’ below. CAUTION Note the following when accessing data registers from BASIC programs. Registers of the UT Link Module are classified into mode registers and data registers. When accessing data registers from a BASIC program, access data position numbers obtained by subtracting 50 from the data position numbers given in Table 3.2, “Register Configuration of UT Link Module”. For mode registers, access the data position numbers as given in Table 3.2. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 8-6 8.2.4 Reading and Writing Input and Output Relays Input and output relays are read and written in single word units. See Section 5.2, “Input/Output Relays Used in Automatic Mode”, Section 6.2, “Input/Output Relays Used in Manual Mode” and Section 7.2, “Input/Output Relays Used in Command Communication” for the function of each input/output relay. z Reading input relays Use the STATUS statement to read an input relay. STATUS SL, n ; P SL : Slot number n : Data position number (always 101) P : Variable for storing the read data bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Data position number = 101 Input relay number XVVV01 XVVV02 XVVV03 XVVV04 XVVV05 XVVV06 XVVV16 Figure 8.1 Data Position Numbers and Input Relays z Writing to output relays Use the CONTROL statement to write to an output relay. CONTROL SL,n ; P, M SL : Slot number n : Data position number (always 101) P : Output data M : Mask pattern bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Data position number = 101 Output relay number YVVV33 YVVV34 YVVV35 YVVV36 YVVV37 YVVV38 YVVV48 Figure 8.2 Data Position Numbers and Output Relays IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 8-7 The mask pattern is used to specify the bit positions in the output data to be changed. Only output bit positions with the mask bit set to 1 are changed, output bit positions with mask bit 0 are not changed. Example: Output data P= 1 0 1 0 1 1 1 1 0 1 0 1 1 1 1 1 = $AF5F Mask pattern M= 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 = $FF00 Output relay before execution 0 0 0 0 0 0 0 00 1 0 0 0 1 1 0 = $0046 Result of output 1 0 1 0 1 1 1 1 0 1 0 0 0 1 1 0 = $AF46 Figure 8.3 Mask Pattern and Output Data See Also See the following manual for details on the BASIC program instructions. BASIC CPU Modules and YM-BASIC/ FA Programming Language (IM34M6Q22-01E) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page 9-1 9. Errors and Troubleshooting 9.1 Error Handling When a communication error occurs, the UT Link Module notifies the user of the type of error using relays and registers. Error information stored in the relays and registers can be read using user programs. Most errors are syntax errors in a user program, and occur during debugging. However, some error caused by, say, discontinuity in the cable, may occur during actual operation. CAUTION Sometimes, error in communication with an external instrument affects the control of the entire system. In such a situation, read the error information stored in the relays and registers, and send an alarm to the external environment using contact outputs, displays, etc. When a communication error with an external instrument severely affects control, it is important to adopt measures appropriate for the control object, such as stopping the control operation etc. The UT Link Module operates the following relays and registers when an error occurs. - Error occurrence : Corresponding relay (XVVV06 to XVVV08) turns on. - Error details : VVV: the slot number where this module is installed. The error details* are stored in the following registers: Mode register Remote Station Status register Response Data register *: The register where error information is stored depends on the error. See Chapter 8, "Accessing the UT Link Module" on how to read relays and registers. Table 8.1, “Errors and Corresponding Relays and Registers” shows the errors and error types that may be detected by the UT Link Module. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-2 Table 9.1 Errors and Corresponding Relays and Registers Classification During configuration Item Mode register parameter error Module error Command parameter error Configuration information error Transmission time out error Communication error Checksum error *1 Time out error during character receiving *1 Time out error awaiting response Error in length of received text Refresh communication error *2: { { { { { { { { { { { { Relay which Turns On When This Error Occurs XVVV07*2 Register Storing Error See Also Details Information Mode register Subsection 9.1.1 { Error response (1) *1 . Communication error . Checksum error { { Error response (2) Error responses other than error response (1) { { { { { { { { Error in length of received text Error response (1) *1 . Communication error . Checksum error Error response (2) Error responses other than error response (1) *1: Communication error*1 Checksum error *1 Time out error during character receiving Time out error awaiting response Command communication error Module Operation During Automatic Command Mode Mode CommuRegister /Manual nication Setup Mode XVVV06*2 XVVV08*2 Remote station status register Subsection 9.1.2 Response data register Subsection 9.1.3 Error occurs when communication is still unsuccessful after retrying for the number of times specified in the Number of Retries mode register. VVV: Slot number where the UT Link module is installed. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-3 9.1.1 Module Error Module error occurs in the following situations: - when there is an invalid parameter during parameter setup to the module. - When there is an error in the transmitted text during command operation. The error details information is stored in the Module Error Details mode register (data position numbers 31, 32) when module error occurs. Error Code 1 (EC1) and Error Code 2 (EC2) listed in the following table are stored in data position numbers 31 and 32 respectively. Table 9.2 Error Details Information of Module Error (data position numbers 31 and 32) Relay XVVV07 Classification Item Error Code 1 (EC1)*2 Mode register parameter error $11 Command parameter error $12 Configuration information error $13 Module error Transmission time out error *: *1: *2: $14 Error Code 2 (EC2) Stores the data position number of the mode register with error Stores the command register number with error Stores data position number of the configuration information with error *1 ― Possible Causes Invalid parameter setup value Invalid parameter setup value Invalid setup value in the configuration Power supply for sub-station is off. Discontinuity in the connecting cable VVV: slot number where the UT Link Module is installed. In this case, the value of error code 2 (EC2) is undefined. Value is expressed in hexadecimal. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-4 9.1.2 Refresh Communication Error T Error Type Refresh communication error occurs in the following situations: - when a communication error occurs during automatic mode or manual mode operation. - when a communication error occurs while receiving the response text during configuration in automatic mode. - When an error response is received from the external instrument. When a refresh communication error occurs, Error Code 1 (EC1) and Error Code 2 (EC2) of Table 9.3 are stored as detailed error information in their respective locations in the Remote Station Status register. See item "T Remote Station Status Register" in subsequent pages for more details on the Remote Station Status register. Table 9.3 Error Details Information of Refresh Communication Error (data position numbers 3771 to 3834) Item Error code 1 (EC1) *2 Error code 2 (EC2) Communication error $21 (Figure 9.1) Checksum error $22 ― $24 ― $25 ― $26 ― Classifi cation Relay Refresh communication error XVVV06 Time out error during character receiving Time out error awaiting response Error in length of received text Error response *: *1: *2: *1 Possible causes Communication conditions do not agree with that of external instrument. Communication conditions do not agree with that of external instrument. *1 Ending character or ETX is not received. *1 Response from external instrument is not received. *1 Error in length of response received from external instrument. (See subsection 9.1.4) VVV: slot number where the UT Link Module is installed. In this case, the value of error code 2 (EC2) is undefined. Value is expressed in hexadecimal. MSB LSB b7 b6 b5 b4 b3 b2 b1 b0 27 26 25 24 23 22 21 20 8 4 2 1 128 64 32 16 Each bit has the following meaning: b7 : (Reserved) b6 : (Reserved) b5 : Over run error b4 : Framing error b3 : Parity error b2 : Overflow of receiving buffer b1 : Time out during character receiving b0 : Break received Example: When an over run error and a parity error occur concurrently, the value of error code 2 (EC2) assumes the following value: EC2 = b5 × 1 + b3 × 1 = 25 × 1 + 23 × 1 = 32 + 8 = 40 Figure 9.1 Error Code 2 (EC2) Value for Communication Error IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-5 T Remote Station Status Register The Remote Station Status register consists of the following 3 areas. Remote station status register (1) (2) (3) Storage area for remote station status Storage area for station where error occurs Storage area for error details code Figure 9.2 shows the data position numbers and register structure of the Remote Station Status register. *1 Data position number Error Details Code storage area 3771 CPU1 of station 1 3772 CPU2 of station 1 3773 CPU1 of station 2 3774 • Error Station storage area Remote Station Status storage area 98 1 EC1 • • • • • • • • • • • EC2 • CPU2 of station 2 • 1 • • • • • 3833 CPU1 of station 32 3834 CPU2 of station 32 3835 CPU1 error station (1-16) 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 3836 CPU1 error station (17-32) 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 3837 CPU2 error station (1-16) 3838 CPU2 error station (17-32) 3839 Remote station status (1-16) 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01 3840 Remote station status (17-32) 32 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 Corresponding station number • • *1: The data position number of the Error Details Code storage area for CPUn of station m is given as: Data position number = 3771+(m-1)×2+(n-1) Figure 9.2 Structure of Remote Station Status Register (1) Remote Station Status storage area The Remote Station Status storage area is used to monitor the status of communications with the remote stations (external instrument). The status of communication with a remote station is stored as a bit expressed as follows. Normal communication :1 Communication fails or no communication : 0 Information in the Remote Station Status storage area is updated in real time according to the outcome of communications in automatic mode, manual mode and command communication. Use the information stored in this area to monitor*1 the communication status of each station. *1: When communicating with multiple stations, if communication with a station is cut-off and subsequently restored, the status of the other stations having normal communication may become 0 for an instantaneous moment. When monitoring the communication status, assume communication cut-off only if the status remains 0 for about 10 seconds. After downloading the program, switch off and then switch on the power supply to the FA-M3 before starting the monitoring process. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-6 (2) Error Station storage area The Error Station storage area is used to monitor the occurrence of errors in remote stations (external instrument) during automatic mode and manual mode operation. Information of each remote station is stored as a bit expressed as follows. Error has occurred : 1 No error :0 Once an error occurs, the error information is stored in the Error Station storage area and remains unchanged until the user clears the error. To clear the Error Station storage area, turn on the Clear Remote Station Status Register (YVVV37) relay with a user program. CAUTION Turning on the Clear Remote Station Status Register (YVVV37) relay clears the Error Station storage area as well as all error codes stored in the Error Details Code storage area. Therefore, if an error has also occurred in another external instrument, always read the Error Details Code storage area of the station before turning on the Clear Remote Station Status Register (YVVV37) relay. TIP When an error occurs during command communication, information on the error station is not stored in the storage area. Instead, the error details code is stored in the response data for the command transmitted from this module. The user can then know from this information that an error has occurred in the external instrument that is specified in the transmitted command. (3) Error Details Code Storage Area An Error Details Code storage area is used to store the Error Details Code*1 of a remote station (external instrument) in automatic mode and manual mode. Two Error Details Code storage areas are provided for each external instrument to accommodate external instruments with two CPUs. To clear the Error Details Code storage areas, turn on the Clear Remote Station Status Register (YVVV37) relay with a user program. *1: See Table 9.3, “Error Details Information of Refresh Communication Error” for details on the error codes. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-7 9.1.3 Command Communication Error A command communication error occurs in the following situations: - when a communication error occurs while receiving the response text during command communication - when an error response is received from an external instrument When a command communication error occurs, the error details information is stored in the response data register (data position number 3941) as error code 1 (EC1) in bits b15 to b8 and as error code 2 (EC2) in bits b7 to b0 as shown in Table 9.4 (Figure 9.3). Table 9.4 Error Details Information of Command Communication Error (data position number 3941) Relay Error Code 1 (EC1)*2 Error Code 2 (EC2) Communication error $21 (Figure 9.3) Checksum error $22 ― $24 ― $25 ― $26 ― Classification Item Time out error during character receiving Time out error awaiting response Command communication error XVVV08 Error in length of received text Error response *1 Possible Causes Communication conditions do not agree with that of external instrument. Communication conditions do not agree with that of external instrument. *1 Ending character or ETX is not received. *1 Response from external instrument is not received. Error in length of response received from external instrument *1 (See subsection 9.1.4) VVV: slot number where the UT Link Module is installed. In this case, the value of error code 2 (EC2) is undefined. Value is expressed in hexadecimal. *: *1: *2: MSB LSB b7 b6 b5 b4 b3 b2 b1 b0 27 26 25 24 23 22 21 20 8 4 2 1 128 64 32 16 Each bit has the following meaning: b7: (Reserved) b6: (Reserved) b5: Over run error b4: Framing error b3: Parity error b2: Overflow of receiving buffer b1: Time out during character receiving b0: Break received Example: When an over run error and a parity error occur concurrently, the value of error code 2 (EC2) assumes the following value: EC2 = b5 × 1 + b3 × 1 = 25 × 1 + 23 × 1 = 32 + 8 = 40 Figure 9.3 Error Code 2 (EC2) Value for Command Communication Error IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-8 9.1.4 Error Response An error response is a response returned by an external instrument for a transmitted command when it detects an error. Errors detected by the UT Link Module and error responses from the external instruments are stored in the same location. To distinguish between errors detected by the UT Link module and error responses for the same error type (e.g. communication error), the error codes differ. An error response returned from an external instrument is stored unchanged into the following registers: - for refresh communication error: Remote Station Status register *1 for command communication error: Response Data register *2 Error codes of error responses and their meaning are given in Table 9.5, “Error Code 1 (EC1) in Error Response” and Table 9.6, “Error Code 2 (EC2) in Error Response”. *1: *2: See Figure 9.2, “Structure of Remote Station Status Register”. See Figure 7.9, “Response Format: R1” and Figure 7.10, “Response Format: R2”. Table 9.5 Error Code 1 (EC1) in Error Response Error Code Item 1 (EC1)* $01 CPU number specification error $02 Command error $03 Device specification error $04 Set value is out of range $05 Out of data count range $06 Monitor error $07 CPU type error $08 Parameter error $41 Communication error $42 $43 Checksum error Internal buffer overflow Time out during character receive $44 $51 CPU error $52 CPU processing error $91 Parameter error Device address specification error $B3 $C1 Out of common area $D1 Device error $E1 Device not ready $F1 Internal error *1: Possible Causes - CPU number exceeds the range of 1 to 4. - Command does not exist. - Command is not executable. - Device name does not exist. (See Error Code 2 in Table 9.6) - Invalid use of a bit device for word access. - Characters other than 0 and 1 are used for bit setting. (See Error Code 2 in Table 9.6) - Specified word set value is out of valid range of $0000 to $FFFF. - Specified number of bits, number of words etc. exceed the specification range. (See Error Code 2 in Table 9.6) - Specified data count and parameter count of device etc. do not agree. - Monitoring is performed without monitor specification (Command number $06, $16). - Not a BASIC CPU. - Parameters other than those mentioned above are invalid. (See Error Code 2 in Table 9.6) - Error occurred during communication. (Refer to Error Code 2 (Table 9.6)) - Values of checksum differ. (Bit omission, changed character) - Amount of data exceeds capacity. - Ending character or EXT is not received. - Time out period is 5 seconds. - End of processing is not returned by CPU due to CPU power failure etc. (time out) - BASIC commands are executed for a sequence CPU. - Error detected during CPU processing. (See Error Code 2 in Table 9.6) - Specified numeric value is out of range. - Specified sequence device address is invalid. - When accessing the BASIC common area, the specified starting position and number of bytes exceeded the common area. - Module error - Attempt to access an I/O module that is not installed. - I/O module failure - Internal processing error Value is expressed in hexadecimal. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-9 Table 9.6 Error Code 2 (EC2) in Error Response Error Code 1 (EC1)* Item $03 Device specification error $04 Set value is out of range $05 Out of data count range Error Code (EC2) The number of the invalid parameter is expressed in hexadecimal. Counting from the first parameter, it is the ordinal number of the first invalid parameter. Example: S T 1 2 3 4 5 ┌┐ ┌────┐ ┌────┐ 0101ABRAW 30 Y00501, 1, 10002, 0, 6 ← Parameter no. ┌────┐ A00502 ↑ $08 Parameter error X Device specification error In this case, error code EC1=$03 error code EC2=$06 MSB b7 $41 Communication error $52 CPU processing error LSB b6 b5 b4 b3 b2 b1 b0 Each bit has the following meaning: b7: (Reserved) b6: (Reserved) b5: Over run error b4: Framing error b3: Parity error b2: Overflow of receiving buffer b1: Time out during character receiving b0: Break received $1V: Self diagnostic error $2V: Program error (including parameter error) $4V: Inter-CPU communication error $8V: Device access error $FV: Internal system error For EC1 values other than the above, EC2 is undefined. *1: Value is expressed in hexadecimal. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-10 9.2 Troubleshooting Flowchart When ‘RDY’ LED Is Not On ‘RDY’ LED is not on Is the communication mode switch correctly set to “7”? See Subsection 2.7.2, “Setting UT Link Module” NO Correct setup YES Any error detected during module self diagnosis? See Subsection 2.7.3, “Self Diagnosis” NO Replace module YES Module is normal End Figure 9.4 Troubleshooting Flowchart When ‘RDY’ LED Is Not On IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-11 9.3 Troubleshooting Flowchart When Communication Fails Communication fails Is the cable correctly connected? See Section 2.6, “Connecting ” to External Instruments NO Connect the cable properly. YES Any cable discontinuity? NO Replace the cable YES Are the communication conditions consistent over all stations? NO Set communication conditions correctly. NO Set station number correctly. YES Any duplicate station number? YES Any error detected during module self diagnosis? See Subsection 2.7.3, “Self Diagnosis” NO Replace the module YES End Normal Figure 9.5 Troubleshooting Flowchart When Communication Fails IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-12 9.4 Troubleshooting Errors that Occur during Refresh Operation Turn on Request to Refresh relay YVVV36 Is Module Error relay on? XVVV07 NO YES Is Refresh Communication Error relay on? XVVV06 NO YES Read Module Error mode register (data position numbers 31 and 32) Read Error Station register (data position numbers 3835 to 3838) Figure 9.2 Turn off Request to Refresh relay YVVV36 Read error details information for error stations (data position numbers 3771 to 3834) Figure 9.2 Analyze error using Table 9.2 and correct program Clear Error Details? End NO YES Turn on Clear Remote Station Status Register relay YVVV37 NO Is Clear Remote Station Status Register Completed relay on? XVVV05 Turn on Clear Refresh Communication Error relay YVVV38 NO Refresh Communication Error relay on? XVVV06 YES Turn off Clear Remote Station Status Register relay YVVV37 YES Turn off Clear Refresh Communication Error relay YVVV38 Analyze error using Table 9.3 and correct program Figure 9.6 Troubleshooting Errors that Occur during Refresh Operation IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-13 T Sample Program for Reading Errors That Occur During Refresh Operation Table 9.7 Signal Name Assignment Table Signal Name RegCrE Address X00505 RefErr ModuErr RefReq RegClr X00506 X00507 Y00536 Y00537 LCslot ModErDt *1 ErrNo ErrDe D00033 D00113 D00115 D00116 I/O Comments Clear remote station status register completed Refresh communication error Module error Request to refresh Clear remote station status register LC51 slot Module error data Error station number Error details *1: Two words starting from ModErDt are used to read the error data and cannot be used for other purposes. Figure 9.7 Sample Program for Reading Errors That Occur During Refresh Operation * Sample Program for Reading Errors That Occur * During Refresh Operation file: REFERR Module error details Error Stations for CPU1: 1 to 16 Error Details for CPU1 of Station 1 Clear Remote Station Status Register Reset Clear Register relay IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-14 9.5 Troubleshooting Errors that Occur during Command Communication Turn on Request to Transmit Command relay YVVV35 Is Module Error relay on? XVVV07 YES Read Module Error mode register (data position numbers 31 and 32) NO Is Command Communication Error relay on? XVVV08 YES NO Is Response Receive Completed relay on? XVVV03 NO YES Turn off Request to Transmit Command relay YVVV35 Read error code in Response Data register (data position no. 3941) Analyze error using Table 9.2 and correct program Turn off Request to Transmit Command relay YVVV35 End Analyze error using Table 9.4 and correct program Figure 9.8 Troubleshooting Errors that Occur during Command Communication IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 9-15 T Sample Program for Reading Errors That Occur During Command Communication Table 9.8 Signal Name Assignment Table Signal Name ModuErr CodErr CodReq Address X00507 X00508 Y00535 I/O Comments Module error Command communication error Request to transmit command LCslot ModErDt *1 CodErDe D00033 D00113 D00117 LC51 slot Module error data Command error details *1: Two words starting from ModErDt are used to read the error data and cannot be used for other purposes. * Sample Program for Reading Errors that Occur during * Command Communication file: COMDERR Module error details Reset request to transmit command Command error details Reset request to transmit command Figure 9.9 Sample Program for Reading Errors That Occur During Command Communication IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page Appx. 1-1 Appendix Appendix 1. Configuration Data Area Station Number Table Appx.1 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Configuration Data Area Data Position Numbers for CPU1 Setup Area for Reading Setup Area for Writing First First Data Device Data Device device device count type count type number number 51 52 53-54 55 56 57-58 67 68 69-70 71 72 73-74 83 84 85-86 87 88 89-90 99 100 101-102 103 104 105-106 115 116 117-118 119 120 121-122 131 132 133-134 135 136 137-138 147 148 149-150 151 152 153-154 163 164 165-166 167 168 169-170 179 180 181-182 183 184 185-186 195 196 197-198 199 200 201-202 211 212 213-214 215 216 217-218 227 228 229-230 231 232 233-234 243 244 245-246 247 248 249-250 259 260 261-262 263 264 265-266 275 276 277-278 279 280 281-282 291 292 293-294 295 296 297-298 307 308 309-310 311 312 313-314 323 324 325-326 327 328 329-330 339 340 341-342 343 344 345-346 355 356 357-358 359 360 361-362 371 372 373-374 375 376 377-378 387 388 389-390 391 392 393-394 403 404 405-406 407 408 409-410 419 420 421-422 423 424 425-426 435 436 437-438 439 440 441-442 451 452 453-454 455 456 457-458 467 468 469-470 471 472 473-474 483 484 485-486 487 488 489-490 499 500 501-502 503 504 505-506 515 516 517-518 519 520 521-522 531 532 533-534 535 536 537-538 547 548 549-550 551 552 553-554 *: Data Position Numbers for CPU2 Setup Area for Reading Setup Area for Writing First First Data Device Data Device device device count type count type number number 59 60 61-62 63 64 65-66 75 76 77-78 79 80 81-82 91 92 93-94 95 96 97-98 107 108 109-110 111 112 113-114 123 124 125-126 127 128 129-130 139 140 141-142 143 144 145-146 155 156 157-158 159 160 161-162 171 172 173-174 175 176 177-178 187 188 189-190 191 192 193-194 203 204 205-206 207 208 209-210 219 220 221-222 223 224 225-226 235 236 237-238 239 240 241-242 251 252 253-254 255 256 257-258 267 268 269-270 271 272 273-274 283 284 285-286 287 288 289-290 299 300 301-302 303 304 305-306 315 316 317-318 319 320 321-322 331 332 333-334 335 336 337-338 347 348 349-350 351 352 353-354 363 364 365-366 367 368 369-370 379 380 381-382 383 384 385-386 395 396 397-398 399 400 401-402 411 412 413-414 415 416 417-418 427 428 429-430 431 432 433-434 443 444 445-446 447 448 449-450 459 460 461-462 463 464 465-466 475 476 477-478 479 480 481-482 491 492 493-494 495 496 497-498 507 508 509-510 511 512 513-514 523 524 525-526 527 528 529-530 539 540 541-542 543 544 545-546 555 556 557-558 559 560 561-562 Numbers in the table represent data position numbers of the UT Link Module IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Appx. 1-2 Appendix 2. Refresh Communication Data Area Table Appx. 2 Station Number 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 *: Refresh Communication Data Area Data Position Numbers for CPU1 Read Area Write Area 571-595 596-620 671-695 696-720 771-795 796-820 871-895 896-920 971-995 996-1020 1071-1095 1096-1120 1171-1195 1196-1220 1271-1295 1296-1320 1371-1395 1396-1420 1471-1495 1496-1520 1571-1595 1596-1620 1671-1695 1696-1720 1771-1795 1796-1820 1871-1895 1896-1920 1971-1995 1996-2020 2071-2095 2096-2120 2171-2195 2196-2220 2271-2295 2296-2320 2371-2395 2396-2420 2471-2495 2496-2520 2571-2595 2596-2620 2671-2695 2696-2720 2771-2795 2796-2820 2871-2895 2896-2920 2971-2995 2996-3020 3071-3095 3096-3120 3171-3195 3196-3220 3271-3295 3296-3320 3371-3395 3396-3420 3471-3495 3496-3520 3571-3595 3596-3620 3671-3695 3696-3720 Data Position Numbers for CPU2 Read Area Write Area 621-645 646-670 721-745 746-770 821-845 846-870 921-945 946-970 1021-1045 1046-1070 1121-1145 1146-1170 1221-1245 1246-1270 1321-1345 1346-1370 1421-1445 1446-1470 1521-1545 1546-1570 1621-1645 1646-1670 1721-1745 1746-1770 1821-1845 1846-1870 1921-1945 1946-1970 2021-2045 2046-2070 2121-2145 2146-2170 2221-2245 2246-2270 2321-2345 2346-2370 2421-2445 2446-2470 2521-2545 2546-2570 2621-2645 2646-2670 2721-2745 2746-2770 2821-2845 2846-2870 2921-2945 2946-2970 3021-3045 3046-3070 3121-3145 3146-3170 3221-3245 3246-3270 3321-3345 3346-3370 3421-3445 3446-3470 3521-3545 3546-3570 3621-3645 3646-3670 3721-3745 3746-3770 Numbers in the table represent data position numbers of the UT Link Module IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Appx. 1-3 Appendix 3. Examples on Performance The system performance when an external instrument is connected is largely dependent on the transmission data size, communication conditions and the response time of the external instrument. UT Link Module External instrument Figure Appx. 1 (1) (2) (5) (4) (3) Communication Path In Figure Appx. 1, the total transmission/receiving time is divided into the following components: (1) (2) (3) (4) (5) Transmission processing time of the UT Link Module Command transmission time Response time of external instrument Response communication time Receiving processing time of the UT Link Module Among these components, items (1) and (5) can be ignored. Items (2) and (4) can be computed from the transmission/receiving data size. Item (5) is determined by the type and operating mode of the external instrument, as well as the size of the read/write data. z Example for Calculating the Transmission/Receiving Communication Time The transmission/receiving time for the recommended communication conditions is given below. Table Appx. 3 Recommended Communication Conditions (Same as the Factory Setting of the UT Link Module) Item Communication speed Data length Parity Start bit Stop bit Ending character Checksum Condition 9600 bps 8 bits Even 1 bit 1 bit Yes No *1 *2 The transmission/receiving time = (transmission/receiving data size ) × (Data frame length ) ÷ (Communication speed) *1: *2: Transmission/receiving data size = size of fixed portion (including the ending character) + size of data portion (in bytes) Data frame length = start bit (1) + data length (8) + stop bit (1) + parity bit (1) = 11 (bits) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Appx. 1-4 - - - - Transmission/receiving data size The transmission/receiving data size varies with the number of data read or written. The UT Link Module also appends information before transmitting data to the communication line and removes information not required by the user program from data received from the communication line. Therefore, the data size received from the user is not the same as the actual data size transmitted on the communication line. Here, we show examples for calculating the transmission/receiving time required for reading respectively 1, 8 and 25 words of contiguous data based on pre-computed transmission/receiving data sizes. The communication time for writing is the same as that for reading data of the same size. Transmission/receiving time required for reading 1 word of data The transmission/receiving data size in this case is 33 bytes. Transmission/receiving time = 33 (bytes) × 11 (frame length) ÷ 9600 (bps) = 0.038 s Transmission/receiving time required for reading 8 words of data The transmission/receiving data size in this case is 60 bytes. Transmission/receiving time = 60 (bytes) × 11 (frame length) ÷ 9600 (bps) = 0.069 s Transmission/receiving time required for reading 25 words of data The transmission/receiving data size in this case is 128 bytes. Transmission/receiving time = 128 (bytes) × 11 (frame length) ÷ 9600 (bps) = 0.147 s z Sample response time of an external instrument (reference values) As the response time varies with the instrument type and operating mode, we show here examples for the minimum response time and the maximum response time for each reading of different number of data words. Response time during writing is the same. Depending on the instrument type, the response time may actually be 5 to 6 times the values shown in the table for some instruments. Table Appx.4 Sample Response Times of External Instruments (Reference Values) Data Count 1 8 25 Minimum Response Time 0.005 0.008 0.015 Unit: s Maximum Response Time 0.040 0.045 0.051 z Sample Performance Values (Reference Values) The approximate performance values are determined by summing the transmission/receiving time and the response time of the external instrument. Table Appx. 5 shows examples of these total values. Table Appx. 5 Sample Performance Values (Reference Values) Data Count 1 8 25 Minimum Response Time 0.043 0.077 0.162 Unit: s Maximum Response Time 0.078 0.114 0.198 The sample performance values shown above are values for one station. When connecting multiple stations to a single line, the access time interval for a specific station can be obtained by multiplying the values shown in Table Appx. 5 by the number of stations. These examples do not take into consideration error situations such as occurrence of retries and hence, allowance should be built in during system design. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Appx. 1-5 Appendix 4. Increasing Ladder Program Speed z Increasing program speed through instructions used The scan time of a program depends on the instructions used in the program and how the program is coded (the program structure). The sample programs in this manual uses 2 different approaches in program coding. We will explain these two methods to help you understand how you may speed up scan time. There are 2 ways to code the program: - By writing data to the data position numbers word-by-word This method is used in the “Specifying refresh stations” program code section in Figure 5.4, “Sample Program for Automatic Mode” and the “Setting station 1 read area” program code section in Figure 6.6, “Sample Program for Manual Mode (1/2)” where multiple WRITE instructions are coded. - By setting data to the D registers followed by a batch write This method is used in Figure 7.12, “Sample Program for Command Communication (Reading) (1/2)” where only one WRITE instruction is coded. Processing of WRITE instructions and READ instructions takes time. The processing time for a WRITE instruction that writes 2 words is, however, less than twice the processing time for a WRITE instruction that writes 1 word. Using a WRITE instruction to write multiple words at one go reduces processing time, when compared to using many WRITE instructions to write data word-by-word. The MOV instruction is much faster than the WRITE instruction. Therefore, setting the data in the D registers using MOV instructions and then performing a batch write using a WRITE instruction speeds up the handling of multiple words. Take note however that the D registers for the batch WRITE must occupy serial addresses. The sample programs for automatic mode and manual mode execute multiple WRITE instructions only once during power-on processing. Although this lengthens the time for power-on handling, it does not pose a problem during regular scans. In the program code section for reading during a regular scan, READ instructions are coded to perform batch reading of multiple data in order to reduce processing time. Batch handling of multiple words by applying the above tip is highly recommended for programs that regularly execute WRITE and READ instructions. Tip See the following manual for details on the processing time for each instruction: Sequence CPU Modules - Instructions (IM34M6P12-03E) IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Appx. 1-6 z Increasing program speed through program structure Even if many lines are coded in a program, high speed scans may still be achieved if few program lines are actually executed during each scan. One way to realize this is through a subroutine structure. Create a subroutine for a group of functions and invoke them as and when required. Since a subroutine is not executed if it is not invoked, this reduces the number of lines actually executed. There are 2 ways to perform the subroutine calls. The first is consecutive calls whilst an input condition is true and the second is a single call when the input condition becomes true (input differential type instruction). Although whichever method is suitable depends on the purpose of the program, using an input differential type instruction wherever permitted will increase program speed. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Index-1 FA-M3 UT Link Module IM 34M6H25-01E 1st Edition Index A accessing using BASIC ...................................8-3 accessing using ladder sequence ...................8-1 attaching and detaching modules ..................2-10 automatic mode ........................................ 3-2,5-1 C command communication ......................... 3-3,7-1 commands and responses ..............................7-5 commands and responses, formats of ...........7-6 communication conditions, recommended .....2-6 communication methods, types of ...................3-1 compatibility with CPU modules ......................2-1 compatibility with external instruments ...........1-1 configuration data area ............................ Appx.-1 configuration setup (communication range) ....6-7 connecting to external instruments ..................2-5 R reading and writing data in automatic mode ... 5-4 reading and writing data in manual mode .....6-10 refresh communication data area .............Appx.-2 refresh station designation .............................. 4-1 register configuration ....................................... 3-4 remote station status ....................................... 9-5 S sample program for automatic mode .............. 5-5 self diagnosis ................................................... 2-8 setting communication conditions ................... 2-6 setting mode registers (communication conditions) ....................................................... 6-5 setting the UT Link Module .............................. 2-6 slot number ...................................................... 3-5 T troubleshooting ................................................ 9-1 D D register map, example ..................................3-7 data areas used in command communication .................................................7-5 E external dimensions and weight ......................2-3 F function specifications ......................................2-1 I input/output relays used in command communication .................................................7-3 input/output relays used in manual mode .......6-3 input/output relays, used in automatic mode ...5-2 M manual mode ............................................ 3-2,6-1 IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page i Revision Information Document Name: UT Link Module Document No.: Edition 1st IM34M6H25-01E Date Nov. 2001 Revised Item New publication Written by Product Marketing Department, IT Controller Center. Yokogawa Electric Corporation Published by Yokogawa Electric Corporation 2-9-32 Nakacho, Musashino-shi, Tokyo, 180-8750, JAPAN Printed by Yokogawa Graphic Arts Co., Ltd. IM 34M6H25-01E 1st Edition : Nov 1, 2001-00 Blank Page