Download Print this page

Omron CJ1W-ETN11 Operation Manual

Sysmac cs/cj series ethernet units.
Hide thumbs

Advertisement

Cat. No. W343-E1-07
SYSMAC
CS/CJ Series
CS1W-ETN01 (10Base-5)
CS1W-ETN11 (10Base-T)
CJ1W-ETN11 (10Base-T)
Ethernet Units
OPERATION MANUAL

Advertisement

Chapters

Troubleshooting

   Related Manuals for Omron CJ1W-ETN11

   Summary of Contents for Omron CJ1W-ETN11

  • Page 1: Operation Manual

    Cat. No. W343-E1-07 SYSMAC CS/CJ Series CS1W-ETN01 (10Base-5) CS1W-ETN11 (10Base-T) CJ1W-ETN11 (10Base-T) Ethernet Units OPERATION MANUAL...

  • Page 2

    CS1W-ETN01 (10Base-5) CS1W-ETN11 (10Base-T) CJ1W-ETN11 (10Base-T) Ethernet Units Operation Manual Revised January 2008...

  • Page 4

    OMRON. No patent liability is assumed with respect to the use of the information contained herein. Moreover, because OMRON is con- stantly striving to improve its high-quality products, the information contained in this manual is subject to change without notice.

  • Page 6: Table Of Contents

    PRECAUTIONS ....... . Intended Audience ..........General Precautions .

  • Page 7

    SECTION 4 System Setup and Memory Allocations....Allocated Words ..........CPU Bus Unit System Setup .

  • Page 8

    SECTION 10 Troubleshooting ....... . 10-1 Troubleshooting with Indicators ........10-2 Error Status .

  • Page 10: About This Manual

    About this Manual: This manual describes the installation and operation of the SYSMAC CS-series CS1W-ETN01 (10Base-5) and CS1W-ETN11 (10Base-T) Ethernet Units and the CJ-series CJ1W-ETN11 (10Base-T) Ethernet Unit, and includes the sections described on the next page. An Ethernet Unit is classified and treated as a CPU Bus Unit in PC processing.

  • Page 11

    CS/CJ-series PCs, and the CX-Net contained within CX-Programmer. W336-E1-@ Describes the use of Serial Communications Units and Boards to per- form serial communications with external devices, including the usage of standard system protocols for OMRON products. Contents...

  • 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

    Application Considerations OMRON shall not be responsible for conformity with any standards, codes, or regulations that apply to the combination of products in the customer's application or use of the products. At the customer's request, OMRON will provide applicable third party certification documents identifying ratings and limitations of use that apply to 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. Actual performance is subject to the OMRON Warranty and Limitations of Liability.

  • Page 16

    This section provides general precautions for using the CS/CJ-series Programmable Controllers (PCs) and related devices. The information contained in this section is important for the safe and reliable application of Programmable Controllers. You must read this section and understand the information contained before attempting to set up or operate a PC system.

  • Page 17: Intended Audience

    It is extremely important that a PC and all PC Units be used for the specified 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 PC System to the above-mentioned applica- tions.

  • Page 18: Operating Environment Precautions

    Operating Environment Precautions !Caution Execute online edit only after confirming that no adverse effects will be Operating Environment Precautions !Caution Do not operate the control system in the following places: !Caution Take appropriate and sufficient countermeasures when installing systems in !Caution The operating environment of the PC System can have a large effect on the Application Precautions !WARNING...

  • Page 19

    Application Precautions !Caution Failure to abide by the following precautions could lead to faulty operation of • Mounting or dismounting I/O Units, CPU Units, Inner Boards, or any other Units. • Assembling the Units. • Setting DIP switches or rotary switches. •...

  • Page 20: Conformance To Ec Directives

    • Low Voltage Directive EMC Directives OMRON devices that comply with EC Directives also conform to the related EMC standards so that they can be more easily built into other devices or the overall machine. The actual products have been checked for conformity to EMC standards (see the following note).

  • Page 22: Features And System Configuration

    This section introduces the overall structure of an Ethernet network, outlines the features of the Ethernet Unit, describes the communications protocols used by an Ethernet network, and provides basic precautions for use of an Ethernet network. Features ............System Configuration .

  • Page 23: Features

    The Ethernet Unit also supports FINS message communications, OMRON’s standard communications service, so other OMRON PCs can be accessed by using SEND(090), RECV(098), and CMND(490) instructions in ladder pro- grams. In addition, the FINS gateway function can be used to allow access to other PCs on not only the same Ethernet network but also on other networks such as Controller Link and SYSMAC Link.

  • Page 24: System Configuration

    3. Node interval (from transceiver to transceiver): Integral multiples of 2.5 m 4. Transceiver cable length: 50 m max. 10Base-5 Node Node Node Section 1-2 CX-Programmer Terminator CVM1/CV-series CJ-series CJ1W-ETN11 Ethernet Unit (10Base-T) CJ-series CVM1/CV Ethernet Unit (10Base-5) CX-Programmer 10Base-T Node 1 segment Ground...

  • Page 25: Devices Required In A Network

    Devices Required in a Network Configuration With Segment Extension Devices Required in a Network 1-3-1 10Base-5 Ethernet Unit CS1W-ETN01 Ethernet Unit 50 m max. Terminator (terminating resistance) Use repeaters to extend the distance between nodes or to increase the num- ber of connected nodes.

  • Page 26: 10base-t Ethernet Unit

    10Base-T conversion adapter The basic configuration of a 10Base-T Ethernet System consists of one hub to which nodes are attached in star form through twisted-pair cable. CS1W-ETN11/CJ1W-ETN11 Ethernet Units Twisted-pair cables 100 m max. The devices shown in the following table must be obtained to configure a net- work using a 10Base-T Ethernet Unit, so prepare them in advance.

  • Page 27: Related Programming Devices

    Related Programming Devices Related Programming Devices Screen Setup Screen Mail Setup Screen The Ethernet Unit functions as a node on the Ethernet network. The basic set- tings for operation are made in the CPU Bus Unit System Setup in the CS/CJ- series CPU Unit.

  • Page 28: Specifications

    Current consumption (Unit) 400 mA max. at 5 VDC External power supply Capacity: Inrush current: Permissible voltage fluctuation range: Recommended power supply: OMRON S82J-series Power supply to transceiver Capacity: Voltage fluctuation range: 13.05 to 14.48 VDC Ripple: Vibration resistance Conforms to JIS 0040.

  • Page 29

    Current consumption (Unit) Vibration resistance Shock resistance Ambient temperature Humidity Atmosphere Weight Dimensions Specifications CJ1W-ETN11 10Base-T CJ-series PCs CJ-series CPU Bus Unit CPU Rack or Expansion Rack 4 max. (including Expansion Racks) CSMA/CD Baseband Star 10 Mbps Unshielded twisted-pair (UTP) cable 100 m max.

  • Page 30

    Specifications Section 1-5 Dimensions CS1W-ETN01 (16.5 including cover) (Unit: mm) CS1W-ETN11 (Unit: mm)

  • Page 31: Software Configuration

    Software Configuration CJ1W-ETN11 Software Configuration CS/CJ-series PC's CPU FINS Communication Service FINS Ethernet ICMP ETN11 ERC SD ERH TCP FTP UNIT NODE ETHERNET The software supported by the Ethernet Unit runs in the layers shown in the following diagram. The components that form the various layers are defined below the diagram.

  • Page 32

    FINS SMTP Factory Interface Network Service: A protocol that sends messages between PCs on any of various OMRON FA networks. The user must provide mea- sures such as retry processing to ensure that transmitted messages arrive at the destination node.

  • Page 33: Ip Addresses

    IP Addresses IP Addresses 1-7-1 IP Address Configuration Bit 31 Class A Network number (7 bits) Bit 31 Class B Network number (14 bits) Bit 31 Class C Bit 31 Class D Bit 31 Class E Note The same network number must be set for every node on the same Ethernet 1-7-2 Allocating IP Addresses Ethernet networks use IP addresses for communications.

  • Page 34: Ip Address Settings

    IP Addresses 1-7-3 IP Address Settings 1-7-4 Subnet Masks nodes regardless of the networks on which they exist. To achieve this, net- work numbers are allocated by the Network Solutions, InterNIC Registration Services, to ensure that all Ethernet networks have unique numbers regard- less of where they exist.

  • Page 35: Precautions

    Precautions Precautions 1-8-1 Installation 1,2,3... 1-8-2 Ethernet and IEEE802.3 Standards Be sure to observe the following precautions when installing and using an Ethernet Unit. Observe the following precautions when installing an Ethernet System. (Refer to Section 3 Installation and Initial Setup for details.) 1.

  • Page 36: Communications Functions

    This section provides an overview of the communications functions that can be used with the Ethernet Unit. Communications Functions........2-1-1 Ethernet Unit Functions .

  • Page 37: Communications Functions

    Communications Functions Communications Functions Function FINS communications Client PC to PC By executing SEND(090), server RECV(098), or CMND(490) FINS command PC to host By executing computer SEND(090), RECV(098), or CMND(490) Host computer (with FINS Gateway function) FINS command Host com- By sending FINS puter to messages from the...

  • Page 38: Ethernet Unit Functions

    Communications Functions 2-1-1 Ethernet Unit Functions Function FINS communications Socket services FTP server Mail 2-1-2 Socket Ports Used By the Ethernet Unit Port number 9600 • A SEND(090), RECV(098), or CMND(490) instruction from the PC’s lad- der program is used to send a FINS command to a remote node, and a response is received.

  • Page 39: Fins Communications

    OMRON PC. To communicate with a host computer (with the FINS gateway function enabled). To perform operations with an OMRON PC other than sending or receiving data (for example, reading or writing files or changing the operating mode). To perform operations...

  • Page 40: Socket Services

    Socket Services Socket Services By Manipulating Dedicated Control Switches CMND(490) instructions in the ladder-diagram program. This enables control operations such as the reading and writing of I/O memory between PCs, mode changes, and file memory operations. (When a FINS message is sent on an Ethernet network, a UDP/IP header is automatically added to the mes- sage.) The FINS gateway function allows access not only to PCs on the same Ether-...

  • Page 41

    Socket Services By Executing CMND(490) There is no need to execute the CMND(490) instruction or to monitor the com- pletion timing and actual processing of the instruction, so this helps to simplify ladder programming. A total of eight ports (UDP and TCP combined) can be used for socket ser- vices.

  • Page 42: Ftp Server

    FTP Server FTP Server Mail Note The Ethernet Unit has a built-in FTP server function, so other computers on the Ethernet can read or write individual files in a Memory Card mounted to the CPU Unit or in EM file memory. This allows files to be exchanged between the host computer and the PC, with the host computer functioning as an FTP client and the PC as an FTP server.

  • Page 43

    Mail Section 2-5 4. Mail delivery is not guaranteed. Depending on factors such as the condi- tion of the network, mail that has been sent may not arrive at its destina- tion.

  • Page 44: Installation And Initial Setup

    This section explains how to install the Ethernet Unit and make the initial settings required for operation. Before Operation..........3-1-1 Automatic Address Generation.

  • Page 45: Before Operation

    Before Operation Before Operation Address Conversion (for FINS Communications Only) Ethernet Unit IP address: 153.211.32.114 Node number: 23 To 153.211.32.114 3-1-1 Automatic Address Generation In order to connect the Ethernet Unit to an Ethernet network, it is necessary to set the IP address. This section explains the process of address conversion, which is required information for determining the Ethernet Unit’s IP address.

  • Page 46: Ip Address Table

    Before Operation Note The rightmost byte of the host number becomes the FINS node number, and Note With CS-series Ethernet Units, when using either the address conversion 1,2,3... 3-1-2 IP Address Table 130.25.36. 8 AND 255.255.255.0 130.25.36.0 130.25.36.5 set the rest of the host number to all zeroes. Example 1: Class B Local IP address: Subnet mask:...

  • Page 47: Overview Of Startup Procedure

    Overview of Startup Procedure 1,2,3... Combined Method Overview of Startup Procedure 1,2,3... Setup. With different segments, nodes with different network IDs can also be registered. FINS node address FINS node number Characteristics of IP Address Table Method The IP address table method provides a simple correspondence table, so it has the advantage of allowing FINS node numbers and IP address to be freely allocated.

  • Page 48

    Overview of Startup Procedure 1,2,3... 6. Connect to the network. Connect the transceiver cable and external 24- VDC power supply for 10Base-5 systems and the twisted-pair cable for 10Base-T systems. Refer to 3-6 Connecting to the Network. 7. Turn ON the external 24-VDC power supply (for 10Base-5 systems) and turn ON power to the CPU Unit.

  • Page 49: Unit Components

    Unit Components Unit Components Refer to 3-7 Creating an I/O Table. 8. For simple operation where the IP address only (and no other System Set- up settings) is set, or for operation using the Programming Console only, set the IP address in the allocated words in the DM Area using the CX-Pro- grammer or Programming Console.

  • Page 50: Nomenclature

    Unit Components 3-3-1 Nomenclature CS-series Ethernet Units CS1W-ETN01 (10Base-5) CS1W-ETN11 (10Base-T) Front Indicators Display the operating status of the Unit. Unit Number Switch Used to set the Ethernet Unit's unit number in one digit hexadecimal. Node Number Switches Used to set the Ethernet Unit's FINS node number in two digits hexadecimal.

  • Page 51

    Unit Components CS1W-ETN01 and CS1W-ETN11 Note The Ethernet address can also be checked using the FINS command, CON- Local IP Address Switches Used to set the Ethernet Unit's IP address in eight digits hexadecimal. Each communications device connected to the Ethernet network is allocated a unique Ethernet address.

  • Page 52

    ERH TCP FTP ETHERNET Slider Mount to other Units. Note An IP address label is provided with the CJ1W-ETN11. Writing the IP address Indicators Display the operating status of the Unit. Unit Number Switch Used to set the Ethernet Unit’s unit number in one UNIT digit hexadecimal.

  • Page 53: Indicators

    At least one of the eight TCP sockets provided for socket services is in use. Not lit FTP server on stand-by. FTP server operating. Section 3-3 CJ1W-ETN11 MADE IN JAPAN Ethernet address (12 digits) CJ1W-ETN11 (10Base-T) ETN11 ERC SD ERH TCP FTP Meaning...

  • Page 54: Switch Settings

    Switch Settings Indicator Color Yellow (Internode Testing) Switch Settings 3-4-1 CS-series Ethernet Units Setting the Unit Number Note Unit Number and CPU Bus Unit Allocations CIO Area Allocations Status Not lit Not running internode test. Running internode test. This section explains how to set the various switches on the Ethernet Unit. The unit number is used to identify individual CPU Bus Units when more than one CPU Bus Unit is mounted to the same PC.

  • Page 55

    Switch Settings DM Area Allocations Setting the Node Number Note Turn OFF the power supply before setting the node number. Setting the Local IP Address Unit No. Allocated words (decimal) 0 (0) D30000 to D30099 1 (1) D30100 to D30199 2 (2) D30200 to D30299 3 (3)

  • Page 56: Cj-series Ethernet Units

    Switch Settings Note 3-4-2 CJ-series Ethernet Units Note With CJ-series Ethernet Units, the local IP address is set with the Program- Setting the Unit Number Note Local IP Address Switch No. 1 2 . 3 4 . 5 6 . 7 8 . The switches are all factory-set to 0 (00.00.00.00).

  • Page 57

    Switch Settings Unit Number and CPU Bus Unit Allocations CIO Area Allocations DM Area Allocations Setting the Node Number With CJ-series PCs, words are automatically allocated in the CIO Area and the DM Area. The Ethernet Unit uses these words for receiving control data from the CPU Unit and for notifying the CPU Unit of Ethernet Unit and com- munications status.

  • Page 58: Mounting To A Pc

    Mounting to a PC Note Turn OFF the power supply before setting the node number. Mounting to a PC 3-5-1 Mounting to a CS-series PC Note Tighten PC Backplane mounting screws to a torque of 1.2 N ⋅ m, and the Unit’s CS1W-BC023/BC033/BC053/BC083/BC103 CPU Backplane 2, 3, 5, 8, or 10 slots (Expansion Backplane not possible with 2-slot CPU Backplane.)

  • Page 59: Mounting To A Cj-series Pc

    Mounting to a PC 3-5-2 Mounting to a CJ-series PC Note Tighten PC Backplane mounting screws to a torque of 1.2 N ⋅ m, and the Unit’s CPU Rack Expansion Backplane Expansion Backplane Expansion Backplane PS: Power Supply Unit CPU: CPU Unit IC: I/O Control Unit II: I/O Interface Unit Note The CS1W-ETN01/ETN11 Ethernet Unit’s maximum current consumption is...

  • Page 60: Connecting To The Network

    Connecting to the Network Connecting to the Network 3-6-1 Ethernet Network Installation 3-6-2 Ethernet Connectors CS1W-ETN01 CS1W-ETN11 and CJ1W- ETN11 When installing an Ethernet network, be sure to take all appropriate safety measures and to follow the applicable standards (ISO 8802-3). You must obtain a copy of these specifications and be sure you understand them before attempting to install an Ethernet System.

  • Page 61: Connecting The Cable

    Connecting to the Network 3-6-3 Connecting the Cable Transceiver Cable (for CS1W-ETN01) !Caution Turn OFF the PC’s power supply before connecting or disconnecting trans- 1,2,3... Connector Signal name Transmission data + Transmission data – Reception data + Not used. Not used. Reception data –...

  • Page 62

    Connecting to the Network Twisted-pair Cable (for CS1W-ETN11 and CJ1W-ETN11) !Caution Turn OFF the PC’s power supply before connecting or disconnecting twisted- !Caution Allow enough space for the bending radius of the twisted-pair cable as shown 1,2,3... Lock post Slide latch...

  • Page 63: Connecting The Power Supply (cs1w-etn01 Only)

    Connecting to the Network 3-6-4 Connecting the Power Supply (CS1W-ETN01 Only) 2. Connect the cable to the hub. Be sure to press in the cable until it locks into place. Examples of the above two steps are provided in Appendix A. Request ca- ble installation from a qualified professional.

  • Page 64

    Connecting to the Network !Caution Be sure to turn OFF the power supply to the PC before connecting to the Note Maker Model J.S.T.MFG.CO., V1.25-N3A V1.25-MS3 MOLEX JAPAN VSY1.25-3.5L CO.,LTD RAV1.25-M3 power supply terminal block. 1. Do not connect a power supply with a voltage other than 24 VDC. 2.

  • Page 65

    Power supply voltage Allowable power supply voltage fluctuation Current consumption Inrush current OMRON’s S82J Series is recommended for the power supply. Section 3-6 24-VDC power supply Rated voltage: 250 V (AC, DC) Rated current: 6 A 105.5 x 52.5 x 40 mm (W x H x D) (Not including connector.)

  • Page 66: Creating An I/o Table

    Creating an I/O Table Note Creating an I/O Table 3-7-1 I/O Table Overview 3-7-2 Connecting Programming Devices to the PC Applicable Programming Devices Connecting Programming Devices 3-7-3 Procedure for Creating an I/O Table 1. Use a power supply that meets these specifications. 2.

  • Page 67: Creating Routing Tables

    Creating Routing Tables Note With the CJ Series, it is necessary to create an I/O table only when I/O alloca- Creating Routing Tables 3-8-1 Routing Table Overview explanation of how to create an I/O table using a CX-Programmer, refer to the CX-Programmer User’s Manual.

  • Page 68

    Creating Routing Tables Local Network Table Note Relay Network Table PC #1 (local node) Node #1 Network #1 PC #1 relay network table Relay Relay network network node To go to network #3, first go to node #3 at network #1. The local network table is a table describing the correspondences among unit numbers of the Communications Units and Boards mounted to each node (PC or FA Computer).

  • Page 69: Connecting And Using A Peripheral Device For The Pc

    Creating Routing Tables 3-8-2 Connecting and Using a Peripheral Device for the PC Note Routing Table Setting Examples Routing tables must be created by a CX-Net connected to the PC. (They can- not be created using a Programming Console.) For details on how to connect and use a CX-Net, refer to the CX-Programmer User’s Manual.

  • Page 70

    Creating Routing Tables Example 2: Three Interconnected Networks This example shows the relay network table settings for three different inter- connected networks. PC #1 Node #a Network #A PC #2 Node #b Node #c PC #3 Network #B Node #d PC #4 Node #e Node #f...

  • Page 71

    Creating Routing Tables Example 3: All Nodes This example uses the following configuration to show the routing tables for all nodes. Unit #5 Node #6 Unit #3 Node #4 Unit #2 Node #3 Network #20 Unit #0 Node #1 PC #1 Routing Table (Local network table) Local CPU Bus...

  • Page 72: System Setup

    System Setup System Setup 3-9-1 When Settings are Required Settings Broadcast setting Address conversion method UDP port number for FINS Local IP address (CJ Series only) Subnet mask FTP login name FTP password IP address table IP router table Mail function 3-9-2 Using a Programming Device 3-9-3...

  • Page 73: Creating An Ip Address Table

    Creating an IP Address Table 3-10 Creating an IP Address Table Connecting and Using a Programming Device for the PC Note An IP address table can also be registered using the FINS command IP 3-11 Creating an IP Router Table Note Connecting and Using a Programming Device for...

  • Page 74: Checking Communications

    Section 3-12 Internode testing Checking settings such as FINS addresses for using the FINS communications service. OMRON Units and Boards that support FINS commu- nications service intern- ode testing. Up to three levels of Ether- net networks, and FA net- works.

  • Page 75: Simple Startup Test Example

    Checking Communications Note 3-12-4 Simple Startup Test Example Application Conditions Setting Method 1,2,3... 1. The internode test can be easily carried out by manipulating dedicated control switches for the Ethernet Unit. For details, refer to 9-3 Internode Test. 2. Internode testing of the FINS communications service can also be carried out by means of the FINS commands INTERNODE ECHO TEST and BROADCAST TEST RESULTS READ.

  • Page 76

    Checking Communications Local network table Local network Unit number address When the above settings have been completed, reset the power supply. 4. Check Communications In order to check that connection is established with Ethernet Unit at an IP protocol level (i.e., whether communications are possible), send the follow- ing PING command from the host computer to the Ethernet Unit.

  • Page 77

    Checking Communications Normal Response RSV GCT DNA DA1 DA2 SNA SA1 SA2 SID Data read from D100 Completion code (Normal completion) Section 3-12 Command code (READ) Data read from D249...

  • Page 78: System Setup And Memory Allocations

    This section explains the System Setup and the words allocated in the CIO Area and the DM Area for Ethernet Units. Allocated Words ..........CPU Bus Unit System Setup.

  • Page 79: Allocated Words

    Allocated Words Allocated Words CPU Unit CPU Bus Unit System Setup (Set using CX-Programmer.) Allocated Words in CIO Area for CPU Bus Units n = CIO 1500 + 25 x unit number n + 1 n + 24 Allocated Words in DM Area for CPU Bus Units n = D30000 + 100 x unit number m + 1...

  • Page 80: Cpu Bus Unit System Setup

    CPU Bus Unit System Setup CIO Area Allocations DM Area Allocations CPU Bus Unit System Setup Note The CPU Bus Unit System Setup is located in the CPU Unit’s Parameter Area, Unit No. Allocated words (decimal) 0 (0) CIO 1500 to CIO 1524 1 (1) CIO 1525 to CIO 1549 2 (2)

  • Page 81: Settings

    CPU Bus Unit System Setup 4-2-1 Settings mer. With CJ-series Ethernet Units, however, it is possible to set the local IP address and the subnet mask using the FINS command IP ADDRESS WRITE. For details, refer to 11-3-20 IP ADDRESS WRITE . Item Broadcast setting Address conversion method...

  • Page 82

    CPU Bus Unit System Setup Note When using automatic address generation (the default) for address conver- Destination FINS address Note Choose the method used to set the local IP address as follows: sion, make the following settings. With the CS Series, set local IP address DIP switches 7 and 8 on the back of the Ethernet Unit to the same value as the node number setting on the front of the Unit, and set all other host settings to 0.

  • Page 83

    CPU Bus Unit System Setup Application Setting device Operation with the CX-Programmer CPU Unit Bus Sys- tem Setup set as desired (i.e., The default settings are not used.) Simple operation Programming Console (CX- (i.e., The CPU Unit Programmer can also be Bus System Setup is used.) used at its default...

  • Page 84

    CPU Bus Unit System Setup Note With the CJ Series, it is possible to set one default IP router. The default IP If the login name is incorrectly specified, or if no login name is specified at all, the default login name of “CONFIDENTIAL” will be used and no FTP pass- word will be required.

  • Page 85: Mail Settings

    CPU Bus Unit System Setup 4-2-2 Mail Settings Mail Settings IP network number IP address of IP router 130.26.0.0 130.25.36.253 Setting range: 0.0.0.0 to 255.255.255.0 A maximum of eight records can be registered. The default is for nothing to be set.

  • Page 86

    CPU Bus Unit System Setup • User Data (Refer to Sending User Data for Errors below.) • Error Log Information (Refer to Sending Error Log Information for Errors below.) • Status Information (Refer to Status Information for Errors below.) If none of these types of data is selected, mail will not be sent even if the set- ting is made for mail to be sent whenever an error is registered.

  • Page 87

    CPU Bus Unit System Setup User-created Mail Data Address Local Mail Address Destination Mail Address SMTP Server Address If none of these types of data is selected, mail will not be sent even if the set- ting is made for mail to be sent whenever an error is registered. Setting Not selected (Default) Mail is not sent periodically.

  • Page 88: Cio Area Allocations

    CIO Area Allocations CIO Area Allocations Offset Unit Control Switch UDP Socket No. 1 Status UDP Socket No. 2 Status UDP Socket No. 3 Status UDP Socket No. 4 Status UDP Socket No. 5 Status UDP Socket No. 6 Status UDP Socket No.

  • Page 89

    CIO Area Allocations Unit Control Switches (CPU Unit to Ethernet Unit) 15 14 13 12 11 10 Switch (Not used.) Internode Test Start Switch Socket Force-close Switch Mail Send Switch 4 to 15 (Not used.) Status Manipulated User Executes internode test while ON. User Stops internode test.

  • Page 90

    CIO Area Allocations Status of UDP/TCP Sockets 1 to 8 (Ethernet Unit to CPU Unit) 15 14 13 12 11 10 n+1 to n+16 Flag Status Opening Flag Receiving Flag Sending Flag Closing Flag 4 to 13 (Not used.) Results Storage Error Flag TCP/UDP Open Flag Note The status of these flags can also be checked using the software switch set-...

  • Page 91

    The FTP status is also shown by the Ethernet Unit’s FTP indicator, as follows: Not lit: FTP server on standby. (FTP status: OFF) Lit: FTP server operating. (FTP status: ON) Section 4-3 Unit operation Reference Page 173 CS1W-ETN11: Always Page 42 CJ1W-ETN11: Always FTP status...

  • Page 92

    CIO Area Allocations Error Status (Ethernet Unit to CPU Unit) 15 14 13 12 11 10 n+18 Error (Not used.) Transceiver echo test error (CS1W-ETN01 only) (See note.) IP address setting error IP address table error IP router table error (Not used.) Routing table error Transceiver error (CS1W-...

  • Page 93

    CIO Area Allocations Note A transceiver is built into the CS1W-ETN11 and CJ1W-ETN11. If this bit turns Socket Service Request Switches 1 to 8 (CPU Unit to Ethernet Unit) Switch Status Manipulated UDP Open Request Switch TCP Passive Open Request Switch...

  • Page 94: Dm Area Allocations

    DM Area Allocations DM Area Allocations Offset Internode test remote network address and node number Internode test number of send bytes Internode test response monitoring time Internode test status Number of internode test runs Number of internode test timeout errors Number of internode test response errors Number of internode test send errors Number of times internode test data did not match...

  • Page 95

    DM Area Allocations Internode Test Response Monitoring Time (CPU Unit to Ethernet Unit) Internode Test Status (Ethernet Unit to CPU Unit) 15 14 13 12 11 10 Error code Note When a routing table error or a sent parameter error occurs, the number of Number of Internode Test Runs (Ethernet Unit to CPU Unit) Specify, in hexadecimal, the number of bytes of test data to be sent between nodes.

  • Page 96

    DM Area Allocations Note When a routing table error or a transmission parameter error occurs, the num- Number of Internode Test Timeout Errors (Ethernet Unit to CPU Unit) Number of Internode Test Response Errors (Ethernet Unit to CPU Unit) Number of Internode Test Transmission Errors (Ethernet Unit to CPU Unit) Number of Times Internode Test Data Did Not Match (Ethernet Unit to CPU Unit) TCP Socket No.

  • Page 97

    DM Area Allocations Mail Status (Ethernet Unit to CPU Unit) 15 14 13 12 11 10 m+17 Socket Services Parameter Area 1 to 8 (Ethernet Unit to CPU Unit) Offset Socket Socket No. 1 No. 8 m+18 m+88 m+19 m+89 m+20 m+90 m+21...

  • Page 98

    DM Area Allocations Note Choose the method used to set the local IP address as follows: Application Setting device Operation with the CX-Programmer CPU Unit Bus Sys- tem Setup set as desired (i.e., The default settings are not used.) Simple operation Programming Console (CX- (i.e., The CPU Unit Programmer can also be...

  • Page 100: Fins Communications

    This section provides information on communicating on Ethernet Systems and interconnected networks using FINS commands. The information provided in the section deals only with FINS communications in reference to Ethernet Units. FINS commands issued from a PC are sent via the SEND(090), RECV(098), and CMND(490) instructions programmed into the user ladder-diagram program.

  • Page 101: Overview Of Fins Communications

    The FINS communications service is a function for controlling operations such as sending and receiving data, changing modes, and so on, between nodes on OMRON factory automation networks. It provides the following features. • Communications instructions are executed in the user program.

  • Page 102

    • Units and Boards that support FINS commands return responses auto- matically, so there is no need for a program at the receiving end. • The FINS communications service is mainly used between OMRON CPU Bus Units, CPU Units, and Support Boards for FA Computers. By cor- rectly setting information such as headers, however, it can also be used from ordinary Ethernet communications devices.

  • Page 103: Procedure Before Using Fins Communications

    Procedure Before Using FINS Communications Procedure Before Using FINS Communications Start Determine the address conversion method for the destination IP address. Automatic Generation Automatically converted from FINS node number. Set the IP address (see note) so that the host number's least significant byte = the FINS node number.

  • Page 104: Sending Commands From A Pc

    Sending Commands From a PC Sending Commands From a PC 5-3-1 Communications Specifications Item Destination Data length SEND(090): RECV(098): CMND(490): Data contents The following data is sent and received with the execution of each instruction. SEND(090): RECV(098): CMND(490): Sends any FINS command and receives response data. Communications port num- Ports 0 to 7 (Eight transmissions can occur simultaneously.) Response monitor time...

  • Page 105

    Sending Commands From a PC Using SEND(090), RECV(098), and CMND(490) SEND(090) S: Local node beginning word D: Destination beginning word C: First word of control data (below) Number of words (n) 0001 to 03DE (Hex): 1 to 990 words Destination network number 00 (Hex): 01 to 7F (Hex): 1 to 127 Destination node number N...

  • Page 106

    Sending Commands From a PC RECV(098) S: Remote node beginning word D: Local beginning word C: First word of control data (below) Number of reception words (m) 0001 to 03DE (Hex): 1 to 990 words Destination network number 00 (Hex): 01 to 7F (Hex): 1 to 127 Remote node number M (send source) 00 to 7E (Hex);...

  • Page 107

    Sending Commands From a PC CMND(049) S: Beginning command storage word D: Beginning response storage word C: First word of control data (below) Number of bytes of command data (n) 0000 to 07C6 (Hex): 1 to 1,990 bytes Number of bytes of response data (m) 0000 to 07C6 (Hex): 1 to 1,990 bytes Destination network number 00 (Hex):...

  • Page 108

    Sending Commands From a PC Usage Command code I/O memory area access Parameter area access Program area access Operating mode changes Machine configura- tion reading Status reading Time data access Message display Access rights Error log Commands Addressed to CS/CJ-series CPU Units The following table provides a list of FINS commands that can be processed by a CS/CJ-series CPU Unit.

  • Page 109

    Sending Commands From a PC Usage Command code File memory Debugging Name FILE NAME READ SINGLE FILE READ SINGLE FILE WRITE FILE MEMORY FORMAT FILE DELETE FILE COPY FILE NAME CHANGE MEMORY AREA–FILE TRANSFER PARAMETER AREA–FILE TRANSFER Transfers or compares data between the PROGRAM AREA–FILE TRANSFER CREATE/DELETE DIRECTORY FORCED SET/RESET...

  • Page 110: Writing Programs

    Sending Commands From a PC Writing Programs Communications port Ethernet Unit There are eight communications ports, so up to eight communications instructions can be executed at a time. The number of messages that can be sent or received with a single CPU Bus Unit ser- vice, though, is not more than two each for the CPU Unit to the Ethernet Unit and for the Ethernet Unit to the CPU Unit.

  • Page 111

    Sending Commands From a PC Communications Flags Note With CS/CJ-series PCs, communications ports 0 to 7 are also used for exe- Communications Port Completion Codes The execution status of the SEND(090), RECV(098), and CMND(490) instruc- tions is always reflected by the communications flags (i.e., the Communica- tions Port Enabled Flag and the Communications Port Error Flag).

  • Page 112

    Sending Commands From a PC Timing of Communications Flag Changes Example Communications Port Enabled Flag Communications instruction: SEND(090), RECV(098), CMND(490) Communications Port Error Flag Communications Port Completion Code Communications Port Error Flag and Completion Codes CMND(490) Errors that occur when CMND(490) is used generate a Communications Port Error Flag and are recorded in a communications port completion code only in the following cases: •...

  • Page 113: Program Example

    Sending Commands From a PC 5-3-2 Program Example Execution condition (See note.) 000000 A20207 120002 120001 120000 (See note.) 120000 A20207 120000 A21907 (Continued on next page.) When the Communications Port Enabled Flag for port 7 KEEP is ON, and RECV(098) is not being executed, the send 120000 execution program will start when execution condition CIO 000000 turns ON.

  • Page 114: Transmission Delays

    Sending Commands From a PC (Continued from previous page.) Execution condition (See note.) 000001 A20207 120000 120003 120002 120002 A20207 (See note.) 120002 A21907 120003 A21907 120002 Note With CS/CJ-series PCs, the Communications Port Enabled Flags at bits 0 to 7 5-3-3 Transmission Delays KEEP...

  • Page 115

    Sending Commands From a PC SEND(090) CPU Bus Unit Service Cycle CPU Bus Unit Service Processing Time Transmission Processing Time Reception Processing Time CPU Data Set Processing Time Note Example Calculations The transmission delay for the SEND(090) instruction can be calculated using the following equation, which is illustrated in the following diagram.

  • Page 116

    Sending Commands From a PC RECV(098) RECV(098) executed in user program CPU Bus Unit service processing time (local node) Transmission processing time (com- mand) Reception processing time (command) Maximum transmission delay CPU Bus Unit Service Cycle CPU Bus Unit Service Processing Time Transmission and Reception Processing...

  • Page 117: Sending Commands From A Host Computer

    Sending Commands From a Host Computer Example Calculations Sending Commands From a Host Computer 5-4-1 Designating Remote Addresses Note The following example shows calculations for receiving 256 words between two PC nodes using RECV(098). The local node’s CPU cycle time is 10 ms, and the remote node’s CPU cycle time is 15 ms.

  • Page 118: Fins Frames

    Sending Commands From a Host Computer Example 1: Intranetwork Addressing Example 2: Internetwork Addressing Host computer IP address: 196.36.32.50 FINS network/node/unit: 1/50/0 hex) Ethernet 5-4-2 FINS Frames In this example, the host computer and the remote node (Ethernet Unit) are on the same network.

  • Page 119

    Sending Commands From a Host Computer FINS Command Frame Configuration FINS header FINS command FINS parameter/data FINS Response Frame Configuration FINS parameter/data field FINS Header Information Size (bytes) Contents Displays frame information Reserved by system. Permissible number of gateways Destination network address Destination node address Destination unit address Source network address...

  • Page 120: Sample Program

    Sending Commands From a Host Computer 5-4-3 Sample Program Operation Overview Settings Sample Program #include <errno.h> #include <stdio.h> #include <sys/types.h> #include <sys/socket.h> #include <netinet/in.h> #include <signal.h> #define FINS_UDP_PORT 9600 #define SERV_IP_ADDR ”196.36.32.100” #define MAX_MSG #define RESP_TIMEOUT 2 dress used for Ethernet. 00 (Hex): Local PC Unit 01 to 7E (Hex): Destination node number (1 to 126)

  • Page 121

    Sending Commands From a Host Computer FINS COMMUNICATIONS SAMPLE PROGRAM main(argc,argv) argc; char *argv[]; sockfd; struct sockaddr_in ws_addr,cs_addr; char fins_cmnd[MAX_MSG],fins_resp[MAX_MSG]; sendlen,recvlen,addrlen; char sid=0; extern recv_fail(); GENERATE UDP SOCKET if((sockfd=socket(AF_INET,SOCK_DGRAM,0))<<0) err_exit(”can’t open datagram socket”); ALLOCATE IP ADDRESS AND PORT # TO SOCKET bzero((char*)&ws_addr,sizeof(ws_addr));...

  • Page 122: Delays For Accessing Pc Memory

    Sending Commands From a Host Computer else{ err_exit(”send error”); RECEIVE FINS RESPONSE addrlen = sizeof(cs_addr); if((recvlen = recvfrom(sockfd,fins_resp,MAX_MSG,0,&cs_addr,&addrlen)) <0){ if(errno == EINTR) goto CMND_SEND; /* err_exit(”receive error”); else{ alarm(0); /* printf(”recv length %d¥n”,recvlen); if(recvlen<14) /* err_exit(”FINS length error”); if((fins_cmnd[3]!=fins_resp[6])||(fins_cmnd[4]!=fins_resp[7]) ||(fins_cmnd[5]!=fins_resp[8])){ / DESTINATION ADDRESS CHECK err_exit(”illegal source address error”);...

  • Page 123: Fins Server

    FINS Server Note Example FINS Server words read) + CPU cycle time + CPU data read processing time (Refer to page 96) 1. The transfer time may exceed the calculated value due to the actual oper- ating environment. Factors affecting the transfer time are network traffic, the window size of each node, Ethernet Unit traffic (e.g., socket services, FTP server communications, etc.), and the system configuration.

  • Page 124: Socket Services

    This section describes the functionality provided by the Ethernet Unit via the socket services. Overview ........... . . 6-1-1 Socket Service Functions .

  • Page 125: Overview

    Overview Overview 6-1-1 Socket Service Functions Note One of the main differences between using Socket Service Request Switches Using Socket Service Request Switches Note Using CMND(490) The socket services allow devices on the Ethernet to send and receive vari- ous data using the UDP or TCP protocol. The socket services can be used by CS/CJ-series PCs through the user program by manipulating dedicated bits (called Socket Service Request Switches) or by executing the CMND(490) instruction.

  • Page 126: Sockets

    Overview Specific Socket Service Functions 6-1-2 Sockets 6-1-3 Using Sockets with the Ethernet Unit 6-1-4 Socket Port Numbers The socket service functions listed in the following table can be executed either using Socket Service Request Switches or using CMND(490). Protocol Open UDP socket Receive via UDP socket Send via UDP socket...

  • Page 127: Differences Between Tcp And Udp

    Overview 6-1-5 Differences between TCP and UDP TCP Communications 1,2,3... Send request made. Local node UDP Communications Send request made. Local node quently, port numbers 1024 and above should be used for socket services. The Ethernet Unit does not support port #0. Some port numbers over 1024 may be reserved on some workstations (for example, the X-window server is port #6000).

  • Page 128: Opening Tcp Sockets

    Overview 6-1-6 Opening TCP Sockets Passive OPEN and Active OPEN Client socket Note TCP Communications Procedure To achieve highly reliable data communications, TCP establishes a virtual communications circuit between the two nodes before starting data transmis- sions. The virtual communications circuit is known as a “connection.” An open command is executed for a node to establish a connection.

  • Page 129: Fragmentation Of Send Data

    Overview Connection established Data receive request Next data receive request 6-1-7 Fragmentation of Send Data Cautions when Using TCP 1,2,3... Host computer (server) Passive open Connection requested Send data ACK (acknowledge) Data send request Send data ACK (acknowledge) Close The Ethernet Unit fragments data for TCP transmission into units of 1,024 bytes and data for UDP transmission into units of 1,472 bytes.

  • Page 130

    Overview Sending User Program 1. Send request 1,984 bytes Source data 2. Data separated Note If communications are with a different segment and data is sent via the TCP Cautions when Using UDP 1,2,3... Sending User Program 1. Send request 1,984bytes Source data Ethernet Unit...

  • Page 131: Maximum Transmission Delays

    Overview 6-1-8 Maximum Transmission Delays Note The delay times calculated here ignore delays that can occur on the Ethernet Note data request is set smaller than the actual length of the data, all received data exceeding the set data length will be discarded. The transmission delays for socket service is calculated as the sum of the communications processing times for both nodes.

  • Page 132: Precautions In Using Socket Services

    Overview 6-1-9 Precautions in Using Socket Services UDP and TCP Socket Services UDP Socket Service TCP Socket Service Item Remote send processing time Remote receive processing time Maximum transmission delay • If a short response monitor time is specified in CMND(490) control data and the Ethernet Unit is operating under a high load, a result may be stored even if the response code indicates a time-out.

  • Page 133: Using Socket Services With Socket Service Request Switches

    Using Socket Services with Socket Service Request Switches Precautions in Using Socket Service Request Switches Using Socket Services with Socket Service Request Switches • Data can remain in a buffer at the local node if the remote TCP socket closes during communications. Any data remaining in the buffer will be discarded when the TCP socket is closed.

  • Page 134

    Using Socket Services with Socket Service Request Switches CS/CJ-series PC CPU Unit Socket Service Request Switches (See note 1.) Socket Service Parameters (See note 2.) Note An illustration of using Socket Service Request Switches to execute socket services is provided below. Ethernet Unit TCP data transfers...

  • Page 135: Socket Service Parameters

    Using Socket Services with Socket Service Request Switches 6-2-1 Socket Service Parameters The Socket Service Parameter Areas in which parameters are set to request socket services is in the CPU Bus Unit Area in the DM Area of the CPU Unit. The Socket Service Parameter Areas are allocated as shown in the following diagrams.

  • Page 136: Parameter Settings

    Using Socket Services with Socket Service Request Switches Parameter Settings UDP Socket Services Parameter UDP/TCP socket No. Local UDP/TCP port No. Remote IP address Remote UDP/TCP port No. Number of bytes to send/receive Send/Receive data address Time out time Response code Note W: TCP Socket Services Parameter...

  • Page 137: Remote Ip Address

    Using Socket Services with Socket Service Request Switches Local UDP/TCP Port No. Remote IP Address Specify the number of the UDP or TCP port for the socket to use for communi- cations. • Do not specify the port being used as the FINS UDP port (default: 9600) in an open request for a UDP socket.

  • Page 138: Response Codes

    Using Socket Services with Socket Service Request Switches Remote UDP/TCP Port No. Time Out Time Number of Bytes to Send/Receive Send/Receive Data Address 6-2-2 Response Codes Specify the UDP or TCP port number used by the remote device. • This parameter is not used when making a receive request for a UDP socket.

  • Page 139

    Using Socket Services with Socket Service Request Switches UDP Socket Open Request UDP Socket Receive Request UDP Socket Send Request lowing response codes will be stored depending on the service that was requested. Response code 0000 Normal end 0105 Local IP address setting error. 0302 CPU Unit error;...

  • Page 140

    Using Socket Services with Socket Service Request Switches UDP Socket Close Request TCP Socket Passive Open Request Response code 110C Request Switch turned ON during other processing. 220F Specified socket is already processing a send request. 2210 The specified socket is not open. 2211 Unit is busy;...

  • Page 141

    Using Socket Services with Socket Service Request Switches Note These response codes will be returned only on large, multilevel networks. TCP Socket Active Open Request Response code 004B Error in communications with remote node (ECONNRESET). (See note.) 004E Remote IP address parameter error (ENETUNREACH). (See note.) 0051 Remote IP address parameter error (EHOSTUNREACH).

  • Page 142

    Using Socket Services with Socket Service Request Switches Note These response codes will be returned only on large, multilevel networks. TCP Socket Receive Request Note These response codes will be returned only on large, multilevel networks. TCP Socket Send Request Response code 0053...

  • Page 143: Socket Service Request Switches

    Using Socket Services with Socket Service Request Switches Note These response codes will be returned only on large, multilevel networks. TCP Socket Close Request 6-2-3 Socket Service Request Switches Response code 110C Request Switch turned ON during other processing. 220F Specified socket is already processing a send request.

  • Page 144

    Using Socket Services with Socket Service Request Switches Offset n+19 Socket Service Socket Service Request Switches 2 Request Switches 1 Socket Service Socket Service n+20 Request Switches 4 Request Switches 3 Socket Service Socket Service n+21 Request Switches 6 Request Switches 5 Socket Service Socket Service n+22...

  • Page 145

    Using Socket Services with Socket Service Request Switches Switch Status Manipulated UDP Open Request Switch TCP Passive Open Request Switch TCP Active Open Request Switch Send Request Switch Receive Request Switch Close Request Switch Note There is also a Socket Force-close Switch in bit 2 of the first word allocated to The configuration of each set of Socket Service Request Switches is shown in the following diagram.

  • Page 146: Udp/tcp Socket Status

    Using Socket Services with Socket Service Request Switches 6-2-4 UDP/TCP Socket Status Switch Status Manipulated Opening Flag Receiving Flag Sending Flag Closing Flag Socket Open Flag The status of the UDP and TCP sockets is provided in the Socket Status Words shown in the following diagram.

  • Page 147: Application Procedure

    Using Socket Services with Socket Service Request Switches Note The TCP socket connection status is also provided as codes in the following 6-2-5 Application Procedure Procedure 1,2,3... CPU Bus Unit Area in the CIO Area Socket Service Socket Service Request Switches 2 Request Switches 1 Socket Service Socket Service...

  • Page 148: Socket Services And Socket Status

    Using Socket Services with Socket Service Request Switches 15 14 13 12 11 10 – – – m+9 to m+16 6-2-6 Socket Services and Socket Status Precautions A Socket Service Parameter Area cannot be used for other sockets once open processing has been successfully completed for it. Check the socket status before attempting to open a socket.

  • Page 149: Timing Charts

    Using Socket Services with Socket Service Request Switches Program Flow Check Socket Open Flag. Is Bit 15 (Open Flag) in the socket status word for the socket being used OFF? (Checks to see if the socket is open before com- munications and close processing.) Turn ON UDP Open Request Switch.

  • Page 150

    Using Socket Services with Socket Service Request Switches Open, Send, or Receive Request Switch Close Request Switch Response Code Opening, Sending, or Receiving Flag Closing Flag Open Flag Note The Open Flag will not turn ON at all if a close request is made during open Open, Send, or Receive Request Switch Force-close Switch...

  • Page 151: Tcp/ip Communications Programming Example

    Using Socket Services with Socket Service Request Switches 6-2-8 TCP/IP Communications Programming Example System Configuration Data Flow Note Here, “execution bits” refer to CIO 000000 to CIO 000003, which are used in Basic Operations The following programming example illustrates transferring 100 bytes of data between an Ethernet Unit and a host computer using TCP/IP communica- tions.

  • Page 152

    Using Socket Services with Socket Service Request Switches Program Memory Map 15 to 8 CIO 0000 CIO 0001 CIO 0002 The send and receive data and bits (flags) used by the program are shown in the following diagram. DM Area Send data, 100 bytes (100 = 0064 Hex) Receive data, 100 bytes (100 = 0064 Hex) CIO Area...

  • Page 153

    Using Socket Services with Socket Service Request Switches Programming Example 000000 000000 000200 000000 000200 000000 000200 151901 <>(305) 000000 000200 151901 000001 000001 000201 000001 000201 Continued on next page. TCP Passive Open @RSET When the TCP Open Bit (CIO 000000) turns ON, the TCP 000100 Open Error Flag (CIO 000100) is turned OFF and the TCP Opening Flag (CIO 000200) is turned ON to initialize pro-...

  • Page 154

    Using Socket Services with Socket Service Request Switches Continued from previous page. 000001 000201 151905 <>(305) 000001 000201 151905 000002 000002 000202 000002 000202 000002 000202 151903 <>(305) 000002 000202 151903 000003 Continued on next page. TCP Send When the TCP Send Bit (CIO 000002) turns ON, the TCP 000101 Send Error Flag (CIO 000102) is turned OFF and the TCP D30027...

  • Page 155: Udp/ip Communications Programming Example

    Using Socket Services with Socket Service Request Switches Continued from previous page. 000003 000203 000003 000203 000203 151904 000003 <>(305) 000003 000203 151904 Note When using the above programming example, change the bit and word 6-2-9 UDP/IP Communications Programming Example System Configuration When the TCP Receiving Flag (CIO 000203) turns ON, MOV(21)

  • Page 156

    Using Socket Services with Socket Service Request Switches Basic Operations Program Memory Map 15 to 8 CIO 0000 CIO 0001 CIO 0002 • CIO 000000 is turned ON to request opening a UDP socket from the Ethernet Unit. • CIO 000001 is turned ON to request closing the UDP socket from the Ethernet Unit.

  • Page 157

    Using Socket Services with Socket Service Request Switches Programming Example 000000 000000 000200 000000 000200 000000 000200 151900 <>(305) 000000 000200 151900 000001 000001 000201 000001 000201 000001 000201 151905 <>(305) 000001 000201 151905 000002 Continued on next page. UDP Open @RSET When the UDP Open Bit (CIO 000000) turns ON, the UDP 000100...

  • Page 158

    Using Socket Services with Socket Service Request Switches Continued from previous page. 000002 000202 000002 000202 000002 000202 151903 <>(305) 000002 000202 151903 000003 Continued on next page. MOV(21) When the UDP Sending Flag (CIO 000202) turns ON, the #0001 following parameters are written to the parameter area for socket number 1.

  • Page 159

    Using Socket Services with Socket Service Request Switches Continued from previous page. 000003 000203 000003 000203 000003 000203 151904 <>(305) 000003 000203 151904 Note When using the above programming example, change the bit and word When the UDP Receiving Flag (CIO 000203) turns ON, MOV(21) the following parameters are written to the parameter area #0001...

  • Page 160: Using Socket Services With Cmnd(490)

    Using Socket Services with CMND(490) Using Socket Services with CMND(490) Basic FINS Command Format Command Socket code number Service request commands can be sent to the Ethernet Unit by executing the CMND(490) instruction in the ladder diagram. CS/CJ Ethernet Units support the same functionality as the CV-series Ethernet Unit, so heritage programs can be easily corrected and reused.

  • Page 161: Udp/tcp Socket Status

    Using Socket Services with CMND(490) Note If there is more than one Communications Unit mounted to the PC, the FINS 6-3-1 UDP/TCP Socket Status Flag Status Manipulated Opening Flag Receiving Flag Sending Flag Closing Flag network address must be set as a parameter for CMND(490) and a local net- work table must be created in the routing tables from the CX-Programmer.

  • Page 162

    Using Socket Services with CMND(490) Flag Status Manipulated Results Storage Error Flag Socket Open Flag Note The TCP socket connection status is also provided as codes in the following Response Codes in the Command Response Response Codes in the Results Storage Areas Using Socket Service Unit Turns ON when there is an error in the Results Storage Area speci-...

  • Page 163

    Using Socket Services with CMND(490) 1,2,3... 1. Execute a socket service request command (MRC: 27) for the Ethernet Unit using CMND(490). User program CMND 2. CMND(490) ends normally when the socket service request command is received and a response is returned (response code: 0000). User program CMND 3.

  • Page 164: Socket Services And Socket Status

    Using Socket Services with CMND(490) 6-3-2 Socket Services and Socket Status Program Flow Check socket status. Is Bit 15 (Open Flag) in the socket status word for the socket being used OFF? (Checks to see if the socket is open before com- munications and close processing.) Check the Port Enabled Flag.

  • Page 165: Communications Timing Chart

    Using Socket Services with CMND(490) 6-3-3 Communications Timing Chart Port Enabled Flag Opening Flag Receiving Flag Sending Flag Closing Flag Open Flag Open request received 6-3-4 Socket Service Timing Chart OPEN REQUEST Port Enabled Flag CMND(490) response code Open Flag Opening Flag Results storage area OPEN REQUEST...

  • Page 166

    Using Socket Services with CMND(490) SEND REQUEST Port Enabled Flag CMND(490) response code Send Flag Opening Flag Results storage area SEND REQUEST command received RECEIVE REQUEST Port Enabled Flag CMND(490) response code Receive Flag Opening Flag Results storage area RECEIVE REQUEST command received CLOSE REQUEST during RECEIVE REQUEST RECEIVE REQUEST command received CLOSE REQUEST command received...

  • Page 167: Tcp/ip Communications Programming Example

    Using Socket Services with CMND(490) 6-3-5 TCP/IP Communications Programming Example System Configuration Data Flow Host computer Processing in host computer Note Here, “execution bits” refer to CIO 000000 to CIO 000003, which are used in Basic Operations shown in the diagram also applies if a CLOSE REQUEST command is exe- cuted during OPEN REQUEST command execution, with the exception of the status of the Opening Flag.

  • Page 168

    Using Socket Services with CMND(490) Program Memory Maps Legend DM Area D00000 CMND(490) control data for TCP PASSIVE OPEN REQUEST 0012H 0004H 0001H 0110H 0000H 0032H D00010 CMND(490) control data for TCP CLOSE REQUEST 0008H 0004H 0001H 0110H 0000H 0032H •...

  • Page 169

    Using Socket Services with CMND(490) CMND(490) control data for TCP SEND REQUEST D00020 006EH 0004H 0001H 0110H 0000H 0032H Command format = 10 bytes + 100 bytes send data CMND(490) control data for TCP RECEIVE REQUEST D00030 000CH 0004H 0001H 0110H 0000H 0032H TCP PASSIVE OPEN REQUEST command data D01000 2710H 0001H 8203H FC00H 1000H 0000H...

  • Page 170

    Using Socket Services with CMND(490) TCP CLOSE REQUEST response D01040 sponse 2714H code TCP CLOSE REQUEST results storage area D01050 sponse code D02000 TCP SEND REQUEST command data 2713H 0001H 820BH C200H TCP SEND REQUEST response D03000 sponse 2713H code TCP SEND REQUEST results storage area D03010 No.

  • Page 171

    Using Socket Services with CMND(490) CIO Area 15 to 8 CIO 0000 CIO 0001 CIO 0002 The following bits and flags are used to control CMND(490) execution. The bits in CIO 0000 are used to signal execution, the bits in CIO 0001 are used to signal errors, and the bits in CIO 0002 are used to control the program so that the instruction is executed only once.

  • Page 172

    Using Socket Services with CMND(490) Programming Example 000000 000000 000200 A20200 000000 000200 A20200 150900 150914 A021900 000000 000200 A20200 150900 000001 000001 000201 A20200 000001 000201 A20200 150903 150914 <>(305) A021900 000001 000201 A20200 150903 Continued on next page. @RSET TCP Passive Open When the TCP Open Bit (CIO 000000) turns ON, the TCP...

  • Page 173

    Using Socket Services with CMND(490) Continued from previous page. 000002 000002 000202 A020200 000002 000202 A20200 150902 150914 <>(305) A021900 000002 000202 A20200 150902 000003 000003 000203 A020200 000003 000203 A020200 150901 150914 <>(305) A021900 000003 000203 A20200 150901 TCP Send @RSET When the TCP Send Bit (CIO 000002) turns ON, the 000102...

  • Page 174: Udp/ip Communications Programming Example

    Using Socket Services with CMND(490) Note When using the above programming example, change the bit and word 6-3-6 UDP/IP Communications Programming Example System Configuration Basic Operations addresses as necessary to avoid using the same areas used by other parts of the user program or the CPU Bus Unit.

  • Page 175

    Using Socket Services with CMND(490) Program Memory Maps DM Area D00000 CMND(490) control data for UDP OPEN REQUEST 000AH 0004H 0001H 0110H 0000H 0032H D00010 CMND(490) control data for UDP CLOSE REQUEST 0008H 0004H 0001H 0110H 0000H 0032H CMND(490) control data for UDP SEND REQUEST D00020 0074H 0004H 0001H 0110H 0000H 0032H CMND(490) control data for UDP RECEIVE REQUEST...

  • Page 176

    Using Socket Services with CMND(490) UDP OPEN response D01010 2701H Stores the response after command execution. UDP OPEN REQUEST results storage area D01020 sponse code UDP CLOSE REQUEST command data D1030 2704H 0001H 8204H 1A00H UDP CLOSE REQUEST response D01040 2704H UDP CLOSE REQUEST results storage area D01050...

  • Page 177

    Using Socket Services with CMND(490) UDP SEND REQUEST response D03000 2703H UDP SEND REQUEST results storage area D03010 sponse code D04000 UDP RECEIVE REQUEST command data 2702H 0001H 820FH B400H UDP RECEIVE REQUEST response D04010 2702H UDP RECEIVE REQUEST results storage area D04020 sponse code...

  • Page 178

    Using Socket Services with CMND(490) Programming Example 000000 000000 000200 A20200 000000 000200 A020200 150100 150114 <>(305) A021900 000000 000200 A020200 150100 000001 000001 000201 A20200 000001 000201 A020200 150103 150114 <>(305) A021900 000001 000201 A020200 150103 Continued on next page. @RSET UDP Open When the UDP Open Bit (CIO 000000) turns ON, the...

  • Page 179

    Using Socket Services with CMND(490) Continued from previous page. 000002 000002 000202 A020200 000002 000202 A20200 150102 150114 <>(305) A021900 000002 000202 A020200 150102 000003 000003 000203 A020200 000003 000203 A020200 150101 150114 <>(305) A021900 000003 000203 A020200 150101 UDP Send @RSET When the UDP Send Bit (CIO 000002) turns ON, the UDP 000102...

  • Page 180

    Using Socket Services with CMND(490) Section 6-3 Note When using the above programming example, change the bit and word addresses as necessary to avoid using the same areas used by other parts of the user program or the CPU Bus Unit.

  • Page 182: Ftp Server

    This section describes the functions provided by the FTP server. Overview ........... . . Setting Login Names and Passwords .

  • Page 183: Overview

    Overview Overview Note The PC, however, is unable to read or write files at other nodes using FTP File System Note Connecting to the FTP Server Login Messages Status Normal 220 xxx.xx.xx.xx yyyyyyyyyy FTP server (FTP Version z.zz) ready. connection xxx.xx.xx.xx: IP address of Ethernet Unit yyyyyyyyyy: Ethernet Unit model number (CS1W-ETN01) z.zz: Firmware version of Ethernet Unit...

  • Page 184: Setting Login Names And Passwords

    Setting Login Names and Passwords Setting Login Names and Passwords Setting Restrictions Setting Method Note The CPU Bus Unit Setup is not contained in I/O memory, but in a parameter Using File Memory File Memory Media Memory type CS/CJ- Flash memory 8 MB series 15 MB Memory...

  • Page 185: File Types

    Using File Memory Note The HMC-AP001 PC Card Adapter can be used to mount a Memory Card in a File Types File Names Directories PC card slot on a computer. The MS-DOS file format is used, allowing the files to be handled as normal files on a Windows-based computer.

  • Page 186: Initializing File Memory

    Using File Memory File Names Handled by CPU Unit File type File name Data file ******** Program file ******** Parameter area file ******** Files Data files AUTOEXEC .IOM trans- ferred at startup Program AUTOEXEC .OBJ files Parameter AUTOEXEC .STD area file Note Initializing File Memory The files described in the following table can be read or written by the CPU...

  • Page 187

    Using File Memory Data File Format Reserved (48 bytes) Writing Data Files via FTP C: Control word #0000 = Read data from Memory Card S1: First source word D: First destination word Reserved (48 bytes) Note The format of data files (files with .IOM extensions) is shown in the following diagram.

  • Page 188: Ftp Server Application Example

    FTP Server Application Example FTP Server Application Example Note The login name and a password must be set in the CPU Bus Setup for the 1,2,3... root MEMCARD DEF.IOM (file) Note The following procedure shows how to use the FTP server by connection with the default login name, CONFIDENTIAL.

  • Page 189: Using Ftp Commands

    Using FTP Commands Using FTP Commands 7-5-1 Table of Commands 2. The FTP server can handle only one command at a time. 3. Do not simultaneously write a file with the same name to the same file de- vice in a CPU Unit from more than one Ethernet Unit or ladder diagram program.

  • Page 190: Using The Commands

    Using FTP Commands 7-5-2 Using the Commands open Format Function user Format Function Format Function Example Format Function Example rename Format Function mkdir Format Function open [IP_address or host_name_of_FTP_server] Connects the FTP server. Normally when the FTP client is booted, the FTP server IP address is specified to execute this command automatically.

  • Page 191

    Using FTP Commands rmdir Format Function Format Function Format Function cdup Format Function type Format Function Format Function mget Format An error will occur if a file or directory of the same name already exists in the working directory. rmdir DIRECTORY_NAME Deletes the directory of the specified name from the remote host (Memory Card or EM File Memory).

  • Page 192

    Using FTP Commands Function Format Function mput Format Function delete Format Function mdelete Format Function close Format Function Format Function quit Format Function Allows the use of a wildcard character (*) to transfer multiple remote files from the Memory Card or EM File Memory to the local host. put file_name [DESTINATION_FILE_NAME] Transfers the specified local file to the remote host (Memory Card or EM File Memory).

  • Page 193: Error Messages And Ftp Status

    Using FTP Commands 7-5-3 Error Messages and FTP Status Error Messages Message PPP is a directory. PPP is not a directory. Another unit has access authority (FINS error 0 x 3001) Bad sequence of commands. Can’t create data socket (X.X.X.X, YY) Cannot access a device (FINS error 0 x 250F).

  • Page 194: Checking Ftp Status

    Using FTP Commands Checking FTP Status Note FTP Status Flag 15 14 13 12 11 10 n+17 Power status (CS1W-ETN01 only) Note The FTP status can also be checked using the software switch settings on the FTP Indicator FTP File Transfer Time File system CPU Unit status Operating mode...

  • Page 195: Unix Application Example

    UNIX Application Example UNIX Application Example 1,2,3... FTP started. Used to check for Memory Card. 2. If the peripheral servicing time setting in the PC Setup is increased, FTP files will be transferred faster. The following procedure provides an example of FTP operations from a UNIX workstation.

  • Page 196

    UNIX Application Example Section 7-6 4. Change to the MEMCARD directory. Change to MEMCARD directory. 5. Change data type to binary. Binary data type set. 6. Transfer the file RESULT.IOM to the workstation. File read. 7. Write the file PLAN.IOM to the Memory Card. File written 8.

  • Page 198: Mail

    This section explains the Ethernet Unit’s mail function. Overview of Mail Function ........8-1-1 Mail Contents .

  • Page 199: Overview Of Mail Function

    Overview of Mail Function Overview of Mail Function Note A mail server is required in order to use the mail function. Mail server settings The mail function can be used to send user-created information, error log information, and status information as e-mail to an address set in the CPU Bus Unit System Setup.

  • Page 200: Mail Contents

    Body Header Ethernet Unit Information The following header information is attached. • Subject: OMRON Ethernet Unit Mail Service • Content-Type: text/plain;charset=US-ASCII • Content-Transfer-Encoding: 7 bit The following Ethernet Unit information is always attached to the mail. • Model Section 8-1...

  • Page 201: Mail Triggers

    Overview of Mail Function Optional Information Item User-created information User-created information is data set by the user, in ASCII, in the CPU Unit’s memory. A maxi- mum of 1,024 bytes of data is sent from the user-created information address set in the CPU Bus Unit Area.

  • Page 202: Mail Status

    Overview of Mail Function Triggered by Error Log Recording Note If several errors in a row are recorded in the error log, the notification of these Triggered at Regular Intervals Note After the mail processing has been completed, the next e-mail will be sent 8-1-4 Mail Status Note 0: OFF;...

  • Page 203: Sending Mail

    Sending Mail Sending Mail 1,2,3... Mail Example 1,2,3... The procedure for sending mail is as follows: 1. Make the following settings in the CPU Bus Unit System Setup. • Mail send information • Mail timing • User-created mail data address •...

  • Page 204

    Mail Example Note 0: OFF; 1: ON 2. Turn ON the Mail Send Switch in the CIO Area words allocated to the CPU Bus Unit. n = CIO 1500 + 25 x unit number) For Unit #5, for example, the Mail Send Switch address is CIO 162503. The status, such as mail being processed, and so on, is reflected in the User Mail Status Area in the DM Area words allocated to the CPU Bus Unit.

  • Page 206: Testing Communications

    This section describes functions that allow you to test communications. Communications Testing Functions ....... . PING Command .

  • Page 207: Communications Testing Functions

    Communications Testing Functions Communications Testing Functions PING Command Internode Testing PING Command 9-2-1 Ethernet Unit 9-2-2 Host Computer The Ethernet Unit provides two functions that allow communications with other node to be tested. The PING command is a common way to perform echoback tests on Ethernet networks.

  • Page 208: Internode Test

    Internode Test Method Note The PING command is not supported by some host computers. Application Examples Normal Execution Abnormal Execution Internode Test 9-3-1 Running the Test Input the following at the host computer prompt ($): ping IP_address(host_name) The destination is specified by its IP address or host name. If the host name is used, the host name must be defined in file /etc/hosts.

  • Page 209

    Internode Test Test Procedure 1,2,3... Note Setting the Test Parameters Configuration of the Software Switches Setting Range Note 1. Write the test parameters into PC memory. The test parameters are de- scribed following this procedure. 2. Turn ON the Internode Test Start Switch allocated to the Ethernet Unit in the CPU Bus Unit Area.

  • Page 210

    Internode Test Starting and Stopping the Internode Test 9-3-2 Checking Results Test Status Error code Error Code Bit 01 of the first word in the words allocated to the Ethernet Unit in the CPU Bus Unit Area is used as the Internode Test Start Switch. Turn ON bit 01 to start the internode test and turn bit 01 OFF to stop the internode test.

  • Page 211

    Internode Test Note The internode test does not count errors when a routing table error or send Error Flags Number of Test Runs and Errors Note Data not matched Routing table error (See note.) Send parameter error (See note.) parameter error has occurred. The bits corresponding to errors are turned ON if errors occur.

  • Page 212

    This section describes information and procedures that can be used to troubleshoot problems that sometimes occur with Ethernet Unit and Ethernet communications. The Ethernet Unit makes up part of a network. Repair a defective Ethernet Unit as soon as possible as it can have a negative effect on the entire network.

  • Page 213: Troubleshooting With Indicators

    Troubleshooting with Indicators 10-1 Troubleshooting with Indicators Not lit Not lit Not lit Power is not being supplied to the CPU Unit or the power supply voltage is too low. The Ethernet Unit is faulty. The CPU Unit or Backplane is faulty. The mounting screws on the Ethernet Unit are loose (CS Series) or the sliders are not properly locked into place (CJ Series).

  • Page 214

    Troubleshooting with Indicators Flashing The IP address is set incorrectly on the rotary switches on the back of the Unit. (CJ Series only) The node number set on the rotary switch on the front of the Unit does not agree with the host ID in the IP address.

  • Page 215: Error Status

    Error Status 10-2 Error Status 15 14 13 12 11 10 Name Transceiver echo test error (CS1W-ETN01 only) IP address setting error IP address table error IP router table error Routing table error CS1W-ETN01: Transceiver error CS1W-ETN11 and CJ1W- ETN11: Cable error Address mismatch EEPROM error 10-3 Error Log...

  • Page 216: Error Log Error Codes

    Error Log Error Codes Error Log Table Error Log Location FINS Commands for Error Logs 10-4 Error Log Error Codes Error Meaning code 0001 Watchdog timer error in CPU Unit 00 0002 CPU Unit service monitor error 0006 Other CPU error 000F CPU Unit initialization error 0010...

  • Page 217

    Error Log Error Codes Error Meaning code 0103 Resend count exceeded (send failed) 0105 Node address setting error (send failed) 0107 Remote node not in network (send failed) 0108 No Unit with specified unit address (send failed) 010B CPU Unit error (send failed) 010D Destination address not in routing tables (send failed)

  • Page 218: Troubleshooting Procedures

    Troubleshooting Procedures Error Meaning code 0300 Parameter error; packet discarded Commands 0601 CPU Bus Unit error 0602 CPU Bus Unit memory error Note 10-5 Troubleshooting Procedures 10-5-1 Startup Problems 1,2,3... Detailed error code 1st byte 2nd byte Bit 15: Bits 08 to 14: SNA Bits 00 to 07: SA1 Responses Bit 15:...

  • Page 219: Fins Communications Problems

    Troubleshooting Procedures 10-5-2 FINS Communications Problems (SEND(090)/RECV(098)/ CMND(490)) 1,2,3... True ➨ Make sure that Unit is firmly mounted and tighten the mounting screws firmly or lock the sliders into place. 6. Do the RUN and ERH indicators not light if another CPU Unit is mounted to the Rack? True ➨...

  • Page 220: (send(090)/recv(098)/cmnd(490))

    Troubleshooting Procedures 10-5-3 UDP Socket Problems General Problems 1,2,3... 3. Is a CMND(194) instruction being addressed to the local node, e.g. for socket services? True ➨ Go to 10-5-6 Network Connection Problems on page 203. 4. Are different UDP port numbers set for FINS communications for both the local node and the remote node? True ➨...

  • Page 221

    Troubleshooting Procedures Opening and Closing Problems Reception Problems 1,2,3... Transmission Problems 1,2,3... Refer to General Problems on page 199. 1. Is reception processing finishing? True ➨ Step 10. 2. Is the remote node not processing to send data? True ➨ Adjust the remote node to process send data. 3.

  • Page 222: Tcp Socket Problems

    Troubleshooting Procedures 10-5-4 TCP Socket Problems General Problems 1,2,3... Opening Problems 1,2,3... Closing Problems Reception Problems 1,2,3... Most of the initial steps in these procedures are in question form. Continue in sequence until a “True” answer tells you to jump to a specified step or until you are told to perform a specific action that corrects the problem.

  • Page 223: Ftp Service Problems

    Troubleshooting Procedures Transmission Problems 1,2,3... 10-5-5 FTP Service Problems Connection Problems 1,2,3... True ➨ Adjust the remote node to process send data. 3. Read memory status using the FINS command READ MEMORY STATUS. 4. Is the network memory being used more than 80%? True ➨...

  • Page 224: Network Connection Problems

    1. Go through the procedure in 10-5-1 Startup Problems before starting this procedure. 2. Go to step 6. for the CS1W-ETN11 or CJ1W-ETN11. 3. Is the P/S indicator lit? True ➨ Step 6. 4. Is a 24-VDC power supply connected?

  • Page 225

    Troubleshooting Procedures True ➨ Replace the following items in order to remove the faulty part: Power supply cable, Power Supply Unit, Ethernet Unit. 5. Connect a 24-VDC power supply. 6. Is the power supply indicator lit on the transceiver? True ➨ Step 9. 7.

  • Page 226: Mail Problems

    Troubleshooting Procedures 10-5-7 Mail Problems 1,2,3... Most of the initial steps in these procedures are in question form. Continue in sequence until a “True” answer tells you to jump to a specified step or until you are told to perform a specific action that corrects the problem. If performing the action does not correct the problem, return to the beginning of the proce- dure and start over.

  • Page 227

    Troubleshooting Procedures error log information, or status data is not set in the send informa- tion). 11. Is the send status for recurring mail “0”? True ➨ If sending recurring mail is not set in the Setup, make the proper settings.

  • Page 228: Troubleshooting With Response Codes

    Troubleshooting with Response Codes 10-6 Troubleshooting with Response Codes 15 14 13 12 11 10 1: Relay Error Flag Main code Sub- code 00: Normal com- pletion 01: Local node Send error in local node was caused by error lack of available space in internal buffers. The network cannot be accessed because the IP address setting is not correct.

  • Page 229

    Troubleshooting with Response Codes Main code Sub- code 02: Remote node IP address of remote node not set cor- error rectly in IP address table or IP router table. No node with the specified unit address. Message packet was corrupted by trans- mission error.

  • Page 230

    Troubleshooting with Response Codes Main code Sub- code 11: Parameter The parameters in the command data are error incorrect. The UDP/TCP socket number was not within the proper range. The local UDP port number might be set to A correct memory area code has not been used or EM Area is not available.

  • Page 231: Results Storage Area Response Codes

    Results Storage Area Response Codes 10-7 Results Storage Area Response Codes Response UNIX error code message 0003 ESRCH No such process 0006 ENXIO No such device or address 0009 EBADF Bad file number (incorrect socket specification) 000D EACCES Permission denied (Broadcast address specified for remote IP address for active TCP open)

  • Page 232

    Results Storage Area Response Codes Response UNIX error code message 0043 EDESTADDRREQ Destination address required (desti- nation address not specified) 0044 ENOPROTOOPT Protocol not available (unsupported option specified) 0045 ECONNABORTED Software caused connection abort (another task closed socket) 0046 EINPROGRESS Operation now in progress (non- block connection ended during pro- cessing)

  • Page 234: Fins Commands Addressed To Ethernet Units

    FINS Commands Addressed to Ethernet Units This section describes the FINS commands that can be sent to an Ethernet Unit and the responses that are returned by the Ethernet Unit. 11-1 Command Codes and Response Codes ......11-1-1 Command Code List .

  • Page 235: Command Codes And Response Codes

    Command Codes and Response Codes 11-1 Command Codes and Response Codes 11-1-1 Command Code List 11-1-2 Response Code List The command codes listed in the following table can be sent to an Ethernet Unit. Command code RESET CONTROLLER DATA READ CONTROLLER STATUS READ INTERNODE ECHO TEST BROADCAST TEST RESULTS READ...

  • Page 236: Socket Applications

    Socket Applications 11-2 Socket Applications 11-2-1 Format Command Socket code number Command Code Socket Number Results Storage Area Parameters The MRES codes are shown in the following table along with the results they indicate. Refer to 10-6 Troubleshooting with Response Codes for details on response codes including the SRES.

  • Page 237: Pc Memory Areas

    Socket Applications 11-2-2 PC Memory Areas The memory areas of the PC that can be specified for results storage when executing commands from the PC are listed in the table below. The Variable type is set in the first byte of the results storage area. The remaining three bytes contain the address for communications.

  • Page 238: Command/response Reference

    Command/Response Reference 11-3 Command/Response Reference Note Except for special cases, all send/receive data is in hexadecimal format. 11-3-1 RESET Command Block Response Block Precautions Response Codes This section describes the FINS commands that can be sent to Ethernet Units and the responses to each command. The command, response, and (where applicable) the results storage blocks are given with the commands in graphic form as shown in the following dia- gram.

  • Page 239: Controller Data Read

    Response Codes 20 bytes 4 bytes 4 bytes Version IP address Subnet mask Example Model: CS1W-ETN01, CS1W-ETN11, CJ1W-ETN11 Version: V1.00 Bit 15 Others all 0 IP address table Both methods (IP address table + automatic generation) Response code 0000 Normal...

  • Page 240: Controller Status Read

    Transceiver Echo Test Error (CS1W-ETN01 only) An error occurred during the self diagnostic testing after the Unit was turned on or reset. Note If this bit turns ON for the CS1W-ETN11 or CJ1W-ETN11, the Ether- net Unit has malfunctioned. IP Address Error All bits for the network number or host number are set to 0 or 1.

  • Page 241: Internode Echo Test

    Precautions The test destination node is the destination node specified in the CMND(194) instruction operands. Note If this bit turns ON for the CS1W-ETN11 or CJ1W-ETN11, the Ether- net Unit has malfunctioned. Response code 0000...

  • Page 242: Broadcast Test Results Read

    Command/Response Reference Response Codes 11-3-5 BROADCAST TEST RESULTS READ Command Block Response Block Parameters Times Received (Response) Response Codes 11-3-6 BROADCAST DATA SEND Command Block Parameters Test Data (Command) Precautions 11-3-7 ERROR LOG READ Always specify the unit address of the Ethernet Unit in the CMND(194) instruction.

  • Page 243

    Command/Response Reference Command Block Response Block Command code Parameters Beginning Record Number (Command) Number of Records (Command, Response) Maximum Number of Stored Records (Response) Number of Stored Records (Response) Error Log Data (Response) Precautions Command Beginning Number code record number records Response Maximum...

  • Page 244: Error Log Clear

    Command/Response Reference Response Codes 11-3-8 ERROR LOG CLEAR Command Block Response Block Response Codes 11-3-9 UDP OPEN REQUEST Command Block Response Block Results Storage Format Parameters UDP Socket Number (Command) Results Storage Area (Command) Local UDP Port Number (Command) Response code 0000 Normal 1001...

  • Page 245: Udp Receive Request

    Command/Response Reference Response Codes Results Storage Area Response Codes 11-3-10 UDP RECEIVE REQUEST Command Block Response Block Results Storage Format Parameters UDP Socket Number (Command) Results Storage Area (Command) the socket specified in the UDP socket number, and send packets are distrib- uted from the UDP socket to this port.

  • Page 246: Udp Send Request

    Command/Response Reference Number of Reception Bytes (Command, Results Storage Area) Timeout Value (Command) Source IP Address (Results Storage Area) Source UDP Port Number (Results Storage Area) Received Data (Results Storage Area) Precautions Response Codes Results Storage Area Response Codes 11-3-11 UDP SEND REQUEST The maximum number of bytes of data to be received is given in the com- mand.

  • Page 247

    Command/Response Reference Command Block Command Results storage area code socket number Response Block Results Storage Format Parameters UDP Socket Number The UDP socket number to send the data specified as 2 bytes between 1 and (Command) Results Storage Area The area in which the result of the command execution is stored. The first byte (Command) specifies the memory area and data type (variable type).

  • Page 248: Udp Close Request

    Command/Response Reference Results Storage Area Response Codes 11-3-12 UDP CLOSE REQUEST Command Block Response Block Results Storage Format Parameters UDP Socket Number (Command) Results Storage Area (Command) Response Codes Response code 0000 Normal 003E Internal buffer cannot be reserved due to high reception load (ENOBUFS).

  • Page 249: Passive Tcp Open Request

    Command/Response Reference Results Storage Area Response Codes 0000 11-3-13 PASSIVE TCP OPEN REQUEST Requests processing to open a TCP socket. The socket will wait to be con- nected to another node. Command Block Command Results storage area code socket number Response Block Results Storage Format...

  • Page 250

    Command/Response Reference Remote Port Number (Command, Results Storage Area) Precautions Specify the remote TCP port number with this command. If all zeroes are set, no remote TCP port number is specified. If any other value is set, it specifies the TCP port number of the remote node. The TCP port number of the con- nected remote node will be stored in the results storage area.

  • Page 251

    Command/Response Reference Response Codes Results Storage Area Response Codes Note These errors occur only in large multilayered networks. Response code 0000 Normal 0105 Local IP address setting error 0302 CPU Unit error; execution not possible. 1001 Command too large 1002 Command too small 1100 TCP socket number is out of range.

  • Page 252: Active Tcp Open Request

    Command/Response Reference 11-3-14 ACTIVE TCP OPEN REQUEST Command Block Command code socket number Response Block Results Storage Format Parameters TCP Socket Number (Command) Results Storage Area (Command) Local TCP Port Number (Command, Results Storage Area) Remote IP Address (Command) Remote Port Number (Command) Response Codes Requests processing to open a TCP socket.

  • Page 253: Tcp Receive Request

    Command/Response Reference Results Storage Area Response Codes Note These errors occur only in large multilayered networks. 11-3-15 TCP RECEIVE REQUEST Requests that data be sent from a TCP socket. Command Block Command code Response Block Command code Results Storage Format Parameters TCP Socket Number The TCP socket number to receive data specified as 2 bytes between 1 and 8.

  • Page 254

    Command/Response Reference Number of Reception Bytes (Command, Results Storage Area) Timeout Value (Command) Received Data (Results Storage Area) Response Codes Results Storage Area Response Codes Note These errors occur only in large multilayered networks. page 216 for details about the variable types and addresses that can be spec- ified.

  • Page 255: Tcp Send Request

    Command/Response Reference 11-3-16 TCP SEND REQUEST Requests that data be received at a TCP socket. Command Block Response Block Command code Results Storage Format Response code Parameters TCP Socket Number The TCP socket number to send the data specified as 1 byte between 1 and (Command) Results Storage Area The area in which the results of the command execution are stored.

  • Page 256: Tcp Close Request

    Command/Response Reference Note These errors occur only in large multilayered networks. 11-3-17 TCP CLOSE REQUEST Command Block Response Block Results Storage Format Parameters TCP Socket Number (Command) Results Storage Area (Command) Precautions Response code 003E Internal buffer cannot be reserved due to high receive load (ENOBUFS).

  • Page 257: Ping

    Command/Response Reference Response Codes Results Storage Area Response Codes 11-3-18 PING Equivalent processing to the UNIX computer ping command (see below). Command Block Command code Response Block Parameters Destination IP Address The IP address (in hexadecimal) of the destination node for the PING com- (Command) mand echo request packet.

  • Page 258: Ip Address Table Write

    Command/Response Reference 11-3-19 IP ADDRESS TABLE WRITE Command Block Response Block Parameters Number of Records (Command) IP Address Table Records (Command) Precautions Response Codes Writes the IP address table. 6 bytes Command Number of IP address code records table records Command Response code...

  • Page 259: Ip Address Write

    Command/Response Reference 11-3-20 IP ADDRESS WRITE Write the local IP address and the subnet mask in the CPU Bus Unit System Setup. This command is supported for CJ-series Ethernet Units only. Command Block Command code Response Block Command code Parameters IP Address (Command) Specify the local IP address of the Ethernet Unit using 4 pairs of hexadecimal numbers...

  • Page 260: Ip Address Table Read

    Command/Response Reference 11-3-21 IP ADDRESS TABLE READ Command Block Response Block Parameters Number of Records (Command, Response) Maximum Number of Stored Records (Response) Number of Stored Records (Response) IP Address Table Records (Response) Precautions Response Codes Reads the IP address table. Command Number of code...

  • Page 261: Ip Router Table Read

    Command/Response Reference 11-3-22 IP ROUTER TABLE READ Reads the IP router table. Command Block Command code Response Block Parameters Number of Records The number of records to read is specified between 0000 and 0008 (0 to 8 decimal) in the command. If this value is set to 0, the number of stored (Command, Response) records will be returned but the IP router table records will not be returned.

  • Page 262: Protocol Status Read

    Command/Response Reference 11-3-23 PROTOCOL STATUS READ Command Block Response Block Parameters IP Status (Response) 1,2,3... ICMP Status (Response) 1,2,3... Reads the Ethernet Unit protocol status. Command code 48 bytes Command Response IP status code code Twelve types of IP status information occupying 4 bytes each are returned in the following sequence.

  • Page 263

    Command/Response Reference 4 bytes 3. Always 0. 4. Total number of outputs of each packet type during ICMP output. The 19 statistical values are returned in the order shown below. Contents are de- fined for 13 types only; all other types contain 0. Only #0, #3, #14, #16, and #18 are counted by the Ethernet Unit.

  • Page 264

    Command/Response Reference 4 bytes TCP Status (Response) 1,2,3... 10. Total number of inputs of each packet type during ICMP input. The 19 sta- tistical values are returned in the order shown below. Contents are defined for 13 types only; all other types contain 0. Type number #1, #2 #6, #7...

  • Page 265

    Command/Response Reference 1,2,3... 1,2,3... 11. The number of times no ACK was returned within the resend timer set time. (The resend timer sets the maximum time limit between the data being out- put and ACK being returned.) 12. The number of times no window advertisement is received within the time set on the duration timer.

  • Page 266: Memory Status Read

    Command/Response Reference UDP Status (Response) 1,2,3... Precautions Response Codes 11-3-24 MEMORY STATUS READ Command Block Response Block Parameters Memory Status (Response) 1,2,3... 16. The number of window probe packets received. 17. The number of resent ACK packets received. 18. The number of ACK packets received with no data set. 19.

  • Page 267

    Command/Response Reference 2. Short Buffer Application by Type: Thirteen items are returned (52 bytes). 3. Long Buffer Application: Two items are returned (8 bytes). 4. Not Used: Always 0. (4 bytes) 5. Network Memory Application: Two items are returned. 6. Memory Exhaustion Log (12 bytes) Precautions All the above values are set to 0 if Ethernet communications functions are stopped due to improper settings in the system setup.

  • Page 268: Socket Status Read

    Command/Response Reference 11-3-25 SOCKET STATUS READ Command Block Response Block Parameters Socket Status (Response) Reads the Ethernet Unit network socket status. Command code 32 bytes Command Response Socket code code status Returns eight types of information in records of 32 bytes each. A maximum of 64 records can be returned.

  • Page 269: Address Information Read

    Command/Response Reference Precautions All the above values are set to 0 if Ethernet communications functions are stopped due to improper settings in the system setup. Response Codes 11-3-26 ADDRESS INFORMATION READ Reads FINS node numbers and IP addresses Command Block Command code Response Block...

  • Page 270: Ip Address Read

    Command/Response Reference 11-3-27 IP ADDRESS READ Command Block Response Block Command Response code code Parameters Response Codes Reads the local IP address and subnet mask in the CPU Bus Unit System Setup and the FINS node number. The values read with this command, how- ever, are not necessarily the settings actually used for operation.

  • Page 272: Network Installation

    Recommended Products The following products are recommended for use with the CS1W-ETN01 Ethernet Unit. CS1W-ETN01 (10Base-5) CS1W-ETN11, CJ1W-ETN11 (10Base-T) CS1W-ETN01 (10Base-5) Precautions Coaxial Cable Installation Precautions Basic Precautions • As a rule, always lay coaxial cables indoors. Laying coaxial cables outdoors requires special measures that should be performed only by a professional.

  • Page 273

    Network Installation • Ground the external shield of the coaxial cable to 100 W or less using AWG 14 wire (cross-sectional area of 2 mm ) or better and a ground cable length of 20 m or less. Ground each segment of the network at one location only.

  • Page 274

    Network Installation Transceiver Installation Examples The following illustrations show examples of installing transceivers in the ceiling and under the floor. Ceiling Installation Inspection opening Free-access Floor Installation Secured wooden board Mount near an inspection opening large enough to enable maintenance. Secured wooden board Appendix A...

  • Page 275

    Network Installation Ceiling Installation Examples Installation Examples for Noise-prone Environments Ethernet networks do not withstand noise very well and require special installation measures if installed where subject to noise. The remainder of this section describes measures for dealing with noise. Note Although the measures described in this section are suitable to certain levels of noise, programming retries in communications will still be required.

  • Page 276

    Network Installation 4. Refer to the CS/CJ-series Programmable Controllers Operation Manual (W339) for information on wiring inside distribution boxes. 4. Distribution box Transceiver cable Noise Wooden board Transceiver 2. Metal box for transceiver Note 1. Cover all metal portions of cables with insulating tape to be sure they do not come into contact with the metal ducts or boxes.

  • Page 277

    Network Installation Multipoint Transceivers Multipoint transceivers can be used to eliminate the need for coaxial cable (which is easily affected by noise) and replace it with transceiver cable as shown in the following diagram. This will increase overall system resis- tance to noise.

  • Page 278

    Transceiver cable Repeater Note Consult with the manufacturer for details on optical Ethernet devices. CS1W-ETN11, CJ1W-ETN11 (10Base-T) Precautions Precautions on Laying Twisted-pair Cable Basic Precautions • Press the cable connector in firmly until it locks into place at both the hub and the Ethernet Unit.

  • Page 279

    Network Installation Hub Connection Methods If more hub ports are required, they can be added by connecting more than one hub. There are two possible connection methods for hubs: Cascade and stacked. Cascade Connections • Connect two hubs to each other as follows: Connect an MDI port to an MDI-X port with a straight cable; connect two MDI ports with a cross cable;...

  • Page 280

    Network Installation Cable Location Separate the transceiver cable or twisted-pair cable connecting the Ethernet Unit as far from the wiring to the Contact Output Units as possible. The coaxial cable must also be placed as far away from the Contact Output Units and their wiring as possible.

  • Page 282: Ethernet Network Parameters

    Ethernet Network Parameters Parameter Value TCP send buffer 4,096 bytes TCP receive buffer 4,096 bytes UDP send buffer 9,000 bytes UDP receive buffer 9,016 bytes RAW send buffer 2,048 bytes RAW receive buffer 2,048 bytes FINS receive buffer 16,383 bytes Hold timer 75 s (12 min max.) Resend timer...

  • Page 284: Buffer Configuration

    Appendix C Buffer Configuration UDP socket reception request buffers (8 x 9,016 max.) TCP socket reception request buffers (8 x 4,096 max.) FTP service reception buffer (4,096 bytes) FINS processing buffers (192 x 2,020 bytes) FTP service send buffer (4,096 bytes) TCP socket send request buffers (8 x 4,096 max.)

  • Page 285

    Buffer Configuration Network Memory Most of the buffers used for communications servicing by the Ethernet Unit are administered in a buffer config- uration called network memory. Network memory consists of 196K bytes of memory divided into short and long buffers. The use of short and long buffers is determined by the status of the various services when the Ethernet Unit is running.

  • Page 286: Tcp Status Transitions

    The TCP socket status can be confirmed using the socket status data returned for the FINS command SOCKET STATUS READ (2764). RECEIVED CLOSE snd FIN WAIT-1 rcv ACK of FIN FIN WAIT-2 rcv FIN snd ACK Appendix D TCP Status Transitions CLOSED CLOSE Passive OPEN...

  • Page 288: Auxiliary Area Data

    The following table and descriptions cover the words and bits in the Auxiliary Area of PC memory that are related to the Ethernet Unit. Read-only Bits/Words Word(s) Bit(s) Name A202 A20200 to Communications A20207 Port Enabled Flags A203 to Communications A210 Port Completion Codes...

  • Page 289

    Auxiliary Area Data Word(s) Bit(s) Name A410 A41000 to CPU Bus Unit Num- A41015 ber Duplication Flags A417 A41700 to CPU Bus Unit Error, A41715 Unit Number Flags A427 A42700 to CPU Bus Unit Set- A42715 ting Error, Unit Number Flags Read/Write Bits Word Bits...

  • Page 290: Cpu Bus Unit Allocations In The Cpu Unit

    CPU Bus Unit Allocations in the CPU Unit The CPU Bus Units, including Ethernet Units, are allocated words in the CPU Unit’s CIO Area and DM Area according to the unit numbers. This appendix is provided for easy reference. For details, refer to Section 4 Sys- tem Setup and Memory Allocations.

  • Page 291

    CPU Bus Unit Allocations in the CPU Unit Area Configuration Offset Unit Control Switch UDP Socket No. 1 Status UDP Socket No. 2 Status UDP Socket No. 3 Status UDP Socket No. 4 Status UDP Socket No. 5 Status UDP Socket No. 6 Status UDP Socket No.

  • Page 292

    Error Status (Ethernet Unit to CPU Unit) 15 14 13 12 11 10 n+18 Note A transceiver is built into the CS1W-ETN11 and CJ1W-ETN11. If this bit turns ON, the Ethernet Unit has malfunctioned. Socket Service Request Switches 1 to 8 (CPU Unit to Ethernet Unit)

  • Page 293

    CPU Bus Unit Allocations in the CPU Unit DM Area Allocations Each Unit is allocated 100 words in the DM Area, as shown in the following table. Unit No. Allocated words (decimal) 0 (0) D30000 to D30099 1 (1) D30100 to D30199 2 (2) D30200 to D30299 3 (3)

  • Page 294

    CPU Bus Unit Allocations in the CPU Unit Internode Test Response Monitoring Time (CPU Unit to Ethernet Unit) Internode Test Status (Ethernet Unit to CPU Unit) 15 14 13 12 11 10 Error code Number of Internode Test Runs (Ethernet Unit to CPU Unit) Number of Internode Test Timeout Errors (Ethernet Unit to CPU Unit) Number of Internode Test Response Errors (Ethernet Unit to CPU Unit) Number of Internode Test Transmission Errors (Ethernet Unit to CPU Unit)

  • Page 295

    CPU Bus Unit Allocations in the CPU Unit Socket Services Parameter Area 1 to 8 (Ethernet Unit to CPU Unit) Offset Socket Socket No. 1 No. 8 m+18 m+88 m+19 m+89 m+20 m+90 m+21 m+91 m+22 m+92 m+23 m+93 m+24 m+94 m+25 m+95...

  • Page 296

    CPU Bus Unit Allocations in the CPU Unit Note 1. If a value other than 00.00.00.00 is set as the local IP address in the CPU Bus Unit System Setup, even if an IP address is set in the allocated words in the DM Area, it will be overwritten with the setting in the CPU Bus Unit System Setup.

  • Page 298: Ascii Characters

    Bits 1 to 4 Binary 0000 0000 0001 0010 0011 0100 0101 0110 0111 1000 1001 1010 1011 1100 1101 1110 1111 Appendix G ASCII Characters Bits 5 to 7 0001 0010 0011 Space ” & ’ < > 0100 0101 0110 0111...

  • Page 300: Dimensions

    Appendix H Dimensions CS1W-ETN01 16.5 with cover attached Unit: mm...

  • Page 301

    Dimensions Appendix H CS1W-ETN11 Unit: mm...

  • Page 302

    Dimensions CJ1W-ETN11 ETN11 ERC SD ERH TCP FTP ETHERNET UNIT NODE Appendix H Unit: mm...

  • Page 304: Maintenance

    The Ethernet Unit makes up part of a network. Repair a defective Ethernet Unit as soon as possible as it can have a negative effect on the entire network. We recommend that customers keep one or more spare Ethernet Units to allow immediate recovery of the network. Replacing an Ethernet Unit Observe the following precautions when replacing the Ethernet Unit.

  • Page 306: J Inspections

    Carry out regular inspections to ensure the Ethernet Unit is functioning perfectly. Items Most of the parts that make up an Ethernet Unit are semiconductor components. None of the parts in the Unit will wear out after a specific lifetime, but some parts may deteriorate due to extreme operating condition. Therefore, it is important to inspect the Unit regularly.

  • Page 308: Index

    Numbers 10BASE-T conversion adapters twisted-pair cables 24-VDC power supply connecting recommended products Address Resolution Protocol See also ARP communications addresses remote addresses ARP communications ASCII characters bits addresses error status power status Socket Service Request Switches Unit control switches BROADCAST DATA SEND broadcast test command reading results...

  • Page 309

    EC Directives echoback test EM File Memory EMC Directives EMI countermeasures ERC indicator troubleshooting ERH indicator troubleshooting ERROR LOG CLEAR ERROR LOG READ errors alignment controller status error codes error log clearing reading error messages error status flags FINS communications hardware error PC error response codes...

  • Page 310

    close delete mdelete mget mput open quitting type user connecting data type displaying current directory file system indicator login name setting password setting quitting See also Memory Cards status troubleshooting grounding noise reduction precautions transceivers hardware errors indicator host numbers humidity I/O allocations CIO Area...

  • Page 311

    lightning optical Ethernet Systems Low Voltage Directives mail application example contents error mail functions periodic mail sending settings status triggers troubleshooting user mail main response code See also MRES maintenance mdelete memory areas See alsodata areas Memory Cards deleting files displaying directories See also FTP server transferring files from host...

  • Page 312

    Ethernet Factory Interface Network Service File Transfer Protocol Internet Control Message Protocol Internet Protocol reading status Simple Mail Transfer Protocol Transmission Control Protocol User Datagram Protocol Racks mounting Ethernet Units RD indicator RECV(098) instruction relay tables RESET response codes FINS commands UNIX error messages results storage area routing tables...

  • Page 313

    reading socket status subnet masks address conversion reading from Unit setting subnet numbers sub-response code See also SRES switches settings Socket Service Request Switches unit control SYSMAC BUS/2 SYSMAC LINK system configuration Ethernet Systems System Setup CPU Bus Units TCP CLOSE REQUEST TCP communications comparison with UDP data fragmentation...

  • Page 314: Revision History

    Page 104: Wording of last 2 paragraphs changed. Page 160: Information on mail send functions added. Information related to the CJ1W-ETN11 added throughout the manual. In addi- tion, the following changes were made. Page 22: Information on address conversion methods added.

  • Page 315

    Page 235: Changes made to diagram showing command block format. Page 261: Lines removed in four places. Revisions were made, as follows: Page 194: Error status for bit 07 changed for CJ1W-ETN11 and corresponding note removed. Page 247: Added number of bytes for each part of the socket status.

  • Page 316

    9. Cancellation; Etc. Orders are not subject to rescheduling or cancellation unless Buyer indemnifies Omron against all related costs or expenses. 10. Force Majeure. Omron shall not be liable for any delay or failure in delivery resulting from causes beyond its control, including earthquakes, fires, floods,...

  • Page 317

    Schaumburg, IL USA • 847.843.7900 • 800.556.6766 • www.omron247.com OMRON CANADA, INC. • HEAD OFFICE Toronto, ON, Canada • 416.286.6465 • 866.986.6766 • www.omron.ca OMRON ELETRÔNICA DO BRASIL LTDA • HEAD OFFICE São Paulo, SP, Brasil • 55.11.2101.6300 • www.omron.com.br OMRON ELECTRONICS MEXICO SA DE CV •...

This manual also for:

Cs1w-etn11, Cs/cj series, Cs1w-etn01, W343-e1-07

Comments to this Manuals

Symbols: 0
Latest comments: