Omron CS CJ1W-ETN21 Operation Manual

Omron CS CJ1W-ETN21 Operation Manual

Sysmac cs and cj series ethernet units construction of applications
Hide thumbs Also See for CS CJ1W-ETN21:
Table of Contents

Advertisement

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CS CJ1W-ETN21 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Omron CS CJ1W-ETN21

  • Page 2 CS1W-ETN21 (100Base-TX) CJ1W-ETN21 (100Base-TX) Ethernet Units Construction of Applications Operation Manual Revised November 2005...
  • Page 3: Omron Product References

    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 5: Table Of Contents

    TABLE OF CONTENTS PRECAUTIONS ........xxi Intended Audience .
  • Page 6 SECTION 4 FTP Server........Overview .
  • Page 7 TABLE OF CONTENTS Appendices Ethernet Network Parameters ..........Buffer Configuration .
  • Page 8 TABLE OF CONTENTS...
  • Page 9: About This Manual

    About this Manual: This manual describes the operation of the CS1W-ETN21 and CJ1W-ETN21 Ethernet Units (100Base- TX) for constructing applications and includes the sections described below. Please read this manual carefully and be sure you understand the information provided before attempting to install or operate the Ethernet Unit.
  • Page 10: Relevant Manuals

    Relevant Manuals The following table lists CS- and CJ-series manuals that contain information relevant to Ethernet Units. Manual Model number W420 CS1W-ETN21 CJ1W-ETN21 W421 CS1W-ETN21 CJ1W-ETN21 W343 CS1W-ETN01 CS1W-ETN11 CJ1W-ETN11 W342 CS1G/H-CPU@@H CS1G/H-CPU-@@V1 CS1W-SCU21 CS1W-SCB21/41 CJ1G/H-CPU@@H CJ1G-CPU@@ CJ1W-SCU41 W339 CS1G/H-CPU@@H CS1G/H-CPU-@@V1 W393 CJ1G/H-CPU@@H...
  • Page 11 Manual Model number W394 CS1G/H-CPU@@H CS1G/H-CPU-@@V1 CJ1G/H-CPU@@H CJ1G-CPU@@ W340 CS1G/H-CPU@@H CS1G/H-CPU-@@V1 CJ1G/H-CPU@@H CJ1G-CPU@@ W414 WS02-CX-@@JV3 W341 CQM1H-PRO01 CQM1-PRO01 C200H-PRO27 + CS1W-KS001 W336 CS1W-SCB21/41 CS1W-SCU21 CJ1W-SCU41 !WARNING Failure to read and understand the information provided in this manual may result in per- sonal injury or death, damage to the product, or product failure.
  • Page 13: Read And Understand This Manual

    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 14: Application Considerations

    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 15: 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 xviii...
  • Page 17 Product nameplate CS1W- UNIT Lot No. 040401 0000 Ver.1.3 OMRON Corporation MADE IN JAPAN CX-Programmer version 4.0 can be used to confirm the unit version using the Unit Manufacturing Information. turing Information. The following dialog box is displayed. In the IO Table Window, right-click and select Unit Manufacturing informa- tion - CPU Unit.
  • Page 18 Using Unit Version Label Unit Version Notation Product nameplate Notation used in this manual Ver. 2.0 or later number Ethernet Unit Ver. 1.3 or later shown to right of the lot number Blank to the right of lot Pre-Ver. 1.3 Ethernet Units number Unit Versions and Lot Numbers Type...
  • Page 19: Precautions

    This section provides general precautions for using the CS1W-ETN21 and CJ1W-ETN21 Ethernet Units (100Base-TX). The information contained in this section is important for the safe and reliable application of Ethernet Units. You must read this section and understand the information contained before attempting to set up or operate an Ethernet Unit.
  • Page 20: Intended Audience

    You must consult with your OMRON representative before applying a PLC System to the above-men- tioned applications. Do not attempt to take any Unit apart while the power is being supplied. Doing so may result in electric shock.
  • Page 21 Safety Precautions !WARNING Provide safety measures in external circuits (i.e., not in the Programmable Controller), including the following items, to ensure safety in the system if an abnormality occurs due to malfunction of the PLC or another external factor affecting the PLC operation. Not doing so may result in serious accidents. !Caution Execute online editing only after confirming that no adverse effects will be caused by extending the cycle time.
  • Page 22: Operating Environment Precautions

    Operating Environment Precautions Operating Environment Precautions !Caution Do not operate the control system in the following locations: !Caution Take appropriate and sufficient countermeasures when installing systems in the following locations: Application Precautions Observe the following precautions when using the Ethernet Unit. !WARNING Always heed these precautions.
  • Page 23 Application Precautions • Always use the power supply voltages specified in the operation manuals. An incorrect voltage may result in malfunction or burning. • Take appropriate measures to ensure that the specified power with the rated voltage and frequency is supplied. Be particularly careful in places where the power supply is unstable.
  • Page 24: Conformance To Ec Directives

    Concepts 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 25: Introduction

    This section introduces the functions and protocols used in Ethernet Unit communications services. Ethernet Unit Communications Services ......Functions Listed by Purpose .
  • Page 26: Ethernet Unit Communications Services

    Ethernet Unit Communications Services Ethernet Unit Communications Services Service Mail send function Through intranet or internet Mail receive func- tion FTP server func- Through intranet or tion internet (See note.) Socket service function Automatic clock Through intranet adjust function FINS communica- Through intranet or tions internet (See note.)
  • Page 27: Table Of Protocols

    Table of Protocols Timing and User purpose direction Automatic execu- Reading data in the tion when a preset CPU Unit's I/O mem- condition is met, sent to computer Reading data from a (See note.) Memory Card installed in the CPU Unit Receiving a user- defined message as an e-mail...
  • Page 28: Common Protocol Settings

    Common Protocol Settings Communications Protocol used service Mail Receive Function SMTP FTP Server Function Socket Service Func- TCP/IP tion UDP/IP Automatic Clock SNTP Adjust Function Creating a FINS com- FINS munications host application Common Protocol Settings 1-4-1 SMTP Situation when used Required Required When specifying the SMTP server and...
  • Page 29: Pop

    Common Protocol Settings Note The “POP before SMTP” is an authentication function required when sending mail (using the SMTP server). Normally, account name and password authen- tication is performed with the POP server because there isn't an authentica- tion process in the SMTP server. Most ISPs (Internet Service Providers) use the “POP before SMTP”...
  • Page 30: Dns

    Common Protocol Settings 1-4-3 The DNS server's settings must be entered when the POP3 server, SMTP server, and SNTP server are specified with host names. Item Server specification Select whether the POP3 server used for type receiving mail is to be specified by IP address or the host's domain name (i.e., host name).
  • Page 31 Common Protocol Settings The DNS server manages the IP addresses and host names of the nodes that communicate in the network. The Ethernet Unit automatically acquires each server's IP address from the DNS server and uses those acquired IP addresses. Item IP Address Set the IP address for the DNS server.
  • Page 32 Section 1-4 Common Protocol Settings...
  • Page 33: Mail Send Function

    This section provides an overview and describes how to use the Ethernet Unit’s Mail Send Function, including application examples and troubleshooting information. Mail Send Function Overview ........2-1-1 Introduction.
  • Page 34: Mail Send Function Overview

    Mail Send Function Overview Mail Send Function Overview 2-1-1 Introduction The Mail Send Function sends an e-mail from the Ethernet Unit to a specified e-mail address when a predetermined condition occurs in the PLC. Data in the CPU Unit's I/O memory areas (or any file in the Memory Card) can be sent as an attached file.
  • Page 35: Mail Send Function Details

    Mail Send Function Details ■ Attached Files ■ Send Timing ■ Send Mail Conditions 2-1-2 Comparison with the Earlier Mail Send Function 2-1-3 Mail Send Function's Compatibility with Earlier Models Mail Send Function Details An I/O memory data file created automatically by the Ethernet Unit (a speci- fied range of the CPU Unit's I/O memory data converted to a .IOM, .TXT, or .CSV file) or any file in file memory (in the CPU Unit's Memory Card) can be sent as an attached file.
  • Page 36: Contents Of E-Mail Body

    Date: Fri, 1 Jan 2004 13:00:00 +0900 From: alpha@omron.co.jp Message-Id: <XXXXXXXXXXX@omron.co.jp> To: beta@omron.co.jp Subject: OMRON Ethernet Unit Mail Service (posted at regular intervals) Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Trigger Setting Number = 1 This is OMRON ethernet unit mail posting service.
  • Page 37: Contents Of E-Mail Body

    CPU error occurrence(FALS) Periodic timer posted at regular intervals • Trigger number: 1 to 8 • Shared message: “This is OMRON ethernet unit mail posting service.” • Trigger-specific messages: The following messages are displayed. Trigger Trigger-specific message in e-mail header...
  • Page 38 Mail Send Function Details Ethernet Unit Information Optional Information ■ User-set Information Trigger Trigger-specific message in e-mail header condition Change in CPU This mail have been posted at changing CPU mode (PRG- Unit >MON) This mail have been posted at changing CPU mode (PRG- >RUN) This mail have been posted at changing CPU mode (MON- >PRG)
  • Page 39: Attached File Details

    Mail Send Function Details ■ Error Log Information The error log information includes all of the data stored in the Ethernet Unit's error log. The error log can contain up to 64 records. For details on the error log, refer to 8-3 Error Log in the Operation Manual Construction of Networks (W420).
  • Page 40: Summary Of E-Mail Body Information And Attached Files

    Mail Send Function Details File Data (1 MB Max.) Any file stored in the Memory Card installed in the CPU Unit (root directory MEMCARD) can be sent with the e-mail as an attached file. Sends e-mail. Ethernet 2-2-4 Summary of E-mail Body Information and Attached Files •...
  • Page 41: Mail Send Function Specifications

    Mail Send Function Specifications Mail Send Function Specifications 2-3-1 Function Specifications Item Destination e-mail address Up to 2 addresses can be registered in the Unit Setup (CPU Bus Unit System Setup) and the addresses can be up to 50 characters long. Subject Fixed text (Depends on the trigger condition.) Body...
  • Page 42: Using The Mail Send Function

    Using the Mail Send Function 2-3-2 Details of the Available Mail Triggers Using the Mail Send Function 2-4-1 Procedure Make the basic settings. For details, refer to Section 2 Installation and Initial Setup in the Operation Manual Con- struction of Networks. Connect the CX-Programmer online and make the following settings in the Unit Setup (CPU Bus Unit System Setup): •...
  • Page 43: Settings Required For The Mail Send Function

    Using the Mail Send Function become effective. Verify that it is safe for the Ethernet Unit to restart before transferring the settings data. 2-4-2 Settings Required for the Mail Send Function The following Unit settings must be made when using the Mail Send Function. Setting Programmer Unit Setup...
  • Page 44 Using the Mail Send Function Setting Programmer Unit Setup Send Mail Trigger type (Send mail conditions 1 to Interval time Mail address (desti- nation) Send user data Send Error Log infor- mation Send status informa- tion IO memory data Attached file name Note Setting requirement One type must be selected.
  • Page 45: Mail Address

    Note: Mail can be sent to multiple addresses by punctuating the mail address with commas. For example, the following mail address entry will send the e-mail to address1@omron.co.jp and address2@omron.co.jp: address1@omron.co.jp,address2@omron.co.jp Set the following settings for send mail conditions 1 to 8.
  • Page 46 Using the Mail Send Function Send Mail Condition Settings Mail Address Specification (Required) Data Sent by Mail (When Required) ■ Data Sent in E-mail Body ■ Data Sent in an Attached File Item Trigger No. Select a number as the trigger condition for sending mail.
  • Page 47 Using the Mail Send Function ■ Attached File Name Send Mail Trigger Type Specifies the type send mail condition that will be used by the Ethernet Unit to Setting (Required) automatically send e-mail. When the Mail Send Function is not being used, disable the send mail upon trigger setting.
  • Page 48: Mail Send Function Status

    Mail Send Function Status Note Interval Time Setting Mail Send Function Status 2-5-1 Send Mail Status ■ Send Mail Status 1 Item CPU condition If this option is selected, mail is sent whenever any of the following conditions occur at the CPU Unit.
  • Page 49: Mail Send Switch, Accessing Memory/Sending Mail Flag

    Mail Send Function Status ■ Send Mail Status 2 m+17 The transmission status of each send condition is indicated by the content of the corresponding 3 bits in Send Mail Status 1 or Send Mail Status 2, as shown in the following table. 0: OFF, 1: ON While mail is being sent, the status of the three bits for the send condition will be 001.
  • Page 50: I/O Memory Data Formats

    I/O Memory Data Formats ■ Accessing Memory/Sending Mail Flag (Bit 01 of n+17) When a data file (IOM, TXT, or CSV) is being attached to the e-mail, the Ethernet Unit will access the CPU Unit's I/O memory and automatically create the data file when the e-mail is being sent.
  • Page 51: Attached File Transfer Times

    Attached File Transfer Times Note CSV Format Note Attached File Transfer Times I/O memory contents 5678 1234 9ABC DEF0 1234 5678 9ABC DEF0 1234 5678 9ABC DEF0 TXT file contents 34 09 [HT] [HT] 38 0D [CR] [LF] Contents of TXT file when displayed 1234@5678@9ABC@DEF0@1234@5678@9ABC@DEF0@1234@5678@ 9ABC@DEF0@1234@5678@9ABC@DEF0@1234@5678@9ABC@DEF0 The @ character represents a hard tab and displayed as a tab in text displays.
  • Page 52: Mail Send Function Errors

    Mail Send Function Errors ■ Access Times for CS1 and CJ1 CPU Units ■ Access Times for CS1-H and CJ1-H CPU Units Note Mail Send Function Errors 2-8-1 Identifying and Correcting Mail Send Function Errors The following table shows the primary causes of e-mail transmission errors and corresponding solution.
  • Page 53: Troubleshooting Mail Send Errors With Led Indicators

    Mail Send Function Errors 2-8-2 Troubleshooting Mail Send Errors with LED Indicators Not lit Note For more details on the error log, refer to 8-3 Error Log in the Operation Man- ual Construction of Networks (W420). 2-8-3 Error Log Error Codes for the Mail Send Function When an error occurs while the Ethernet Unit is operating, the error code, detailed error code, and time the error occurred are saved in the error log.
  • Page 54: Example Application

    • Correct the set- tings for each server. • Inspect the com- munications path (Ethernet Unit, cable con- nections, hub, router, server), and correct the situation that is causing the error. Setting Host Name smtp.omron.com 25 (default value) ETN21@omron.co.jp Not selected...
  • Page 55 • Send on the Rising or Falling Edge of a Specified Bit Section 2-9 Setting 10.56.3.24 53 (default value) 10 s (default value) Setting beta@omron.co.jp Setting Address 1 Setting Selected Set the leading address of the words in I/O memory that contain the user-set ASCII data.
  • Page 56: Step 3. Transfer The Cpu Bus Unit Setup Settings

    Example Application 2-9-3 Step 3. Transfer the CPU Bus Unit Setup Settings Select Transfer to PLC from the Options Menu and click the Yes Button. The settings will be transferred to the CPU Bus Unit Setup Area in the CPU Unit. 2-9-4 Step 4.
  • Page 57: Receive Mail Function

    This section describes how to use the Ethernet Unit’s Mail Receive Function, including specifications, status details, I/O memory data formats, file transfer timing, application examples, and troubleshooting information. Mail Receive Function Overview ........3-1-1 Introduction.
  • Page 58: Mail Receive Function Overview

    Mail Receive Function Overview Mail Receive Function Overview 3-1-1 Introduction The mail receive function performs the following functions using e-mails sent to the Ethernet Unit. 1,2,3... 1. The user can enter a command in the e-mail and send that e-mail to the 2.
  • Page 59: Table Of Remote Mail Commands

    Mail Receive Function Overview ■ Remote Mail Commands Enter the remote command (for example, FileRead) in ASCII in the e-mail subject line. ■ Command Parameters Enter the parameters (for example, Para1:Overwrite=OK) in ASCII in the e- mail body. ■ Attached File Data With remote write commands, a single file can be attached containing the write data.
  • Page 60: Mail Receive Function Specifications

    Mail Receive Function Specifications Remote mail command type File memory opera- Performing file operations on a tions Memory Card in the CPU Unit or EM file memory Backing up data in user mem- ory (user program or parameter area) Reading/Clearing the error log Reading/Clearing the e-mail log Performing an e-mail send/receive test Sending a FINS command...
  • Page 61 Mail Receive Function Specifications Item Attached Data format • IOM Write command: file Writes an I/O memory data file (IOM, TXT, or CSV) to the CPU Unit. • File Write command: Any type of file (a file with any filename extension) can be written to EM file memory or a Memory Card mounted in the CPU Unit.
  • Page 62: Using The Mail Receive Function

    Using the Mail Receive Function Using the Mail Receive Function 3-3-1 Procedure Mount the Ethernet Unit in the CPU Rack or Expansion Rack, connect online with the CX-Programmer or Programming Console, and create the I/O table. With the CX-Programmer still connected online, make the following settings in the Unit Setup (CPU Bus Unit System Setup): •...
  • Page 63: Settings Required For The Mail Receive Function

    Using the Mail Receive Function 3-3-2 Settings Required for the Mail Receive Function The following Unit settings must be made when using the Mail Receive Func- tion. CX-Programmer Setting Unit Setup Tab SMTP Server specification type Required. IP Address Host name Port No.
  • Page 64: Receive Mail Tab

    Using the Mail Receive Function 3-3-3 Receive Mail Tab The CPU Bus Unit settings for the mail receive function can be set in the CX- Programmer's CPU Bus Unit Setup Window. Posting Mail Address Protection Setting Protect using mail address Mail address Item Contents...
  • Page 65 Using the Mail Receive Function Receive Attached File Setting Receive Command Setting Item Receive file with Select this option when you do not want to specified extension receive attached files other than the specified only file types (filename extensions). Multiple exten- sions can be selected.
  • Page 66: Remote Mail Command Details

    Mail Log Clear command. Test Select when you want to execute the Mail Test command. FinsSend Select when you want to execute the FINS Command Send command. etn@omron.co.jp Subject: FileWrite Para1: MEMCARD ¥user Body: Para2: Overwrite=OK #Overwrite OK Attached file: Write.iom(98KB)
  • Page 67 Writes the attached file to the CPU Unit's EM file memory or a Memory Card mounted in the CPU Unit. Command Format Subject: FileWrite Notation Body: Para1:Destination folder name Example) Specifying subdirectory OMRON in the Memory Card: Para1:MEMCARD\OMRON Para2:Overwrite=OK or NG Example) Allowing existing file to be overwrit- ten: Para2:Overwrite=OK...
  • Page 68 Remote Mail Command Details FileRead (File Read) Function Command Format Subject: FileRead Notation Body: Para1:Source folder name Example) Specifying subdirectory OMRON in the Memory Card: Para1:MEMCARD\OMRON Para2:File name Example) Specifying AUTOEXEC.STD: Para2:AUTOEXEC.STD Attached file: None Response Format Subject: Re:FileRead Response contents...
  • Page 69 Deletes the specified file from the CPU Unit's EM file memory or a Memory Card mounted in the CPU Unit. Command Format Subject: FileDelete Notation Body: Para1:Folder name Example) Specifying subdirectory OMRON in the Memory Card: Para1:MEMCARD\OMRON Para2:File name Example) Specifying AUTOEXEC.STD: Para2:AUTOEXEC.STD...
  • Page 70 EM file memory or a Memory Card mounted in the CPU Unit. Command Format Subject: FileList Notation Body: Para1:Source folder name Example) Specifying subdirectory OMRON in the Memory Card: Para1:MEMCARD\OMRON Attached file: None Response Format Details Subject: Re:FileList Response contents...
  • Page 71 Remote Mail Command Details UMBackup (User Memory Backup) Function Command Format Details Subject: UMBackup Notation Body: Para1:Destination folder name Example) Specifying subdirectory OMRON in the Memory Card: Para1:MEMCARD\OMRON Para2:File name Example) Specifying USER.OBJ: Para2:USER.OBJ Para3:Overwrite=OK or NG Example) Allowing existing file to be overwrit-...
  • Page 72 Backs up (saves) the parameter area data in the CPU Unit's EM file memory or a Memory Card mounted in the CPU Unit. Command Format Subject: PARAMBackup Notation Body: Para1:Destination folder name Example) Specifying subdirectory OMRON in the Memory Card: Para1:MEMCARD\OMRON Para2:File name Example) Specifying USER.STD: Para2:USER.STD Para3:Overwrite=OK or NG...
  • Page 73 Remote Mail Command Details IOMWrite (I/O Memory Write) Function Writes the contents of the attached file to the specified data area in the CPU Unit's I/O memory. The data is written in word units. Command Format Subject: IOMWrite Notation Body: Para1:File format Example) Specifying a file of comma-delimited word data with returns every 16 fields:...
  • Page 74 Remote Mail Command Details Attached file: Yes Response Format Subject: Re:IOMWrite Response contents Body: Response Code:@@@@ Response Status:@@@@ > Para1:File format > Para2:Starting write address > Para3:Overwrite=OK or NG Attached file: None Attach an I/O data file (IOM, CSV, or TXT format). Note Up to 6,000 words can be written from the data file.
  • Page 75 Remote Mail Command Details IOMRead (I/O Memory Read) Function Reads the contents of the specified range of words from the CPU Unit's I/O memory and returns the data in an attached file. The data is read in word units. Command Format Subject: IOMRead Notation Body: Para1:File format...
  • Page 76 Remote Mail Command Details Para4:File name Example) Specifying MEMORY.TXT: Para4:MEMORY.TXT Attached file: None Response Format Subject: Re:IOMRead Response contents Body: Response Code:@@@@ Response Status:@@@@ > Para1:File format > Para2:Starting read address > Para3:Number of words > Para4:File name Attached file: Yes Specifies the name of the file (including the file- name extension) in which the read data will be stored.
  • Page 77 Remote Mail Command Details ChangeMode (Operating Mode Change) Function Changes the CPU Unit's operating mode. Command Format Subject: ChangeMode Notation Body: Para1:RUN (or MON or PRG) Example) Changing to RUN mode: Para1:RUN Attached file: None Response Format Subject: Re:ChangeMode Response contents Body: Response Code:@@@@ Response Status:@@@@ >...
  • Page 78 Remote Mail Command Details ErrorLogRead (Error Log Read) Function Reads the entire error log from the CPU Unit or a specified Special Unit (CPU Bus Unit or Special I/O Unit). Command Format Subject: ErrorLogRead Notation Body: Para1:Unit address Example) Specifying a CPU Bus Unit (unit number 0): Para1:10 Attached file: None...
  • Page 79 Remote Mail Command Details ErrorLogClear (Error Log Clear) Function Clears the entire error log from the CPU Unit or a specified Special Unit (CPU Bus Unit or Special I/O Unit). Command Format Subject: ErrorLogClear Notation Body: Para1:Unit address Example) Specifying a CPU Bus Unit (unit number 0): Para1:10 Attached file: None...
  • Page 80 Remote Mail Command Details MailLogRead (Mail Log Read) Function Reads the mail log, which contains information on mail received by the Ether- net Unit. (The mail log contains basic information on all of the mail received since power was turned ON or the mail log was cleared.) Command Format Subject: MailLogRead Notation...
  • Page 81 Remote Mail Command Details MailLogClear (Mail Log Clear) Function Clears the mail log, which contains information on mail received by the Ether- net Unit. Command Format Subject: MailLogClear Notation Body: None Attached file: None Response Format Subject: Re:MailLogClear Response contents Body: Response Code:@@@@ Response Status:@@@@ Attached file: None...
  • Page 82 Remote Mail Command Details Test (Mail Test) Function Performs an e-mail send/receive test with the Ethernet Unit. When this remote mail command is executed, the Ethernet Unit returns a response to the address that sent the remote mail command. Command Format Subject: Test Notation Body: None...
  • Page 83: Response List

    Remote Mail Command Details FinsSend (FINS Command Send) Function Requests execution of the specified FINS command by the Ethernet Unit. Command Format Subject: FinsSend Notation Body: Para1:FINS header Example) Specifying DNA=01, DA1=02, and DA2=00: Para1:010200 Para2:Command code and parameter Example) Specifying 0501: Para2:0501* Attached file: None...
  • Page 84: Mail Receive Function Status

    Mail Receive Function Status Mail Receive Function Status 3-5-1 Accessing Memory/Receiving Mail Flag The Accessing Memory/Receiving Mail Flag is located in CIO Area words allocated to the Ethernet Unit as a CPU Bus Unit. The leading address (n) of the allocated CIO area is determined by the Ether- net Unit's unit number (n = CIO 1500 + 25 ×...
  • Page 85: Csv Format

    I/O Memory Data Formats TXT Format When hexadecimal I/O memory data (1234, 5678, 9ABC, etc.) is being copied to an attached file in TXT format, the data is converted to ASCII in one-word fields or two-word fields. The fields (one-word or two-word) are delimited by tabs ([HT]: 09) and a return and line feed ([CR][LF]: 0D0A) are inserted after the specified number of fields.
  • Page 86: Attached File Transfer Times

    Attached File Transfer Times Attached File Transfer Times When sending an attached file with the Mail Receive Function, the access time can be as long as 30 or 40 minutes for a very large file. The following tables show how long the CPU Unit's memory will be accessed by the Ether- net Unit (how long the Accessing Memory/Receiving Mail Flag will be ON).
  • Page 87: Mail Receive Function Errors

    Mail Receive Function Errors Mail Receive Function Errors 3-8-1 Identifying and Correcting Mail Receive Function Errors The following table shows the primary causes of e-mail transmission errors and corresponding solution. 3-8-2 Troubleshooting Mail Receive Errors with LED Indicators Note For more details on the error log, refer to 8-3 Error Log in the Operation Man- ual Construction of Networks.
  • Page 88: Error Log Codes Related To The Mail Receive Function

    Mail Receive Function Errors 3-8-3 Error Log Codes Related to the Mail Receive Function If an error occurs while the Ethernet Unit is operating, the main error code, detailed error code, and time stamp will be recorded in the error log. The contents of the error log can be read by sending a FINS command to the Ethernet Unit or sending the ErrorLogRead command through e-mail.
  • Page 89: Example Application

    Local Mail Address (SMTP Tab) Initial POP3 Server Settings (POP Tab) Initial Settings for the Mail Receive Function Item name Example Local mail address ETN21@omron.co.jp Item name Server specification type Host Name Host name mail.omron.com Port No. Account Name omronID...
  • Page 90: Step 3. Transfer The Cpu Bus Unit Setup Settings

    Example Application 3-9-3 Step 3. Transfer the CPU Bus Unit Setup Settings Select Transfer to PLC from the Options Menu and click the Yes Button. The settings will be transferred to the CPU Bus Unit Setup Area in the CPU Unit. 3-9-4 Step 4.
  • Page 91: Ftp Server

    This section describes the functions provided by the FTP server. Overview ........... . . 4-1-1 Specifications .
  • Page 92: Overview

    Overview Overview FTP client Intranet Large file Note Only one FTP client can connect at the same time. 4-1-1 Specifications Item Executable com- Connects the specified host FTP server. open: mands Specifies user name for the remote FTP server. user: Displays the Memory Card file names.
  • Page 93: Ftp Server Function Details

    FTP Server Function Details FTP Server Function Details 4-2-1 File Types Note 4-2-2 Connecting to the FTP Server Note When general-purpose FTP software is used, files can be transferred and The file system in the CPU Unit that can be accessed by the Ethernet Unit includes files in any Memory Card mounted in the CPU Unit and files in the EM file memory.
  • Page 94: Using The Ftp Server Function

    Using the FTP Server Function Using the FTP Server Function 4-3-1 Procedure Make the basic settings. Refer to SECTION 2 Installation and Initial Setup in the Operation Manual, Construction of Networks (W420). When using a user-set FTP login name and password: With the CX-Programmer online, select the Ethernet Unit from the I/O Table Window in the CX-Programmer, right-click, and select Unit Setup to display the window for making the Ethernet Unit Setup.
  • Page 95: List Of Settings Required For The Ftp Server Function

    Using the FTP Server Function 4-3-2 List of Settings Required for the FTP Server Function 4-3-3 Setup Tab ■ Settings become effective. Verify that it is safe for the Ethernet Unit to restart before transferring the settings data. Make the following settings for the unit setup when the server function is used. CX-Programmer Settings Setup...
  • Page 96: 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 Note When general-purpose FTP software is used, files can be transferred and 1,2,3... root MEMCARD DEF.IOM (file) The following procedure shows how to use the FTP server by connection with the default login name, CONFIDENTIAL.
  • Page 97: Using Ftp Commands

    Using FTP Commands Using FTP Commands 4-5-1 Table of Commands 4-5-2 Using the Commands open Format Function This section describes the FTP commands which the host computer (FTP client) can send to the Ethernet Unit’s FTP server. The descriptions should also apply to most UNIX workstations, but slight differences may arise.
  • Page 98 Using FTP Commands user Format Function Format Function Format Function rename Format Function user [user_name] Specifies the user name. Specify the FTP login name set in the Ethernet Unit system setup. The default FTP login name is “CONFIDENTIAL.” If a non-default login name is used, it must be followed by the password. In this case, enter the FTP password set in the system setup.
  • Page 99 Using FTP Commands mkdir Format Function rmdir Format Function Format Function Format Function cdup Format Function mkdir DIRECTORY_NAME Creates a directory of the specified name at the remote host (Memory Card or EM File Memory). An error will occur if a file or directory of the same name already exists in the working directory.
  • Page 100 Using FTP Commands type Format Function Format Function mget Format Function Format Function mput Format Function type data_type Specifies the file data type. The following data types are supported: ascii: Files are transferred as ASCII data binary (image): Files are transferred as binary data. All files are treated by the PLC as binary files.
  • Page 101 Using FTP Commands delete Format Function mdelete Format Function close Format Function Format Function quit Format Function Any existing file with the same name in the remote host (Memory Card or EM File Memory) will be overwritten by the contents of the transferred file. If an error occurs during file transfer, the file being transferred will be deleted and the transmission of that file will end in an error.
  • Page 102: Error Messages And Ftp Status

    Using FTP Commands 4-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 to device (FINS error 0 x 250F).
  • Page 103: Checking Ftp Status

    Checking FTP Status Checking FTP Status 4-6-1 FTP Status Flag 15 14 13 12 11 10 n+17 Note ■ FTP Indicator PPP: Path name XXX: IP address Port number MM: FINS error code NN: Socket error code The current status of the FTP server can be obtained from the service status in the words allocated to the Ethernet Unit in the CPU Bus Unit Area in the CIO Area.
  • Page 104: Using File Memory

    Using File Memory Using File Memory 4-7-1 File Memory Media Memory type CS/CJ- Flash memory 8 MB series 15 MB Memory 30 MB Cards EM File Max. capacity of EM Area Memory in CPU Unit 4-7-2 File Types ■ File Names ■...
  • Page 105 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 The files described in the following table can be read or written by the CPU Unit.
  • Page 106: Initializing File Memory

    Using File Memory 4-7-3 Initializing File Memory 4-7-4 I/O Memory Data Format ■ IOM Format ■ TXT Format Memory Memory 1. Insert the Memory Card into the CPU Unit. Cards 2. Initialize the Memory Card from a Programming Device (Programming Consoles included). EM File Mem- 1.
  • Page 107 Using File Memory ■ CSV Format I/O memory 1234 5678 9ABC DEF0 1234 9ABC DEF0 1234 5678 9ABC DEF0 .TXT file contents 31 32 33 34 09 35 36 37 38 09 39 41 42 43 09 4 [HT] 5 8 [HT] 9 35 36 37 38 0D 0A 39 41 42 43 09 8 [CR][LF] 9...
  • Page 108 Using File Memory Note FREAD(700) will not be able to read the last byte in a file that has been written Note The UM and DM Areas contain binary data. Set the data type to binary using Note For details on how to use File Memory Instructions, refer to the CS/CJ Series I/O memory 1234 5678...
  • Page 109: Ftp File Transfer Time

    FTP File Transfer Time FTP File Transfer Time ■ CS1 CPU Units/CJ1 CPU Units CPU Unit status Transfers using Transfers using ■ CS1-H CPU Units/CJ1-H CPU Units CPU Unit status Transfers using Transfers using Note File transfers using FTP can require 30 or 40 minutes depending on the capacity of the file.
  • Page 110: Unix Application Example

    UNIX Application Example UNIX Application Example 1,2,3... FTP started. Used to check for Memory Card. The following procedure provides an example of FTP operations from a UNIX workstation. In this example, the following assumptions are made. • The IP address of the Ethernet Unit is registered in /etc/hosts on the workstation as [cs1].
  • Page 111 UNIX Application Example Section 4-9 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 112 UNIX Application Example Section 4-9...
  • Page 113: Automatic Clock Adjustment Function

    This section provides an overview of the automatic clock adjustment function, including details on specifications, required settings, operations from CX-Programmer, and troubleshooting. Overview ........... . . 5-1-1 Overview.
  • Page 114: Overview

    Overview Overview 5-1-1 Overview The Ethernet Unit can obtain the clock information from the SNTP server (see note 1) at a particular time or when a designated bit turns ON and then refresh the internal clock information of the CPU Unit to which it is mounted (referred to as the local CPU Unit).
  • Page 115: Using The Automatic Clock Adjustment Function

    Using the Automatic Clock Adjustment Function 5-1-2 Specifications Using the Automatic Clock Adjustment Function 5-2-1 Procedure Make the basic settings. Refer to SECTION 2 Installation and Initial Setup in the Ethernet Units Operation Man- ual Construction of Networks (W420). With the CX-Programmer online, set the following items in the Unit Setup (CPU Unit System Setup).
  • Page 116: Settings Required For Automatic Clock Adjustment Function

    Using the Automatic Clock Adjustment Function 5-2-2 Settings Required for Automatic Clock Adjustment Function The following settings must be set in the Unit Setup when using the automatic clock adjustment function. Note When the Server specification type field in Auto Adjust Time Tab is set to Host name.
  • Page 117: Auto Adjust Time

    Using the Automatic Clock Adjustment Function 5-2-3 Auto Adjust Time The contents in the CPU Bus Unit System Setup that are set for using mail send and receive functions are shown in the CX-Programmer’s Unit Setup. Item Get the time Enable to set the CPU Unit's clock to the time at the information from SNTP server's clock.
  • Page 118: Automatic Clock Adjustment Switch

    Automatic Clock Adjustment Switch Automatic Clock Adjustment Switch The Automatic Clock Adjustment Switch is allocated in the CIO Area as shown below. The first word n of the CIO Area is calculated using the follow- ing equation. n = CIO 1500 + (25 Automatic Clock The Unit control bit is shown in the following diagram.
  • Page 119: Error Log Error Codes For The Automatic Clock Adjustment Function

    Automatic Clock Adjustment Error Processing Note For details on other error log information, refer to the Operation Manual, Con- struction of Networks: SECTION 8 Troubleshooting. 5-4-3 Error Log Error Codes for the Automatic Clock Adjustment Function When an error occurs while the Ethernet Unit is operating, the error code, detailed error code, and time the error occurred are saved in the error log.
  • Page 120 Automatic Clock Adjustment Error Processing Note Error Meaning Detailed error code code 1st byte 03C6 Clock data 0001: Clock data could not write error be refreshed because of a CPU Unit error. 0002: Clock data could not be refreshed because the CPU Unit could not write clock data in that operation mode.
  • Page 121: Socket Services

    This section describes the functionality provided by the Ethernet Unit via the socket services. Overview of Socket Communications from Ethernet Units ....6-1-1 What are Sockets?........6-1-2 Socket Port Numbers .
  • Page 122 Using Socket Services with CMND(490) ......6-8-1 Using Socket Service ........6-8-2 Socket Services and Socket Status .
  • Page 123: Overview Of Socket Communications From Ethernet Units

    Overview of Socket Communications from Ethernet Units Overview of Socket Communications from Ethernet Units 6-1-1 What are Sockets? ■ Using Sockets with the Ethernet Unit 6-1-2 Socket Port Numbers Sockets are interfaces that allow TCP and UDP protocols to be used directly from the user program.
  • Page 124: Protocol Overview

    Protocol Overview Protocol Overview 6-2-1 Differences between TCP and UDP ■ TCP Communications 1,2,3... Send request made. Local node ■ UDP Communications Send request made. Local node 6-2-2 Opening TCP Sockets There are differences in the socket services between TCP and UDP. The following procedure is followed each time data is transmitted to ensure that the data arrives normally at the remote node: 1.
  • Page 125 Protocol Overview ■ Passive OPEN and Active OPEN Client socket Note TCP Communications Procedure Connection established Data receive request Next data receive request An open command is executed for a node to establish a connection. The open method differs depending on whether the node is a client or server. A passive open method is used to open the node as a server and the active open method is used to open the node as a client.
  • Page 126: Fragmentation Of Send Data

    Protocol Overview 6-2-3 Fragmentation of Send Data ■ Cautions when Using TCP 1,2,3... 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 ■...
  • Page 127: Overview

    Overview Sending User Program 1. Send request 1,984bytes Source data Overview 6-3-1 Socket Service Functions Intranet General-purpose application (not FINS communications); The host computer uses system calls to call sockets provided in a C language interface library to allow TCP and UDP protocols to be used directly to access PLC data.
  • Page 128: Using Socket Services With Socket Service Request Switches

    Overview Note One of the main differences between using Socket Service Request Switches 6-3-2 Using Socket Services with Socket Service Request Switches CS/CJ-series PLC CPU Unit Socket Service Request Switches (See Note 1.) Socket Service Parameters (See Note 2.) Note The two methods of using the socket services are as follows: •...
  • Page 129: Using Socket Services With Cmnd(490)

    Overview 6-3-3 Using Socket Services with CMND(490) 6-3-4 Specific Socket Service Functions reception, data is received to the send/receive data addresses set in the parameter area. 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 CVM1/CV-series Ethernet Unit, so heritage programs can be easily corrected and reused.
  • Page 130: Socket Service Function Guide

    Socket Service Function Guide 6-3-5 Differences with Previous Models Socket Service Function Guide 6-4-1 Manipulating Dedicated Control Bits ■ Description ■ Point ■ Advantages/Disadvantages 6-4-2 Executing CMND(490) ■ Description ■ Point ■ Advantages/Disadvantages Compared with the socket service functions of previous models (CS1W- ETN01/11 and CJ1W-ETN11 Ethernet Units), the Number of Bytes Received at the TCP Socket that stores the size of received data accumulated in the reception buffer and a related Data Received Flag have been added.
  • Page 131: Using Socket Service Functions

    Using Socket Service Functions Using Socket Service Functions 6-5-1 Procedure Make the basic settings. Refer to SECTION 2 Startup Procedure in the Operation Manual Construction of Networks. ↓ Use the CX-Programmer or Programming Console to make the socket service settings in the socket service parameter areas 1 to 8 (m+18 to m+88) allocated in the DM Area.
  • Page 132: Setup Tab

    Using Socket Service Functions 6-5-3 Setup Tab ■ Setup The CPU Bus Unit System Setup, which is set when using socket services, is shown in the CX-Programmer's Unit Setup Window. Item Broadcast Set the method for specifying IP address when broadcasting with FINS/UDP. •...
  • Page 133 Using Socket Service Functions Item IP Router Table Set when the Ethernet Unit will communi- cate with nodes in other IP network seg- ments via an IP router. TCP/IP keep-alive Set the liveness checking interval (keep- alive). When using FINS/TCP or TCP/IP socket services, if the remote node (server or client) continues idling (no response) for the duration of time set...
  • Page 134: Socket Service Status

    Socket Service Status Socket Service Status 6-6-1 CIO Area Allocations ■ UDP/TCP Socket Status (Ethernet Unit to CPU Unit) The following CIO Area words are allocated in the CPU Bus Unit Area in the CIO Area starting at word n+ 1. The value of n can be calculated from the unit number as follows: Beginning word n = CIO 1500 + (25 x unit number) The status of the UDP and TCP sockets is provided in the socket status words...
  • Page 135: Dm Area Allocations

    Socket Service Status Switch Status Manipulated Opening Flag Receiving Flag Sending Flag Closing Flag Data Received Flag Results Storage Error Flag TCP Connection/UDP Open Flag 6-6-2 DM Area Allocations ■ Number of Bytes Received at TCP Socket (Ethernet Unit to CPU Unit) Data Received/Requested Flag Results Storage Flag TCP Connection/UDP Open Flag...
  • Page 136: Using Socket Services By Manipulating Dedicated Control Bits

    Using Socket Services by Manipulating Dedicated Control Bits ■ TCP Connection Status (Ethernet Unit to CPU Unit) 15 14 13 12 m+9 to m+16 Using Socket Services by Manipulating Dedicated Control Bits 6-7-1 Application Procedure Procedure 1,2,3... Up to 4,096 bytes of data are stored in the reception buffer, but the value stored is within the range (maximum: 1,984 bytes) that can be set by manipu- lating the control bits or sending the receive request in the CMND(490) instruction.
  • Page 137: Socket Services And Socket Status

    Using Socket Services by Manipulating Dedicated Control Bits CPU Bus Unit Area in the CIO Area Socket Service Socket Service Request Switches 2 Request Switches 1 Socket Service Socket Service Request Switches 8 Request Switches 7 6-7-2 Socket Services and Socket Status m = D30000 + (100 x unit number) CPU Bus Unit Area in the DM Area m+18...
  • Page 138 Using Socket Services by Manipulating Dedicated Control Bits Program Flow Check TCP Connection/UDP 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 139: Socket Service Parameters

    Using Socket Services by Manipulating Dedicated Control Bits 6-7-3 Socket Service Parameters The Socket Service Parameter Areas in which parameters are set to request socket services are 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 140: Parameter Settings

    Using Socket Services by Manipulating Dedicated Control Bits Parameter Settings UDP Socket Services Parameter Socket option 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 (Unit: 100 ms) Response code Note W:...
  • Page 141: Parameters

    Using Socket Services by Manipulating Dedicated Control Bits 6-7-4 Parameters ■ Socket Option ■ UDP/TCP Socket No. ■ Local UDP/TCP Port No. ■ Remote IP Address Read by user for results at completion ---: Not used. For the TCP OPEN REQUEST (ACTIVE or PASSIVE) command, specifies whether or not the keep-alive function is to be used.
  • Page 142 Using Socket Services by Manipulating Dedicated Control Bits ■ Remote UDP/TCP Port No. ■ Time Out Time ■ Number of Bytes to Send/Receive ■ Send/Receive Data Address If the Remote IP Address is set to 0, a connection can be made to any remote node and the remote IP address of the node that is connected will be stored as the Remote IP Address in the Socket Service Parameter Area.
  • Page 143: Socket Service Request Switches

    Using Socket Services by Manipulating Dedicated Control Bits 6-7-5 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 Dedicated control bits can be manipulated to request socket services. These bits are called Socket Service Request Switches, and are turned ON in the CPU Unit to request socket services through the Ethernet Unit.
  • Page 144: Response Codes

    Using Socket Services by Manipulating Dedicated Control Bits Switch Status Manipulated Close Request Switch Note There is also a Socket Force-close Switch in bit 2 of the first word allocated to 6-7-6 Response Codes UDP Socket Open Request UDP Socket Receive Request User Close processing executed when switch is turned ON.
  • Page 145 Using Socket Services by Manipulating Dedicated Control Bits UDP Socket Send Request UDP Socket Close Request Response code 1103 The bit number in the Send/Receive Data Address is not 00. 110C Request Switch turned ON during other processing. 220F Specified socket is already processing a receive request. 2210 The specified socket is not open.
  • Page 146 Using Socket Services by Manipulating Dedicated Control Bits TCP Socket Passive Open Request Note These response codes will be returned only on large, multilevel networks. TCP Socket Active Open Request Response code 0000 Normal end 0105 Local IP address setting error. 0302 CPU Unit error;...
  • Page 147 Using Socket Services by Manipulating Dedicated Control Bits Note These response codes will be returned only on large, multilevel networks. TCP Socket Receive Request Response code 000D Remote IP address parameter error (EACCES). 003E Internal buffer cannot be obtained due to high reception traffic (ENOBUFS).
  • Page 148 Using Socket Services by Manipulating Dedicated Control Bits Note These response codes will be returned only on large, multilevel networks. TCP Socket Send Request Note These response codes will be returned only on large, multilevel networks. Response code 004F ICMP data received (EHOSTDOWN). (See note.) 0051 ICMP data received (EHOSTUNREACH).
  • Page 149: Timing Charts

    Using Socket Services by Manipulating Dedicated Control Bits TCP Socket Close Request 6-7-7 Timing Charts Closing during Other Processes Response code 0000 Normal end 0302 CPU Unit error; cannot execute. 2210 The specified socket is not been connected. 2211 Unit is busy; cannot execute. 2607 Specified Socket Service Parameter Area is already being used for another socket.
  • Page 150 Using Socket Services by Manipulating Dedicated Control Bits 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 by Manipulating Dedicated Control Bits Note The Open Flag will not turn ON at all if a force-close request is made during 6-7-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 open processing.
  • Page 152 Using Socket Services by Manipulating Dedicated Control Bits Program Memory Map 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 15 to 8 CIO 0000...
  • Page 153: Using Socket Services By Manipulating Dedicated Control Bits

    Using Socket Services by Manipulating Dedicated Control Bits 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 by Manipulating Dedicated Control Bits Continued from previous page. 000001 000201 151905 <>(305) 000001 000201 151905 000002 000002 000202 000002 000202 000002 000202 151903 <>(305) 000002 000202 151903 000003 150913 =(300) 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...
  • Page 155: Udp/Ip Communications Programming Example

    Using Socket Services by Manipulating Dedicated Control Bits 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-7-9 UDP/IP Communications Programming Example System Configuration When the TCP Receiving Flag (CIO 000203) turns ON, MOV(21)
  • Page 156 Using Socket Services by Manipulating Dedicated Control Bits Basic Operations Program Memory Map • 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: Programming Example

    Using Socket Services by Manipulating Dedicated Control Bits 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 by Manipulating Dedicated Control Bits 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 by Manipulating Dedicated Control Bits 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) 6-8-1 Using Socket Service 1,2,3... Each Ethernet Unit has eight TCP sockets and eight UDP sockets. Open, close, send, and receive processes are available for communications with sockets. Open Enables communications on a specified socket. A socket must be opened before it can be used for socket services.
  • Page 161: Socket Services And Socket Status

    Using Socket Services with CMND(490) 6-8-2 Socket Services and Socket Status Ethernet Unit 4. When the process has been completed, the result is stored in the results storage area defined in the socket service request command and the sock- et status will indicate completion of processing. Socket status area Results storage area When using socket services, it is important to consider the timing of the status...
  • Page 162: Basic Fins Command Format

    Using Socket Services with CMND(490) 6-8-3 Basic FINS Command Format Command code Socket number Socket option 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 163: Response Codes In The Command Response

    Using Socket Services with CMND(490) Note If there is more than one Communications Unit mounted to the PLC, the FINS 6-8-4 Response Codes in the Command Response 6-8-5 Response Codes in the Results Storage Areas 6-8-6 Communications Timing Chart 6-8-7 Socket Service Timing Chart ■...
  • Page 164 Using Socket Services with CMND(490) ■ CLOSE REQUEST ■ SEND REQUEST ■ RECEIVE REQUEST Running Port Enabled Flag CMND(490) response code Close Flag Closing Flag Results storage area CLOSE REQUEST command received Running Port Enabled Flag CMND(490) response code Send Flag Opening Flag Results storage area SEND REQUEST...
  • Page 165: System Configuration

    Using Socket Services with CMND(490) ■ CLOSE REQUEST during RECEIVE REQUEST Note The timing shown in the above diagram occurs if a CLOSE REQUEST com- 6-8-8 TCP/IP Communications Programming Example System Configuration RECEIVE REQUEST command received Running Port Enabled Flag CMND(490) (RECEIVE REQUEST) response command CMND(490) (CLOSE REQUEST)
  • Page 166: Data Flow

    Using Socket Services with CMND(490) Data Flow Note Here, “execution bits” refer to CIO 000000 to CIO 000003, which are used in Basic Operations The data will flow between the CPU Unit, Ethernet Unit, and host computer as shown in the following diagram. Host Line Ethernet Unit...
  • Page 167 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 Number of TCP PASSIVE OPEN REQUEST command data bytes: 18 (0012 D00010 CMND(490) control data for TCP CLOSE REQUEST 0008H 0004H 0001H 0110H 0000H 0032H CMND(490) control data for TCP SEND REQUEST D00020...
  • Page 168 Using Socket Services with CMND(490) CMND(490) control data for TCP RECEIVE REQUEST D00030 000CH 0004H 0001H 0110H 0000H 0032H Number of bytes received specified in command data. TCP PASSIVE OPEN REQUEST command data D01000 2710H 0001H 8203H FC00H 1000H 0000H TCP PASSIVE OPEN REQUEST response D01010 2710H...
  • Page 169 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 170 Using Socket Services with CMND(490) CIO Area 15 to 8 CIO 0000 CIO 0001 CIO 0002 Receive Receive Error Flag Receiving Flag Section 6-8 Send Close Open Send Close Open Error Error Error Flag Flag Flag Opening Sending Closing Flag Flag Flag...
  • Page 171 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 A21900 000001 000201 A20200 150903 Continued on next page. @RSET TCP Passive Open When the TCP Open Bit (CIO 000000) turns ON, the TCP 000100...
  • Page 172 Using Socket Services with CMND(490) Continued from previous page. 000002 000002 000202 A20200 000002 000202 A20200 150902 150914 A21900 000002 000202 A20200 150902 000003 150913 =(300) 000003 000203 A20200 000003 000203 A20200 150901 150914 A21900 000003 000203 A20200 150901 Note When using the above programming example, change the bit and word TCP Send @RSET When the TCP Send Bit (CIO 000002) turns ON, the...
  • Page 173: Basic Operations

    Using Socket Services with CMND(490) 6-8-9 UDP/IP Communications Programming Example System Configuration Basic Operations The following programming example illustrates transferring 100 bytes of data between Ethernet Unit communications. For the UDP connection, the Ethernet Unit uses a PASSIVE OPEN and the host computer uses an ACTIVE OPEN.
  • Page 174 Using Socket Services with CMND(490) Program Memory Maps DM Area CMND(490) control data for UDP OPEN REQUEST D00000 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 175 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 D01030 2704H 0001H 8204H 1A00H UDP CLOSE REQUEST response D01040 2704H UDP CLOSE REQUEST results storage area D01050...
  • Page 176 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 177 Using Socket Services with CMND(490) Programming Example 000000 000000 000200 A20200 000000 000200 A20200 150100 150114 A21900 000000 000200 A20200 150100 000001 000001 000201 A20200 000001 000201 A20200 150103 150114 A21900 000001 000201 A20200 150103 Continued on next page. @RSET UDP Passive Open When the UDP Open Bit (CIO 000000) turns ON, the 000100...
  • Page 178 Using Socket Services with CMND(490) Continued from previous page. 000002 000002 000202 A20200 000002 000202 A20200 150102 150114 <>(305) A21900 000002 000202 A20200 150102 000003 000003 000203 A20200 000003 000203 A20200 150101 150114 <>(305) A21900 000003 000203 A20200 150101 Note When using the above programming example, change the bit and word UDP Send @RSET When the UDP Send Bit (CIO 000002) turns ON, the UDP...
  • Page 179: Precautions In Using Socket Services

    Precautions in Using Socket Services Precautions in Using Socket Services 6-9-1 UDP and TCP Socket Services 6-9-2 UDP Socket Service 6-9-3 TCP Socket Service • 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 180: Precautions In Using Socket Service Request Switches

    Precautions in Using Socket Services 6-9-4 Precautions in Using 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 181: Maximum Transmission Delays (Ignoring Other Network Delays)

    Precautions in Using Socket Services 6-9-5 Maximum Transmission Delays (Ignoring other Network Delays) ■ Requesting UDP Socket Services by Manipulating Dedicated Control Bits ■ Requesting TCP Socket Services by Manipulating Dedicated Control Bits ■ Requesting UDP Socket Services by Executing CMND(490) ■...
  • Page 182 Precautions in Using Socket Services Note Note 4: When the CPU Unit cycle time is less than 2 ms, A = 27, and when it is 2 ms or more, A = 53 1. The values obtained from the above equations are guidelines for the trans- mission delay time when one socket in the Ethernet Unit is used only.
  • Page 183: Using Fins Communications To Create Host Applications

    Using FINS Communications to Create Host Applications 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 PLC are sent via the SEND(090), RECV(098), and CMND(490) instructions programmed into the user ladder-diagram program.
  • Page 184: Overview Of Fins Communications

    Physical Layer The FINS communications service is a communications method based on UDP/IP, and it is supported by most OMRON Ethernet-related products. (In this manual it is called the FINS/UDP method.) In addition to supporting the FINS/UDP method, the CS1W-ETN21 and CJ1W-ETN21 support FINS com- munications using TCP/IP.
  • Page 185: Using The Fins/Udp And Fins/Tcp Methods

    Overview of FINS Communications 7-1-2 Using the FINS/UDP and FINS/TCP Methods It is recommended that FINS/UDP and FINS/TCP be used as follows: 7-1-3 FINS Communications Service Specifications for Ethernet Item Number of nodes Message length 2,012 bytes max. Number of buffers Protocol name FINS/UDP method Protocol used...
  • Page 186: Fins Frames

    FINS Frames FINS Frames The FINS communications service is carried out through the exchange of FINS command frames and their corresponding response frames. (There are also commands with no responses.) Both command frames and response frames are comprised of a FINS header for storing transfer control information, a FINS command field for storing a command, and a FINS parameter/data field for storing command parameters and transmission/response data.
  • Page 187: Fins/Udp Method

    FINS/UDP Method RSV (Reserved by Set to 00 (Hex). System) GCT (Permissible Number Set to 02 (Hex). of Gateways) DNA (Destination Network Specifies the number of the network where the destination node is located. Address) The address can be specified in the following range. 00 (Hex): 01 to 7F (Hex): DA1 (Destination Node...
  • Page 188 FINS/UDP Method The FINS/UDP method has the following features: FINS/UDP Frame The following diagram shows the structure of a UDP packet used for sending Format and receiving data on an Ethernet network. As the diagram shows, a nested structure is used with the FINS/UDP method, i.e., Ethernet Ver.
  • Page 189 FINS/UDP Method The UDP port number for the host application (e.g., personal computer) func- tions differently from the ports that can be used depending on the setting for the address conversion method at the Ethernet Unit. Basically, the same num- ber can be used for the UDP port number set in the Ethernet Unit (default: 9600), but the number does not need to be the same as the Ethernet Unit under the following application conditions.
  • Page 190: Sending Commands From A Host Computer

    FINS/UDP Method It is not necessary to set routing tables if one Communications Unit is mounted to the PLC and the nodes are connected as one network. For details on routing table, refer to the section on Creating Routing Tables in the Opera- tion Manual, Construction of Networks: Section 6 FINS Communications.
  • Page 191 FINS/UDP Method UDP port number: FINS addresses (Remote node CPU Unit): FINS addresses (Host computer): FINS/UDP Sample Program Operation Overview Settings FINS UDP port number (Ethernet Unit of relay node) Network address: 2 Node address: 1 Unit number: 0 Network address: 1 Node address: 50 Unit number: 0 •...
  • Page 192: Sample Program

    FINS/UDP Method Sample Program 1 #include <errno.h> 2 #include <stdio.h> 3 #include <sys/types.h> 4 #include <sys/socket.h> 5 #include <netinet/in.h> 6 #include <signal.h> 8 #define FINS_UDP_PORT 9600 9 #define SERV_IP_ADDR "196.36.32.100" /* Ethernet Unit IP ADDRESS*/ 10 #define MAX_MSG 2010 11 #define RESP_TIMEOUT 2 14 /* 15 * FINS/UDP COMMUNICATIONS SAMPLE PROGRAM 16 */...
  • Page 193 FINS/UDP Method ALLOCATE ADDRESS bzero((char *) & s_addr,sizeof(ws_addr)); ws_addr.sin_family = AF_INET; ws_addr.sin_addr.s_addr = htonl(INADDR_ANY); ws_addr.sin_port = htons(0); /* GET AVAILABLE PORT FOR LOCAL UDP PORT */ if (bind(sockfd,(struct sockaddr *)&ws_addr,sizeof(ws_addr)) < 0) err_exit("can't bind local address"); GENERATE MEMORY AREA READ COMMAND * (READ 150 WORDS FROM DM 100) fins_cmnd[0] = 0x80;...
  • Page 194 FINS/UDP Method /* 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; RE-SEND err_exit("receive error"); else alarm(0); STOP RESPONSE printf("recv length %d¥n",recvlen); if (recvlen < 14) ILLEGAL 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...
  • Page 195: Fins/Tcp Method

    FINS/TCP Method FINS/TCP Method 7-4-1 Overview FINS/TCP Features The FINS/TCP method is a FINS communications method that uses the TCP/ IP protocol. TCP/IP is a connection-type communications protocol. Before a message is sent from one node to another, it is necessary to establish a vir- tual circuit, i.e., a connection.
  • Page 196 FINS/TCP Method FINS/TCP Frame Format Ethernet V.2 TCP Port Number for FINS/TCP FINS/TCP Connection Numbers • Once a FINS/TCP connection (connection number, remote IP address) has been set in the Unit Setup, it can be dynamically changed from the ladder program using a FINS command (i.e., FINS/TCP CONNECTION REMOTE NODE CHANGE REQUEST).
  • Page 197: Communications Procedure

    FINS/TCP Method FINS/TCP Connection While a connection with a remote node is established, the bit corresponding to Status (Word n+23) the FINS/TCP connection status turns ON in the section of the CPU Bus Unit words allocated in the CIO Area. The bit turns OFF if the connection is termi- nated by an error in communications with a remote node or a FINS command (i.e., FINS/TCP CONNECTION REMOTE NODE CHANGE REQUEST).
  • Page 198 FINS/TCP Method Note Automatic Allocation of FINS Node Addresses ■ Automatic Allocation Procedure Personal computer Example: IP address C FINS node address 0 Active open Connection established Local node address sent Remote node address received FINS frame sent • If there is no response from the client when the keep-alive function is in effect.
  • Page 199 FINS/TCP Method ■ Setting Range for Automatic Allocation of FINS Node Addresses The range of node addresses that can be used as automatically allocated FINS node addresses is set in the Ethernet Unit’s Unit Setup. Normally (default status), node addresses 239 to 254 are allocated to each of the con- nections 1 to 16.
  • Page 200 FINS/TCP Method Procedure for Using FINS/TCP Make the basic settings. Refer to Section 2 Startup Procedure in the Operation Manual, Construction of Net- works. Make the settings in the Unit Setup. With the CX-Programmer connected online, select the Ethernet Unit in the CX-Program- mer's I/O Table Window.
  • Page 201: Fins/Tcp Mode Specifications

    FINS/TCP Method 7-4-2 FINS/TCP Mode Specifications FINS/TCP Headers FINS NODE ADDRESS DATA SEND (CLIENT TO SERVER) Command FINS NODE ADDRESS DATA SEND (SERVER TO CLIENT) Command • When routing tables are used for one or more other nodes on the same network.
  • Page 202 FINS/TCP Method When automatically allocated FINS node addresses are set, the client node address automatically allocated at the server is stored in the client node address field. After a connection has been established as a FINS/TCP client or server, do not send this command again.
  • Page 203 FINS/TCP Method FINS/TCP header The details of the above frame are shown in the following table. FINS FRAME SEND If an error occurs in the FINS/TCP header of the FINS FRAME SEND com- ERROR NOTIFICATION mand, this command is used so that an error code will be returned to the node Command that sent the FINS FRAME SEND command by the node that detected the error.
  • Page 204: Connection Sequence

    FINS/TCP Method After the command is sent, if ACK is returned in the TCP layer by the remote node, the connection that is established is maintained. If RST is returned in the TCP layer by the remote node, the established connection is closed. If the FINS NODE ADDRESS DATA SEND (CLIENT TO SERVER) or FINS NODE ADDRESS DATA SEND (SERVER TO CLIENT) command is received after a connection has already been established as a FINS/TCP client and...
  • Page 205 FINS/TCP Method 1,2,3... 1. After the TCP connection is established, the client node address is sent by 2. The client’s FINS node address (client node address) is obtained from the 3. The server’s node address is sent by the server to the client using the FINS 4.
  • Page 206 FINS/TCP Method Connection Sequence for Automatic Allocation of FINS Node Addresses 1,2,3... 1. The client specifies the client node address as 00000000 hexadecimal in 2. The server checks the client node address in the received command to see 3. The server stores its own node address in the server node address field 4.
  • Page 207 FINS/TCP Method Recovery Connection Sequence when Host Computer (WS) is Stopped by an Error 1,2,3... In steps 1 to 4 the FINS message send and receive processing is performed using the FINS FRAME SEND command. 5. This example assumes that the host computer’s power is unexpectedly in- 6.
  • Page 208: Sending Commands From A Host Computer

    FINS/TCP Method From step 12 onwards, the connection is established again. Note When FINS node addresses are automatically allocated, the node address cannot be specified, so the connection remains open until it is closed by the keep-alive function. 7-4-3 Sending Commands from a Host Computer When sending FINS commands from a computer, the command data in the computer’s program must be created in command frame format.
  • Page 209 FINS/TCP Method ■ Example 2: Host Computer and Remote Node Connected Via Relay Node (Ethernet Unit) Destination IP Address: 196.36.32.100 (Ethernet Unit of relay node) UDP port number: FINS addresses (Remote node CPU Unit): FINS addresses (Host computer): FINS/TCP Sample Program Operation Overview Settings...
  • Page 210 FINS/TCP Method Sample Program 1 #include <errno.h> 2 #include <stdio.h> 3 #include <sys/types.h> 4 #include <sys/socket.h> 5 #include <netinet/in.h> 6 #include <signal.h> 8 #define FINS_TCP_PORT 9600 9 #define SERV_IP_ADDR "196.36.32.100" /* Ethernet Unit IP ADDRESS*/ 10 #define MAX_MSG 2010 11 #define MAX_HEADER 32 12 #define RESP_TIMEOUT 2 15 /* 16 * FINS/TCP...
  • Page 211 FINS/TCP Method ALLOCATE IP ADDRESS AND PORT # TO SOCKET*/ bzero((char *) &ws_addr,sizeof(ws_addr)); ws_addr.sin_family = AF_INET; ws_addr.sin_addr.s_addr = htonl(INADDR_ANY); ws_addr.sin_port = htons(0); /* ASSIGN LOCAL TCP PORT NUMBER if (bind(sockfd,(struct sockaddr *)&ws_addr,sizeof(ws_addr)) < 0) err_exit(“can’t bind local address”); /* ESTABLISH CONNECTION WITH FINS/TCP SERVER*/ bzero((char *) &cs_addr,sizeof(cs_addr));...
  • Page 212 FINS/TCP Method else err_exit("FINS/TCP header send error"); /*RECEIVE FINS/TCP COMMAND recvlen = 24; if (tcp_recv(sockfd, fins_tcp_header, recvlen) == recvlen) alarm(0); /*STOP RESPONSE MONITOR /* CONFIRM WHETHER FINS (CLIENT SERVER) if ((fins_tcp_header[8] != 0x00) | (fins_tcp_header[9] != 0x00) | 0x00) || (fins_tcp_header[11] != 0x01)) (fins_tcp_header[10] != err_exit("FINS/TCP illegal command error");...
  • Page 213 FINS/TCP Method alarm(RESP_TIMEOUT); /* START RESPONSE MONITOR TIMER*/ printf("FINS/TCP header send length %d¥n",sendlen); else { err_exit("FINS/TCP header send error"); /* SEND FINS COMMAND FRAME*/ GENERATE MEMORY AREA READ COMMAND * (READ 150 WORDS FROM DM 100) fins_cmnd[0] = 0x80; /* ICF */ fins_cmnd[1] = 0x00;...
  • Page 214 FINS/TCP Method printf("FINS/TCP header receive length %d¥n",recvlen); recvlen = fins_tcp_header[6]; recvlen <<=8; recvlen += fins_tcp_header[7]; recvlen -= 8; /* SUBTRACT LENGTH OF COMMAND & ERROR CODE OF FINS/TCP HEADER*/ printf("FINS/TCP frame receive length %d¥n",recvlen); else err_exit("TCP receive error"); /* RECEIVE FINS RESPONSE FRAME*/...
  • Page 215 FINS/TCP Method int total_len = 0; int recv_len; for (;;) recv_len = recv(sockfd, (char *)buf, len, 0); if (recv_len > 0) if (recv_len < (int)len) len -= recv_len; buf += recv_len; total_len += recv_len; else total_len += recv_len; break; else err_exit("TCP receive error");...
  • Page 216: Maximum Transmission Delays: Writing/Reading To Cpu Unit

    Maximum Transmission Delays: Writing/Reading to CPU Unit Maximum Transmission Delays: Writing/Reading to CPU Unit The time for the response to be received after a remote node on the Ethernet network sends a memory area read or write command to a PLC can be calcu- lated using the following formula.
  • Page 217 Maximum Transmission Delays: Writing/Reading to CPU Unit For details, refer to the CPU Unit operation manual. Transmission Processing 0.704 ms (Response) Note The actual operating environment can cause transmission delays larger than those calculated with the methods given here. Among the causes of longer delays are the following: traffic on the network, window sizes at network nodes, traffic through the Ethernet Unit (e.g., simultaneous socket servicing and FTP server communications, etc.), and the system configuration.
  • Page 218: Example Calculations

    Maximum Transmission Delays: Writing/Reading to CPU Unit For details, refer to the CPU Unit operation manual. CPU Bus Unit Service The processing time will be as follows, depending on the CPU processing Processing Time mode settings at the CPU Unit. For details, refer to the CPU Unit operation manual.
  • Page 219: 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 220 Appendix A Ethernet Network Parameters...
  • Page 221: Buffer Configuration

    Appendix B Buffer Configuration UDP socket reception request buffers (8 × 9,016 max.) TCP socket reception request buffers (8 × 4,096 max.) FTP service reception buffer (4,096 bytes) FINS reception buffer (16,383 FINS processing bytes max.) buffers (192 × 2,020 bytes) FTP service send buffer (4,096 bytes)
  • Page 222 Appendix B 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.
  • Page 223: 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 Status CLOSED LISTEN SYN SENT SYN RECEIVED ESTABLISHED CLOSE WAIT...
  • Page 224 Appendix C TCP Status Transitions...
  • Page 225: 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 D ASCII Characters Bits 5 to 7 0001 0010 0011 Space ” & ’ < > 0100 0101 0110 0111...
  • Page 226 Appendix D ASCII Characters...
  • Page 227: 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 228 Appendix E Maintenance...
  • Page 229: 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 230 Appendix F Inspections...
  • Page 231: Index

    Numerics 100Base-TX transmission delays 10Base-T transmission delays Accessing Memory/Receiving Mail Flag Accessing Memory/Sending Mail Flag Account Name field Adjust Time field applications examples mail send function using UNIX precautions xxiv ASCII characters Attached file name field Attached file type field attached files extensions file data...
  • Page 232 delete command dir command DNS communications DNS server automatic clock adjustment errors DNS Tab initial settings EC Directives xxvi electromagnetic fields xxiv EM File Memory using E-mail attached files receiving body command line compression data sent decoding destination e-mail-address encoding encryption errors troubleshooting...
  • Page 233 FileWrite command command/response format FileWrite field FINS communications address conversion application layers commands CONNECTION CONFIRMATION FINS FRAME SEND FINS FRAME SEND ERROR NOTIFICATION FINS NODE ADDRESS DATA SEND (CLIENT TO SERVER) FINS NODE ADDRESS DATA SEND (SERVER TO CLIENT) FINS frames format headers FINS/TCP method...
  • Page 234 I/O memory data CSV format IOM format TXT format I/O tables creating inspections installation location xxiv Interval time field IO memory data field IOM field IOM format IOMRead command command/response format IOMRead field IOMWrite command command/response format IOMWrite field IP Address field IP communications IP addresses remote devices...
  • Page 235 send timing sending method (encoding) settings DNS Tab Mail Address Tab POP Tab SMTP Tab SMTP settings status Send Mail Status 1 Send Mail Status 2 status information subject triggers user-set information Mail Send Switch MailLogClear command command/response format MailLogClear field MailLogRead command command/response format MailLogRead field...
  • Page 236 TCP/IP UDP/IP put command pwd command quit command radioactivity xxiv READ DATA FILE (FREAD) instruction Receive file with specified extension only field Receive Mail Tab Receive Request Switch Receive specified commands only field remote mail commands accessing CPU Unit’s I/O memory area changing the CPU Unit’s operating mode command/response format file memory operations...
  • Page 237 port numbers status TCP sockets number status UDP socket number UDP sockets Software switch field specifications FTP server mail receive function mail send function SRES static electricity xxiv precautions STD field switches Socket Service Request Switches TCP Active Open Request Switch TCP communications comparison with UDP data fragmentation...
  • Page 238 Index...
  • Page 239: Revision History

    A manual revision code appears as a suffix to the catalog number on the front cover of the manual. The following table outlines the changes made to the manual during each revision. Page numbers refer to the previous version. Revision code Date July 2003 March 2004...
  • Page 240 Revision History...
  • Page 241 The Netherlands Tel: (31)2356-81-300/Fax: (31)2356-81-388 OMRON ELECTRONICS LLC 1 East Commerce Drive, Schaumburg, IL 60173 U.S.A. Tel: (1)847-843-7900/Fax: (1)847-843-8568 OMRON ASIA PACIFIC PTE. LTD. 83 Clemenceau Avenue, #11-01, UE Square, Singapore 239920 Tel: (65)6835-3011/Fax: (65)6835-2711 OMRON (CHINA) CO., LTD. Room 2211, Bank of China Tower,...
  • Page 242 Authorized Distributor: Cat. No. W421-E1-03 Note: Specifications subject to change without notice Printed in Japan This manual is printed on 100% recycled paper.

This manual is also suitable for:

Cs cs1w-etn21Sysmac cs1w-etn21Sysmac cj1w-etn21

Table of Contents