Omron CJ - REFERENCE MANUAL 07-2009 Reference Manual
Omron CJ - REFERENCE MANUAL 07-2009 Reference Manual

Omron CJ - REFERENCE MANUAL 07-2009 Reference Manual

Communications commands
Hide thumbs Also See for CJ - REFERENCE MANUAL 07-2009:
Table of Contents

Advertisement

Cat. No. W342-E1-14
SYSMAC CS/CJ/CP Series
SYSMAC One NSJ Series
Communications Commands
REFERENCE MANUAL

Advertisement

Table of Contents
loading

Summary of Contents for Omron CJ - REFERENCE MANUAL 07-2009

  • Page 1 Cat. No. W342-E1-14 SYSMAC CS/CJ/CP Series SYSMAC One NSJ Series Communications Commands REFERENCE MANUAL...
  • Page 3 SYSMAC CS/CJ/CP Series CS1G/H-CPU@@H CS1G/H-CPU@@-EV1 CS1D-CPU@@H CS1D-CPU@@S CS1W-SCB@@-V1 CS1W-SCU@@-V1 CJ2H-CPU6@-EIP CJ2H-CPU6@ CJ1H-CPU@@H-R CJ1G/H-CPU@@H CJ1G-CPU@@P CJ1G-CPU@@ CJ1M-CPU@@ CJ1W-SCU@@-V1 CP1H-X@@@@-@ CP1H-XA@@@@-@ CP1H-Y@@@@-@ CP1L-M/L@@@-@ CP1E-E@@D@-@ CP1E-N@@D@-@ SYSMAC One NSJ Series NSJ@-@@@@(B)-G5D NSJ@-@@@@(B)-M3D Communications Commands Reference Manual Revised July 2009...
  • Page 5 © OMRON, 1999 All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, mechanical, electronic, photocopying, recording, or otherwise, without the prior written permission of OMRON.
  • Page 6 Note: A special Power Supply Unit must be used for CS1D CPU Units. *1 Can only be used with the CP1H CPU unit. *2 Indicated as "E-type" in some parts of this manual. *3 Indicated as "N-type" in some parts of this manual.
  • Page 7: Table Of Contents

    SECTION 1 Introduction ........
  • Page 8 viii...
  • Page 9: About This Manual

    CJ-series and CP-series Programmable Controllers (PLCs) and NSJ Controllers, and includes the sections described below. Please read this manual and all related manuals listed in the following table and be sure you under- stand information provided before attempting to design or implement communications for CS/CJ-series or CP-series Programmable Controllers (PLCs) or NSJ Controllers.
  • Page 10 CPU Unit Software User’s Manual • Internal memory • Programming • Settings • Function built into the CPU Unit Also refer to the Hardware User's Manual (W472) SYSMAC CJ Series CJ2H-CPU6@-EIP, CJ2H-CPU6@ W472 Describes the following for CJ2 CPU Units: • Overview and features CPU Unit Hardware User’s Manual...
  • Page 11 Section 5 provides detailed descriptions of the FINS commands. !WARNING Failure to read and understand the information provided in this manual may result in per- sonal injury or death, damage to the product, or product failure. Please read each section in its entirety and be sure you understand the information provided in the section and related sections before attempting any of the procedures or operations given.
  • Page 12 WHETHER SUCH CLAIM IS BASED ON CONTRACT, WARRANTY, NEGLIGENCE, OR STRICT LIABILITY. In no event shall the responsibility of OMRON for any act exceed the individual price of the product on which liability is asserted. IN NO EVENT SHALL OMRON BE RESPONSIBLE FOR WARRANTY, REPAIR, OR OTHER CLAIMS...
  • Page 13 The following are some examples of applications for which particular attention must be given. This is not intended to be an exhaustive list of all possible uses of the products, nor is it intended to imply that the uses listed may be suitable for the products: •...
  • Page 14 PERFORMANCE DATA Performance data given in this manual is provided as a guide for the user in determining suitability and does not constitute a warranty. It may represent the result of OMRON's test conditions, and the users must correlate it to actual application requirements.
  • Page 15 Application Precautions ........
  • Page 16: Intended Audience

    !WARNING It is extremely important that a PLC and all PLC Units be used for the speci- fied purpose and under the specified conditions, especially in applications that can directly or indirectly affect human life. You must consult with your OMRON representative before applying a PLC System to the above-mentioned appli- cations.
  • Page 17 !Caution Confirm safety before transferring data files stored in the file memory (Mem- ory Card or EM file memory) to the I/O area (CIO) of the CPU Unit using a peripheral tool. Otherwise, the devices connected to the output unit may mal- function regardless of the operation mode of the CPU Unit.
  • Page 18: Operating Environment Precautions

    PLC to which is mounted a non-insulated Unit (CS1W-CLK12/52(-V1) or CS1W-ETN01) connected to an external power supply. A short-circuit will be created if the 24 V side of the external power supply is grounded and the 0 V side of the peripheral device is grounded. When connecting a peripheral device to this type of PLC, either ground the 0 V side of the external power supply or do not ground the external power supply at all.
  • Page 19: Application Precautions

    Always heed these precautions. Failure to abide by the following precautions could lead to serious or possibly fatal injury. • Always connect to a class-3 ground (to 100 Ω or less) when installing the Units. Not connecting to a class-3 ground may result in electric shock.
  • Page 20 BUSY indicator to go out before removing the Memory Card. • If the I/O Hold Bit is turned ON, the outputs from the PLC will not be turned OFF and will maintain their previous status when the PLC is switched from RUN or MONITOR mode to PROGRAM mode.
  • Page 21 Application Precautions • Do not apply voltages to the Input Units in excess of the rated input volt- age. Excess voltages may result in burning. • Do not apply voltages or connect loads to the Output Units in excess of the maximum switching capacity.
  • Page 22 Unit to any device other than an NT-AL001 or CJ1W-CIF11 Adapter. The external device or the CPU Unit may be damaged. • When replacing parts, be sure to confirm that the rating of a new part is correct. Not doing so may result in malfunction or burning.
  • Page 23: Introduction

    C-mode Commands........
  • Page 24: Overview Of Communications Commands

    C-mode Commands C-mode commands are specialized Host Link communications commands. They are issued by a host computer and sent to a CPU Unit. The devices that can be connected for serial communications are the CPU Unit, a Serial Com- munications Unit, and a Serial Communications Board.
  • Page 25 TIMER/COUNTER SV READ Finds the specified timer/counter instruction, beginning with the designated program address, and reads the con- stant SV in four digits or the word in which the SV is stored. TIMER/COUNTER SV READ Finds the specified timer/counter instruction, beginning...
  • Page 26: Fins Commands

    Initializes the transfer control procedures for all Host Link Units. Undefined command This is the response when the command header code (response only) cannot be decoded. FINS Commands The following table lists the FINS commands. For details, refer to SECTION 5 FINS Commands. Type Command Name Function code...
  • Page 27 (See note.) force-reset. Note These commands will not be accepted and an end code of 2102 hex (cannot write due to protection) will be returned if the Write Protection from FINS Commands Sent to CPU Units via Networks option is selected in the PLC Setup for a CS/CJ-series CPU Unit with unit version 2.0 or later, for a CP-...
  • Page 28 FINS Commands Section 1-3...
  • Page 29: Overview Of C-Mode Commands

    C-mode Commands..........Command/Response Formats ........
  • Page 30: C-Mode Commands

    Response C-mode command C-mode command 1. There are two Host Link formats: the 1:N Host Link (with N ≥ 1) and the 1:1 Note Host Link. • The 1:1 Host Link is the earlier Host Link format supported by C-series PLCs, such as the C200H, C1000H, and C2000H.
  • Page 31: Command/Response Formats

    Unit number (BCD) • @: Must be attached at the beginning of the command. • Unit number: Set in BCD from 0 to 31 for each Host Link Unit. • Header code: Specified in two characters. • Text: Set parameters corresponding to command code.
  • Page 32 [CR code, CHR$(13)] instead of a terminator at the end of each command frame until the last one. A terminator is sent at the end of the last frame. The procedure is given below for three command frames.
  • Page 33 If a response is more than 131 characters long, the response from the PLC is partitioned by returning a delimiter (CR code, CHR$(13)) instead of a termina- tor at the end of each frame until the last one. A terminator is returned at the end of the last frame.
  • Page 34 1. Frames in partitioned commands or responses must have not more than 128 characters including the delimiter/terminator. 2. Delimiters from the host computer are detected by the presence of a CR code. The delimiter will be detected even if there is data in front of it.
  • Page 35 Non-ASCII data, however, may sometimes be sent in the text data. If the data length is 7 bits, the leftmost bit of each character is masked before the FCS is calculated.
  • Page 36: Application Example

    1. The host computer’s transmission/reception program is started up, and the Host Link command is input. 2. The Host Link command that was input is sent to the PLC, and the data that is received is displayed on the screen.
  • Page 37: Precautions When Reusing Programs From Earlier Models

    CPU Units, and serial ports 1 and 2 on the Option Board for CP-series CPU Units. With a C-series Host Link Unit, the first frame can contain up to 29 words of data (text) and the following frames can contain up to 30 words of data (text).
  • Page 38 Precautions when Reusing Programs from Earlier Models Section 2-4 Words per Frame for C-mode Commands (Except RG Command) Units C Series CS/CJ Series CVM1 and CV Series Data words per frame Other frames frame C-series C200H-LK101/LK201/ 29 words 30 words...
  • Page 39 1 word The second-to-last frame contains 124 data words and the last frame contains 1 word. This also applies when the number of words is 246 + a multiple of 125 (i.e., 371 words, 496 words, 621 words, etc.). The following responses are returned when reading 121 words of Timer/ Counter Completion Flags through CS/CJ-series Unit built-in ports.
  • Page 40 The second-to-last frame contains 125 data words and the last frame contains the terminator only. This also applies when the number of words is 246 + a multiple of 125 (i.e., 371 words, 496 words, 621 words, etc.). For responses containing the terminator only, “00*CR”...
  • Page 41 3G2A6-LK101/LK201/LK202 Host Link Units Note When the MS command reads the CPU Unit’s status data and an FAL or FALS instruction has not been executed, spaces (ASCII code 20 hex) are included as the FAL/FALS message in the response frame for some models (fixed length response in the table above).
  • Page 42: C-Series Host Link Units With 1:1 Host Link Format Selected

    Using the CPU Unit's Built-in Peripheral Port or RS-232C Port Only the 1:N Host Link format is supported by the CPU Unit’s built-in periph- eral port and RS-232C port. A host computer program cannot be used if it was developed for a 1:1 Host Link.
  • Page 43 Precautions when Reusing Programs from Earlier Models Section 2-4 mat can be selected with the 1:N format/1:1 format setting in the allocated DM Area settings.) Host link Usage Applicable PLC models Remarks format 1:N format With this Host Link C Series...
  • Page 44: C-Mode Command Support

    Terminator in host link code code 1:1 Format As shown in the following diagrams, the 1:1 format is equivalent to the 1:N for- mat without the @ character, Host Link unit number, and FCS byte. • Command format Header Terminator code •...
  • Page 45 Precautions when Reusing Programs from Earlier Models Section 2-4 Note Refer to information on the previous page for commands with “Caution” in the Frame data size column. Frame Header Name CS/CJ C Series CVM1 and data code Series CV Series...
  • Page 46 SAGE (slave- initiated) Note When using CVM1 or CV-series built-in ports or Host Link Units, the response data format for the MS command (STATUS READ) is different from the format for other Units. For details, refer to 4-3-23 STATUS READ – – MS.
  • Page 47 Precautions when Reusing Programs from Earlier Models Section 2-4 Manuals for Host Link Operations Product Model (suffixes omitted) Manual type Catalog No. CS/CJ Series Communications CPU Unit Reference W342-E1 CJ2H-CPU (-EIP) commands (C- Manual CS1G/H-CPU mode and FINS) CS1G/H-CPU -EV1...
  • Page 48 Precautions when Reusing Programs from Earlier Models Section 2-4...
  • Page 49: Overview Of Fins Commands

    Timing of Commands to Host Computers ....3-5-10 Programming Example ........
  • Page 50: Fins Commands

    FINS commands have the following features: 1,2,3... 1. They are defined in the application level and do not depend on lower levels (i.e., the physical and data link levels). This allows them to be used across a variety of networks and CPU buses. Specifically, they can be used with Ethernet, Controller Link, and Host Link networks, and between CPU Units and CPU Bus Units.
  • Page 51 2.0 and later, CP-series CPU Units, and NSJ Controllers.) If ear- lier models are used, a routing error (end codes 0501 to 0504) will occur and the response may not be returned to the node that sent the com- mand.
  • Page 52: Using Fins Commands

    CPU Unit from the Backplane of the CPU Rack, via a Communications Unit (Controller Link Unit, Ethernet Unit, etc.) 2. FINS commands sent from a host computer to a CPU Unit are sent with a Host Link header code and a terminator (as in the Host Link communica- tions mode).
  • Page 53: Issuing And Using Any Command (Cmnd (490) Instruction)

    1. Store the command format of the FINS command (i.e., the command data) in an I/O memory area, such as the DM area. 2. In the same way, store the control data (number of bytes of transmission data, destination address, etc.) in an I/O memory area, such as the DM ar- 3.
  • Page 54: Fins Command And Response Frames

    Text code *Set in word specified for CMND(490) operand S onwards. FINS header (automatically attached for CMND(490)) *With Host Link communications, the header, FCS, and terminator are attached before and after the frame. 3-3-2 FINS Response Frame Configuration Command Text...
  • Page 55: Individual Items In Command/Response Frames

    Bridges (0: Not used; 1: Used) Always 1. Note Set bits 01 to 05 to 0 when sending a FINS command. Do not access these bits when receiving a FINS response. RSV (Reserved) is always 00 hex. These bits are used by the system. Do not access them in the response.
  • Page 56: Settings For Sending Fins Commands

    SID to any number between 00 and FF Note 1. The unit address for a CPU Bus Unit is 10 (hexadecimal) plus the unit num- ber set on the front panel of the CPU Bus Unit. 2. With a CS/CJ-series CPU Unit with unit version 2.0, CP-series CPU Unit,...
  • Page 57: Fins Command And Response Formats

    The length depends on the command code. (2 bytes) Note The command code is a 2-byte code that expresses the content of the com- mand. A FINS command must begin with a 2-byte command code. If there is also text, it is added after the command code.
  • Page 58: Addresses In Fins Commands

    Designate the addresses as follows: • Designate the device from which the command is to be sent, the network that the device is on, and the node through which the command is to tran- sit. • Designate the device to which the command is to be sent, the network the device is on, and the node through which command is to transit.
  • Page 59 • To identify the Unit when there is more than one device connected at the same node on a network. • To identify the type of device (CPU Unit, CPU Bus Unit, etc.) at the desti- nation. Note The meanings of FINS commands will vary depending on the Unit at the des- tination even when the commands have the same command code.
  • Page 60 Node Node address address address Node address Note It is also possible to set the serial port (No. 1 to 4) for the destination device. Serial Communications Serial Communications Unit CPU Unit Board Serial port 1 Serial port 1 Serial port 1...
  • Page 61 (refer to the following diagram): Network Address An address that identifies the entire network. All nodes on the same network have the same network address. Node Address An address that identifies an individual node on a network, such as a PLC or host computer.
  • Page 62 Section 3-4 Unit Address For a PLC, an address that identifies the specific Unit that is participating in the communication in the PLC. For a host computer, an address that identifies the specific application that is participating in the communication in the com- puter.
  • Page 63: Other Fins Command Settings

    Note 1. Unit address are fixed for Units and Boards, as well as for serial ports. For the SEND(090), RECV(098), and CMND(490) instructions, the CPU Unit will add the proper unit address based on the unit address of the Unit/ Board and the specified serial port.
  • Page 64: Cmnd(490) Setting Example

    S is sent to the designated unit address via the node address on the network address designated by operand C, and the response is stored for the number of bytes of data received starting from S: First command word...
  • Page 65: Fins Commands With Host Link Protocol

    PLCs. 3-5-1 Connection Configurations One of the following two methods can be used to send and receive FINS com- mands using the Host Link protocol. Sending from a Computer to a CPU Unit Note The host computer can be connected to the peripheral port or RS-232C port on the CPU Unit or to a serial ports on a Serial Communications Unit/Board.
  • Page 66: Overview Of Command And Response Frames

    ASCII when they are handled using Host Link communications. 2. When a FINS command sent from a host computer or the CPU Unit (with the CMND instruction) is received by a Serial Communications Board or Unit with version number Ver.
  • Page 67: Sending Commands From The Computer To The Cpu Unit

    Host Link header FINS response frame (See note.) Host Link terminator Note A FINS response frame also consists of the contents set at the time of trans- mission and the FINS command response format data. 3-5-3 Sending Commands from the Computer to the CPU Unit...
  • Page 68 Response Wait Time The response wait time sets the time from when the CPU Unit receives a command block until it starts to return a response. It can be set from 0 to F in hexadecimal, in units of 10 ms.
  • Page 69 FINS Commands with Host Link Protocol Section 3-5 Setting SNA and SN1 is required only when sending to a CPU Unit on a net- work. SA2 (Source Unit Address) Set the unit address of the Unit physically connected to the host computer.
  • Page 70 The same unit number and header code specified in the FINS command that was received will be returned. ICF (Information Control Field) For a CPU Unit on a network, “C0” (ASCII: 43, 30) will be returned. For a CPU Unit connected directly to the host computer, “40” (ASCII: 34,30) will be returned.
  • Page 71: Sending Fins Commands To The Host Computer From The Cpu Unit

    CPU Unit. Commands can also be sent, however, from the CPU Unit to the host computer. Any FINS command can be sent to the host computer using SEND(090), which sends CPU Unit data to the host computer, RECV(098), which receives data from the host computer, or CMND(490).
  • Page 72: Sending Commands From The Cpu Unit

    2. A program must be created to process the commands received by the host computer. 3. When instructions (SEND(090), RECV(098), and CMND (490)) are exe- cuted in a CPU Unit, some of the control data settings will be different. Re- fer to the relevant instruction specifications. 3-5-5...
  • Page 73 Set the unit address of the Unit to which the host computer is connected. Response Setting Normally this bit is set to 0 to require a response. When a response is not required, set this bit to 1. Communications Port Number Set the port number in the CPU Unit which will transmit SEND(090).
  • Page 74 Response monitor time (unit: 0.1 s) Number of Read Words Set the total number of words of data to be read from the host computer. Serial Port Number Set the serial port number to which the host computer is connected.
  • Page 75 FINS Commands with Host Link Protocol Section 3-5 Number of Retries Set the maximum number of times RECV(098) is to be resent if no re- sponse is returned. Response Monitor Time Set the time to wait for a response Control Word Settings The setting range for each item is shown on the following table.
  • Page 76 Set the unit address of the Unit to which the host computer is connected. Response Setting Normally this bit is set to 0 to require a response. When a response is not required, set this bit to 1. Communications Port Number...
  • Page 77: Command Format Received By The Host Computer

    If the Response Setting is set to require a response, set the response mon- itor time. Note If response data longer than that set in the Number of Bytes of Response Data is returned, all extra response data will not be stored. If response data...
  • Page 78 Terminator Unit Number The unit number of the Host Link port connected to the host computer is set. Header Code The header code in FINS commands sent to the host computer is always set to “OF” (ASCII: 4F, 46).
  • Page 79: Response Format Returned By The Host Computer

    FINS Commands with Host Link Protocol Section 3-5 SA1 (Source Node Address) The node address (01 to 7E Hex) of the source is set in hexadecimal. SA2 (Source Unit Address) The unit address of the source is set. SID (Source ID) Automatically set by the CPU Unit using SEND(090), RECV(098), and CMND(490).
  • Page 80: Flags For Network Communications

    • When an error response or retry error has been generated for the port. These Flags will turn OFF when the corresponding Communications Port Enabled Flag is turned OFF at the start of operation or at the start of execut- ing the SEND(090), RECV(098), or CMND(490).
  • Page 81: Timing Of Commands To Host Computers

    The Communication Port Completion Code words will contain the FINS end Completion Codes code after SEND(090), RECV(098), or CMND(490) has been executed. If the Communications Port Enabled Flag turns OFF when operation is started or SEND(090), RECV(098), or CMND(490) are executed, the contents of these words will be cleared.
  • Page 82 Command acknowledged Command completed At (1) in the diagram, the response to a command sent from the host com- puter is being transmitted from the port. In this case, the command transmis- sion to the host computer is postponed until the response transmission is completed (2).
  • Page 83 Command acknowledged Command completed When response wait time has been set in the command format from the host computer, commands to the host computer will not be transmitted until the response time has elapsed (1). Transmission of responses to commands from the host computer will be postponed until the command transmission to the host computer has been completed.
  • Page 84: Programming Example

    D05030 (12) 1,2,3... 1. When the SEND(090)/RECV(098) Enabled Flag is ON, and the execution condition CIO 000000 is ON, execution of the instructions for network transmissions are started. CIO 0128.00 will remain ON from when SEND(090) is started until execution has been completed.
  • Page 85 Number of retries: 5 Response monitor time: 2 s ($0000: Default) 3. Transmit Data Stored Stores 10 words of data starting from CIO 0100 to D00010 and later. 4. Execute SEND(090). 5. When the instruction for network communications has been completed (A202.04: ON), CIO 0128.01 will turn ON, and the instruction for sending...
  • Page 86 :’ Checks command code. 180 CMNDCODE$=MID$ (COMMAND$, 27, 4) 190 IF CMNDCODE$<>”0102” THEN ENDCODE$=”0401” :GOTO *RESPONSE 200 FOR I=0 TO VAL (”&H”+MID$ (COMMAND$, 39, 4) ) -1 :’ Sets No. of write elements. CHDATA$ (I) =MID$(COMMAND$, 43+I*4, 4) PRINT “Data”;”:”;CHDATA$(I) 230 NEXT I :’...
  • Page 87 :’ Checks command code. 210 CMNDCODE$=MID$ (COMMAND$, 27, 4) 220 IF CMNDCODE$<>”0101” THEN ENDCODE$=”0401” :GOTO *RESPONSE 230 FOR I=0 TO VAL (”&H”+MID$ (COMMAND$, 39, 4) ) -1 :’ Sets No. of read elements. RESPDATA$=RESPDATA$+CHDATA$ (I) 250 NEXT I 260 PRINT ”Send data”;RESPDATA$ :’...
  • Page 88: Serial Gateway Overview

    • CompoWay/F • Modbus-RTU • Modbus-ASCII • Host Link FINS (FINS commands enclosed in Host Link header and ter- minator) Note Serial Communications Boards/Units can receive FINS commands via a FINS network (including Host Link FINS) or via the CPU bus.
  • Page 89: Types Of Protocol Conversion

    FINS command The Serial Gateway is enabled under the following conditions. • In Serial Gateway mode • In protocol macro mode with the Serial Gateway Prohibit Switch turned OFF 3-6-2 Types of Protocol Conversion Type of Frame before conversion...
  • Page 90 3F88L-160, 3F88L-162 Safety Controllers F3SX System Configuration Patterns Sending FINS Messages Using CMND(490) in CPU Unit’s Ladder Program The Board/Unit converts the FINS messages to CompoWay/F protocol for sending in this operation. Access from CPU Unit (on the Same PC)
  • Page 91 CompoWay/F command RS-485 (CompoWay/F) CompoWay/F-compatible OMRON component Executing Smart Active Parts Using an NS-series PT (Sending Internal FINS Messages) The Board/Unit converts the FINS messages to CompoWay/F protocol for sending in this operation. Access from PT on Ethernet or Details...
  • Page 92: Converting Fins To Modbus-Rtu

    Converting FINS to Modbus-RTU Modbus-RTU Slave-compatible devices (including OMRON Inverters) con- nected serially to a PC via Modbus-RTU can be accessed from the PC or PT using Modbus-RTU commands enclosed in FINS messages. • Sent FINS message: FINS header + FINS command code 2804 hex + Modbus-RTU command •...
  • Page 93 Serial Gateway Overview Section 3-6 System Configuration Patterns Sending FINS Messages Using CMND(490) in CPU Unit’s Ladder Program The Board/Unit converts the FINS messages to Modbus-RTU protocol for sending in this operation. Access from CPU Unit (on the Same PC)
  • Page 94 Serial Gateway Overview Section 3-6 Executing Smart Active Parts Using an NS-series PT (Sending Internal FINS Messages) The Board/Unit converts the FINS messages to Modbus-RTU protocol for sending in this operation. Access from PT on Ethernet or Details Routing tables to treat serial...
  • Page 95: Converting From Fins To Modbus-Ascii

    Modbus-ASCII Slave-compatible devices connected serially to a PLC via Modbus-ASCII can be accessed from the PLC using Modbus-ASCII com- mands enclosed in FINS messages. • Sent FINS message: FINS header + FINS command code 2805 hex + Modbus-ASCII command • Message after conversion: Modbus-ASCII command...
  • Page 96: Converting From Fins To Host Link Fins

    3-6-6 Converting from FINS to Host Link FINS A PC slave that is connected serially to the PC master via Host Link can be accessed from the PC master or personal computer (see note) using FINS messages. Accessing a device on another network via Host Link (serial com- munications) is also possible by using FINS messages.
  • Page 97 1. Register the PC to be connected serially (using Host Link FINS) in the project gateway (e.g., PC2). 2. In the Change PLC Dialog Box of the target PC (e.g., PC1), select the relay PC (gateway PC) in the Network Type pull-down menu (e.g., [PC2] (See note.)) and click the Settings Button to the right of the Network Type pull-...
  • Page 98 Host Link (values are incremented by 1 automatically). Note When using the CX-Programmer, enter the actual Host Link unit number. Do not add 1 to the value. The CX-Programmer will automatically add 1 internally. Access from CX-Programmer Connected to Network Network-to-Serial Details...
  • Page 99 Section 3-6 Sending FINS Messages or Sending/Receiving Data Using CMND(490), RECV(098), SEND(090) in the CPU Unit’s Ladder Program The Board/Unit converts the FINS messages to Host Link FINS in this opera- tion. Access from CPU Unit (on the Same PC...
  • Page 100: Treating Serial Communications Paths As Networks

    (word C+3, bits 08 to 15 of the CMND(490) instruction). Do not set the unit number of the actual Host Link slave (0 to 31). Using the Host Link unit number without incrementing by one will access the PC with the en- tered Host Link unit number less one.
  • Page 101: Using A Plc As The Target

    ASCII Slave ASCII Note To access from a CX-Programmer, Select Change PLC Serial Gateway Guide, and enter the actual Host Link unit number, The CX-Programmer will automatically increment the value by one. 3-6-8 Using a PLC as the Target Network-to-Serial Conversion Routing tables are required to enable the serial communications path to be treated as a network.
  • Page 102 (Host Link FINS) To serial communications path network address A Target: PLC (2) Node address: Unit numbers for Host Link (0 to 31) + 1 (3) Unit address: E.g., 00 hex for CPU Unit Serial-to-Serial Conversion Routing tables to enable the serial communications path to be treated as a network are optional.
  • Page 103: Using A Non-Plc Component As The Target

    (1) Network address: To serial communications path network address A Target: PLC (2) Node address: Unit numbers for Host Link (0 to 31) + 1 (3) Unit address: E.g., 00 hex for CPU Unit 3-6-9 Using a non-PLC Component as the Target...
  • Page 104 To serial communications path network address A (e.g., 80 hex) Target: OMRON Component or Modbus Slave Serial-to-Serial Conversion Routing tables to enable the serial communications path to be treated as a network are optional. Without Routing Tables Specify the addresses as shown in the following example.
  • Page 105 Serial Gateway Overview Section 3-6 Serial-to-Serial-to-Serial Conversion Routing tables to enable the serial communications path to be treated as a network are optional. Without Routing Tables Specify the addresses as shown in the following example. Address Specification Address Contents Example...
  • Page 106: Explanation

    Serial Gateway Overview Section 3-6 3-6-10 Explanation To treat the serial communications path as a network, the serial port itself is recognized as a Communications Unit and is allocated a network address. CPU Unit Peripheral port Commu- Local network table in routing tables...
  • Page 107 Serial Communications Unit/Board • Serial Port 1 Unit Addresses Unit number Board Hexadecimal Decimal 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 228 • Serial Port 2 Unit Addresses Unit number Board Hexadecimal Decimal...
  • Page 108: Communications Frames

    Host Link FINS Protocol Conversion and Use of Network Routing tables are required to enable the serial communications path to be treated as a network. This is because with Host Link FINS, the FINS remote node address is used to specify the target (communications partner PC that is the Host Link slave).
  • Page 109: Modbus-Rtu

    Example: If the CompoWay/F command MRC SRC is “01” “02” (where the quotation marks (“ ”) indicate ASCII characters), 0, 1, 0, 2 must be treated as ASCII characters. Therefore, set “01” as 3031 hex (not 01 hex), and “02” as 3032 hex (not 02 hex).
  • Page 110: Modbus-Ascii

    (DNA) (DA1) (DA2) Serial port 00 hex Serial Slave FUNCTION Communications data allocated port address code (ASCII code n characters) address unit (ASCII code (ASCII code address 2 characters: 2 characters: or local or local 4 bytes) 4 bytes) network...
  • Page 111: Host Link Fins

    Frame before Conversion Modbus-ASCII frame Header Slave address FUNCTION code Communications data ":" (ASCII code (ASCII code (ASCII code n characters) (0D hex) (0A hex) (ASCII code 2 characters: 2 characters: or error code 3A hex) 4 bytes) 4 bytes)
  • Page 112: Sending Commands Using The Cmnd(490) Instruction

    • Set the data without spaces (see note) following the FINS command code in S+1 onwards. Note Frames are set in the same order as in I/O memory from leftmost to rightmost byte (without blank bytes (00 hex)). C Operand C+2 bits 00 to 07 (Send destination network address) •...
  • Page 113 (Board: E1 hex; Unit: 10 hex + unit number) in the send destination unit address bits 00 to 07 of C+3, and set the serial port numbers (Port number 1: 1 hex; Port number 2: 2 hex) in the serial port number (phys- ical port) bits 08 to 11 of C+2.
  • Page 114: E.g., Unit Number 0, Port

    Example: Write data for frequency reference value (FUNCTION code 10 hex, register No. 0002 hex) Modbus-RTU command RS-485 (Modbus-RTU) Port 1 unit address: 80 hex + 4 hex × unit number 3 = 8C hex 3G3MV OMRON Inverter List of Settings • FINS Network Settings Item...
  • Page 115 Number of write data registers: 0001 hex (1 register) 0200 hex Number of attached data bytes: 02 hex (2 bytes); Leftmost register No.: 00 hex 6400 hex Rightmost register No.: 64 hex (Frequency reference value: 10.0 Hz when unit is 0.1...
  • Page 116 Sending Host Link FINS Commands • Set any FINS command code in S. • Be sure to set the Host Link unit number (0 to 31) incremented by one (1 to 32) for the PC slave corresponding to the send destination node address in C+3 bits 08 to 15.
  • Page 117 • FINS Network Settings Item Value (example) Setting location Send destination network Network address for • Set 05 hex in bits 00 to 07 (net- address serial communica- work address) of control data (network address allocated tions path allocated C+2 in the CMND(490) instruc-...
  • Page 118 0005 hex Send destination network address: 05 hex; Serial port number: 0 hex (not used) 0200 hex Send destination node address: 02 hex (set the unit number for Host Link + 1); Send destination unit address: 00 hex 0000 hex Response required;...
  • Page 119 Set the contents of S+3 when using CompoWay/F commands as follows: Set the SID “0” as ASCII 30 hex (1 byte) in the leftmost byte, and the leftmost digit of the CompoWay/F command code MRC as ASCII (1 byte) in the right- most byte.
  • Page 120 Communications Frames Section 3-7...
  • Page 121 4-3-25 ERROR READ – – MF ........
  • Page 122: C-Mode Command List

    TIMER/COUNTER SV READ 2 Finds the specified timer/counter instruction, begin- ning with the designated program address, and reads the constant SV in four digits or the word in which the SV is stored. TIMER/COUNTER SV READ 3 Finds the specified timer/counter instruction, begin-...
  • Page 123 SV in four digits (BCD) or the word in which the SV is stored to a new constant SV or storage word. TIMER/COUNTER SV CHANGE 3...
  • Page 124 C-mode Command List Section 4-1 C-mode Command Force Conditions Header Name Single- Multiple- Single- Multiple- code frame frame frame frame write read com- command response response protect protect mand CIO AREA READ Valid Not valid Valid Valid Valid Valid Valid...
  • Page 125: End Codes

    End Codes End Code Summary These are the response (end) codes that are returned in the response frame. When two or more errors occur, the end code for the first error will be returned. Contents Probable cause Corrective measures...
  • Page 126 128 bytes. Note Occurs only for a Serial Communications Unit/Board. A response will not be received with some errors, regardless of the command. These errors are listed in the following table. Error PLC operation A command is received with eight bytes or less The initial command (4 bytes) executes the initial processing.
  • Page 127: C-Mode Command Details

    About this Section With C-mode command and response formats, a single character is indicated by a single box. Each character is sent and received as a single byte in ASCII. Execution Conditions The Execution Conditions table at the beginning of the description of each...
  • Page 128: Cio Area Read - - Rr

    3. D10000 to D32767 and E10000 to E32767 cannot be read or written using C-mode commands. 4. SV can be read and written only in cyclic task 0. Also, timer SV can be read and written only when the timer number is not indirectly addressed.
  • Page 129: Lr Area Read - - Rl

    Not executable due to CPU Unit CPU error. 4-3-3 LR AREA READ – – RL Treats CIO 1000 to CIO 1199 as a data link area and reads the contents of the specified number of words starting from the specified word. Command Format...
  • Page 130: Hr Area Read - - Rh

    Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries, or are not specified in BCD, or if the number of words to read is 0.
  • Page 131: Timer/Counter Pv Read - - Rc

    Multiple Single Multiple PROG Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if...
  • Page 132: Timer/Counter Status Read - - Rg

    1: ON 0: OFF Limitations The number of words per frame for response data is different to that for C- series Units. For details refer to 2-4 Precautions when Reusing Programs from Earlier Models. The text portion of the response’s first frame can contain up to 121 words. If more than 121 words are read, the data will be returned in multiple frames.
  • Page 133: Dm Area Read - - Rd

    Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries, or are not specified in BCD, or if the number of words to read is 0.
  • Page 134: Ar Area Read - - Rj

    Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect and an end code of 15 (entry number data error) will be returned if the specified words exceed the data area boundaries, or are not specified in BCD, or if the number of words to read is 0.
  • Page 135: Em Area Read - - Re

    No. of words Terminator code (See note.) (0000 to 9999) (0001 to 9999) Note Input 00, 01, or 0C to specify bank number 0, 1, or C. Input two spaces to specify the current bank. Response Format ↵ x 10 x 10...
  • Page 136: Cio Area Write - - Wr

    BCD, or the write data is not hexadecimal. (An end code of A5 will be returned instead of 15 for non-hexadecimal write data in multiple command frames.)
  • Page 137: Lr Area Write - - Wl

    BCD, or the write data is not hexadecimal. (An end code of A5 will be returned instead of 15 for non-hexadecimal write data in multiple command frames.)
  • Page 138: Hr Area Write - - Wh

    BCD, or the write data is not hexadecimal. (An end code of A5 will be returned instead of 15 for non-hexadecimal write data in multiple command frames.)
  • Page 139: Timer/Counter Pv Write - - Wc

    BCD, or the write data is not hexadecimal. (An end code of A5 will be returned instead of 15 for non-hexadecimal write data in multiple command frames.)
  • Page 140: Dm Area Write - - Wd

    BCD, or the write data is not hexadecimal. (An end code of A5 will be returned instead of 15 for non-hexadecimal write data in multiple command frames.)
  • Page 141: Ar Area Write - - Wj

    BCD, or the write data is not hexadecimal. (An end code of A5 will be returned instead of 15 for non-hexadecimal write data in multiple command frames.)
  • Page 142: Em Area Write - - We

    (See note.) (0000 to 9999) Write data (for number of words to write) Note Input 00 to 0C to specify bank number 0 to C. Input two spaces to specify the current bank. Response Format x 10 x 10...
  • Page 143: Timer/Counter Sv Read 1 - - R

    This command cannot be executed while UM read protection is in effect. If there are multiple relevant instructions in the UM Area, a search will be con- ducted from program address 0, and the first instruction found will be read.
  • Page 144 C-mode Command Details Section 4-3 End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. An end code of 15 (entry number data error) will be returned if the timer/ counter type or timer/counter number is out of range (including hexadecimal data).
  • Page 145 The constant or I/O memory area classification is returned, in ASCII, to this parameter. SV/Word Address (Response) The constant SV or the word address in which it is stored is returned to this parameter. Limitations Timers T2048 to T4095 and counters C2048 to C4095 cannot be read.
  • Page 146: Timer/Counter Sv Read 3 - - R

    From the specified program address onwards in cyclic task 0, TIMER/ COUNTER SV READ 3 finds the specified TC instruction and reads the con- stant SV that is set or the word address where the SV is stored. The SV that is read is a 4-digit decimal number (BCD).
  • Page 147 TIMER WAIT COUNTER WAIT HIGH-SPEED TIMER TOTALIZING TIMER REVERSIBLE COUNTER TIMER (SP) COUNTER (SP) Note “SP” represents a space (20 Hex). Response Format ↵ x 10 x 10 x 16 x 16 OP1 OP2 OP3 OP4 x 10 x 10...
  • Page 148 The constant or I/O memory area classification is returned, in ASCII, to this parameter. SV/Word Address (Response) The constant SV or the word address in which it is stored is returned to this parameter. Limitations Timers T2048 to T4095 and counters C2048 to C4095 cannot be read.
  • Page 149: Timer/Counter Sv Change 1 - - W

    Timers T2048 to T4095 and counters C2048 to C4095 cannot be read. The command cannot be executed unless the SV is a constant. If there are multiple relevant instructions in cyclic task 0, a search will be con- ducted from program address 0, and the first instruction found will be read.
  • Page 150 C-mode Command Details Section 4-3 End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. An end code of 15 (entry number data error) will be returned if the program address is not specified in BCD, or if the timer/counter type or number is out of range (including hexadecimal data).
  • Page 151 Timers T2048 to T4095 and counters C2048 to C4095 cannot be read. The SV of the first timer/counter found after the designated program address will be read. If the SV is outside of range for the timer/counter type or number, an end code of 16 (command not supported) will be returned.
  • Page 152: Timer/Counter Sv Change 3 - - W

    Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. An end code of 15 (entry number data error) will be returned if the program address is not BCD, or if the timer/counter type or number is out of range (including hexadecimal data).
  • Page 153 0000 to 2047 WAIT TIMER WAIT COUNTER WAIT HIGH-SPEED TIMER TOTALIZING TIMER REVERSIBLE COUNTER TIMER (SP) COUNTER (SP) Note “SP” represents a space (20 Hex). Classification Constant/area classification SV or word address Charac- Charac- Charac- Charac- (BCD) ter 1 ter 2...
  • Page 154 Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. An end code of 15 (entry number data error) will be returned if the program address is not BCD, or if the timer/counter type or number is out of range (including hexadecimal data).
  • Page 155: Status Read - - Ms

    10K steps 20K steps 30K steps 60K steps 120K steps 250K steps (In the case of a CJ2 CPU Unit, this is fixed at 111) Parameters Message (Response) The message for any FAL/FALS occurring during command execution will be returned.
  • Page 156: Status Change - - Sc

    Single Multiple Single Multiple PROG Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. End code (Hex) Contents Normal completion FCS error Format error Frame length error Not executable due to CPU Unit CPU error.
  • Page 157: Error Read - - Mf

    Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. An end code of 15 (entry number data error) will be returned if the mode data is out of range.
  • Page 158 1: Number duplication (A40113) 1: I/O setting error (A40110) 1: SYSMAC BUS error (A40205) Limitations Only FAL and FALS numbers 0 to 99 can be read. For numbers 100 to 511, FAL/FALS number 00 will be set. Execution Conditions Commands...
  • Page 159: Forced Set - - Ks

    Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect, or if the bit is designated as other than 00 by the TIM/CNT desig- nation. An end code of 15 (entry number data error) will be returned if the area classi- fication, word address, or bit parameter setting is out of range (including hexa- decimal data).
  • Page 160: Forced Reset - - Kr

    Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect, or if the bit is designated as other than 00 by the TIM/CNT desig- nation. An end code of 15 (entry number data error) will be returned if the area classi- fication, word address, or bit parameter setting is out of range (including hexa- decimal data).
  • Page 161: Multiple Forced Set/Reset - - Fk

    Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. (The forced set/reset/cancel data is 16 bytes long.) An end code of 15 (entry number data error) will be returned if the area classi-...
  • Page 162: Forced Set/Reset Cancel - - Kc

    C-mode Command Details Section 4-3 will also be returned if the a data specification of 0 or 1 is used when a timer or counter is designated. End code (Hex) Contents Normal completion Not executable in RUN mode FCS error...
  • Page 163: Plc Model Read - - Mm

    Single Multiple Single Multiple PROG Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. End code (Hex) Contents Normal completion FCS error Format error Frame length error...
  • Page 164: Test- - Ts

    Multiple Single Multiple PROG Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if a terminator is not received in the first frame. End code (Hex) Contents FCS error Format error Frame length error Not executable due to CPU Unit CPU error.
  • Page 165: Program Write - - Wp

    Single Multiple Single Multiple PROG Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. End code (Hex) Contents Normal completion FCS error Format error Frame length error Not executable Not executable due to CPU Unit CPU error.
  • Page 166: I/O Table Generate - - Mi

    End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect (the total size of the program is not a multiple of 8 bytes) or the first frame contains no program data.
  • Page 167: Register I/O Memory - - Qqmr

    Pre-registers to the table all of the I/O memory area bits, words, and timers/ counters that are to be read. The registered contents are retained until they are overwritten or until the power is cut off, so they can be read by QQIR. (Refer to 4-3-36 READ I/O MEMORY – – QQIR.)
  • Page 168: Read I/O Memory - - Qqir

    EM can be read through the current bank or bank designation. The maximum EM bank number that can be specified is 12 (0C Hex). Bits and words can be specified in any order and they will be registered in the order that they were specified.
  • Page 169: Abort - - Xz

    PROG Write-protected Read-protected End Codes An end code of 14 (format error) will be returned if the length of the command is incorrect. An end code of 19 (not executable) will be returned if there is no registered data. End code (Hex)
  • Page 170: Initialize

    There are no end codes with this command. (There is no response). If the ABORT command (XZ) is received when data is being sent from a serial port to a host, the send operation will be stopped even in the middle of a frame.
  • Page 171: Fins Commands

    5-3-19 CLOCK READ: 07 01 ........
  • Page 172: Command Lists

    MESSAGE READ/CLEAR Reads and clears messages, and reads FAL/FALS messages. Access rights ACCESS RIGHT ACQUIRE (See note.) Acquires the access right as long as no other device holds it. ACCESS RIGHT FORCED ACQUIRE Acquires the access right even if another device already holds it.
  • Page 173 CONVERT TO COMPOWAY/F COM- Encapsulates a CompoWay/F command functions MAND in a FINS command and sends it to a serial port. (The CompoWay/F com- mand is extracted and sent through the serial port at the receiving end.) CONVERT TO MODBUS-RTU COM-...
  • Page 174 Connecting to the Destination PLC Connect the destination PLC to the serial port of a Serial Communications Unit or Board (Ver. 1.2 or later) as a Host Link Slave and use the serial gateway mode or protocol macro mode communications.
  • Page 175: Fins Command Restrictions

    Disabled OK Disabled Disabled CLEAR Operating Disabled OK Disabled mode STOP Disabled OK Disabled changes Machine CPU UNIT DATA READ OK configuration CONNECTION DATA reading READ Status CPU UNIT STATUS reading READ CYCLE TIME READ Disabled OK Time data CLOCK READ...
  • Page 176 FINS Commands Sent to CPU Units via Networks) to not re- ceived FINS write commands from specified network nodes even if a FINS write command is sent to the CPU Unit. The FINS write commands are the ones listed as Disabled in the Write-protected from network column above.
  • Page 177: End Codes

    Note In addition to the end codes listed in the following table, the specific flags in the end code word (bits 6, 7, and 15) may also be ON. If bit 15 is ON, an error has occurred during a network relay operation. If bit 6 or 7 is ON, an error has occurred in the destination CPU Unit.
  • Page 178 Check the destination unit address. control data specified unit address. 03: Third node Instruction The third node does not exist. Check the unit address of the third missing control data node. Check the node address of the third node in the send data for CMND(490).
  • Page 179 0C: Parameter Parameters in There is an error in one of the Check the command data and error command data parameter settings. correct the parameters. Data link table There is an error in the file.
  • Page 180 Device and then execute the command. 03: Table miss- Table A table has not been regis- Register a table. tered. There is an error in the table. Correct the table. 04: Data The search data does not missing exist. 05: Program Program num-...
  • Page 181 Check the modes of the PLC and mode mode. computer. 04: Wrong PLC The PLC is in DEBUG mode. Check the modes of the PLC and mode computer. 05: Wrong PLC The PLC is in MONITOR Check the modes of the PLC and mode mode.
  • Page 182 EM file memory. mand. For a memory card or EM file mem- ory, the file data has been destroyed. Execute the FILE MEM- ORY FORMAT command. If the problem persists, replace the memory.
  • Page 183 In addition to the above end codes, there are also specific flags in the end code word (bits 6, 7, and 15) that may also be ON. If bit 6 or 7 is ON, an error has occurred in the destination CPU Unit. If bit 15 is ON, an error has occurred during a network relay operation.
  • Page 184 1: Network relay error (See following section for details) Handling Fatal and Non-fatal CPU Errors If bit 6 or 7 is ON, an error has occurred in the destination CPU Unit. If this occurs, refer to the operation manuals for the CPU Unit where the error occurred and remove the cause of the error.
  • Page 185: Designating Command Parameters

    When bits are designated, each bit is considered a single element. The data for the element is expressed in one byte (ON: 01 hex; OFF: 00 hex). When data is written, this byte is transmitted. When data is read, this byte is returned.
  • Page 186 When words are designated, each word is considered a single element. The data for the element is expressed in two bytes. Bits 0 to 15 correspond to bits 0 to 15 of each word. When data is written, these two bytes are transmitted for each word.
  • Page 187: I/O Memory Address Designations

    CIO 6143 17FF00 CIO 2555 09FB00 Work W000 to 000000 to Area W511 01FF00 Holding H000 to H511 000000 to Bit Area 01FF00 Auxiliary A000 to A447 000000 to A000 to A447 0B0000 to Bit Area (read only) 01BF00 (read only)
  • Page 188 EM Area EM 20 to 2F E0_0000000 000000 to bank 0 to 3276715 7FFF0F to bank EF_0000000 to 3276715 E0 to E8 E10_0000000 000000 to bank to 3276715 7FFF0F 10 to bank E18_0000000 0 to 3276715 Word A0 to AF...
  • Page 189 1. The only current EM bank that can be read with FINS commands is the current EM bank that is set at the end of the cycle. 2. On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F.
  • Page 190 Start the file name and extension in the most-significant bytes respectively and then fill in any unused bytes with 20 hex. If the file name or extension in response data is less than 8 or 3 bytes respec- tively, unused bytes will be filled with 20 hex.
  • Page 191 7E hex (–) at the first and second characters (consecutive) of a file name. If a file name has no extension, fill both the period (2E hex) and the extension with 20 hex. If the file name in response data has no extension, both the period (2E hex)
  • Page 192: Fins Commands

    Using CMND(490) When CMND(490) is used to send a FINS command, the command is stored in I/O memory from the rightmost word to the leftmost word, with a single word represented as two boxes (four digits hexadecimal) in the format diagram.
  • Page 193: Memory Area Read: 01 01

    Device CPU Unit. Note The access right is the exclusive right of access to a particular device (the CPU Unit in this case) which prevents interruption by another device (i.e., another Peripheral Device or Unit) when multiple commands are executed.
  • Page 194 Parameters I/O memory area code, beginning address, number of items (command) Specify the type of data read, the beginning address of the data to be read, and the number of items of data to be read (2 digits hexadecimal). The memory areas that can be read are given in the following table (I/O Mem- ory Area Codes).
  • Page 195 EM current Bank No. bank No. Task Flag Status Index Register Data Register Clock Pulses Condition Flags Note On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F.
  • Page 196: Memory Area Write: 01 02

    Parameters I/O memory area code, beginning address, number of items (command) Specify the type of data written, the beginning address of the data to be written, and the number of items of data to be written (2 digits hexadecimal). The memory areas that can be written are given in the following table (I/O Memory Area Codes).
  • Page 197: Memory Area Fill: 01 03

    Word Index Register Data Register Note On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F. 5-3-4 MEMORY AREA FILL: 01 03 Writes the same data to the specified number of consecutive memory area words.
  • Page 198 50 to 5F (see note.) EM bank 10 60 to 68 to bank 18 EM current Word bank Note On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F.
  • Page 199: Multiple Memory Area Read: 01 04

    The data in the designated memory area(s) will be returned in the sequence specified by the command. The number of bytes that can be read for each item depends on the I/O mem- ory area that is read. For details regarding data configuration, refer to Element Data Configurations on page 163.
  • Page 200 EM current bank bank No. Task Flag Status Index Register Data Register Clock Pulses Condition Flags Note On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F.
  • Page 201: Memory Area Transfer: 01 05

    Parameters I/O memory area code and Beginning address (command) Specify the data area to transfer from and the data area to transfer to and specify the positions for beginning the data transfer. The memory areas that can be transferred are given in the following table (I/O Memory Area Codes).
  • Page 202: Parameter Area Read: 02 01

    EM current Word bank Note On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F. 5-3-7 PARAMETER AREA READ: 02 01 Reads the contents of the specified number of consecutive CPU Unit parame- ter area words starting from the specified word.
  • Page 203: Parameter Area Write: 02 02

    0000 to 143F (5184 words) Number of words (command and response) Bits 0 to 14 are used to specify the number of words to be read. (Each word consists of 16 bits.) Bit 15 must be OFF (0) in the command format. When the content in the response format contains the last word of data in the specified parameter area, bit 15 will be ON (1).
  • Page 204 0000 to 143F (5184 words) Number of words (command) Bits 0 to 14 are used to specify the number of words to be written. (Each word consists of two bytes.) Bit 15 must be ON (1) when data is written to the last word in the specified parameter area or no data will be written.
  • Page 205: Parameter Area Clear: 02 03

    There are some settings in the PLC Setup that cannot and will not be written if the CPU Unit is in RUN mode, but the end code will be 0000 nevertheless. It is the user’s responsibility to program steps to prohibit this command from being executed when the CPU Unit is in the RUN mode if such protection is neces- sary.
  • Page 206: Program Area Read: 03 06

    8002 0000 to 143F (5184 words) Data (command) Set to 0000. The number of words to be cleared is specified by the number of words in the command format. This parameter has two bytes (one word) of data. End code (response) Refer to 5-1-3 End Codes for information on end codes.
  • Page 207: Program Area Write: 03 07

    (bit 15) indicates whether the data at the last address in the pro- gram area is included. If bit 15 is ON (1) when the response is returned, it indi- cates that the data at the last address in the program area is included in the read data.
  • Page 208: Program Area Clear: 03 08

    Specify the number of bytes of data to write. The number of bytes must be a multiple of 4 and 996 or less. The leftmost bit (bit 15) is used to indicate when program area writing is completed. Bit 15 must be ON (1) the last word of data.
  • Page 209 Power interrupt task Scheduled interrupt task I/O interrupt task Cyclic task With Interrupt Tasks In this mode, one single cyclic task 0 and one or several interrupt tasks are set Name Number Task No. Power interrupt task Scheduled interrupt task...
  • Page 210: Run: 04 01

    Changes the CPU Unit’s operating mode to MONITOR or RUN, enabling the PLC to execute its program. Note The CPU Unit will start operation when RUN is executed. You must confirm the safety of the system before executing RUN. When the "prohibit overwriting of protected program" setting is enabled, this command cannot be executed.
  • Page 211: Cpu Unit Data Read: 05 01

    If only the command code or only the command code and program number are to be sent, the operating mode will be changed to the PROGRAM mode. 5-3-15 CPU UNIT DATA READ: 05 01 Reads the following data: •...
  • Page 212 FINS Commands Section 5-3 Response Format The format is as shown below if 00 (hex) is specified as the data to be read, i.e., from the CPU Unit model to the area data. 20 bytes 20 bytes 40 bytes 12 bytes...
  • Page 213 CPU Bus Unit configuration (response) Each CPU Bus Unit has a code assigned to it consisting of two ASCII charac- ters (two bytes). These codes are given in the numerical order according to the unit number of the CPU Bus Units (unit 0 to 15).
  • Page 214: Connection Data Read: 05 02

    Section 5-3 CPU Unit information (response) The total number of racks (CPU Racks + Expansion I/O Racks) connected to the CPU Unit is returned in a single byte (8 bits) of data in the configuration shown below. Not used. Number of Racks connected to the CPU Unit = CPU Rack + Expansion I/O Racks (1 to 8 Hex).
  • Page 215: Cpu Unit Status Read: 06 01

    The number of Units for which the connection data is being returned. If bit 7 is ON (1), it means that the data for the last Unit is being returned. The maxi- mum setting is 19 hex (25). If the number of items is not specified, 19 hex (25) will be used.
  • Page 216 1: FAL error Note For details, refer to the CPU Unit’s operation manual. Message yes/no (response) If MSG(046) has been executed, the bit corresponding to the message num- ber will be ON (1) as shown below. To read the messages generated by...
  • Page 217: Cycle Time Read: 06 20

    Error code (response) Among errors that occur when the command is executed, the error code indi- cates the most serious. If there are no errors, it will be 0000 (hex). Error message (response) Indicates messages from execution of FAL(006) or FALS(007). If there is no error message, or if FAL(006) or FALS(007) are not being executed, 16 spaces (ASCII 20) will be returned.
  • Page 218: Clock Read: 07 01

    It is expressed in four binary bytes, in increments of 0.1 ms. Minimum cycle time The minimum cycle time is found in the same way as the maximum cycle time described above. End code (response) Refer to 5-1-3 End Codes for information on end codes.
  • Page 219: Clock Write: 07 02

    The year, month, day of month, hour, minute, and second are expressed in BCD. Year: The rightmost two digits of the year. (1998, 1999, and 2000 are expressed as 98, 99, and 00 respectively. 2096 and 2097 will be expressed as 96 and 97.) Hour: 00 to 23 (BCD).
  • Page 220: Message Read: 09 20

    The PLC does not check the day of week from the day of month. This means that no error will occur even if the day of month and the day of week do not agree. The PLC automatically checks the range of the specified data. If any portion of the data is incorrect, the clock will not be set.
  • Page 221: Message Clear: 09 20

    The number of messages read × 32 bytes If a message consists of less than 32 bytes, the remainder will be filled with spaces (20 hex). If no message has been registered for a message number that has been requested, 32 bytes of spaces (20 hex) will be returned.
  • Page 222: Fal/Fals Read: 09 20

    20) commands share the same command code (0920). They are distin- guished by bits 14 and 15 of the two-byte parameter following the command code. To clear messages, bit 14 must be ON (0) and bit 15 must be OFF (0). 5-3-23 FAL/FALS READ: 09 20 Reads FAL(006)/FALS(007) error messages.
  • Page 223: Access Right Acquire: 0C 01

    If no message has been registered for a message number that has been requested, 16 bytes of spaces (20 hex) will be returned. Message data will be returned as is even if a control code such as CR (0D hex) is included in the message data.
  • Page 224 Refer to 5-1-3 End Codes for information on end codes. Comments If any other device has the access right, the access right cannot be acquired with this command; use ACCESS RIGHT FORCED ACQUIRE (command code 0C01). (Refer to 5-3-25 ACCESS RIGHT FORCED ACQUIRE: 0C 02.)
  • Page 225: Access Right Forced Acquire: 0C 02

    FORCED SET/RESET CANCEL Note ACCESS RIGHT ACQUIRE is used to prevent Programming Devices or other Units from taking the access right when more than one command is to be exe- cuted in succession. When finished, always execute ACCESS RIGHT RELEASE (0C03).
  • Page 226 Refer to 5-1-3 End Codes for information on end codes. Comments Even if any other device has the access right, the access right can be acquired with this command and a normal end code will be returned. When ACCESS RIGHT FORCED ACQUIRE (command code 0C02) is exe- cuted while any other device has the access right, subsequent commands cannot be executed from the other device.
  • Page 227: Access Right Release: 0C 03

    The access right can be released by this command even when the access right is held by another device. In that case a normal end code will be returned. A normal end code will also be returned if this command is used...
  • Page 228: Error Clear: 21 01

    Flash memory error 00F7 Battery error 0200 to 020F CPU Bus Unit error (The rightmost two digits are the unit number in binary of the Unit that has the error.) • When a error occurs during data transfer between the CPU Bus Unit and CPU Unit.
  • Page 229: Error Log Read: 21 02

    If the specified error is not occurring, a normal end code will be returned. If the present error is one that can only be cleared when the CPU Unit is in PROGRAM mode, it will not be possible to clear it in MONITOR or RUN mode.
  • Page 230 PLC. When the PLC does not have the specified number of records, all the records that have been stored in the PLC will be read and an address range overflow error will result.
  • Page 231: Error Log Clear: 21 03

    FINS Commands Section 5-3 If the data is too large and exceeds the permissible length of the response for- mat, the part in excess will not be read and a normal response will be returned. 5-3-29 ERROR LOG CLEAR: 21 03 Clears all error log pointers to 0.
  • Page 232 Parameters Beginning record number (command) Specify the first record to be read. (The first record number is 0000 hex.) Number of records (command, response) Specify the number of records to read. The number of read records will be returned with the response.
  • Page 233: Fins Write Access Log Clear: 21 41

    The following rules apply to records stored in the access log. • If there is already a record for the same node, the old record will be over- written with a new one. • If there is not already a record for the same node, a new record will be created at the end of the log.
  • Page 234 The number of file names to be read between 0001 and 0014 (hex). A maxi- mum number of 20 file names can be read at one time. If there are more file names than that, add one to the number of response files when specifying the next beginning file position.
  • Page 235 Number of files (response) The number of files that have been read. Bit 15 is ON (1) if the last file is included. Bit 15 OFF (0): Without last file Bit 15 ON (1): With last word file Bits 0 to 14: No.
  • Page 236: Single File Read: 22 02

    (0 to 59) (0 to 29) All data values are in binary. Year: Add 1980 to the value returned. (The year is the number of years since 1980.) Second: Multiply the value returned by two. (The value returned is expressed in units of two seconds.)
  • Page 237: Single File Write: 22 03

    The position of the first data read is returned. Data length (response) The number of bytes of data read is returned. If the last data in the file is included, the leftmost bit in this parameter will be ON. Data (response) The specified data is returned in sequence starting from the specified byte.
  • Page 238: File Memory Format: 22 04

    Parameter code (command) As follows: 0000 (hex) Writes a new file. If a file with the same name already exists, the new file will not be created. 0001 (hex) Writes a new file. If a file with the same name already exists, it will be overwrit- 0002 (hex) Adds data to an existing file.
  • Page 239: File Delete: 22 05

    Before executing this command, check to be sure that it is okay to clear the data. Refer to file memory applica- tion procedures in the CPU Unit’s operation manual for details on using file memory.
  • Page 240: File Copy: 22 07

    Indicates the absolute path from the root directory. It begins with \ (5C hex), and the drive name and colon (:) are not required. “\” is used to delimit the lower directory. It is not required at the end of the final absolute path. No set- ting is required to specify the root directory itself.
  • Page 241: File Name Change: 22 08

    Refer to 5-1-3 End Codes for information on end codes. Comments The file will not be copied if there is already a file of the same name at the destination. The file will not be copied if an existing file name is given at the copy destina- tion.
  • Page 242: Memory Area-File Transfer: 22 0A

    8001 (hex): EM file memory Old and new file names (command) Specify the original file name and a new name for the file. For details on the configuration, refer to page 168. Directory length (command) Indicates the length of the absolute directory path. The maximum number of characters is 65.
  • Page 243 EM current bank Word Note On a CJ2 CPU unit only, 50 to 5F can be specified for the memory area code of EM banks 0 to F. Number of items (command and response) In the command format, specify the number of items, in word units, to be transferred or compared.
  • Page 244: Parameter Area-File Transfer: 22 0B

    Indicates the absolute path from the root directory. It begins with \ (5C hex), and the drive name and colon (:) are not required. “\” is used to delimit the lower directory. It is not required at the end of the final absolute path. No set- ting is required to specify the root directory itself.
  • Page 245 0000 to 143F (5184 words) Number of items (command and response) In the command format, the number of items is always FFFF (hex) so that the entire parameter area is specified. In the response format, the number of words transferred is indicated when data is transferred. When data is com- pared, the response format indicates the position at which a verification error occurs or the number of words compared.
  • Page 246: Program Area-File Transfer: 22 0C

    The clock data upon completion of a parameter area to file memory transfer will be recorded as the date of the file that has been transferred. A file can be transferred to the I/O table only when the CPU Unit is in PRO- GRAM mode.
  • Page 247 Indicates the absolute path from the root directory. It begins with \ (5C hex), and the drive name and colon (:) are not required. “\” is used to delimit the lower directory. It is not required at the end of the final absolute path. No set- ting is required to specify the root directory itself.
  • Page 248: Create/Delete Directory: 22 15

    (:) are not required.“\” is used to delimit the lower directory. It is not required at the end of the final absolute path. No set- ting is required to specify the root directory itself.
  • Page 249: Memory Cassette Transfer (Cp-Series Cpu Units Only)

    5-3-43 MEMORY CASSETTE TRANSFER (CP-series CPU Units Only): 22 20 Transfers or verifies data between a Memory Cassette mounted in a CP- series CPU Unit (see note) and the memory areas in the CP-series CPU Unit. Transfers can go either direction.
  • Page 250: Forced Set/Reset: 23 01

    Bit 00: User program + Function block sources Note If bit 15 is OFF and any of bit 02 or bits 02 to 07 is ON, an Other Parameter Error will occur and an end code of 110C hex will be returned.
  • Page 251 “number of bits/flags” parameter. Note If “forced set/reset OFF release (8000)” or “forced set/reset ON release (8001)” is exceeded for a bit/flag that does not have forced status, only the bit/ flag’s ON/OFF status will be affected.
  • Page 252: Forced Set/Reset Cancel: 23 02

    C on the Controller Section of an NSJ Controller, built-in serial ports of N-type CP1E CPU Units, serial port 1 or 2 on an Option Board of a CP-series CPU Unit, or a serial port on a Serial Communications Unit/ Board (version 1.2 or later), the CPU Unit or Serial Communications Unit/...
  • Page 253 3030 hex. For some models, other values must be set. CompoWay/F SID (Service ID) The Service ID is 0 for most models and the value is specified in ASCII as 30 hex. For some models, other values must be set.
  • Page 254 • Unit addresses for serial port 1: Unit number Board Hexadecimal Decimal 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 228 • Unit addresses for serial port 2: Unit number Board Hexadecimal...
  • Page 255: Convert To Modbus-Rtu Command: 28 04

    5-3-47 CONVERT TO MODBUS-RTU COMMAND: 28 04 When this command is sent to serial port 1 or 2 on an Option Board of a CP- series CPU Unit, or a serial port on a Serial Communications Unit/Board (ver- sion 1.2 or later), the CPU Unit or Serial Communications Unit/Board removes...
  • Page 256 • Unit addresses for serial port 1: Unit number Board Hexadecimal Decimal 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 228 • Unit addresses for serial port 2: Unit number Board Hexadecimal...
  • Page 257: Convert To Modbus-Ascii Command: 28

    01 and F7 hex (3031 to 4637 ASCII), which is 1 to 247 in decimal. Function Code Specify the function code of the Modbus-ASCII command. Set the address in ASCII between 01 and FF hex (3031 to 4646 ASCII), which is 1 to 255 in dec- imal. Communications Data Specify the required parameters (in ASCII) associated with the function code.
  • Page 258 This is the serial ports unit address. • Unit addresses for serial port 1: Unit number Hexadecimal Decimal 128 132 136 140 144 148 152 156 160 164 168 172 176 180 184 188 228 • Unit addresses for serial port 2: Unit number Hexadecimal Decimal 129 133 137 141 145 149 153 157 161 165 169 173 177 181 185 189 229 •...
  • Page 259: Index

    Index commands for CV series PCs ACCESS RIGHT RELEASE Communications Port Enabled Flags ABORT (XZ) Communications Port Error Flags access right acquiring counters at another device reading Completion Flag status releasing CPU Unit accessing I/O memory status – accessing program area...
  • Page 260 FORCED RESET (KR) reading FORCED SET (KS) model code forced set/reset model numbers FORCED SET/RESET CANCEL (KC) reading model numbers of Units reading PC model number MULTIPLE FORCED SET/RESET (FK) non- fatal error data Host Link communications command frame response frame...
  • Page 261 TIMER/COUNTER PV WRITE (WC) operating environment xviii safety TIMER/COUNTER STATUS READ (RG) program TIMER/COUNTER SV CHANGE 1 (W#) clearing TIMER/COUNTER SV CHANGE 2 (W$) comparing/transferring TIMER/COUNTER SV CHANGE 3 (W%) reading writing to program area words TIMER/COUNTER SV READ 1 (R#)
  • Page 262 Index...
  • Page 263: Revision History

    Revision History A manual revision code appears as a suffix to the catalog number on the front cover of the manual. Cat. No. W342-E1-14 Revision code The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version.
  • Page 264 Pages xi to xvii: PLP information updated. Front of manual: Information added on unit versions. Pages 4, 5, 110, and 111: Note and references to it added and 21 40 and 21 41 added. Pages 24 and 28: Note added.
  • Page 265 Revision History Revision code Date Revised content December 2008 Added the CJ-series CJ2 CPU Units (CJ2H-CPU@@). July 2009 Added the CP-series CP1E CPU Units. Added the Ethernet option board (CP1W-CIF41).
  • Page 266 Revision History...
  • Page 267 Automation & Drive Division Automation Department 1 OMRON ASIA PACIFIC PTE. LTD. Shiokoji Horikawa, Shimogyo-ku, No. 438A Alexandra Road # 05-05/08 (Lobby 2), Kyoto, 600-8530 Japan Alexandra Technopark, Singapore 119967 Tel: (81) 75-344-7084/Fax: (81) 75-344-7149 Tel: (65) 6835-3011/Fax: (65) 6835-2711 Regional Headquarters OMRON (CHINA) CO., LTD.

Table of Contents