Manual Ethernet Interface

Download as pdf or txt
Download as pdf or txt
You are on page 1of 124

HITACHI PROGRAMMABLE CONTOROLLER

H-SERIES
Intelligent Ethernt
Interface Module 2

Instruction Manual

Type : LAN- E T H 2

NOTICE : Make sure to have this manual available to the person directly responsible for use
and maintenance of this unit. After installation and initialization, file the manual for
future reference.

NJI-426B(X)
{ Warranty period and coverage
The warranty period is the shorter period either 18 months from the date of manufacture or 12 months from the
date of installation.
However within the warranty period, the warranty will be void if the fault is due to;
(1) Incorrect use as directed in this manual and the application manual.
(2) Malfunction or failure of external other devices than this unit.
(3) Attempted repair by unauthorized personnel.
(4) Natural disasters.
The warranty is for the PLC only, any damage caused to third party equipment by malfunction of the PLC is not
covered by the warranty.

{ Repair
Any examination or repair after the warranty period is not covered. And within the warranty period any repair and
examination which results in information showing the fault was caused by any of the items mentioned above, the
repair and examination cost are not covered. If you have any questions regarding the warranty please contact either
your supplier or the local Hitachi Distributor. (Depending on failure part, examination might be impossible.)

{ Ordering parts or asking questions


When contacting us for repair, ordering parts or inquiring about other items, please have the following details
ready before contacting the place of purchase.
(1) Model
(2) Manufacturing number (MFG no.)
(3) Details of the malfunction

Warning
(1) This manual may not be reproduced in its entirety or any portion thereof without prior consent.
(2) The content of this document may be changed without notice.
(3) This document has been created with utmost care. However, if errors or questionable areas are found, please
contact us.

MS-DOS, Windows, and Windows NT are registered trademarks of America and other registered countries
of Microsoft Corp. of the United States.
Safety Precautions

Read this manual and related documents thoroughly before installing, operating, performing preventive maintenance or
performing inspection, and be sure to use the unit correctly. Use this product after acquiring adequate knowledge of the
unit, all safety information, and all cautionary information. Also, make sure this manual enters the possession of the
chief person in charge of safety maintenance.
Safety caution items are classified as “Danger” and “Caution” in this document.

: Cases where if handled incorrectly a dangerous circumstance may be created, resulting in


DANGER
possible death or severe injury.

: Cases where if handled incorrectly a dangerous circumstance may be created, resulting in


CAUTION
possible minor to medium injury to the body, or only mechanical damage.

However, depending on the circumstances, items marked with CAUTION may result in major accidents.

In any case, they both contain important information, so please follow them closely.

Icons for prohibited items and required items are shown below:

: Indicates prohibited items (items that may not be performed). For example, when open flames are prohibited,

is shown.

: Indicates required items (items that must be performed). For example, when grounding must be performed,

is shown.

1. About installation

CAUTION
• Use this product in an environment as described in the catalog and this document.
If this product is used in an environment subject to high temperature, high humidity, excessive dust, corrosive
gases, vibration or shock, it may result in electric shock, fire or malfunction.

• Perform installation according to this manual.


If installation is not performed adequately, it may result in dropping, malfunction or an operational error in the
unit.

• Do not allow foreign objects such as wire chips to enter the unit.
They may become the cause of fire, malfunction or failure.
2. About wiring

REQUIRED
• Always perform grounding (FE terminal).
If grounding is not performed, there is a risk of electric shocks and malfunctions.

CAUTION
• Connect power supply that meets rating.
If a power supply that does not meet rating is connected, fire may be caused.

• The wiring operation should be performed by a qualified personnel.


If wiring is performed incorrectly, it may result in fire, damage, or electric shock.

3. Precautions when using the unit

DANGER
• Do not touch the terminals while the power is on.
There is risk of electric shock.

• Structure the emergency stop circuit, interlock circuit, etc. outside the programmable controller (hereinafter
referred to as PLC).
Damage to the equipment or accidents may occur due to failure of the PLC.
However, do not interlock the unit to external load via relay drive power supply of the relay output module.

CAUTION
• When performing program change, forced output, RUN, STOP, etc., while the unit is running, be sure to verify
safety.
Damage to the equipment or accidents may occur due to operation error.

• Supply power according to the power-up order.


Damage to the equipment or accidents may occur due to malfunctions.
4. About preventive maintenance

DANGER
• Do not connect the , of the battery in reverse. Also, do not charge, disassemble, heat, place in fire, or
short circuit the battery.
There is a risk of explosion or fire.

PROHIBITED
• Do not disassemble or modify the unit.
These actions may result in fire, malfunction, or malfunction.

CAUTION
• Turn off the power supply before removing or attaching module/unit.
Electric shock, malfunction or failure may result.
Revision History

No. Description of Revision Date of Revision Manual Number


1 The first edition 2002/11 NJI-426(X)
2 Correct the error in writing. 2003/01 NJI-426A(X)
3 Table 1.1.1 and Paragraph 3.2 is changed. Correct the Figure 5.1.2.7 2003/05 NJI-426B(X)
Table of contents
Safety Precautions

Chapter 1 Introduction ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-1


1.1 Before to use ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-1
1.2 Product location ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-2
1.3 Feature ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-2
1.4 Notes to use・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-3
1.4.1 General notes ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-3
1.4.2 No response of Task code communication・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-4
1.4.3 Close procedure of message communication ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-5
1.4.4 Notes using on H-4010 (CPU3-40H)・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-5
1.4.5 Network equipment ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-6
1.4.6 Mis-setting of module configuration post ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-6
1.5 Term and abbreviation ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-6
1.6 Difference with LAN-ETH ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 1-6

Chapter 2 Specifications ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1


2.1 General Specifications ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1
2.2 Performance Specifications・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1
2.3 Functional Specifications ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 2-1

Chapter 3 Installation and System configuration ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1


3.1 Installation and setting ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1
3.1.1 Installing location and notes on installing ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1
3.1.2 Set of module configuration post ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-1
3.2 Example for installation and laying of cable・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-2
3.3 Basic system configuration ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-3
3.4 Extended system configuration ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 3-4

Chapter 4 Name of each parts and function ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-1


4.1 Structure ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-1
4.2 Setting of mode switch ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-2
4.2.1 Setting of mode switch 1 ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-2
4.2.2 Setting of mode switch 2 ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-3
4.3 Status LED ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-4
4.4 Port1 (PORT1) ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-5
4.5 10BASE-T port (10BT) ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 4-5

Chapter 5 Communication function ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-1


5.1 Before to communicate ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-1
5.1.1 Control register and status register・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-1
5.1.2 IP addresss setting ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-4
5.2 Communication with task code ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-12
5.2.1 Outline ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-12
5.2.2 Communication protocol and flame format ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-13
5.2.3 H series network address ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-14
5.2.4 Occupation・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-15
5.2.5 Task code communication matrix ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-16
5.2.6 Example of task code issue ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-18
5.2.7 Sample program of host computer ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-19
5.3 Message communication ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-22
5.3.1 Transmission parameter ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-22
5.3.2 Configuration of transmission parameter ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-34
5.3.3 Processing of connection open/close ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-41
5.3.4 Processing of message send ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-50
5.3.5 Processing of message receive ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 5-54

Chapter 6 Other function ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-1


6.1 Software reset ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-1
6.2 Error clear ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-3
6.3 Test function ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-5
6.3.1 Internal loop back test ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-5
6.3.2 External loop back test・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-6
6.3.3 Send/receive test ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 6-7

Chapter 7 Maintenance,check,troubleshooting ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-1


7.1 Daily check ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-1
7.2 Regular check ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-1
7.3 Error LED and measure ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-2
7.4 Troubleshooting ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-5
7.4.1 Cause of error and analyzing method・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-5
7.4.2 Troubleshooting flow chart ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 7-6

Chapter 8 Sample program ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 8-1


8.1 Consideration for programming ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 8-1
8.2 Message communication ・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・・ 8-2
Chapter 1 Introduction

Chapter 1 Introduction
Thank you adoption Hitachi programmable controller H series.
This manual is written about dealing of the intelligent ethernet interface module 2 (LAN-ETH2) for Hitachi programmable
controller H series.
When this book is perused, use it for the creation of a program, the installation operation and maintenance inspection.
And there is the following thing as a manual of a related apparatus. Please show to it.

Table 1.1 The list of documentation

Items Name of documentation Number of Manual


Specification of all CPU module CPU module (by hardware) NB-322D
CPU module (by software) NB-323D
Programming software LADDER EDITOR for Windows®(Windows®95/98/NT4) NJI-206/299

Intelligent ethernet interface LAN-ETH2 application manual (this book) NJI-426


module 2

*The last character of the manual number may be modified when the product is revised.
*Notes. The contents of this manual may be modified without previous notice.

1.1 Before using


This product is manufactured carefully. After purchase, check the following items immediately.

(1) Is a type the same as the thing that orderd it ?

(2) Is not there a place where is damaged while transporting ?


(3) Are the packing goods complete ?
If you find any inconvenience, inquire it to your agent.

Table 1.1.1 LAN-ETH2 List of packing conents

No. Products Name Model number Outlook Quantitiy Notes


(CAUTION)
Please confirm the form of CPU
module, Before this module is
Intelligent ethernet
1 LAN-ETH2 1 used . To use this module, CPU
interface module 2
of the (2) of paragraph 1.4.1
description is needed.

2 10 BASE T - - 1 Mounted on the module


connector cap

When this manual is revised, “*”


Application manual
3 NJI-426*(X) 1 mark of “NJI-426*(X)” is updated.
(this book)

For CE marking (EMC restriction).


Please refer to paragraph 3.2
4 Ferrite core SFC-10 1 "Example for installation and
laying of cable" for the mounting
method.

1-1
Chapter 1 Introduction

1.2 Product location


LAN-ETH2 is H series module which is used to connect H series PLC to a CSMA/CD method Local Area Network
based on IEEE802.3.

LAN-ETH2 operates as a station in network. LAN-ETH2 connected in network makes possible to communicate
among H series PLC, workstation and personal computers.

Data Base Server


Personal Computer Workstation

HUB

Ethernet(UTP cable)

H series PLC H series PLC

EH series PLC

LAN-ETH2 LAN-ETH2

H series CPU Link Network


Optical/Coaxial 1M bit/s

H series PLC EH series PLC

1.3 Feature
(1) Because LAN-ETH2 is a general purpose LAN, it has varios connectable equipments(CSMA/CD 10 BASE T based
on IEEE802.3).
(2) It is possible to communicate with other equipments in high speed.(10Mbps)
(3) You can select a communication protocol according to yor needs(TCP/IP or UDP/IP).
(4) It is possible to make several connections at once(6 for message communication and 2 for communication with task
code).
(5) You can send in broadcast on UDP/IP.

1-2
Chapter 1 Introduction

1.4 Notes to use

1.4.1 General notes


(1) After applying the power to LAN-ETH2 module or press RESET switch, it takes about 8 seconds until the module
is ready. Please be care of this waiting time when you construct a system.
(2) Because LAN-ETH2 module reads and writes CPU internal output directly same as like BASIC module, 
please use
CPU module corresponding to BASIC module.(*1)
If you use CPU module which is not correspond to BASIC module, LAN-ETH2 does not operate normally.
(3) Because many internal outputs are used in message communication, we recommend to use enhance CPU that is
higher than H-1002(memory 48K words).
If you transmit a large amount of data with a memory cassette with small capacity, you might be make a cpmplex
ladder program.
(4) Please fix to the base firmly with the module fixation screw (two places) when you mount this module.
(5) Static electricity may cause a serious trouble on LAN-ETH2 module. When you touch a terminal chassis,
connector, module mounting screw and so on, dishcarge static electricity in your hands with an earth stick in
advance.
(6) The parts in LAN-ETH2 module and base mounting connector pin is not for user maintenance. Be careful not
to touch them.
(7) Never mount LAN-ETH2 on the base and remove it from the base when power is applied because the operation
may cause trouble on the module. In the worst case,the whole system may be downed.
(8) Be sure to earth FG terminal of power module in a base what LAN-ETH2 is mounted with less than 100Ω safety
and to prevent a fault operation with noise.
(9) In case of constructing network system using LAN-ETH2, it is necessary to use software according to connected
equipment (workstation, personal computer etc.). Please check up your system in detail and prepare (purchase or
make newly) the needed software.
(10) Please note the allocation of IP address and the logical port number when you make the network system of existing
add LAN-ETH2.
There is a possibility that the inconvenience is generated in the network system if an improper value is set.
(11) LAN-ETH2 can be mounted up to two on a basic base simultaneously and can’t be mounted on extended base.
LAN-ETH2 does not operate normally when three or more LAN-ETH2 are mounted on a basic base.
The mount capacity varies according to the other modules (ex. LAN-ETH, BASIC-H, LAN-SNH(This is product
for Japan only) etc.), so that be sure to set module configuration post when you use the system.

*1) Type : CPU2-**H, CPU3-40H or CPU module that is printed “FOR BASIC”

1-3
Chapter 1 Introduction

1.4.2 No response of Task code communication


[Phenomenon]
If the timeout of the task code communication is not observed when the communication interrupts in the task
code communication processing by pulling out the cable, the communication might not be able to be
restarted. Please do the following measures. The task port timeout watch time is recommended to be set in a
proper value according to the communication system even if there is no above-mentioned problem.

[Cause]
The host (PC and workstation, etc.) detects the communication error by pulling out the cable, it closes the
connection and open the connection again. At this time, host's TCP/IP software automatically increases one
on logical port number, and opens the connection normally (for instance, Winsock). However, LAN-ETH2
disregards data from the host who opens again to wait for data from the host by the logical port number
before, becomes no response, and the communication stops.

[Measures]Please execute (1) and (2) as below.


(1) Timeout watch of task port on LAN-ETH2 side
Please set appropriate time according to the communication system at the timeout time usually.
Please refer to “5.1.2 IP address setting”.
(2) Transmit the termination command at first, when the host open the connection and communicates with task
code.
If the termination command is received, LAN-ETH2 breaks off the processing of the request task code
received before, and becomes initial of the following task code waiting.
Please refer to “5.2.2 Communication protocol and flame format”.
* Please put the interval of 50ms or more in the following task request after transmitting the termination
command.

(Note)
By doing measures of above-mentioned (1) and (2), the timeout can usually work when the line is
intercepted, the communication can be restarted. In this case, ERR LED lights (*1).
(*1) There are the following two kinds of cases at time until ERR LED lights.
• 20 second later
• (20 second + time-out time of task port) later

However, there is unusually a case which does not become a timeout according to the timing of the line
interception but becomes no response. ERR LED can not be lighted in this case. The task code
communication cannot be restarted, because it is not possible to open the connection.
In LADDER EDITOR for Windows, "Communication abnormality (109)" is displayed, and it is not
possible to connect.

Disposal : When no response occurred, the communication can be restarted by doing the following
processing.

Press the RESET switch of LAN-ETH2. Or, the software reset function is executed.
(Refer to "6.1 Software reset")

1-4
Chapter 1 Introduction

1.4.3 Close procedure of message communication


Please close the connection on the client side (active) and the server side (passive), as follow procedure. That is,
closing from the other side (Generally, it is a client) one by one. The close operation might not be able to normalize,
when the connection is closed at the same time by both.

Close procedure
(1) Basic close procedure
c The connection is closed by the client.
d The server confirms the close request from the client.
e The connection is closed by the server.
(2) Close procedure of LAN-ETH2
(2-1) Procedure to which LAN-ETH2 closes previously
c The connection is closed by LAN-ETH2.
d The other station confirms the close request from LAN-ETH2.
e The connection is closed by the other station.
(2-2) Procedure to which LAN-ETH2 closes later (*)
c The connection is closed by the other station.
d LAN-ETH confirms the close request from the other station.
e The connection is closed by LAN-ETH2.
(*) When the other station can't confirm the close request, please close the connection by this procedure, even
if LAN-ETH2 is client.

(Note) In LAN-ETH2, it is possible to close by resetting the open request flag. The close request of the other
station can be confirmed in status area 4.
Please refer to “5.3.3 Processing of connection open/close”.

1.4.4 Notes using on H-4010 (CPU3-40H)


When you use LAN-ETH2 with H-4010 (CPU3-40H), please note the following.

(1) Please do not access "LAN-ETH2" at the same time by two task code ports when software revision of H-4010 is
before "M". In this case, an abnormal communication are generated and the communication stops occasionally.
Please see the manual (NJI-279*) of H-4010 about H-4010 software revision.
(2) When DIP SW is operated according to the following procedures, communicate is correctly done.
However, in H-4010, if the power supply is not turned on again , the communication is not correctly done.
A). DIP SW of LAN-ETH2 is set besides normal operation mode and the power supply is turned on.
B). It keeps for about 20 seconds or more.
C). DIP SW is set in normal operation mode, and reset SW is pushed.
After the operation of above (A)(B)(C), it is not possible to communicate by the Ethernet.
In case of "LADDER EDITOR for Windows", it is displayed as "Communication error" and can't connect to H-
4010.
Please turn on the power supply again after setting "IP address" etc. to set LAN-ETH in normal operation mode.
(4) When "IP address" is set according to the following procedures, "IP address" is stored in special internal output
(from WRF022 to WRF031). However, in H-4010, if the power supply is not turned on again, "IP address" is not
stored in special internal output.
A). The "IP address" setting of LAN-ETH2 is executed.
B). DIP SW is changed to the normal operation mode, and reset SW is pushed.

1-5
Chapter 1 Introduction

1.4.5 Network equipment


The network equipment (HUB and twisted-pair cable, etc.) which connects LAN-ETH2 must use the one with
reliability to the coming from outside noise. There is a possibility to interfere to the communication when the
equipment influenced easily by the coming from outside noise is used.

Note
In a part of maker's HUB, the response might worsen. In that case, please inquire of the shop or sales of the nearest.

1.4.6 Mis-setting of module configuration post


LAN-ETH2, LAN-ETH, ELINK-H, SUMINET-3200 communication I/F module (LAN-SNH, this is a product for
Japan only) and BASIC module (BASIC-H) can be installed up to 2 among basic bases. In this case, module
configuration post of each module must be set as shown in the description in “3.1.2 Set of module configuration post”.
Be careful please not to operate normally when you mistake setting a module configuration post of LAN-ETH2.
Especially, WDE LED lights occasionally when the "IP address" etc. is set by mistake.

1.5 Term and abbreviation


Table 1.5.1 shows the term and abbreviation in this manual.
Table 1.5.1 Term and abbreviations

Term / abbreviation Explanation


Task code This is original communication protocol for H-series PLC.
Task code connection This is connection for task code communication.

1.6 Difference with LAN-ETH


Table 1.6.1 Difference with LAN-ETH
Difference Reference section
(1) 10 BASE 5 (Coaxial cable) is not supported. “4.1 Structure”
(2) The position of a module configuration post moved to the dip switch on the “4.1 Structure”
front side from the module side.
(3) Setting the gateway address for the message communication became “5.3.1 Transmision parameter [q]
only one kind. Routing information”
(LAN-ETH sets 32 kinds.)
(4) The default value of "IP address" was changed as follows. “5.1.2 IP address setting”
Own IP address : 192.168.0.1 Å 192.0.0.1
IP address of other station : 192.168.0.254 Å 192.0.0.255
(5) The content of the error is understood from the blinking frequency of STAS “4.3 Status LED”
LED.
(6) Setting of “IP address” etc. can be done from the personal computer. “5.1.2 IP address setting (7)IP
However, the following environment is necessary. address information setting (Port
Personal computer : Windows95, Windows98, WindowsMe, 1)”
Windows2000, WindowsXp
Connected cable : WVCB02H+EH-RS05, or EH-VCB02
Software : “LAN-ETH2 IP address set tool”
(Please contact our sales about details.)
(7) The subnet mask is not supported.

1-6
Chapter 2 Specifications

Chapter 2 Specifications
2.1 General Specifications
Table 2.1.1 General specification

Item Specification
Internal power consumption 5 V DC 1.1Amax (Supplied by power module)
Operating ambient temperature and humidity 0 ∼ 55 °C, 20 ∼ 90 % RH (no condensation)
Storage ambient temperature and humidity −10 ∼ 75 °C, 10 ∼ 90 % RH (no condensation)
Noise resistance Noise voltage 1,500 Vpp, noise width 100 ns, 1 µs
static electricity noise is up to 3000V on metallic face
Vibration resistance Conforms to JIS C 0911
Environment No corrosive gas, oil. Dust is normal.
Structure Open type module case
Cooling natural cooling
Number of occupation slots 1 slot width
I/O assignment “COMM”
Dimensions, Weight 210H × 35W ×130D(mm), About 0.4 kg

2.2 Performance Specifications


Table 2.2.1 Performance specification

Item Specification
Interface 10 BASE T
Communication Standard for ethernet Based on IEEE802.3
method Transmit modulation method Base band
Media Access method CSMA/CD
Baud rate 10 M bps
Communication protocol TCP/IP, UDP/IP
Maximum message length 1024 byte
Port no. of message communication max 6
Port no. of communication with task code max 2

2.3 Functional Specifications


Table 2.3.1 Functional specification

Function Contents
Message communication • It is possible to send/receive data of internal output area by LADDER PROGRAM.
• It is possible to know the receipt of data by LADDER PROGRAM.
Communication with • Conformed to H series task code rule.
task code • LADDERPROGRAM of data transmitting and receiving instruction is not necessary.
• It is possible to access to CPU in network through CPU link.
Test function • Internal loop back test and external loop back test is possible.
• Send/receive test is possible.

2-1
Chapter 2 Specifications

MEMO

2-2
Chapter 3 Installation and System configuration

Chapter 3 Installation and System configuration


3.1 Installation and setting
3.1.1 Installing location and notes on installing
LAN-ETH2 can be installed any slot on basic base except slot 0 and occupies 1 slot as installation space. It can not
be installed to extend base.

Power supply module


CPU module (CPU3-40H, CPU2-**H or CPU described as ”FOR BASIC”)

Memory Cassete
0 1 2 3 4 5 6 7 8 Slot No.

Basic base type acceptable slot No.


BSU-09H slot 1 ~ 8
BSU-05H slot 1 ~ 4
BSU-02H slot 1

Acceptable area
Figure 3.1.1.1About acceptable area
You can install LAN-ETH2 up to 2 (maximum) on basic base.
However, the number of LAN-ETH2 can be limited under influence of other modules.
Please see “3.1.2 Set of module configuration post” to verify and set the necessities before installing the
module.

3.1.2 Set of module configuration post


LAN-ETH2, SUMINET-3200 communication I/F module (LAN-SNH, this is a product for Japan only) and BASIC
module can be installed up to 2 among basic base. In this case, module configuration post of each module must be set
as the below table. The slot installing point is no effect, but one installed nearer to CPU module is considered as the 1st.
Table 3.1.2.1 Setting of module configuration post
1st
BASIC-H LAN-SNH LAN-ETH LAN-ETH2
2nd
2-3 short 2-3 short Dip switch
BASIC-H impossible OFF
no setting no setting no setting
no setting 2-3 short 2-3 short Dip switch
LAN-SNH OFF
2-3 short 1-2 short 1-2 short 1-2 short
no setting 2-3 short 2-3 short Dip switch
LAN-ETH OFF
2-3 short 1-2 short 1-2 short 1-2 short
no setting 2-3 short 2-3 short Dip switch
LAN-ETH2 OFF
Dip switch OFF Dip switch ON Dip switch ON Dip switch ON
(Note) Setting of the module configuration post of LAN-ETH2 is ON/OFF of the dip switch. (Please refer to “4.2.2 Setting of
module switch 2”)
Please refer to the manual of each module for "1-2(2-3) short".

3-1
Chapter 3 Installation and System configuration

3.2 Example for installation and laying of cable


10 BASE T in network of CSMA/CD based on IEEE 802.3 are high speed transmission path for slight current,
10M bit/s. Lay a transmission cable paying attention as the following especially.

(1) Never set transmission cable in a wiring duct with power line or I/O wiring duct.
(2) Keep space about 300mm between a transmission cable and other wiring duct.
If possible, lay the transmission cable not to be parallel with other wiring duct.
(3) According to your needs, put the cable in metal pipe for shield processing.
(4) In certain case, putting Ferrite core in a cable is effective to prevent induction noise from occurring.

Grounding example

Keep away transmission cable more


than 300mm from a wiring duct.

Put a supporter to prevent that weight of


Make shield process with pipe.
transmission cable depends on the cable’s neck.

In a certain case, inserting Ferrite core to transmission cable is


effective to prevent induction noise in transmission line.

To LAN-ETH2

Within 300mm

Figure 3.2.1 Grounding example

3-2
Chapter 3 Installation and System configuration

3.3 Basic system configuration


Using LAN-ETH2, you can make a network system among the equipments has specification for network of
CSMA/CD based on IEEE 802.3.

HUB

Figure 3.3.1 General system configuration

The connector form is RJ-45 (8pin) type to connect LAN-ETH2 to a network physically.
Please use the general UTP cable or STP cable of a category 5 standard for communication cable.

Supplement) UTP cable : Cable that is composed only with a twisted wire.
STP cable : Cable that is composed with the inside twisted wire and the outside shield that protects the
inside twisted wire.

3-3
Chapter 3 Installation and System configuration

3.4 Extended system configuration


When H series PLC mounting H series CPU Link is used as gateway, it makes communication with task code among
hosts on ethernet (workstation, personal computer, etc) and CPU linked via CPU Link network.

Database server
Personal computer Workstation

HUB

Ethernet(UTP cable)

H series PLC H series PLC

EH series PLC

LAN-ETH2 LAN-ETH2

H series CPU Link network


Optical / Coaxial 1M bit/s

H series PLC EH series PLC

Figure 3.4.1 Extended system configuration

Note
There are 2 types of H series CPU Link. One of them has coaxial type transmission path (LINK-H, LINK-SH), and the
other has optical (OLINK-H, OLINK-SH). But it is prohibited to use both type of link in a CPU Link network.

Point - What is communication with task code ? -


• There are the communication protocol between a communication module and host computer in H series.
In protocol for H series, task code (command code) and transmission control procedure are specified definitely.
In protocol, a command code is assigned to each function, such as I/O control, CPU control, memory read/write.
By sending this code (task code) what you need to H series PLC, you can use a function you need without making a
program on H series PLC side.
• LAN-ETH2 supports the function for communication with task code on TCP/IP or UDP/IP. In others, there is
Intelligent serial port module (COMM-2H) that supports communication with task code on RS-232C, etc.
And, CPU module peripheral port (PERIPHERAL) also supports communication with task code on RS-232C.

3-4
Chapter 4 Name and function of each part

Chapter 4 Name and function of each part


4.1 Structure
Name and function of each part Type LAN-ETH2
Weight 0.4 kg
k Dimension(mm)
POW   I.ERR

c
232C   ERR
STAS   WDE
TX    RX
TX2   RX2
OPN1   OPN4
OPN2   OPN5
OPN3   OPN6

d
12345678

MODE1
l
e
12345678

MODE2

210
h E.CLR
RESET
f
i PORT1

g
PORT2

j
10BT
130 35
k
No. Name Function
1 Status LED Indicates the status of LAN-ETH2.
Please refer to “4.3 Status LED”.
2 Mode swirch 1 (MODE1) Mode change of IP address setting mode, test mode etc.
Please refer to “4.2 Setting of mode switch”.
3 Mode switch 2 (MODE2) Setting of module configuration post.
Please refer to “4.2 Setting of mode switch”.
4 Error clear switch (E.CLR) Make error flag and ERR LED clear.
5 Reset switch (RESET) Make LAN-ETH2 hardware reset.
6 Port 1 (PORT1) RS-232C communication port for IP address setting and diagnosis.
Please refer to “5.1.2 IP address setting”.
7 Port 2 (PORT2) No use.
8 Ethernet port (10BT) Port of 10BASE T.
9 Module mounting screw A screw to mount the module to basic base.
10 Revsion name plate Product revision No. is described.

4-1
Chapter 4 Name and function of each part

4.2 Setting of mode switch


Setting of mode switch is read at the time of applying power or pressing down RESET switch.
Even if you change the setting while the module is in operation, the mode does not change.

4.2.1 Setting of mode switch 1

8
Note) : OFF
7
6
5 Function kind select : ON

IP address change setting


4
3
1 2

Mode selection (always OFF)


ON

Table 4.2.1.1 Description of mode switch 1

Setting of switch
Name OFF ON

SW No.
5 6 7 8 Function
OFF OFF OFF OFF Normal operation
8 OFF OFF OFF ON Internal loop back test (Note 1)
∼ Function kind select OFF OFF ON OFF External loop back test (Note 2)
5 OFF OFF ON ON Send/Receive test (Note 3)
OFF ON OFF OFF IP address default value setting
OFF ON OFF ON Reference of IP address reading
OFF ON ON OFF IP address user value setting
OFF ON ON ON Don’t change this status
ON OFF OFF OFF IP address user value setting
(Note 4)
ON ** ** ** Don’t change this status

4 IP address change setting Possible to change Impossible to change


3 Mode selection Normal operation Don’t set to ON
∼ (ON is a mode only for maintenance)
1

(Note 1) Please execute the internal loop back test without connecting the cable.
(Note 2) Please execute the external loop back test with connecting test module only.
If the other modules are connected, it may cause an error.
(Note 3) In send/receive test, a set of LAN-ETH2 or ethernet equipment is necessary as other station.
(Note 4) IP address can be set from port 1.

4-2
Chapter 4 Name and function of each part

4.2.2 Setting of mode switch 2

8
Note) : OFF

7
: ON

6
5
Unused

4
3
1 2
ON
Module configuration post

Table 4.2.2.1 Description of mode switch 2


Setting of switch
No. Name OFF ON
8
7
6 Unused Always OFF
5
4
3
2
1 Module configuration post 1st mounted 2nd mounted

Switch No.2-8 is unused. Please give switches No.2-8 as turning off.

4-3
Chapter 4 Name and function of each part

4.3 Status LED


Table 4.3.1 Description of status LED
POW I.ERR LED Information Turn on (Blinking) Turn off
232C ERR POW Normal operation Operate Stop
STAS WDE 232C Port 2 is set RS232C. (*1) Power ON Power OFF
TX RX I.ERR Unused  
ERR Various error detection Error Normal
TX2 RX2
STAS Status display Normal (Error kind) Non error
OPN1 OPN4
WDE Module hardware error Error Normal
OPN2 OPN5
TX 10BT Port data transmitting Transmitting No data
OPN3 OPN6
RX 10BT Port data receiving Receiving No data
Figure 4.3.1 Status LED TX2 Unused  
RX2 Unused  
OPN1 State of connection 1 opening Open Close
OPN2 State of connection 2 opening Open Close
OPN3 State of connection 3 opening Open Close
OPN4 State of connection 4 opening Open Close
OPN5 State of connection 5 opening Open Close
OPN6 State of connection 6 opening Open Close
*1) RS-232C is a reservation function, and it is unused in this module.

ERR LED lights in the following states, and STAS LED blinks at the same time.
Error information Blinking time of STAS
1 Open error of message communication Once
2 Transmit error of message communication Twice
3 Receive error of message communication 3 times
4 Transmission parameter error 4 times
5 IP address error 5 times
6 Communication error with task code 6 times
7 Test function error 7 times

Blinking method of STAS LED


STAS LED blinks for 0.25 seconds interval and then turn off for 1 second.
The above is repeated.

Once

Twice

3 times

0.25 seconds 1 second

4-4
Chapter 4 Name and function of each part

4.4 Port 1 (PORT1)


IP address can be set from this port.
IP address can be set with the software by connecting to RS232C port of the personal computer.

Table 4.4.1 Signal table of PORT1 (RS-232C)


Pin Signal Direction Function
c
No. Port 1 Host
d
e c SG1 ←→ Signal ground
f d − NC
g e − NC
h f − NC
i
j g SD1 −→ Transmit data
h RD1 ←− Receive data
i DR1 ←− Receive request (When DR1 is high
level, host is transmitting)
j RS1 −→ Transmit request (When RS1 is
high level, it is possible to receive)

4.5 10BASE-T port (10BT)


Ethernet interface port.

Table 4.5.1 Signal table of 10BT port (Ethernet)


Pin Signal Direction Function
c
No. Port Host
d
e c TD+ −→ Transmit data +
f d TD- −→ Transmit data -
g e RD+ ←− Receive data +
h
f − NC
i
j g − NC
h RD- ←− Receive data -
i − NC
j − NC

4-5
Chapter 4 Name and function of each part

MEMO

4-6
Chapter 5 Communication function

Chapter 5 Communication function


5.1 Before to communicate
5.1.1 Control register and status register
In H series CPU, LAN-ETH2 is I/O assigned as ”COMM”. When you make settings, specify data in internal I/O area with
LADDER PROGRAM, and set data by handshake using control and status register.
(“S “ is a slot No. to install LAN-ETH2.)

(1) Control register WY00S1 (Y00S16 ~ Y00S31)


Y 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 Å Bit I/O No.

Bit 16–23 : Top I/O No. of setting area


Head I/O number of the internal output of WR area which used as a set area on setting of transmision parameter and of
IP address is set in this bit.
Bit 16–23 Description
H00 ∼ HC3 Specify upper 2 figures in I/O No. of WR used as setting area.

(Example) In case of using WR0300-WR035C as transmission parameter area (similar with IP address set).
"03" which corresponds to the high rank of head I/O No. two digits is specified from bit 16 for 23 by the binary.
Y 23 22 21 20 19 18 17 16 Å Bit I/O No.
0 0 0 0 0 0 1 1
0 3

Bit 24–27 : Reserved


Always set "0".

Bit 28 : Software reset request bit


This bit is used to execute the software reset of LAN-ETH2. This bit is operated according to the reset sequence of
paragraph 6.1.
Please note the matters as follows, as well as hardware reset (RESET button pressing).
c "54" or "51" error might be displayed in CPU module.
d WDE LED of LAN-ETH2 does not light.
Bit 28 Description
0 No operation
1 Software reset of this module is requested.

Bit 29 : ERR clear request bit


ERR LED is turned off by setting "1" in this bit with ERR LED lights(X00S09=1). Moreover, the X00S09 bit is set to
"0" at the same time as turning off ERR LED.
This bit is operated according to the reset sequence of paragraph 6.2.
Bit 29 Description
0 No operation
1 Error information is deleted, and ERR LED is turned off.

5-1
Chapter 5 Communication function

Bit 30 : IP address set request bit


This bit becomes effective at IP address set mode.
Bit 30 Description
0 No operation
1 Setting IP address is requested for this module.

Bit 31 : Request bit for configuration of transmission parameter


It is necessary to set transmission parameter by using this bit when the message communication function is used.
Bit 31 Description
0 No operation
1 Setting configuration of transmission parameter is requested for this module.

(2) Status register WX00S0 (X00S00 ~ X00S15)

X 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0 Å Bit I/O No.

The subordinate position six bits of the status register have a different definition between setting of IP address and
setting of configuration of transmission parameter.

Bit 0-5 :
"0" means "no error" and "1" means "error".
The error detection condition of each bit is as follows.
[Bit 0] The internal output area to use as a set area is mistake.
[Bit 1] You requested the configuration of transmission parameter, when the connection used by the message
communication is already opened.
[Bit 2] IP address of "H00000000" or "HFFFFFFFF" is specified.
[Bit 3] Port number of "H00000000" is specified.
[Bit 4] You detect sum error in the preservation data of the flash memory.
[Bit 5] You requested the setting of IP address, when MODE1 switch is set besides the setting of IP address
information.
Bit No. Setting of IP address Configuration of transmission parameter
0 Top word number error flag Top word number error flag
1 Undefined Error flag when connection is opening
2 IP address error flag Undefined
3 Port number error flag Undefined
4 FLASH sum error flag Undefined
5 Prohibition error flag to write FLASH Undefined

Bit 6-7 : Undefined flag


Always set "0".

Bit 8 : Software reset response flag


It is the flag which answers "Software reset request bit" of the control register.
Bit 8 Description
0 There is no software reset demand. Or software reset has be executed.
1 Software reset request reception inside

Bit 9 : ERR LED lighting flag


Lighting/turning off ERR LED is displayed. Please refer to "7.3 Error LED measure" for the condition of the ERR
LED lighting.
Bit 9 Description
0 ERR LED is being turned off.
1 ERR LED is lighting.

5-2
Chapter 5 Communication function

Bit 10 : Completion of configuration of IP address


When the function related to the IP address setting is effective, whether processing ended normally or processing
terminated abnormally is displayed.
Bit 10 Description
0 Setting was incompleted (Error end).
1 Setting was completed (Normal end).

Bit 11 : Configuration error of IP address


When the function related to the IP address setting is effective, the presence of the error is displayed.
Bit 11 Description
0 No error
1 Error

Bit 12 : Response of configuration of IP address


When the function related to the IP address setting is effective, It is the flag which answers "IP address set request bit"
of the control register.
Bit 12 Description
0 There is no IP addres set request. Or IP addres set request has be executed.
1 IP addres set request reception inside

Bit 13: Completion of configuration of transmission parameter


When you set the configuration of transmission parameter, whether processing ended normally or processing
terminated abnormally is displayed.
Bit 13 Description
0 Setting was incompleted (Error end).
1 Setting was completed (Normal end).

Bit 14: Configuration error of transmission parameter


When you set the configuration of transmission parameter, whether the error is or not is displayed.
Bit 14 Description
0 No error
1 Error

Bit 15: Response of configuratin of transmission parameter


When you set the configuration of transmission parameter, It is the flag which answers " Request bit for
comfiguration of transmission parameter " of the control register.
Bit 15 Description
There is no request bit for configuration of transmission parameter. Or the configuration of
0
transmission parameter has be executed.
1 Request for configuration of transmission parameter reception inside

5-3
Chapter 5 Communication function

5.1.2 IP address information setting


You can not set IP address information in normal operation mode. Please change operation mode by mode switch.
The function related with IP address setting is shown in following.
Table 5.1.2.1 Function related with IP address setting

No. Operation mode MODE1 setting switch (*1) Description

8
IP address is set newly. Set the information of IP

7
6
address etc. in IP address seting area, and
IP address

5
1 handshake. Contents of setting is set as special

4
information setting
internal output (*2) in normal operation.

3
1 2
ON
8
7
6
IP address setting is read.
Reference of IP 5
2 IP address information is read to IP address reading
4

address setting
area.
3
1 2
ON

IP address returns to default value.


8

IP address : 192.168.0.1
7
6

IP address default IP address of other station to set : 192.168.0.254


5

3 setting Task port 1 : 3004.1(TCP/IP)


4

Task port 2 : 3005.1(TCP/IP)


3
1 2

Task port : 0 (No observation)


ON

time out observation (*3)


8

IP address is newly set by the operation from the


7

personal computer by way of the PORT 1. It is


6

IP address
necessary to install IP address set software in the
5

4 information setting
4

personal computer.(*4)
(PORT1)
3

Contents of setting is set as special internal output


1 2

(*2) in normal operation.


ON

*1 When you change a setting of MODE setting switch, press RESET switch or apply power again.
*2 Special internal output No. differs according to a slot to install LAN-ETH2.
(Ex.) When installing
Slot 1 WRF022 ~ WRF023 Slot 2 WRF024 ~ WRF025 LAN-ETH2 to slot 1
Slot 3 WRF026 ~ WRF027 Slot 4 WRF028 ~ WRF029 b15 b0
Slot 5 WRF02A ~ WRF02B Slot 6 WRF02C ~ WRF02D WRF022 C0 00
Slot 7 WRF02E ~ WRF02F Slot 8 WRF030 ~ WRF031 WRF023 00 01
*3 Task port timeout observation is observation of the time from creating connection to the first request task code, or
from response task code to next request task code. When it is tine out, it is considered that other station is down and
the connection released (closed).
*4 Please contacts our sales about IP address set software.

5-4
Chapter 5 Communication function

The following information is necessary at the time of communication. The information is written to FLASH memory in
LAN-ETH2, and the module operates according to the setting until these information is changed to new information.

Table 5.1.2.2 IP address information


*1
I/O No, Items Default value
WR**00 Own IP address 192.168.0.1 HC0A80001
02 Send/receive test IP address of other station 192.168.0.254 HC0A800FE
Logical port No. 4000 H0FA0
05 Communication Task port 1 Own logical port No. 3004 H0BBC
with task code Sevice type*2 1 (TCP/IP) H0001
07 Task port 2 Own logical port No. 3005 HBBD
*2
Sevice type 1 (TCP/IP) H0001
09 Timeout observation*3 0 (No observation) H0000
*1 The display of "**" corresponds to the value set in "Top I/O No. of setting area" of the control register.
*2 "1" is set in the service type when TCP/IP is used and "0" is set when UDP/IP is used.
*3 The task port timeout observation time becomes set value x 1s. However, there is no observation when the task port
timeout observation time is set to "0".

(1) Operation of IP address information


It is necessary to make handshake program based on the time shown in Figure 5.1.2.1 so that the user may set, and read IP
address information.

c-g of the figure below corresponds to the number of each diagram of next paragraph (2) - (4).

Request of configuration of IP address


Y00S30 d e
Response of configuration of IP address c f
X00S12
Completion of configuration of IP address Normal

X00S10 g
Configuration errror of IP address Error

X00S11

Figure 5.1.2.1 Timechart of handshake program

5-5
Chapter 5 Communication function

(2) Set procedure of IP address information


It is necessary to change the operation mode to "Internet Protocol address information setting" and to secure the
internal output area to store set information, when the user may set Internet Protocol address information. And, IP
address information is set in this module by executing handshake program after necessary information is set in the
internal output area.

Operation mode MODE1 setting switch

8
7
6
IP address

5
4
information setting

31 2
ON
IP address information storage area
WR**00 Set information
:
:
WR**0B :

Control register c d e fg
WY00S1 00------** 01------** 01------** 00------** 00------**
Status register
WX00S0 ---0-- ---0-- ---100 ---100 ---0XX--

No. Description (Please refer along with Figure 5.1.2.1.)


c The area of WR(internal output) that the subordinate position two digits of the I/O number start by 00 is made
a head by the user program, and IP address information is set in the area for 12 consecutive words beforehand.
The user program sets the high rank two digits of above-mentioned WR area in the control register.
The user program confirms IP address set response flag (X00S12) of the status register is "0", and sets "1" in
IP address set demand bit (Y00S30) of the control register.
d This module detects that "IP address set request bit (Y00S30)" is set to "1".
This module reads IP address information set in WR**00-WR**0B, and sets "1" in IP address set response
flag (X00S12).
At this time, both flags are cleared in "0" regardless of the state of IP address set completion flag (X00S10)
and IP address set error flag (X00S11) (However, when ERR LED lights, ERR LED maintains lighting).
e The user program confirms IP address set response flag (X00S12) of the status register became "1", and clears
IP address set request bit (Y00S30) of the control register in "0".
f This module detects IP address set request bit (Y00S30) becoming "0", and clears IP address set response flag
(X00S12) in "0".
g When IP address information is correctly set, this module sets "1" in IP address set completion flag (X00S10).
This module informs that the error occurred by lighting ERR LED at the same time as setting "1" in IP address
set error flag (X00S11) when there are some inconveniences in IP address information. IP address set
completion flag (X00S10) maintains "0" when the error occurs, and IP address information set till then is
never updated.
Details of the error factor are set in X00S00~X00S05.
Figure 5.1.2.2 Set procedure of IP address information

5-6
Chapter 5 Communication function

(3) Reading IP address information


It is necessary to change the operation mode to "Refer to Internet Protocol address set value" to read a set value of IP
address information, and to secure the internal output area to store read information. And, IP address information can be
read by executing handshake program.

Operation mode MODE1 setting switch

8
7
IP address

6
5
information

4
3
reading

1 2
ON
IP address information storage area
WR**00 Read information

:
:
WR**0B :

Control register c d e fg
WY00S1 00------** 01------** 01------** 00------** 00------**
Status register
WX00S0 ---0-- ---0-- ---100 ---100 ---0XX--

No. Description (Please refer along with Figure 5.1.2.1.)


c The area of WR(internal output) that the subordinate position two digits of the I/O number start by 00 is made
a head by the user program, and IP address information is set in the area for 12 consecutive words beforehand.
The user program sets the high rank two digits of above-mentioned WR area in the control register.
The user program confirms IP address set response flag (X00S12) of the status register is "0", and sets "1" in
IP address set demand bit (Y00S30) of the control register.
d When this module detects "1" of IP address set request bit (Y00S30), this module set "1" in IP address set
response flag (X00S12).
At this time, both flags are cleared in "0" regardless of the state of IP address set completion flag (X00S10)
and IP address set error flag (X00S11) (However, when ERR LED lights, ERR LED maintains lighting).
e The user program confirms IP address set response flag (X00S12) of the status register became "1", and clears
IP address set request bit (Y00S30) of the control register in "0".
f This module detects I P address set request bit (Y00S30) becoming "0", and clears IP address set response
flag (X00S12) in "0".
g An existing fixed value is stored in the WR area specified by the control register when IP address information
is correctly read, and this module sets "1" in IP address set completion flag (X00S10).
This module informs that the error occurred by lighting ERR LED at the same time as setting "1" in IP address
set error flag (X00S11) when the error occurs at the time of reading IP address information. When the error
occurs, IP address set completion flag (X00S10) maintains "0".
Details of the error factor are set in X00S00~X00S05.
Figure 5.1.2.3 Reading procedure of IP address information

5-7
Chapter 5 Communication function

(4) Set procedure of default IP address


It is necessary to change the operation mode to "IP address default setting" to return IP address information to the
default value, and to secure the internal output area to store IP address information on default. And, IP address
information can be returned to the state of default by executing handshake program.

Operation mode MODE1 setting switch

8
7
6
IP address default

5
4
setting

31 2
ON
IP address information storage area
WR**00 Read information

:
:
WR**0B :

Control register c d e fg
WY00S1 00------** 01------** 01------** 00------** 00------**
Status register
WX00S0 ---0-- ---0-- ---100 ---100 ---0XX--

No. Description (Please refer along with Figure 5.1.2.1.)


c The area of WR(internal output) that the subordinate position two digits of the I/O number start by 00 is made
a head by the user program, and IP address information is set in the area for 12 consecutive words beforehand.
The user program sets the high rank two digits of above-mentioned WR area in the control register.
The user program confirms IP address set response flag (X00S12) of the status register is "0", and sets "1" in
IP address set demand bit (Y00S30) of the control register.
d When this module detects "1" of IP address set request bit (Y00S30), this module set "1" in IP address set
response flag (X00S12).
At this time, both flags are cleared in "0" regardless of the state of IP address set completion flag (X00S10)
and IP address set error flag (X00S11) (However, when ERR LED lights, ERR LED maintains lighting).
e The user program confirms IP address set response flag (X00S12) of the status register became "1", and clears
IP address set request bit (Y00S30) of the control register in "0".
f This module detects I P address set request bit (Y00S30) becoming "0", and clears IP address set response
flag (X00S12) in "0".
g IP address information on default is stored in the WR area specified by the control register when IP address
information on default is correctly set, and this module sets "1" in IP address set completion flag (X00S10).
This module informs that the error occurred by lighting ERR LED at the same time as setting "1" in Internet
Protocol address set error flag (X00S11) when the error occurs.When the error occurs, IP address set
completion flag (X00S10) maintains "0".
Details of the error factor are set in X00S00~X00S05.
Figure 5.1.2.4 Set procedure of default IP address

5-8
Chapter 5 Communication function

(5) Example of IP address information setting


When this module is mounted on slot No.1 in the network composition shown in Figure 5.1.2.5, and the head of a set
area is specified for WR0200, an actual set example is explained.
HUB

Host

IP address : 192.168.0.1 IP address : 192.168.0.254

Send/receive test logical port No. : 4000


Task port 1
Logical port No. : 3004
Communication protocol : TCP/IP
Task port 2
Logical port No. : 3005
Communication protocol : TCP/IP
Figure 5.1.2.5 Example of network composition

(a) Initial value of control register


The I/O number of two digits of the high rank of the internal output of WR area used as IP address informational set
area is specified for bit 16-23 by the binary value. All the values set in bit 24-31 are assumed to be "0" for
convenience' sake.

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 Å Bit I/O No.


*1
Y1xx 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 (BIN)

WY0011 0 0 0 2 (HEX)
*1 : The part of "xx" corresponds to bit I/O number.

(b) IP address information setting value


The internal output of WR area where the I/O number of 12 words in total is consecutive is used to set IP address
information.

I/O No. Item Set value Description


(HEX)
WR0200 Own IP address C0 A8 192.168.0.1 in hexadecimal
00 01
02 Send/receive test Other station IP address C0 A8 192.168.0.254 in hexadecimal
00 FE
04 Logiacl port No. 0F A0 4000 in hexadecimal
05 Task code Task port 1 Own logical port No. 0B BC 3004 in hexadecimal
communication Service type 00 01 TCP/IP
07 Task port 2 Own logical port No. 0B BD 3004 in hexadecimal
Service type 00 01 TCP/IP
09 Timeout observation 00 00 No observation

Note
If shutdown happens while IP address is rewritten, it may be considered as FLASH memory sum error or WDE.
In this case, apply power pressing E.CLR switch, and set IP address again.

5-9
Chapter 5 Communication function

(6) Example for IP address configuration program


Sample program 1 IP address configuration Slot No. 0 1 2 ∼ 8
LAN-ETH2
Executed by turning on R0. - - -
Mounted position

R000 X112 (00001)


R000 = 0 IP address configuration start OFF
IP address Response of R001 = 1 Circuit (00002) operation is active.
configuration configuration
start of IP address

R001 X112 (00002)


WY0011 = H0002 Set the top word No. of IP address setting
Response of DR0200 = H0001C0A8 parameter area to WR0200.
configuration DR0202 = H00FEC0A8
of IP address
WR0204 = H0FA0
WR0205 = H0BBC
WR0206 = H0001 Set parameter from WR0200 to WR0209
WR0207 = H0BBD
WR0208 = H0001
WR0209 = 0
Y130 = 1
R001 = 0 Request of configuration of IP address ON
Circuit (00002) operation is inactive.

Y00130 X112 (00003)


When response of configuration of IP address
Y130 = 0 ONs, OFF request of configuration of IP
Request of Response of R002 = 1 address.
configuration configuration
of IP address of IP address Circuit (00004) operation is active.

R002 X112 (00004)


R002 = 0 When response of configuration of IP
Response of R003 = 1 address OFFs,
configuration circuit (00004) operation is inactive.
of IP address
circuit (00005) operation is active.
R003 X110 (00005)
R003 = 0 After flag OFF of response of IP address
Completion of R004 = 1 information set, the presence of the error is
configuration checked.
of IP address
X111 It is assumed it is the error at the time of the
R004 ON.
Configuration
error of IP
address

R004 X100 (00006)


Processing for configuration error
Top word of IP address
No. error

R004 X102 (00007)


Processing for configuration error
IP address of IP address
error

R004 X103 (00008)


Processing for configuration error
Port No. of IP address
error

R004 X104 (00009)


Processing for configuration error
FLASH memory of IP address
sum error

R004 X105 (00010)


Processing for configuration error
FLASH memory of IP address
prohibited to write

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

5-10
Chapter 5 Communication function

(7) IP address information setting (PORT1)


Figure 5.1.2.6 shows the composition when the personal computer sets IP address by way of RS232C of port 1.
The example of operating the outline when IP address is changed from "192.168.0.1" to "192.168.0.9" is shown.
Operation mode MODE1 setting switch

8
7
IP address

6
5
information setting

4
3
(PORT1)

1 2
ON
Personal computer

RS-232C

WVCB02H+EH-RS05
or EH-VCB02
IP address
192.168.0.1
Figure 5.1.2.6 IP address set composition
c IP address set tool is started (*1)
d The value of the module is automatically read now and the value is set in current value column and setting value
column. (State of Figure 5.1.2.7)
e The cursor is matched to the settimg value column, and each parameter is changed.
f When "Transmission" button is pushed, the changed parameter is written in the module.
g When "Reception" button is pushed, the current value is read from the module.
Whether the parameter was correctly changed is confirmed.
Supplementation
(1) The value is read from the module now when IP address setting tool is started, and the value is set in the current
value column and the setting value column now.
(2) When "Default value copy" button is pushed, the default value is set in the setting value column.
(3) When "Setting value save" button is pushed, the data of the setting value column is saved as a file.
(4) When "Setting value load" button is pushed, the data is read from the file which was saved by "setting value
save", and that data is set in the "setting value column".

Figure 5.1.2.7 Screen of IP address setting tool


*1 Please contacts our sales about IP address set software.

5-11
Chapter 5 Communication function

5.2 Communication with task code


There is a communication protocol named as Task code that is H series original commands. You can make
communication with task code through LAN-ETH2. This module has two connection ports for the task code
communication.
Please refer to the manual of the COMM module and CPU module for details of the task code.
Feature of task code communication
• You need not to make ladder program to communicate with task code.
• Reading/writing of ladder program is possible between the host computer and CPU module. Moreover, data can be
set in an internal output of CPU module, and the data of an internal output be monitored.
• After detaching header information etc. on TCP (Or, UDP) frame which the host computer issued, this module
passes the demand task code to H series CPU module. After header information etc. on TCP (Or, UDP) frame are
added by this module, the response task code which H series CPU module issued is sent back to the host computer
for this.
• The task code communication processing does not influence at the scanning time of ladder program. Therefore, the
system can be constructed by separating the control and control.

5.2.1 Outline
This communication protocol regulates communication with task code between host computer and LAN-ETH2. H series
module based on this communication protocol are CPU module, COMM module, Remote I/O local station module, GPIB
module, and CPU link module. Excepting for CPU link module, user can connect host with them.
The generality of H series communication rule is shown in figure 5.2.1.1.

Function for user

I/O control CPUcontrol Memory read/write Response

Assortment of task code


Logical level Rule for each task code

Rule for H series network


Data link level TCP/IP Transmission control procedure1, 2 Transmission control
UDP/IP Correspomding to Fieldnet procedure 1, 2
Physical level IEEE 802.3 RS-232C, RS-422 GPIB
CPU module
Module name LAN-ETH2 GPIB
COMM, Remote I/Olocal station
It is necessary to understand the specification of the halftone screen part , when you make the host program.
Figure 5.2.1.1Generality of H series protocol
This module uses the procedure which is called a one side start at the data link level. As for this one side start, only the
host computer side can start the communication for the module of H series. That is, the task code communication protocol
supported by this module is a passive protocol of always returning the response based on the demand from the host
computer.

You can use 5 functions of H series communication rule shown in below.


(1) CPU control : CPU module run control, occupation, status read etc.
(2) I/O control : I/O monitor, forced output etc.
(3) Memory read : Reading from program memory etc.
(4) Memory write : Writing to program memory, program clear etc.
(5) Response : Response from CPU module for task code etc.

Please refer to H series CPU module manual (software edition) "6.4 task code specification" for details of the task
code (command code) and refer to the next paragraph respectively for the data format.

5-12
Chapter 5 Communication function

5.2.2 Communication protocol and flame format


When the task code communication function is used in this module, either communication protocol is used among
UDP/IP or TCP/IP. The communication protocol is selected by setting the service type. Please refer to "Table 5.1.2.2 IP
address information" for the service type.

It is necessary to generate data in the application program of the host computer based on the frame format shown in Figure
5.2.2.1 when communicating the task code between this module and the host computer. This data is handled as a binary.

(a) (b) (c) (d)

(a) Termination command Size : 1 byte


Execution and the interruption of the task code processing are told to CPU module. It is set by the application of the
host computer. The command is the following three kinds.
H00 : When the request task code is transmitted to CPU module, this value is used. CPU module executes processing
to the demand task code added to this command, and replies the response task code.
HFF : When the request task code issued before is cut, this value is used.
H01 ∼ HFE : This module does not move "receiving request task code (d)" to CPU, and this module annul this request
task code.
(b) Through No. Size : 1 byte
It is a serial number added to the request task code. It is set by the application of the host computer.
This serial number added to the demand task code is set in the response task code as it is and this module replies to the
host computer.
Please use this No., when you control the correspondence between the demand task code which the host computer
sends, and the response task code from this module.
(c) LUMP address Size : 4 byte
H series network address. Please refer to “5.2.3” for detail.
(d) Request/Response task code Size : 244 byte maximum
H series communication protocol. Please refer to H series CPU module manual (software edition) "6.4 task code
specification" for details.
Figure 5.2.2.1 Flame format

Note
The data form to be able to treat this module is only a binary. ASCII data form is not handled.
While CPU module is executing processing to demand task code c, when you receive the following demand task
code d, this module replies from a pertinent port busy response d 'to the request task code of d.
(c 'is normal response of the demand task code of c.)

Host computer LAN-ETH2 CPU module



② ①

②’ Execution of request task code
①’
①’

5-13
Chapter 5 Communication function

5.2.3 H series network address


It is necessary to decide the address in the network in H series communication system which shows in Figure 5.2.3.1 to
specify fixed CPU from the host.
Station

CPU LNK ETH2


1 1 Ethernet

LINK

Loop α

Station Station Host

CPU ETH2 LNK CPU LNK LNK ETH2


3 3 2 2

Station

Loop β

Figure 5.2.3.1Example of H series communication system configuration


H series network address is composed of the hexadecimal number eight digits (four bytes) as shown in Figure 5.2.3.2.
Moreover, details of each item are shown in Table 5.2.3.1.

L U M P

L : Loop No. (Loop No. of CPU link) M : Module No.


U : Unit No. (Station No. of CPU link) P : Port No.
Figure 5.2.3.2 Network address

Table 5.2.3.1 Details of network address


c Loop No. (L) d Unit No. (U)
Item Loop No. Item Unit No.
CPU link loop 1 H01 CPU link ST No.0 H00
CPU link loop 2 H02 CPU link ST No.63 H3F
No CPU link HFF No CPU link HFF
(Note) When loop No. is HFF, unit No. should be HFF. The opposite is also similar.
e Module No. (M) f Port No. (P)
Please specify "00" always. Please specify "00" always.

In the example of Figure 5.2.3.1, of H series communication system configuration, the example of setting the network
address is shown in Table 5.2.3.2 when communicating from the host with each CPU the task code.
Table 5.2.3.2 Example of setting network address

No. By way of LAN-ETH2 CPU Network address


1 CPU1 HFFFF0000
2 ETH2-1 CPU2 H01010000
3 CPU3 (can not access)
4 CPU1 H02000000
5 ETH2-2 CPU2 HFFFF0000
6 CPU3 H01000000
4 CPU1 (can not access)
5 ETH2-3 CPU2 H01050000
6 CPU3 HFFFF0000

5-14
Chapter 5 Communication function

5.2.4 Occupation
In H series, it is possible to access a CPU module belongs to communication from several hosts. So, we made a status
“occupation” to prevent to contend for writing to a CPU module. There are 3 types in occupation.
(1) No occupation
No host occupies CPU for read/write. You can execute I/O monitor.
(2) READ occupation
4 hosts can occupy CPU at once (maximum). But when one of them occupy CPU to write, the others can not occupy
CPU to read. The hosts can do I/O monitor, I/O forced set/reset, program reading etc. in READ occupation.
(3) WRITE occupation
When any host does not READ occupation, only 1 host can do this occupation. The host can do I/O monitor, I/O
forced set/reset, program reading/writing etc..

Table 5.2.4.1 shows the necessity of occupation when executing each task code.
Table 5.2.4.1 Needed occupation for each task code

Task code Contents Occupation Remarks


H10 CPU status read NO
H11 Control CPU run/stop NO
H16 Occupation/Release of CPU NO
H17 Forced occupation release NO
H18 Set and read of RTC (calender and clock) NO Only CPU2-**H and H-4010 are effective.
H20 Program memory all clear WRITE occupation
H23 Program transmission by specifying address WRITE occupation
H26 Writing of memory assignment WRITE occupation
H27 Parameter change complete WRITE occupation
H28 Timer/counter setting change WRITE occupation
H31 Program reading by specifying address READ occupation
H33 Last circuit search READ occupation
H35 Reading of memory assignment READ occupation
H40 Monitoring by specifying I/O No. (N point) NO (Note 3)
H42 Forced set/reset by specifying I/O No. (N point) READ occupation
H44 Monitoring by specifying I/O No. (Random N point) NO (Note 3)
H45 Forced set/reset by specifying I/O No. (Random) READ occupation
H82 Extended program transmission by specifying address WRITE occupation
H84 Extended writing of memory assignment WRITE occupation Only H-4010 standard mode is
H85 Extended timer/counter setting change WRITE occupation effective.
H89 Extended program reading by specifying address WRITE occupation
H8B Extended last circuit search READ occupation
H8C Extended reading of memory assignment READ occupation
HA0 Monitoring by specifying I/O No. (N point) NO
HA2 Forced set/reset by specifying I/O No. (N point) NO Only CPU2-**H and H-4010 are effective.
HA4 Monitoring by specifying I/O No. (Random N point) NO
HA5 Forced set/reset by specifying I/O No. (Random) NO
<Note> 1. Be sure to release occupation after the process occupying CPU completes.
2. Task codes “18”, “A0”, “A2”, “A4”, and “A5” is applicable when CPU2-**type or H-4010 is used. Task code
error response (01H) will return in case of other CPU type.
3. Caution response (02H) returns for task code “40” and “44”, but the operation will execute normally.
4. The task code "82" -"8C" can be used in only H4010 standard mode.

5-15
Chapter 5 Communication function

5.2.5 Task code communication matrix

TCP/IP Host side (transmit to the bold column at the time of normal process)
Event No. A B C D E F G H I
Item Connection Task code Communication Communication Communication Receipt of task Termination Connection Task code
No. open request command complete error timeout code response command release request response timeout
send request send request

1 Waiting for Connection


connection open open process
Æ2
2 Distinction of Error report Error report
the result of
connection open
Æ3 Æ1 Æ1
3 Waiting for task Send process Data break Termination Connection
code command command send release process
send request
Æ4 Æ3 Æ8 Æ7
4 Distinction of Connection Connection
the result of release process release process
task code
error report error report
command send

Æ5 Æ7 Æ7
5 Waiting for task Termination Connection Error report
code response command send release process
receive
Æ6 Æ8 Æ7 Æ3
6 Distinction of Receive process Connection Connection
the result of release process release process
task code
error report error report
receive
Æ3 Æ7 Æ7
7 Distinction of Error report Error report
the result of
connection
release
Æ1 Æ1 Æ1
8 Distinction of Connection Connection
the result of release process release process
termination of
error report error report
command send
Æ3 Æ7 Æ7

1. When connection is released, send the shutdown transmission (It is FIN packet at the transmission level).

TCP/IP Module side


Event No. A B C D E F G H I J
Item Connection Disconnection Disconnection Receipt of Receipt of Receipt of Error CPU error Timeout of Timeout of
No. complete request task response task termination command User specified response
code from code from command from host timer waiting timer
host CPU from host for 60 seconds
1 Waiting for User Data break
connection specified
timer start
Æ2
2 Waiting for request Request task Data break Data break Data break Disconnect
task code from host code send
to CPU
Response
waiting timer
for 60 second
start
Æ4 Æ3 Æ4
3 Waiting for response Busy Response Data break Network Network
task code from CPU response task code error error
send to host send to host response response
User send to host send to host
specified
timer start
Æ4 Æ2 Æ2 Æ2 Æ2
4 Waiting for
disconnection
complete
Æ1

Abnormal command : termination command is 01H ~ FEH.

5-16
Chapter 5 Communication function

UDP/IP Host side (transmit to the bold column at the time of normal process)
Event No. A B C D E F G
Item Request of task code Communication Communication Communication Receiving of task Termination Task code response
No. command sending complete error timeout code response command send timeout
request
1 Waiting for request Task code Data break Termination
of task code command send command send
command send
Æ2 Æ1 Æ5
2 Distinction of the Error report Error report
result of task code
command send
Æ3 Æ1 Æ1
3 Waiting for Termination Error report
receiving of task command send
code response
Æ4 Æ5 Æ1
4 Distinction of the Receive process Error report Error report
result of task code
response receive
Æ1 Æ1 Æ1
5 Distinction of the Error report Error report
result of termination
response receive
Æ1 Æ1 Æ1

TCP/IP Module side


Event No. A B C D E F
Item Receipt of request task Receipt of response task Receipt of termination Error command CPU error Timeout of response
No. code from host code from CPU command from host from host waiting timer for 60
seconds
1 Waiting for request Request task code Data break Data break Data break
task code from host send to CPU
Response waiting
timer for 60 second
start
Æ2
2 Waiting for response Busy response send Response task code Data break Network error Network error
task code from CPU to host send to host response send to host response send to host

Æ1 Æ1 Æ1 Æ1

Abnormal command : termination command is 01H ~ FEH.

5-17
Chapter 5 Communication function

5.2.6 Example of task code issue

An example for communication in which a requesting task code and a response task code are issued to see status
information to H series CPU.

Requesting task code Response task code

00 12 FFFF0000 1000

00 12 FFFF0000 00 10 ******

Task code of CPU status read


Detail of CPU status

Requested task code


H series network address

Response task code


In this sample, H12 is used for H series network address
through No.

Same through No. with request task code is returned


“00” means that this is requesting task code

“00” means that this is response task code

Please refer to "6.4 task code specification" of H series CPU module manual (software edition),
for detail of the task code.

5-18
Chapter 5 Communication function

5.2.7 Sample program of host computer


[Note on using]
- This sample program operates with the personal computer with which LAN-ETH2 and Ethernet LAN are
connected, and is a sample for CPU module where LAN-ETH2 is mounted and the Visual Basic application of
the task code to communicate program.
- Please acknowledge beforehand that it is not the one to promise our company to support concerning the operation
guarantee and the content.
- Though this sample program confirms the operation in the environment of the our company possession personal
computer, it is not the one that it was guaranteed to operate in all the environments.
- This Visual Basic making environment and operation confirmation situation in our company are as follows.
Microsoft Visual Basic 5.0 EnterPrize
Windows 32Bit Application compilation
FLORA1010
- Ethernet usually uses "Winsock control" which is the Visual Basic ActiveX control to communicate by the
application software made with Visual Basic. The Winsock control is included as Visual Basic developer tool
and the control which improves convenience is marketed. It is necessary to know these controls well to make the
Ethernet communication application program. A document on the market and the Microsoft Co. are
recommended to be used to support.
- This sample does not contain various error processing in the program operation. When an actual application is
made, error processing is recommended to be added.
- When this sample program is used, setting IP address information on LAN-ETH is needed. Especially, please
specify TCP/IP about the task code service type. Please refer to "5.1.2 IP address setting" for the method of
setting IP address information.
Please refer to the manual related to H series for the task code.

[Screen composition]
Each numerical value in the screen reaches the default value when this sample program starts.

①IP address and the port number of LAN-ETH2 which


communicates are input.

②Cliclk to connect TCP/IP


(There is no response.)

③The request task code issued to CPU where LAN-ETH


is mounted is input by the hexadecimal number.
H series network address (LUMP) is not needed to
input.

④When the input request task code is send, this button is


clicked.

⑤The display of the response task code is cleared when


this button is clicked.

⑥The response task code to the sending request task


code is displayed. The LUMP address is not displayed.

5-19
Chapter 5 Communication function

[Sample program list]


' Termination command (H00)+through No. (H00)+LUMP address (FFFF0000) setting
Private Const HEADER = "0000FFFF0000"

Private Sub Form_Load()


Text1.Text = 158
Text2.Text = 213
Text3.Text = 83
Text4.Text = 1
Text5.Text = 3004
Text6.Text = "A00A00000005"
Text7.Text = ""
End Sub

Private Sub Command1_Click()


Ipaddr = Text1.Text + "." + Text2.Text + "." + Text3.Text + "." + Text4.Text
' Designation of IP address of other station
Winsock1.RemoteHost = Ipaddr
' Designation of Port No. of other station
Winsock1.RemotePort = Text5.Text
' Open the connection
Winsock1.Connect
End Sub

Private Sub Command2_Click()


Dim Bin() As Byte
' Calling the "AscToBin" which converts the input request task code to the binary.
Call AscToBin(HEADER & Text6.Text, Bin)
' Sending of data which was converted to binary
Winsock1.SendData Bin
End Sub

Private Sub AscToBin(ByVal Data As String, ByRef Bin() As Byte)


Dim i&
' "0" is added at the end, when the character string length is an odd number.
If Len(Data) Mod 2 Then
Data = Data & "0"
End If
ReDim Bin(0 To Len(Data) / 2 - 1)
' Binary conversion and stored in the buffer
For i = 0 To Len(Data) / 2 - 1
Bin(i) = "&h" & Mid(Data, i * 2 + 1, 2)
Next
End Sub

5-20
Chapter 5 Communication function

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)


Dim Bin() As Byte, i&, buf$, h$
Winsock1.GetData Bin
If bytesTotal >= 2 Then
For i = 6 To bytesTotal - 1
h = Hex(Bin(i))
' After the conversion to hexadecimal, 0 is added if that is one digit.
If Len(h) = 1 Then
buf = buf & "0" & h & " "
Else
buf = buf & h & & " "
End If
Next
' Display of response task code
Text7.Text = buf
End If
End Sub

Private Sub Command3_Click()


' The display of the response task code is clear.
Text7.Text = ""
End Sub

5-21
Chapter 5 Communication function

5.3 Message communication


5.3.1 Transmission parameter
It is necessary to set the definition of the internal output area as "Transmission parameter" which is set as other station IP
address and is used to transmit/receive the message, when the message communication function is used in this module.
Transmission parameter area uses 213 words of continuous internal output (WR) maximum. The following shows the
parameter configuration.
Table 5.3.1.1 Transmission parameter
WR** R/W Description
00 - 02 Own station physical address 3 words R [a] LAN-ETH2 sets physical address of own station
03 - 04 Own station IP address 2 words R [b] LAN-ETH2 sets IP address of own station
05 Control area Control area 1 W [c] Open request for each connection
06 Control area 2 W Request of sending and response of receiving for
each connection
07 Status area Status area 1 R [d] Open completed and error of each connection
08 Status area 2 R Response of sending and error of each connection
09 Status area 3 R Receive existence and error of each connection
0A Status area 4 R Close request from other station of each connection
0B Connection 1 Status area R [e] Error information for each connection
0C Connection 2 Status area R Errors at the time of configuration of
0D Connection 3 Status area R transmission parameter, open/close and
0E Connection 4 Status area R sending/receiving data are set.
0F Connection 5 Status area R
10 Connection 6 Status area R
11 Timeout observation timer seting R (f) For active open and message communication
12 Reserve Not for use
13 Connection 1 Own station logical port No. W [g] Specify the own station logical port No. of
connection 1.
14 parameter setting area Other station IP address W [h] Specify IP address of other station for connection 1
15 (11 words in total)
16 Other station logical port No. W [j] Specify logical port No. of other station for
connection 1.
17 Send buffer I/O type W [k] Specify send buffer I/O type
18 Send buffer top No. W [m] Specify send buffer top No.
19 Send buffer area length W [j] Specify send buffer area length
1A Receive buffer I/O type W [k] Specify receive buffer I/O type
1B Receive buffer top No. W [m] Specify receive buffer top No.
1C Receive buffer area length W [n] Specify receive buffer area length
1D Service type W [p] Specify communication protocol and open status.
1E - 28 Connection 2 W Same with connection 1
parameter setting area
29 - 33 Connection 3 W Same with connection 1
parameter setting area
34 - 3E Connection 4 W Same with connection 1
parameter setting area
3F - 49 Connection 5 W Same with connection 1
parameter setting area
4A - 54 Connection 6 W Same with connection 1
parameter setting area
55 Routing information 1 Other station IP address W [q] When routing information area isn’t used or isn’t
56 used up to class 32, set H0000 in 4 words in the top
57 Gateway IP address W of unused area.
58 LAN-ETH2 ignores the data written in behind
59 - 5C Routing information 2 W H0000 in 4 words.
: : Only gateway IP address set in routing information 1
: : becomes effective. Gateway IP address of routing
D1 - D4 Routing information 32 W information 2-32 is unused.

5-22
Chapter 5 Communication function

(1) Explanation for each transmission parameter


[a] Physical address
This module sets the own physical address (48 bits) to transmission parameter area in the form of Figure 5.3.1.1.
This physical address is read only for regardless of the operation mode.
(MSB) b47 b32 b31 b16 b15 b0 (LSB)
A B C D E F G H J K L M

b15 b0
WR* *00 A B C D
01 E F G H
02 J K L M
Figure 5.3.1.1 Physical address storage form

[b] IP address of own station


This module sets own IP address (32 bits) to transmission parameter area in the form of Figure 5.3.1.2. This IP
address is only for reading in the normal operation mode.
(MSB) b31 b16 b15 b0 (LSB)
A B C D E F G H

b15 b0
WR* *03 A B C D
04 E F G H
Figure 5.3.1.2 IP address storage form

5-23
Chapter 5 Communication function

[c] Control area


When the communication relation processing to use the message communication function is requested of this
module, this area is used. This area is set by user program.

Control area 1 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *05

Bit 8-13 : Connection open request bit


It is a bit which requests the open processing of each connection for the message communication.
Bit Corresponding Set value and explanation
connection 1 0
8 Connection 1 Open processing is requested Open processing is not requested
9 Connection 2 Open processing is requested Open processing is not requested
: : : :
13 Connection 6 Open processing is requested Open processing is not requested

Bit 0-7, 14-15 : Reserved bit


Always set "0".

Control area 2 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *06

Bit 0-5 : Receive response bit


This bit is used to notify to have finished saving the receiving data in the receiving buffer to other internal output
areas. There is a corresponding bit of each connection for the message communication.
Bit Corresponding Set value and explanation
connection 1 0
0 Connection 1 Receiving response is notified Receiving response is not notified
1 Connection 2 Receiving response is notified Receiving response is not notified
: : : :
5 Connection 6 Receiving response is notified Receiving response is not notified

Bit 8-13 : Send request bit


It is a bit which requests the data transmission of each connection for the message communication. There is a
corresponding bit of each connection.
Bit Corresopnding Set value and explanation
connection 1 0
8 Connection 1 Data sending is requested. Data sending is not requested.
9 Connection 2 Data sending is requested. Data sending is not requested
: : : :
13 Connection 6 Data sending is requested. Data sending is not requested

Bit 6-7, 14-15 : Reserved bit


Always set "0".

5-24
Chapter 5 Communication function

[d] Status area


When the user refers to various information on this module needed to process the communication relation to use the
message communication function from the user program, this area is used.

Status area 1 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *07

Bit 0-5 : Open error flag


The status of the open error which occurs by each connection for the message communication is stored.
Bit Corresopnding Set value and explanation
connection 1 0
0 Connection 1 There is open error. There is no open error.
1 Connection 2 There is open error. There is no open error.
: : : :
5 Connection 6 There is open error. There is no open error.

Bit 8-13 : Open status flag


The status of open/close of each connection for the message communication is stored.
Bit Corresopnding Set value and explanation
connection 1 0
8 Connection 1 Opening Closing
9 Connection 2 Opening Closing
: : : :
13 Connection 6 Opening Closing

Bit 6-7, 14-15 : Reserved bit


Always set "0".

Status area 2 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *08

Bit 0-5 : Send error flag


When this module cannot send data, it is detected as send error.
Bit Corresopnding Set value and explanation
connection 1 0
0 Connection 1 There is a send error. There is no send error.
1 Connection 2 There is a send error. There is no send error.
: : : :
5 Connection 6 There is a send error. There is no send error.

Bit 8-13 : Send response flag


This module is notified to have accepted the sending request to the sending request from the user program. There is a
corresponding bit of each connection.
Bit Corresopnding Set value and explanation
connection 1 0
8 Connection 1 There is a send response. There is no send response.
9 Connection 2 There is a send response. There is no send response.
: : : :
13 Connection 6 There is a send response. There is no send response.

Bit 6-7, 14-15 : Reserved bit


Always set "0".

5-25
Chapter 5 Communication function

Status area 3 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *09

Bit 0-5 : Receive error flag


When this module cannot receive data, it is detected as receive error.
Bit Corresopnding Set value and explanation
connection 1 0
0 Connection 1 There is a receive error. There is no receive error.
1 Connection 2 There is a receive error. There is no receive error.
: : : :
5 Connection 6 There is a receive error. There is no receive error.

Bit 8-13 : Receive flag


The data which this module received is notified to have been stored in the specified reception buffer area. There is a
corresponding bit of each connection.
Bit Corresopnding Set value and explanation
connection 1 0
8 Connection 1 There is a reception. There is no reception.
9 Connection 2 There is a reception. There is no reception.
: : : :
13 Connection 6 There is a reception. There is no reception.

Bit 6-7, 14-15 : Reserved bit


Always set "0".

Status area 4 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *0A

Bit 8-13 : Close request flag


It is a flag which notifies the closing request of the connection from the other station on the opening connection.
Bit Corresopnding Set value and explanation
connection 1 0
8 Connection 1 Close request from other station No close request from other station
9 Connection 2 Close request from other station No close request from other station
: : : :
13 Connection 6 Close request from other station No close request from other station

Bit 0-7, 14-15 : Reserved bit


Always set "0".

5-26
Chapter 5 Communication function

[e] Status area of each connection


It is such an area where notifies error occurrence at the time of the normal operation and at the time of transmission
parameter setting mainly. You read out the value of these status areas with user program.

Connection 1 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)


status WR* *0B
: :
: :
Connection 6 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
status WR* *10
[Transmission parameter setting]

Bit 0: I/O type error flag


When I/O types other than WR(H0A), WL(H0B), and WM(H0C) are specified as a transmission buffer or a receiving
buffer, it becomes an error.

Bit 1 : I/O No. error flag


When the I/O number outside the range is specified for the I/O type specified as a transmission buffer or a receiving
buffer, it becomes an error.

Bit 2 : Buffer length error flag


When the specified size of receving buffer or transmission buffer is out of 4-516(H04-H204) word, it becomes an
error.

Bit 3 : Area error flag


When the IP address information area, the transmission parameter area, and the sending/receiving buffer exceeds the
upper bound value, it becomes an error. Moreover, when the transmission parameter area and the sending/receiving
buffer overlaps, it becomes an error.

Bit 4 : IP address error flag


The error is detected by the following conditions.
1) When "H00000000" or "HFFFFFFFF" is set in other station IP address.
2) When own IP address and the other station IP address are the same.

Bit 5 : Logical port No. error flag


The error is detected by the following conditions.
1) When "H00000000" is set in the other station logical port number.
2) When the logical port number and the other station logical port number for the task code communication are the
same.

Bit 6 : Service type error flag


When the service type which cannot be used is specified, it becomes an error.

Bit Description
1 0
0 I/O type error None
1 I/O No. error None
2 Buffer length error None
3 Area error None
4 IP address error None
5 Logical port No. error None
6 Service type error None

Bit 7-15 : Reserved bit


Always set "0".

5-27
Chapter 5 Communication function

[Message sending/receiving processing]

Bit 0 : Receive buffer overflow flag


When receiving data exceeds the specified reception buffer area length, it becomes error.

Bit 1 : Send byte number error flag


The error is detected by the following conditions.
1) When the number of sending bytes is set to "0".
2) When the number of sending bytes exceed the sending buffer area length.

Bit 2 : Timeout error flag


When the transmission processing time exceeds the timeout value in transmission parameter, it becomes an error.

Bit 7 : Communication error flag


When the transmission processing terminates abnormally due to the trouble of the communication line though this
module executed the transmission processing, it becomes an error.
Bit Description
1 0
0 Receive buffer overflow error None
1 Send byte number error None
2 Tiemout error None
7 Communication error None

Bit 3-6, 8-15 : Reserved bit


Always set "0".

[f] Timeout observation timer value (Recommended value : 32 second = "H0020")


The time limit of timeout observation at the time of active open and sending message is specified with second. Set
the plenty time considering the congestion of network and the performance of the other station. If you do not need to
observe timeout, set H0000=0 second. The available range is H0000 to HFFFF (0 to 65535).

[g] Own station logical port No.


Set the own station logical port number of a pertinent connection.

[h] Other station IP address


Set the other station IP address of a pertinent connection.

[j] Other station logical port No.


Set the other station logical port number of a pertinent connection.

[k] I/O type


Set the type of the internal output used as a sending/receiving buffer area. Table 5.3.1.2 shows the I/O type which
can be specified.
Table 5.3.1.2 I/O type

I/O type I/O type value


WR H0A
WL H0B
WM H0C

5-28
Chapter 5 Communication function

[m] I/O number


Set top I/O number of the internal output used as a sending/receiving buffer area. Table 5.3.1.3 shows the range
of the I/O number which can be specified.
Table 5.3.1.3 Specifying range for I/O No.

I/O type I/O type value Specifying range for I/O No


WR H0A Refer to note.
WL H0B 0 ∼ H03FF, H1000 ∼ H13FF
WM H0C 0 ∼ H03FF
Note : Set Specifying range is different according to the memory cassette type.
Table 5.3.1.4 Specifying range for WR I/O

Memory cassette type Specifying range for I/O No


RAM-04H, RAM2-04H 0 ∼ H03FF
RAM-08H, RAM2-08H, RAM3-08H
RAM-16H, RAM2-16H, RAM3-16H 0 ∼ H43FF
ROM-16H, ROM2-16H
RAM-48H, RAM2-48H, RAM3-48H 0 ∼ HC3FF
ROM2-48H

[n] Buffer length


Set the data size which added 4 words to data length of sending/receiving, as word unit. The range of the buffer
area length which can be specified is H0005-H0204(5-516) word.
For instance, the data size which can send and receive becomes 1 word, when H0005 is specified for this area.

5-29
Chapter 5 Communication function

[p] Service type


Specify the type of the service used by a pertinent connection.
(MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)

Bit 0 : Opening type specification bit


In the opening type, there are "Active open" and "Passive open". Specify the opening form used.

Bit 1 : Other station specification bit


In the passive opened connection, "The other party bureau is specified" or "The other party bureau is not specified" can
be selected. Specify them based on the communication procedure used.

Bit 2 : Communication protocol specification bit


Select the communication protocol used by a pertinent connection.

Bit 3 : Bi-direction communication specification bit


You can select "Bi-direction communication" or "One direction communication" for one connection. Specify them
based on the communication procedure used.

Bit 15 : Connection effective/ineffective specification bit


Specify whether to use a pertinent connection.
Bit Description
1 0
0 Active open Passive open
1 the other station is fixed the other station is not fixed
2 TCP/IP is used. UDP/IP is used.
Either sending or reception is used by one Both sending and reception is used by one
3
connection. connection.
15 A pertinent connection is used. A pertinent connection is not used.

Bit 4-14 : Reserved bit


Always set "0".

Note
• When you specify "One direction communication", the data delivery confirmation by the user program cannot be done.
Therefore, we recommend "Bi-direction communication", if there is no restriction in customer's network environment
and communication procedure.
• Even if the connection opening processing and the data transmission demand, etc. are done with "A pertinent
connection is not used" specified, this module does not process anything.

5-30
Chapter 5 Communication function

There is a limitation in the combination which can be set about the service type. Moreover, the item which should be
set according to the set service type is different. Table 5.3.1.5 and Table 5.3.1.6 show this combination. "{" in the table
is a necessary item for transmission parameter to set and "×" in the table is a unnecessary item for transmission parameter
to set. In addition, please set bureau Internet Protocol address and the port number regardless of the service type setting.
Table 5.3.1.5 Available combination (TCP/IP)

No. Service Setting item Service type


Other Open Communicate Other station Other station Send Receive Set value
station type direction IP address logical buffer buffer
specify port No.
1 Fix Active Send/Receive { { { { H8007
2 Fix Active Send { { { { H800F
3 Fix Passive Send/Receive { { { { H8006
4 Fix Passive Receive { { { { H800E
5 Unfix Passive Send/Receive × × { { H8004
6 Unfix Passive Receive × × { { H800C
Table 5.3.1.6 Available combination (UDP/IP)

No. Service Setting item Service type


Other Open Communicate Other station Other station Send Receive Set value
station type direction IP address port No. buffer buffer
specify
1 Fix - Send/Receive { { { { H8002(Note1)
2 Fix - Send/Receive { { { { H8003(Note1)
3 Fix - Send { { { { H800B
4 Fix - Receive { { { { H800A
5 Broad- - Send × { { { H8009
cast
6 Unfix - Receive × × { { H8008
Note 1) Setting H8002 and H8003 of the service type become the same operations.

[p-1] Active open and passive open


It is necessary to establish the logical transmission line of connection beforehand before the initiation of the data
sending and receiving processing, when the TCP/IP communication protocol is used in the message communication.
There are two kinds of establishment forms of the connection, and even when which form is used, it is necessary to
request the opening processing from the user program to this module.
• Active open is a method that own station issues open request to the other station has already waited for
communication open and establishes a connection.
• Passive open is a method that own station waits for connection open and the connection is established when
open request from other station is received.
Note : Own station in the explanation here indicates this module. The other station indicates the network equipment
which communicates about this module.

Point
• When the other station is passive open, own station must be active. And own station is passive open, the other must be active.
• In general, it is known that the communication processing procedure by which establishment and cutting the connection are
frequently repeated becomes a factor to make the system instability. "10 seconds or more" is recommended to be secured in
this module at waiting time from cutting the connection to the repeated establishment.

[p-2] About the operation when the other station is not fixed
When you specify passive open in TCP/IP or receive only in UDP/IP, it is possible to make message
communication with any other station without specifying the other station. In this case, this module sets IP address
and logical port No. of the other station in send/receive data after other station is decided to send/receive data buffer.
Use them to verify the other station.

5-31
Chapter 5 Communication function

[p-3] Broadcast send


In the UDP/IP, the broadcast transmission can be used.
When you specify broadcast send in UDP/IP, it is possible to send same data to several other stations, which have
same logical No. and are located on a network, in receive status. It is useful for simultaneously sending from user
program.

Other station A Other station B Other station C

IP address IP address IP address


192.168.0.2 192.168.0.3 192.168.0.4
Logical port No. Logical port No. Logical port No.
4100 4100 4100

Broadcast data

Own station (Sending) Other station D

IP address IP address
192.168.0.6 192.168.0.5
Logical port No. Logical port No.
4200 4100

Figure 5.3.1.3UDP/IP broadcast send

5-32
Chapter 5 Communication function

[q] Routing information


In generally, when network is logically divided into two or more segments, communication equipment with
gateway function exists in the network.*1 The user should specify IP address of the gateway equipment for this module
beforehand when communicating with the other station where this module belongs to other segments the message.
*1 : The gateway equipment might be unnecessary in case of the network composition installed in a single segment.

When the network in Figure 5.3.1.5 is composed, it is necessary to set IP address of the default gateway equipment
in this module to transmit data to the other station which belongs from this module to segment B.

IP address of the default gateway equipment (32 bits) is stored in the transmission parameter area in the form of
Figure 5.3.1.4.
(MSB) b31 b16 b15 b0 (LSB)
A B C D E F G H

b15 b0
WR* *03 A B C D
04 E F G H
Figure 5.3.1.4 Default gateway IP address storage form

Other station B-1 Other station B-2 Other station B-3

IP address IP address IP address


172.16.0.2 172.16.0.3 172.16.0.4
Logical port No. Logical port No. Logical port No.
4100 4100 4100

Segment B Segment B IP address


(network address : 172.16.0.0) 172.16.0.1

Default
gateway equipment

Segment A Segment A IP address


(network address : 192.168.1.0) 192.168.1.1

IP address
192.168.1.2 IP address
Logical port No. 192.168.1.3
4100 Logical port No.
4100
Own station(sending) Other station A-1

Figure 5.3.1.5 Communication example across subnet

Note
• IP address which can be set in this module as gateway information becomes only one. Therefore, when you make
this module participate in the network connected with two or more segments, please make the network a composition
that the communication across between segments ends in one gateway.

5-33
Chapter 5 Communication function

5.3.2 Configuration of transmission parameter


The handshake procedure to set parameter in communication tools is explained. The user must make the user program
based on the procedure shown in Figure 5.3.2.1.
When the number of other station is below six nodes, You only have to make the user program which sets transmission
parameter only once after turning on the power supply.
On the other hand, while the PLC system is operating when the message communication with the other station more than
seven nodes is necessary, whenever the other station is switched, it is necessary to change setting transmission parameter.

Note
• The connection for the communication of all messages should be closing when transmission parameter is changed.
The error is detected while the line is opening when transmission parameter is changed when the connection for one or
more-message communication is an opening, and transmission parameter is not changed.

Start

Set the necessary information to


transmission parameter area.

Is status register N
setting response "0" ?

Set “1” to configuration of transmission


parameter request of control register.

Is status register
N
setting response "1" ?

Reset configuration of transmission


parameter request to "0".

Is status register Is status register


N
setting complete “1” ? setting error “1” ?

Y Y

Normal end Error end process

Figure 5.3.2.1 Configuraion of transmission parameter procedure

5-34
Chapter 5 Communication function

(1) Procedure of configuration of transmission parameter


In order that the user sets up the transmission parameter, The communication parameter area where stores the
information (the data) to sets up it is secured in the internal output area. You make the handshake program in proportion
to the time chart that shows it below, after necessary information is stored in the communication parameter area. By
implementing the handshake program that you made, the transmission parameter can be set up to this module.

Request of configuration of transmission parameter

Y00S31 (2) (3)

Response of configuration of transmission parameter (4)


X00S15 (1)

Completion of configuration of transmission parameter Normal


X00S13 (5)

Configuration of transmission parameter error


Error

X00S14

(1) (2) (3) (4)、(5)


WRab00 Setting information Setting information Setting information Setting information Setting information

: : : : :
: : : : :
WRabD4

Control register
WY00S1 00****ab 10****ab 10****ab 00****ab 00****ab
Status register
WX00S0 0***** 0***** 100*** 100*** 0XX-----

No. Description
(1) The area of WR(internal output) that the subordinate position two digits of the I/O number start by 00 is made a head
by the user program, and transmission parameter is set in the area beforehand. Set “0” to all parameter area of
unused connection.
The user program sets the high rank two digits of above-mentioned WR area in the control register.
The user program confirms the response of configuration of transmission parameter flag (X00S15) of the status
register is "0", and sets "1" in request of configuration of transmission parameter bit (Y00S31) of the control
register.
(2) This module detects that "IP address set request bit (Y00S31)" is set to "1".
This module reads information of configuration of transmission parameter and sets "1" in response of configuration
of transmision parameter flag (X00S15).
At this time, completion flag of configuration of transmission parameter (X00S13) and error flag of configuration of
transmission parameter (X00S14) are cleared in "0" (However, when ERR LED lights, ERR LED maintains
lighting).
(3) The user program confirms response flag of configuration of transmission parameter (X00S15) of the status register
became "1", and clears request bit of configuration of transmission parameter (Y00S31) of the control register in "0".
(4) This module detects request bit of configuration of transmission parameter (Y00S31) becoming "0", and clears
response flag of configuration of trnamission parameter (X00S15) in "0", and .set completion flag of configuration of
transmissin parameter (X00S13) in "1".
(5) When there are some inconveniences in information of configuration of transmisiion parameter, completion flag of
configuration of transmission parameter (X00S13) maintains "0". This module informs that the error occurred by
lighting ERR LED at the same time as setting "1" in error flag of configuration of transmission parameter (X00S14).
Details of the error factor are set in X00S00~X00S05 and status area of each connection (WRab0B - WRab10).
Figure 5.3.2.2 Time chart and the explanation

5-35
Chapter 5 Communication function

Note
• This module requires about 8 seconds in the processing time after the power supply turned on or reset.
• Transmission parameter set request cannot be accepted while processing initial. Please make the program after
considering the initial processing time of this module for making the user program.

(2) Example for configuration of transmission parameter


The transmission parameter setting when this module is used by the equipment composition shown in Figure 5.3.2.3 is
explained.
This module is mounted on slot No.1 on a basic base.
The internal output area which starts from WR0300 is secured as a transmission parameter area.

Other station B

IP address
172.16.0.2
Logical port No.
4100

Segment B Segment B IP address


(network address : 172.16.0.0) 172.16.0.1

Default
gateway equipment

Segment A Segment A IP address


(network address : 192.168.0.0) 192.168.0.1

Own station (sending)


IP address
192.168.0.3
Logical port No.
3000

Other station A

IP address : 192.168.0.2
Logical port No.
Connection 1 : 4101 (Send/Receive with other station A, TCP/IP, Active open)
Connection 2 : 4102 (Send/Receive with other station B, UDP/IP)
Connection 3 : 4103 (Broadcast send, UDP/IP)
Connection 4 : 4104 (Receive with any other station, TCP/IP, Passive open)
Connection 5 : 4105 (Unused)
Connection 6 : 4106 (Unused)

Figure 5.3.2.3 Example of composing equipment

(2-1) Control register (WY0011)

Y01 31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 Å Bit I/O No.


0 0 0 3 (Hex)

5-36
Chapter 5 Communication function

(2-2) Transmission parameter area (WR0300 ~)


WR0300 Hex
00 - 02 Own station physical address ********** LAN-ETH2 sets physical address of own station
03 Own station IP address H0002 LAN-ETH2 sets IP address of own station
04 HC0A8 (192.168.0.2)
05 Control area **** Open request for each connection
06 **** Request of sending and response of receiving for each
connection
07 Status area **** Open completed and error of each connection
08 **** Response of sending and error of each connection
09 **** Receive existence and error of each connection
0A **** Close request from other station of each connection
0B **** Error information for each connection
0C **** Errors at the time of configuration of
0D **** transmission parameter, open/close and
0E **** sending/receiving data are set.
0F ****
10 ****
11 Timeout observation timer setting H0020 Set 32 second as timeout value
12 Reserved ---- Not for use
13 Connection 1 H1005 Specify the own station logical port No. of connection 1
14 parameter setting area HC0A8 Specify IP address of other station for connection 1
15 (11 words in total) H0003 (192.168.0.3)
16 H0BB8 Specify logical port No. of other station for connection 1.
17 H000A Specify send buffer I/O type. (WR)
18 H1000 Specify send buffer top No. (WR1000)
19 H0204 Specify send buffer area length. (WR1000-1203)
1A H000A Specify receive buffer I/O type. (WR)
1B H2000 Specify receive buffer top No. (WR2000)
1C H0204 Specify receive buffer area length. (WR2000-2203)
1D H8007 TCP/IP, Active open, Send/Receive
1E Connection 2 H1006 Specify the own station logical port No. of connection 2
1F parameter setting area HAC10 Specify IP address of other station for connection 2
20 (11 words in total) H0002 (172.16.0.2)
21 H1004 Specify logical port No. of other station for connection 2.
22 H000A Specify send buffer I/O type. (WR)
23 H3000 Specify send buffer top No. (WR3000)
24 H0204 Specify send buffer area length. (WR3000-3203)
25 H000A Specify receive buffer I/O type. (WR)
26 H4000 Specify receive buffer top No. (WR4000)
27 H0204 Specify receive buffer area length. (WR4000-4203)
28 H8003 UDP/IP, Send/Receive
29 Connection 3 H1007 Specify the own station logical port No. of connection 3
2A parameter setting area H0000 Specify IP address of other station for connection 3
2B (11 words in total) HC000 (Brouadcast send)
2C H0BB9 Specify logical port No. of other station for connection 3.
2D H000A Specify send buffer I/O type. (WR)
2E H5000 Specify send buffer top No. (WR5000)
2F H0204 Specify send buffer area length.. (WR5000-5203)
30 H000A Specify receive buffer I/O type. (WR)
31 H6000 Specify receive buffer top No. (WR6000)
32 H0204 Specify receive buffer area length. (WR6000-6203)
33 H8009 UDP/IP, Broadcast send

5-37
Chapter 5 Communication function

34 Connection 4 H1008 Specify the own station logical port No. of connection 4
35 parameter setting area 0 Specify IP address of other station for connection 4
36 (11 words in total) 0 (Broadcast send)
37 0 Specify logical port No. of other station for connection 4
38 H000A Transmission buffer is not used.
39 H7000 Dummy (WR7000)
3A H0010 Dummy (WR7000 - 700F)
3B H000A Specify receive buffer I/O type. (WR)
3C H8000 Specify receive buffer top No. (WR8000)
3D H0204 Specify receive buffer area length. (WR8000 - 8203
3E H800C TCP/IP、Any other station, Passive open, Receive only
3F - 49 Connection 5 0 Unused
parameter setting area (Unused, all “0”)
4A - 54 Connection 6 0 Unused
parameter setting area (Unused, all “0”)
55 Other station IP address HAC10 Other station IP address (172.16.0.2)
56 H0002
57 Default IP address HC0A8 IP address of subnet A (192.168.0.1)
58 H0001
59 End of routing information H0000 End of routing information
5A H0000 4 words ”H0000”
5B H0000
5C H0000

5-38
Chapter 5 Communication function

(2-3) Example of user program


Sample program 2 Configuration of transmission parameter Slot No. 0 1 2 ∼ 8
LAN-ETH2
- - -
Mounted position

R7E3 (00001)
WY0011 = 0 Control register clear
R000 = 0

R001 (00002)
WR0311 = H0020 The timeout value of each connection is set.

R001 (00003)
WR0313 = H1005
DR0314 = H0003C0A8
WR0316 = H0BB8
WR0317 = H000A
WR0318 = H1000
WR0319 = H0204 Parameter setting of connection 1
WR031A = H000A
WR031B = H2000
WR031C = H0204
WR031D = H8007

R001 (00004)
WR031E = H1006
DR031F = H0002AC10
WR0321 = H1004
WR0322 = H000A
WR0323 = H3000
WR0324 = H0204 Parameter setting of connection 2
WR0325 = H000A
WR0326 = H4000
WR0327 = H0204
WR0328 = H8003

R001 (00005)
WR0329 = H1007
DR032A = H00000000
WR032C = H0BB9
WR032D = H000A
WR032E = H5000
WR032F = H0204 Parameter setting of connection 3
WR0330 = H000A
WR0331 = H6000
WR0332 = H0204
WR0333 = H8009

R001 (00006)
WR0334 = H1008
DR0335 = H000A
DR0337 = H8000
DR0339 = H0010
WR033B = H000A
WR033C = H8000 Parameter setting of connection 4
WR033D = H0204
WR033E = H800C
R001 = 1

R001 (00007)
WR0355 = HAC10 Setting of routing information
WR0356 = H0002
WR0357 = HC0A8
WR0358 = H0001
WR0359 = H0000
WR035A = H0000
WR035B = H0000
WR035C = H0000

5-39
Chapter 5 Communication function

R000 X115 R001 (00008)


WY0011 = H0003 Set the top word No. of configuration of
Response of Y131 = 1 transmission parameter area to WR0300.
configuration of R000 = 1 Set the request of configuration of transmission
transmission
parameter parameter to “1”.
Circuit (00008) is active.
Y131 X115 Y131 (00009) Request of configuration keeps “1” until a
Request of Response of
response of configuration of transmission
configuration configuration of parameter becomes “1”.
of transmission parameter
transmission
parameter
Y131 X115 (00010) When response of configuration or
Y311 = 0 transmission parameter is set to “1”, request of
Request of Response of R002 = 1 configuration of transmission parameter is
configuration of configuration of
transmission transmission parameter cleared in “0”.
parameter Circuit (00011) operation is active.
R002 X115 (00011)
R002 = 0 Response of configuration of transmission
Response of R003 = 1 parameter is cleared in “0”, circuit (00011)
configuration of
transmission parameter
operation is inactive.
Circuit (00012) operation is active.
R003 X113 (00012)
R003 = 0 After R003 is set to “1”, when completion of
Completion of configuration of R004 = 1 configuration of transmission parameter is in
transmission parameter the state of "0", and "1" was set to configuration
X114 of transmission parameter setting error flag,
circuit (00014) operation is active.
Configuration of transmission
parameter error

R003 X113 (00013)


R003 = 0 After R003 is set to “1”, when completion of
Completion of configuration of R005 = 1 configuration of transmission parameter is set to
transmission parameter “1”, Transmission parameter setting becomes
completion.
R004 (00014)
Processing of configuration of
transmission parameter error

R005 (00015)
Processing of message
communication

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

5-40
Chapter 5 Communication function

5.3.3 Processing of connection open/close


It is explained about open/close processing of the connection in this clause. It is necessary to make the handshake
program in proportion to the time chart that shows it in figure 5.3.3.1, to request open/close processing from this module.

(1) Processing outline

Start

Not complete
Setting of configuration of
transmission parameter completion?

Complete

1' is set the connection open request bit of


control area "1".
Open request of connection

The value of the open flag of status


area 1 is ? 0 : Closing state

1 : Opening state

Connection establishment condition


(Message communication processing possible
condition)

The value of the closing request flag 1 : Closing request


of status area 4 is ?

0 : No closing request

N Does message communication


processing end ?

Connection open request bit of control area is


cleared to "0". Close request of connection

End

Figure 5.3.3.1 Flow chart of open/close processing of connection


Open/close condition for each connection of this module can confirm with OPN LED.

Note
• Closing connection from the other station might be requested in connection establishment state.
In this case, please do the closing request processing of the connection from this module side.
• Please confirm that the data sending and receiving handshake of a proper connection is completing before closing
processing without fail. In the case that it tried to close the connection in the data sending and receiving handshake
midway, closing processing does sometimes not end normal.

5-41
Chapter 5 Communication function

(2) Open/close procedure


Open/close request processing is done by the handshake using control area and status area specified by the
transmission parameter.
The range of transmission parameter is from WR0300, and it is explained the example of opening/closing connection 1
with (a) ∼ (d). Furthermore, this module shall be mounted in slot No. 1.

(a) Control area and status area


It is explained about the inside output area and corresponding bit that must refer to/operate it at the time of
open/closing request of the connection.

Status area 1 (WR0307, please read only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1 Connection1
open completed open error

Status area 4 (WR030A, please read only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1 close request from other station

Connection 1 status area (WR030B, please read only)


(MSB) b15 b8 b7 b2 b0 (LSB)

Timeout
Communication error

Control area 1 (WR0305, please write only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1 open request

5-42
Chapter 5 Communication function

(b) Open/close sequence


(b-1) Open process sequence
The open processing sequence of case that the proper connection of this module is designated in active station is
shown in figure 5.3.3.2.

Other station LAN-ETH2


(Passive) (Active)

Passive
open
Waiting for connection open
Open request
Acceptance of
open request
Connection OPN LED
Connection open lighting
open

Figure 5.3.3.2 Open process sequence (Active station)

The handshake procedure that conformed to the sequence of figure 5.3.3.2 is shown in figure 5.3.3.3.
Open request
(WR305.b8) (4)

Transmission parameter completed (1)


(X00113)
Open completed
(WR307.b8) (2)

Open error
(WR307.b0) (3) (5)

No. Description Process


(1) Please set open request bit in "1", after the transmission parameter setting completion flag is Normal
set to "1'', in the case that the connection is opened.
(2) This module starts open processing, when that the open request bit of "1'' is detected. When
open processing ends normal, this module sets "1" to the open flag. In this condition, the
data sending and receiving becomes possible
(3) When open processing ends abnormally, this module sets "1" to open error flag and lights Error
ERR LED. Furthermore, "0" is held to open completion flag at this time.
(4) When open error is occurred, clear the open request bit in “0” by user program.
(5) This module resets a open error flag in "0", when that the open request bit of "0'' became is
confirmed. However, ERR LED holds lighting.
Figure 5.3.3.3 Time chart and the explanation

5-43
Chapter 5 Communication function

The open processing sequence of case that the proper connection of this module is designated in passive station is
shown in figure 5.3.3.4
Other station LAN-ETH
(Active) (Passive)

Passive
open
Waiting for connection open

Open request
Acceptance of
open request
Connection
open Connection OPN LED
open lighting

Figure 5.3.3.4 Open process sequence (Paasive station)

The handshake procedure that conformed to the sequence of figure 5.3.3.4 is shown in figure 5.3.3.5.

(3)Open request from other station

Open request
(WR305.b8) (6)

Transmission parameter completed (1)


(X00113)
Open completed (2)Listen state
(WR307.b8) (4)

Open error
(WR307.b0) (5) (7)

No. Description Process


(1) Please set open request bit in "1", after the transmission parameter setting completion flag is Normal
set to "1'', in the case that the connection is opened passively.
(2) This module become the state of waiting for opening. when that the open request bit of "1'' is
detected.
(3) This module starts open processing, when it receives the open request form other station.
(4) When open processing ends normally, this module sets "1" to open flag.
In this state, Data sending/receiving becomes possible.
(5) When open processing ends abnormal, this module sets "1" to open error flag and lights Error
ERR LED. Furthermore, "0" is held to open completion flag at this time.
(6) When open error is occurred, clear the open request bit in “0” by user program.
(7) This module resets a open error flag in "0", when that the open request bit of "0'' became is
confirmed. However, ERR LED holds lighting.
Figure 5.3.3.5 Time chart and the explanation

5-44
Chapter 5 Communication function

Note (1)
After the connection is established, data is send and received only between the specified other, when the service
type is selected that in TCP, other station is fixed. However, the connection might be established between no specified
other station. This originates the fact that the other station distinction is processed after the connection is established.
It is assumed that this module specifies the other station for B station and is waiting for opening the connection. At
this time, when A station outside specification issues the opening request to this module, a normal response replies,
and the connection between this module and A station is established. Next, this module starts the distinction
processing of the other station. Here, because this module concludes that the other station of connection establishment
is not B station, and then the connection closing request is issued at once.
It is possible to send data to this module because A station is recognizing that the connection is established for a
little period when this module processes the distinction of the other station. However, because this module is not able
to send the data to A station and is not able to receive the data from A station, this module does not reply to A station.
Please close the connection in the communication application of A station when you fall into such a state.
A station LAN-ETH2 B station
(Active) (Passive) (Active)

Passive open
of specified
other station
Waiting for
connection open

Open request SYN


Provisional acceptance
of open request
SYN ACK
Connection Distinction of
open ACK other station

Other station NG
FIN ACK
Data send

RST Open request


SYN

Provisional acceptance
of open request SYN ACK

Distinction of other station Connection


ACK open
Other station OK

Connection
open

OPN LED
lighting

5-45
Chapter 5 Communication function

Note(2)
LAN-ETH2 is waiting for opening the connection with a specified other station as shown below. After the
connection is opened by the opening request of B station, even if unspecified station open the connection, the request
of A station is refused.
Afterwards, please close the connection once, and open the connection again, when A station send and does not
receive the response. Moreover, please close the connection without leaving the connection opening when you do not
send and receive.

A station LAN-ETH2 B station


(Active) (Passive) (Active)

Passive open of
specified other station

Waiting for
connection open SYN Open request
Provisional acceptance
of open request

SYN ACK
Connection
open
ACK
Connection
open OPN LED
lighting
Open request SYN

RST

Close request

5-46
Chapter 5 Communication function

(b-2) Close sequence


You do not need to concerned with an activity station or passive station in closing processing.
The processing sequence of case that closes a proper connection from this module side is shown in figure 5.3.3.6.

Other station LAN-ETH2


OPN LED
Connection Connection lighting
open open
Notice of no sending
Reply for close data (Close request)
request
Receive the reply
Notice of no sending data from other station
(Acceptance of
close request) Reply for close
Receive the reply request acceptance
from LAN-ETH2
Connection OPN LED
Connection close
close turning off

Figure 5.3.3.6 Close sequence (1)

The handshake procedure that conformed to the sequence of figure 5.3.3.6 is shown in figure 5.3.3.7

Open request
(WR305.b8) (2) (3)

Open completed (1)


(WR307.b8)

No. Description
(1) You confirmed that proper connection is opened by user program.
(2) Clear the open request bit in “0” to close connection.
(3) This module detects that open request bit is set to "0", this module starts closing process.
After closing process end normally, open flag clear in “0”.
Figure 5.3.3.7 Time chart and explanation

5-47
Chapter 5 Communication function

The processing sequence of case that closes a proper connection from the other station is shown in figure 5.3.3.8.

Other station LAN-ETH2


Connection Connection OPN LED
open open
lighting
Notice of no sending
data (Close request)
Receive the reply from Reply for close request
LAN-ETH2 Notice of no sending data
(Acceptance of
Reply for acceptance close request)
of close request
Receive the reply
from other station
Connection
close Connection OPN LED
close turning off

Figure 5.3.3.8 Close sequence (2)

The handshake procedure that conformed to the sequence of figure 5.3.3.8 is shown in figure 5.3.3.9

Open request
(WR305.b8) (2) (3)

Open complted
(WR307.b8)
Close request
(WR30A.b8) (1)

No. Descripyion
(1) This module sets the closing requestflag to "1", when it receives the closing request from he other
station.
(2) User program clears the open request bit in "0", when this module may close the connection to the
closing request from the other station.
(3) This module detects that open request bit is set to "0", this module starts closing process.
After closing process end normally, open flag and close request flag clear in “0”.
Figure 5.3.3.9 Time chart and explanation

Note
In the connection close processing in TCP/IP, a period until actually changing in the state of the connection close
after the close sequence ends in general and fixed time have been installed (wavy line part in Figure 5.3.3.6 and Figure
5.3.3.8). That period is defined as TIME_WAIT value, and the value of about two minutes might be set in general
telecommunications equipment.
This means the telecommunications equipment needed for two minutes or more exists as an interval from the
connection close to the repeated opening of the connection of time in general telecommunications equipment.
To prevent such a trouble beforehand, the interval from the connection close to the re-opening have room enough
for the specification of the other station telecommunications equipment.

5-48
Chapter 5 Communication function

(d) Sample program of Open/Close


Sample program 3 Open/Close process Slot No. 0 1 2 ∼ 8
LAN-ETH2
- - -
Mounted position

The open request process begins, when "1" is


Processing of communication parameter setting set in the open start bit.

(Open process)

R010 WR0305 = WR0305 OR H100 (0000n)


R010 = 0
"1" is set in the connection 1 open request bit.
(1) R011 = 1

WM0307 = WR0307 (0000n+1)


WM030A = WR030A
The content of status area 1 is saved in WM0307 at
every scanning unconditionally.

R011 M3078 R013 = 1 (0000n+2)


R011 = 0
(2)

R011 M3070 WM030B = WR030B (0000n+3)


R012 = 1
When the open error occurs, the error details data
R011 = 0
is stored in WM030B.
(3) The open request bit is cleared in "0".
WR0305 = WR0305 AND HFEFF

R012 M30B2
Processing of open error
(4)

R012 M30B7
Processing of open error
(5)

R013

(6) Processing of message


communication

(クローズ処理)

R015 M3078 WR0305 = WR0305 AND HFEFF (0000m)


R015 = 0 The open request bit of connection 1 is cleared in
(7) (2) R013 = 0 "0".
M30A8

(8)

Description of I/O comment


No. I/O I/O comment No. I/O I/O comment
(1) R010 Open start bit (5) M30B7 Communication errror
(2) M3078 Opne flag (6) R013 Ready bit of message communication
(3) M3070 Open error flag (7) R015 Close start bit
(4) M00B2 Timeout flag (8) M30A8 Close request bit

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

5-49
Chapter 5 Communication function

5.3.4 Processing of message send


It is explained about message send processing in this clause. Message sending is executed by user program.
Furthermore, it is necessary that corresponding connection be opened beforehand when you send message.

(1) Processing outline

Start

Connection open process


Open the corresponding
connection

Set the send data and the number of send byte


to communication buffer.

“1” is set in the send request bit of control


area 2. Message send is requested.

Does the sending response bit N


set in "1" ?

Y Connection close process


Clear the send request bit of control area 2 Close the corresponding
in “0”. connection

Does the send response bit clear N


in "0" ?

Y Analysis of an error factor


Retransmission processing

Does the send error bit set Y


in "1" ?

N Does message communication


processing end ?

Y Connection close process


Close the corresponding
connection.

End

Figure 5.3.4.1 Flow chart of message send processing

5-50
Chapter 5 Communication function

(2) Message send procedure


Message sending request processing is done by the handshake using control area and status area specified by the
transmission parameter.
The range of transmission parameter is from WR0300, the range of send buffer is from WR1000, and it is explained
the example of sending message on connection 1 with (a) ∼ (d). Furthermore, this module shall be mounted in slot No. 1.
(a) Send buffer composition
b15 b8 b7 b0
WR1000 Other station IP address H
LAN-ETH2 sets them by
+1 Other station IP address L
send/receive after connection
+2 Other station logical port No.
+3 Send byte number
+4 Data 0 Data 1
+5 Data 2 Data 3
+6 Data 4 Data 5
+7 Data 6 Data 7
Send data is set by the user program

Data n-3 Data n-2


Data n-1 Data n
(b) Control area and status area
It is explained about the area and corresponding bit that must refer to/operate it at the time of the send processing
request of the message.
Status area 1 (WR0307, read only)
(MSB) b15 b8 b7 b0 (LSB)

Connetion 1 open completed.

Status area 2 (WR0308, read only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1 Connection 1
send response send error

Connection 1 status area (WR030B, read only)


(MSB) b15 b8 b7 b2 b0 (LSB)

Send byte number error


Timeout error
Communication error

Control area 2 (WR0306, write only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1 request of sending

5-51
Chapter 5 Communication function

(c) Handshake procedure

Send request (2)


(WR306.b8) (4)

Open completed (1)


(WR307.b8)
Send response (3)
(WR308.b8)
Data send process
(Internal process)
Completion of send buffer operation
(User program)
Communication error
(WR308.b0) (5)

No. Description
(1) After you confirmed that the opening completion flag is "1" and the sending response flag are "0", and
set the sending data and the number of sending bytes in the send buffer. Set "1" in the send request bit
after completing the preparation for the send buffer.
(2) After it is confirmed that the sending request bit is set in "1", this module takes the send data and sets
"1" in the send response notification flag.
This module starts sending data after 2ms (maximum), after setting "1" in sending response flag.
(3) Clear the sending request bit in "0" by user program, after confirming the sending response notification
flag was set in "1".
(4) If the sending request bit is "0" after the data sending ends, this module clears the sending response
notification flag in "0".
(5) When abnormality is detected in the sending processing, this module sets error information on each
connection in the status area, and lights ERR LED. Afterwards, this module informs the user of the set
of "1" in the send error flag, and the occurrence of abnormality.
Figure 5.3.4.2 Time chart and explanation

Note
Close the connection to clear the sending error flag in "0", after the sending error occurs. Open the connection
before sending again, and execute the user program based on the procedure of Figure 5.3.4.2.
Even if the sending error flag is cleared in "0", ERR LED which lighted at the time of the sending error is not turned
off. Please execute the sample program of "6.2 Error clear" to turn off ERR LED.

5-52
Chapter 5 Communication function

(d) Sample program


Sample program 4 Message send process Slot No. 0 1 2 ∼ 8
LAN-ETH2
- - -
Mounted position

Processing of open

WM0307 = WR0307 (0000n)


WM0308 = WR0308 At every scanning unconditionally,
The content of status area 1 is saved in WM0307.
The content of status area 2 is saved in WM0308.

R020 M3078 M3088 WR1003 = H0020 (0000n+2)


DR1004 = H32333031 The number of transmission bytes is set in WR1003.
DR1006 = H36373435 The transmission data is set in WR1004-WR1013.
(1) (2) (3) "1" is set in transmission request bit (WR3006.bit8)
:
:
of the connection 1.
DR1012 = H6E6F6C6D
WR0306 = WR0306 OR H100
R020 = 0
R024 = 1

R024 M3088 WR0306 = WR0306 AND HFEFF (0000n+3)


R021 = 1
After it is confirmed that "1" was set in transmission
R024 = 0
response notification flag of connection 1
(4) (3) (M03088), the transmission request bit of the
connection 1 is cleared in "0".
R021 M3088 M3080 R021 = 0 (0000n+4)
R023 = 1 The message transmission processing ended
normally.
(5) (3) (6)

R021 M3080 R021 = 0 (0000n+5)


R022 = 1
When the transmission error occurs, the
WM030B = WR030B
error details data is stored in WM030B.
(5) (6)

R022 M30B1
Processing of send error
(7) (8)

R022 M30B2
Processing of send error
(7) (9)

R022 M30B7
Processing of send error
(7) (10)

Processing of close

Description of I/O comment


No. I/O I/O comment No. I/O I/O comment
(1) R020 Message send start bit (6) M3080 Send error flag
(2) M3078 Open flag (7) R022 Error analysis bit
(3) M3088 Response flag of sending (8) M30B1 Send byte number error flag
(4) R024 Operation completion bit of (9) M30B2 Timeout error flag
transmission buffer
(5) R021 Normal/error judgement bit (10) M30B7 Communication error flag

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

5-53
Chapter 5 Communication function

5.3.5 Processing of message receive


It is explained about message receive processing in this clause. Message receiving is executed by user program.
Furthermore, it is necessary that corresponding connection is opened beforehand when you receive message.

(1) Processing outline

Start

Connection open process Connection close process


Open the corresponding Close the corresponding
connection connection

Does the receive notification bit N


set in “1” ?

Y
Analysis of an error factor

Does the receive error bit Y


set in “1” ?

Data stored in receive buffer area is copied or


moved to internal output area

“1” is set in the receive response bit of control


area 2.

Does the receive notification bit N


clear in “0” ?

Clear the receive response bit of control area 2


in “0”.

N Does message receive


processing end ?

Y Connection close process


Close the corresponding
connection

End

Figure 5.3.5.1 Flow chart of message receive processing

5-54
Chapter 5 Communication function

(2) Message receive procedure


Message receiving request processing is done by the handshake using control area and status area specified by the
transmission parameter.
The range of transmission parameter is from WR0300, the range of receive buffer is from WR2000, and it is explained
the example of receiving message on connection 1 with (a) - (d). Furthermore, this module shall be mounted in slot No. 1.
(a) Receive buffer composition
b15 b8 b7 b0
WR2000 Other station IP address H
LAN-ETH2 set them at the time of
+1 Other station IP address L
connection establishment.
+2 Other station logical port No.
+3 Receive byte number
+4 Data 0 Data 1
+5 Data 2 Data 3
+6 Data 4 Data 5 LAN-ETH2 set them at the time of
+7 Data 6 Data 7 normal completion of receiving.
When the number of receive byte is
an odd number, H00 is set to the
following 1 byte.

Data n-3 Data n-2


Data n-1 Data n

(b) Control area and status area


It is explained about the area and corresponding bit that must refer to/operate it at the time of the receive processing
request of the message.

Status area 1 (WR0307, read only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1 open completed.

Status area 3 (WR0309, read only)


(MSB) b15 b8 b7 b0 (LSB)

Connection 1receive exist Connection 1receive error

Connection 1 status area (WR030B, read only)


(MSB) b15 b8 b7 b2 b0 (LSB)

Receive buffer overflow


Communication error

Control area 2 (WR0306, write only)


(MSB) b15 b8 b7 b2 b0 (LSB)

Connection 1 response of
receiving

5-55
Chapter 5 Communication function

(c) Handshake procedure

Receive response
(WR306.b0) (4)

Open completed
(WR307.b8)
Receive notification (2)
(WR309.b8) (5)

Dta receive
(Internal process) (1)

Receive buffer operation


(User program) (3)

Receive error
(WR309.b0) (6)

No. Description
(1) When this module receives data, "1" is set in the reception notification flag.
(2) After the user program confirms the reception notification flag is set in "1", then that copies or moves
the data of receiving buffer to an internal output area.
(3) After it is confirmed that the receiving request bit is set in "1", this module takes the receive data and
sets "1" in the receive response notification flag.
(4) When it is confirmed that "1" was set in the reception response bit, this module clears the reception
notification flag in "0".
(5) Clear the receiving request bit in "0" by user program, after confirming the receiving response
notification flag was set in "1".
(6) This module sets error information on each connection in the status area and lights ERR LED, when
abnormality is detected at the time of receiving data. Afterwards, this module informs the user of the set
of "1" in the send error flag, and the occurrence of abnormality.
Because "1" is set in the reception notification flag on detecting error, please execute the operation of
(3) and (5) as well as normally processing.
Figure 5.3.5.2 Time chart and explanation

Note
Close the connection to clear the receiving error flag in "0", after the receiving error occurs. Open the connection
before receiving again.
Even if the receiving error flag is cleared in "0", ERR LED which lighted at the time of the receiving error is not
turned off. Please execute the sample program of "6.2 Error clear" to turn off ERR LED.

5-56
Chapter 5 Communication function

(d) Sample program


Sample program 5 Message receive process Slot No. 0 1 2 ∼ 8
LAN-ETH2
- - -
Mounted position

Processing of open

WM307 = WR0307 (0000n)


WM309 = WR0309 At every scanning unconditionally,
The content of status area 1 is saved in WM0307.
The content of status area 3 is saved in WM0309

R030 M3078 M3098 R030 = 0 (0000n+1)


R031 = 1 After it is confirmed that "1" was set in receiving
notification flag of connection 1 (M03089), receive
(1) (2) (3) buffer operation circuit (0000n+2) is active.

R031 M3090 MOV ( WR7000, WR2000, 255 ) (0000n+2)


MOV ( WR70FF, WR20FF, 255 )
After it is confirmed that receive error flag is “0”,
MOV ( WR71FE, WR21FE, 6 )
receive data is moved to WR7000 – wr7203.
(4) (5)

R031 WR0306 = WR0306 OR H0001 (0000n+3)


R031 = 0
After the catch of reception data is completed, "1" is
R032 = 1
set at receive response bit (WR0306, bit 0) of
(4) connection 1.

R032 M3098 WR0306 = WR0306 AND HFFFE (0000n+4)


R032 = 0
After it is confirmed that "0" was set in receiving
R033 = 1 notification flag of connection 1, and receive
(6) (3) response bit of connection 1 is cleared in “0”.

R033 M3090 R033 = 0 (0000n+5)


R034 = 1
Receive processing is completed.
(7) (5)

R033 M3090 R033 = 0 (0000n+6)


R035 = 1
When the receive error occurs, the
WM030B = WR030B
error details data is stored in WM030B.
(7) (5)

R035 M30B0
Processing of receive error
(8) (9)

R035 M30B7
Processing of receive error
(8) (10)

Processing of close

Description of I/O comment


NO. I/O I/O comment No. I/O I/O comment
(1) R030 Message receive bit (6) R032 Next circuit active bit
(2) M3078 Open flag (7) R033 Completion bit of receive processing
(3) M3098 Response flag of receiving (8) R035 Error processing active
(4) R031 Operation start bit of receive buffer (9) M30B0 Receive buffer overflow
(5) M3090 Receivie error flag (10) M30B7 Communication error flag

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

5-57
Chapter 5 Communication function

MEMO

5-58
Chapter 6 Other function

Chapter 6 Other function


6.1 Software reset
It is necessary to make the program which does handshake program shown in Figure 6.1.1 when this module is reset in
software. Please refer to paragraph 5.1.1 with the bit assign of the control register and the status register.

Use of software reset function

Y00S28 (1)

X00S08 (3) (4)

(2)
{ : Set by user ∆ : Set by LAN-ETH2

No. Explanation
(1) Please set "1" in software reset request bit (Y00S28) when the reset processing is necessary.
(2) When the software reset request bit is detected becoming "1", this module sets "1" in
software reset response flag (X00S08).
(3) In ladder program, the software reset request response flag is observed. Please clear the
software reset request bit in "0" when you detect the software reset response flag becoming
"1".
(4) This module clears the software reset response flag in "0", and begins the reset processing of
the LAN-ETH2 module, when the software reset request bit is detected becoming "0".
Figure 6.1.1 Reset sequense and its explanation

Reference
• The error display of CPU module might become "54" or "51" as well as time when the RESET switch was pushed.
• WDE LED never lights.

Note
•The software reset function usually becomes effective only at the operation mode. Please push the RESET switch
when you reset this module which is the operation excluding the operation mode usually.
•The ethernet communication port is intercepted immediately after the reset processing is begun when the software
reset processing is executed at the time of communicating in the ethernet communication port.

6-1
Chapter 6 Other function

Sample program 6 Software reset Slot No. 0 1 2 ∼ 8


LAN-ETH2
- - -
Mounted position

R100 DIF0 (00001) If "1" is set in R100,


Y128 = 1 circuit (00002) operation is active.
Software R001 = 1
reset start

R001 Y128 X108 DIF1 (00002) If software reset response flag (X108) is "0",
R001 = 0 circuit (00002) operation is inactive.
Software Software R002 = 1 circuit (00003) operation is active.
reset reset
request response
bit flag

R002 X108 DIF2 (00003) If software reset response flag (X108) becomes "1",
R002 = 0 circuit (00003) operation is inactive.
Software R003 = 1 circuit (00004) operation is active.
reset
response
flag

R003 Y128 X108 DIF3 (00004) If Y128 "=1" and X108 “=1" was detected,
Y128 = 0 the software reset request bit is clear "0".
Software Software R003 = 0 circuit (00004) operation is inactive.
reset reset R004 = 1
request response circuit (00005) operation is active.
bit flag R100 = 0

R004 Y128 X108 TD0 (00005)


0.01S 10 After 100ms, TD0 is turned on from the timing of the
Software Software software reset processing beginning.
reset reset
request response
bit flag

TD0 R004 R5
(00006)

R005

R005
R004 = 0 (00007)

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

6-2
Chapter 6 Other function

6.2 Error clear


It is necessary to make the program which does handshake program shown in Figure 6.2.1 when various errors of this
module are cleared. Please refer to paragraph 5.1.1 with the bit assign of the control register and the status register.

Use of error clear function


(1) (5) (7)
X00S09
(2)
Y00S29 (4) (6)

(3)
{ : Set by user ∆: Set by LAN-ETH2

No. Explanation
(1) It is shown that the module detected the error (ERR LED lighting).
(2) The waiting time of 500ms or more is secured until moving to the following processing after
the ERR LED lighting is detected. Meanwhile, please remove the error factor.
(3) After 500ms or more is waited after ERR LED lighting flag (X00S09) is set, the value of
Y00S29 is read.
(4) The user sets "1" in the error clear bit.
(5) This module clears the ERR LED lighting flag (ERR LED turning off).
(6) The user must clear the error clear bit in "0" after confirming ERR LED lighting flag
(X00S09) was cleared.
(7) After setting "1" in the ERR LED lighting flag, this module clears "0" at once when this
module detects the error with "1" set in the error clearness bit. ERR LED lights and
immediately turns off.
Figure 6.2.1 Time chart and its explanation

Note
•The error clear function usually becomes effective only at the operation mode. Please push the E.CLR switch when
you clear the error of this module which is the operation excluding the operation mode usually.
•The error occurs again even if a clear error is executed when the error factor remains.

6-3
Chapter 6 Other function

Sample program 7 Error clear Slot No. 0 1 2 ∼ 8


LAN-ETH2
- - -
Mounted position

R100 X109 DIF0 (00001) If "1" is set in ERR LED(X109),


R001 = 1 circuit (00002) operation is active.
Error
clear start

R001 TD0 (00002)


0.01S 50 After 500ms, TD0 is turned on from the timing of the
turning on detection of ERR LED.

R001 X109 TD0 DIF1 (00003) Error clear request bit (Y129) is set in "ON",
Y129 = 1 circuit (00003) operation is inactive.
ERR LED R001 = 0 circuit (00004) operation is active.
flag R002 = 1

R002 Y129 DIF2 (00004) If error clear request bit (Y129) becomes “1”,
R002 = 0 circuit (00004) operation is inactive.
Error R003 = 1 circuit (00005) operation is active.
clear
request
bit

R003 Y129 X109 DIF3 (00005) If Y129 "=1" and X109 "=1" was detected, the error clear
Y129 = 0 request bit (Y129) is clear "0".
Error ERR LED R003 = 0 circuit (00005) operation is inactive.
clear flag
R004 = 1 circuit (00006) operation is active.
request
bit R100 = 0

R004 Y129 X109 TD1 (00006)


0.01S 10 After 100ms, TD1 is turned on from the timing of the
Error ERR LED error clear processing end.
clear flag
request
bit

TD1 R004 R5
(00007)

R005

R005
R004 = 0 (00008)

Note
This program is a sample for operation and can not be necessarily used in the environment of all customers.
If you apply this program to your system, please check safety of whole system etc. carefully.

6-4
Chapter 6 Other function

6.3 Test function


The test to check hardware including the transmitting and receiving circuit of this module is explained. A set change of
the MODE switch is necessary to use each test function. After the MODE switch setting is changed, set the MODE switch
content is read to this module by after the power supply is turned on or depressing the RESET switch.

Note
The operation mode does not change only by changing the state of ON/OFF of the MODE switch.

6.3.1 Internal loop back test


The loop back is tested in Ethernet communication IC of this module. When the RESET switch is pushed after "Internal
loop back test" is selected with the MODE switch, the test is begun. POW LED blinks while testing.
This module is out of order at a high probability, when this test terminates abnormally. Please contact our service agency
or a relative manufacture promptly.

[Examination content] The loop back is tested in an internal circuit of this module.
[Dip switch setting]
Operation mode MODE1 switch

8
7
6
5

Internal loop
4
3

back test
1 2
ON

Only Bit8 is turned on.


[Examination procedure]
(a) The MODE1 dip switch of the tested LAN-ETH2 is set in the internal loop back test mode.
Please connect neither TP cable nor the loop back connector with Ethernet port (10BT).
(b) When the power supply of PLC where the tested LAN-ETH2 is mounted is turned on, the examination is begun.
(c) When the dip switch setting is changed with the power supply of PLC where the tested LAN-ETH2 is mounted
turned on, the internal loop back test is begun by depressing the RESET button of the machine which is
examined.
(d) The examination is repeated until the power supply is turned off.

[The examination time required] About 30 seconds


[LED display and method of judging diagnosis result] Show in table 6.3.1.1
Table 6.3.1.1 LED display and diagnosis result judgment when internal loop back test is executed.

POW STAS ERR State or diagnosis result


Green, Lighting Turning off Normal end of examination
Blinking
Turning off Lighting Abormal end of examination

6-5
Chapter 6 Other function

6.3.2 External loop back test


[Examination content] The test to turn the test signal with HUB is done.
[Dip switch setting]
Operation mode MODE1 switch

8
7
6
5
External loop

4
3
back test

1 2
ON
Only Bit7 is turned on.
[Examination procedure]
(a) Please prepare HUB.
(b) The MODE1 dip switch of the tested LAN-ETH2 is set in the external loop back test mode.
Please connect Ethernet port (10BT) and HUB.
(c) When the power supply of PLC where the tested LAN-ETH2 is mounted is turned on, the examination is begun.
(d) When the dip switch setting is changed with the power supply of PLC where the machine which is examined is
mounted turned on, the external loop back test is begun by depressing the RESET button of the tested LAN-
ETH2.
(d) The examination is repeated until the power supply is turned off.

[The examination time required] About 30 seconds


HUB

Transmit to own station

Machine to be tested

Figure 6.3.2.1 External loop back test composition

[LED display and method of judging diagnosis result] Show in table 6.3.2.1
Table 6.3.2.1 LED display and diagnosis result judgment when external loop back test is executed.

POW STAS ERR State or diagnosis result


Green, Lighting Turning off Normal end of examination
Blinking Turning off Lighting Abormal end of examination
(*) Tx/Rx LED lights during executing the test. That is because this module transmits and receives the diagnosis packet.

Note
Please do not connect equipments other than the test module with HUB when you execute the external loop back test.
It might become an error when connecting.

6-6
Chapter 6 Other function

6.3.3 Send/receive test


It is necessary to select either from among two kinds of equipment compositions to execute the send/receive test.
Equipment composition 1 : PLC which mounts LAN-ETH2 is used by two sets.
Equipment composition 2 : PLC which mounts LAN-ETH2 and telecommunications equipment in accordance with
send/receive test specification (*1) are used.

The following items become common specifications which do not affect the equipment composition.
• Dip switch setting of machine to be examined
• UDP message format
• LED display and method of judging diagnosis result
• The examination time required

[Dip switch setting]


Operation mode MODE1 switch

8
7
6
5
4
Send/receive test

3
1 2
ON
Bit7 and bit8 are turned on.

[UDP message format]


The UDP message which the machine which is examined sends on the line is shown below.
0 1 2 3 4 5 …….. 1023 Byte

Command Data byte number Message


H01 H03FD H00 H01 H02 …….. HFC

[LED display and method of judging diagnosis result] Show in table 6.3.3.1
Table 6.3.3.1 LED display and diagnosis result judgment when send/receive test is executed.

POW STAS ERR State or diagnosis result


Green, Lighting Turning off Normal end of examination
Blinking Turning off Lighting Abormal end of examination
(*) Tx/Rx LED lights during executing the test. That is because this module transmits and receives the diagnosis packet.

[The examination time required] About 30 seconds

(*1) The send/receive test specification is the following.


• UDP/IP should be able to be used as a communication protocol.
• The message data which the tested LAN-ETH2 transmits should be able to be sent back to that as it is.

6-7
Chapter 6 Other function

(1) PLC which mounts LAN-ETH2 is used by two sets


[Examination content]
It is tested to turn the UDP message between the tested LAN-ETH2 and LAN-ETH2 of the normal operation mode
(other station for the examination).
[Examination procedure]
(a) Please set setting information with the I/O assign of LAN-ETH2, setting the equipment, and parameter in
communication tools referring to the examination composition of Figure 6.3.3.1.
(b) LAN-ETH2 of the other station for the examination is started in the normal operation mode.
(c) When the power supply of PLC where the tested LAN-ETH2 is mounted is turned on, the examination is begun.
(d) When the dip switch setting is changed with the power supply of PLC where the tested LAN-ETH2 is mounted
turned on, the external loop back test is begun by depressing the RESET button of the tested LAN-ETH2.
(d) The examination is repeated until the power supply is turned off.
[Examination composition] Show in figure 6.3.3.1
HUB

Transmit data

Receive data

IP address IP address
Own station Other station
192.168.0.3 192.168.0.5
(Machine to be tested) Logical port number Logical port number
4000 4000

Fogure 6.3.3.1 Sned/receive test composition (1)


(2) PLC which mounts LAN-ETH2 and telecommunications equipment in accordance with send/receive test
specification (the following communication specification) are used.
[Examination content]
It is tested to turn the UDP message between LAN-ETH2 and the personal computer.
[Communication specification]
UDP/IP should be able to be used as a communication protocol.
The message data which the tested LAN-ETH2 transmits should be able to be sent back to that as it is.
[Examination procedure]
(a) Please set setting information with the I/O assign of LAN-ETH2, setting the equipment, and parameter in
communication tools referring to the examination composition of Figure 6.3.3.1.
(b) Please start the application which meets the communication specification.
(c) When LAN-ETH2 is reset, the send/receive test is begun.
[Examination composition] Show in figure 6.3.3.2
HUB

Transmit data

Receive data

Other station

Own station IP address IP address


192.168.0.3 192.168.0.5
(Machine to be tested) Logical port number Logical port number
4000 4000

Figure 6.3.3.2 Sned/receive test composition (2)


6-8
Chapter 7 Maintenance, Check, Troubleshooting

Chapter 7 Maintenance,Check,Troubleshooting
Check the module daily or regularly in order to use LAN-ETH2 in best condition and keep the system run
normally.

7.1 Daily check


Check the following item (Table 7.1.1) on running condition.
As to H series PLC, see the application manual (Hardware edition) or the instruction manual.
Table 7.1.1 Daily check item

Check item Check LED Normal Error Cause


Power status POW LED ON OFF •Defectiveness of connection between module and base
connector.
•Electric power capacity shortage of power supply module.
•Breakdown of power supply module.
Hardware WDE LED OFF ON •Fatal breakdown of hardware
System software WDE LED OFF ON •Malfunction of system software by excessive noise, etc.
Communication ERR LED OFF ON •Setting of inappropriate parameter.
parameter*1 STAS LED OFF Blinking *2 Please refer to “Status area in each connection (Page 5-
27)” for details.
Error of ERR LED OFF ON •Communication error happened.
application*1 STAS LED OFF Blinking *2 Please refer to “Status area 1-4, status area in each
connection (Page 5-25 ~ 5-27)” for details.
Hardware of PLC ERR LED OFF Blinking •Breakdown of CPU module or base.
system •Malfunction of hardware according to excessive noise, etc.
*1 : A peripheral equipment such as LADDER Editor for Windows® is necessary to investigate details of an abnormal cause.
*2 : The outline of the error can be distinguished according to the blinking times of STAS LED.
Please refer to “4.3 Status LED” for details.

7.2 Regular check


Execute the following checks (Table 7.2.1) once half of a year. But check these items more frequently according to your
using condition.
Table 7.2.1 Regular check item

Check item Check target Contents


Mounting of Module mounting screws •Are the module mounting screw tightened ?
module Base connector •Is not the connector pin curved ?
Condition of UTP or STP cable •Is the cable applied irregular weight ?
transmission cable •Are neither the power cable nor the I/O cable stored in the same
duct ?
Appearance of This module •Do not fine partiles of metal, etc. adhere to the main body case?
module •Is not the ventilation hole of top and bottom of main body case
blocked?
•Is not the main body case corroded, and remarkably
transformed?
Using condition Temparature, humidity, the Is the module used in normal condition (temparature, humidity)?
others Is the vibration kept in acceptable range ?

Danger
• Please work with the power supply of PLC system turned off, whenever a regular check is executed.
Otherwise, it causes the dread of the electric shock and the breakdown of the PLC equipment.

7-1
Chapter 7 Maintenance, Check, Troubleshooting

7.3 Error LED and measure


Following table shows the indication and the measure in case an error occurs in communication between LAN-ETH2
and other station.
(1) Status LED
If an error occurs while LAN-ETH2 is operating, WDE LED or ERR LED of status LED lights and STAS LED
blinks. Following tables shows error contents and measures.

Table 7.3.1 Error contents and measures


No. Lighting Error contents When errors are Measure
LED detected, LAN-
ETH2 :
1 WDE There is a fault of can not operation. •Apply power or reset with RESET switch or
hardware in LAN-EHT2. reset with software reset.
•Malfunction of hardware, if it doesn’t recover.
2 WDE, Sum error of IP address •Set IP address once again after applying power
OPN2 supply with E.CLR switch on. (*3)
•Malfunction of hardware, if it doesn’t recover.
3 ERR LED An error occurs at the can not •Correct the setting according to the contents of
(*1) time of configuration IP communication with status register or status register every
address and transmission other station. connection and set again.
parameter. •Clear the error with E.CLR switch.
4 An error occurs at the stop to •Correct the error according to status area in
time connection opens. communication. each connection.
5 An error occurs at the •Close connection.
time of sending. •Clear the error with E.CLR switch.
6 An error occurs at the If these errors frequently occur, remove
time of receiving data. causes of the errors by loop back test, etc.
7 An error occurs during a - •Check network, other equipments and LAN-
test. ETH2. And take a necessary measure.
•Clear the error with E.CLR switch.
8 ERR LED Timeout error of system can not operation. •Apply power or reset with RESET switch or
blinking bus reset with software reset.
•Malfunction of LAN-ETH2 module, CPU
module or base, if it does not recover.

(*1) An error may occur when line is busy, send/receive and open/close are executed simultaneously.
Seeing consideration for making program, make program which has retry function.
(*2) Please refer to "4.3 Status LED” about the error display by the blinking number of STAS LED.
(*3) Please set IP address once again, because the module becomes condition active possibility, after the power supply
is input while set up MODE1 switch to IP address setting mode and pushing the E. CLR switch.

(2) Status area


The bit, corresponding to connection, in status area 1,2,3 (WR**07 ~ 09) is ON, when ERR LED of status LED
lights. (** are two figures from the left end of WR I/O No. specified in control register.)
Table 7.3.2 Status area (ERR LED lighting)
Status area Error contents Cause of error Measure
1 Open error •An error occurs at the time of •Correct the setting according to
connection open. status area every connection.
2 Message send error •An error occurs at the time of After close the connection once,
sending a message. open the connection again and
3 Message receive error •An error occurs at the time of start communication.
receiving a message.

7-2
Chapter 7 Maintenance, Check, Troubleshooting

(3) Status area in each connection


cIn case an error occurs in status area 1,2,3 :
The bit, corresponding to the error, in status area (WR**0B ∼ 10) in each connection ONs in order to give
information of the error content. (See the items “5.3.1 Transmission parameter”. ** are two figures from the left end of
WR I/O No. specified in control register.)

Table 7.3.3 Status area in each connection (ERR LED lights)


Bit Error contents Cause of error Measure
position
0 Receive buffer •The received data is larger than receive buffer •Confirm transmission
overflow capacity. parameter, check
1 Send byte number •Send byte number is 0. network line, and take to
error •Send byte number is larger than receive buffer necessary measure.
capacity. •Check your program.
•Send byte number is over maximum send byte
number.
2 Timeout •Processing wasn’t completed within the specified
time.
7 Communication error •An error occurs during communication processing.

Receive buffer overflow occurs in case receive is not executed in spite of normal communication. At the time of
receive, execute receive handshake processing immediately and make user program to read receive data.
ERR LED lights in case a communication error occurs in communication with task code, but you need to be
careful because the bit of each error doesn’t show “1”.

dIn case an error occurs at the time of configuration of transmission parameter :


The bit, corresponding to the error, in status area (WR**0B ∼ 10) in each connection ONs in order to give
information of the error content. (See the items “5.3.1 Transmission parameter”. ** are two figures from the left end of
WR I/O No. specified in control register.)

Table 7.3.4 Status area in each connection (Transmission parameter sets)


Bit Error content Cause of error Measure
position
0 I/O type error •A bit except H0A to H0C is specified. Correct the parameter
1 I/O No. error •No. beyond the limit in each I/O kind is specified. and set transmission
2 Buffer length error •The size of send/receive buffer excepting for H4 to parameter again.
H204 word is set.
3 Area error •IP address setting area, configuration of transmission
parameter area, and send/receive buffer is over the
limit of memory.
•Transmission parameter and send/receive buffer are
duplicated each other.
4 IP address error •IP address excepting for H00000001 to HFFFFFFFE is
specified.
•Other IP address is the same as own IP address.
5 Port NO. error •Logical port number excepting for H0001 to HFFFF is
specified.
•Task code service is the same as logical port No. of
message communication.
6 Service type error •The service type is incorrect.

7-3
Chapter 7 Maintenance, Check, Troubleshooting

(4) Status register (WX00S0)


The bit, corresponding to an error content, in status register ONs in case an error occurs in parameter at the time of
IP address setting and/or configuration of transmission parameter. (See the items of “5.1.1 Control register and status
register”.)

c At the time of IP address setting


Table 7.3.5 Status register (IP address set)
Bit Error content Cause of error Measure
position
0 Top word number error •The value of WR**00 specified in control register is Correct the parameter
over the range. and set it again.
2 IP address error •IP address excepting for H00000001 to HFFFFFFFE
is specified.
•Other station IP address is set to the same as own
station IP address.
3 Port number error •Logical port No. excepting for H0001 to HFFFF is
specified.
•Task code port 1, 2 and send/receive test port are
duplicated.
4 FLASH sum error •At the time reading IP address information, the Apply the power again
content is sum error. or press down
RESET switch.
Or, Set IP address
information again
after applying the
power supply on
pushing E.CLR
switch.
If an error occurs in
spite of restarting the
module, the hardware is
broken.
5 Prohibition to write to •DIP switch is set to prohibit to write when you write Position the switch to
FLASH default value and user setting value. permit to write and set
the value again.

d At the time of configuration of transmission parameter


Table 7.3.6 Status register (Configuration of transmission parameter)
Bit Error content Cause of error Measure
position
0 Top word number error •The value of WR**00 specified in control register is Correct the parameter
over the range. and set it again.
1 Error in connection •Request of setting ONs when one of connection 1 to Close connection and
opening 6 opens. set the parameter again.

7-4
Chapter 7 Maintenance, Check, Troubleshooting

7.4 Troubleshooting
Following table shows troubleshooting in case a system using LAN-ETH2 dose not run normally.

7.4.1 Cause of error and analyzing method

Table7.4.1 Cause of error and analyzing method


Cause Trouble contents Analyzing method
Trouble of LAN-ETH2 Defective components Make the module self-diagnose at the time of loop back
Defective manufacturing test and send/receive test, applying the power.
I/O assignment Confirm assignment of “COMM” from peripheral
equipment.
Mounting position Mount LAN-ETH2 to basic base excepting for 0 slot.
Mistake in setting of Mode setting switch Confirm the switch is set for normal operation.
LAN-ETH2 Module configuration post Confirm the module is set right.
Configuration of IP address
Bad connection of cable Check your own eyes or execute external loop test.
Fault related to transmission Disconnection of cable
cable Transmission distance is over 100m of within between module and HUB
the limit
Cable out of the standard Check a form and a character of the cable.
CPU module
Trouble in PLC Memory cassette Execute trouble shooting for each module.
Base, power
Trouble of connection Fault in hardware
equipments Error in software Execute trouble shooting for each equipment.
Other
Trouble of application Mistake in system specification Check the specification.
program Error in software Check user application program.
Trouble of in using Temperature of using Measure and arrange the using condition.
surrounding, humidity, noise
condition Vibration, other bad
environment

7-5
Chapter 7 Maintenance, Check, Troubleshooting

7.4.2 Troubleshooting flow chart


The following flow charts show the troubleshooting when errors occur.

(1) WDE LED ligthing

WDE LED lights

Was suddenly WDE LED lighted Y


during a normal operation?

Restart the whole PLC system including


N
this module

It may be a momentary error of system


software.
Y Was WDE LED lighted once again ? N If the module runs normally when you apply the
power again, wait for minutes.
In case an error occurs, contact our service
agency or a relative manufacture.

Physical damage was given to this module


Did you do the construction Y during the construction work, and this module
work near the control disk this module might have broken down.
was mounted ?
Please replace to the preliminary module.
N

Is there the equipment that


produces excessive noise near the Y
control disk this module was
mounted ? Please restart the whole PLC system including
this module in, the condition where suspended
the equipment that is thought as a noise
N
occurrence resource.

It may be a momentary error of system


software because of noise or the like.
Y Was WDE LED lighted once again ? N If the module runs normally when you apply the
power again, wait for minutes.
In case an error occurs, contact our service
agency or a relative manufacture.

Did the natural disaster of the falling of


a thunderbolt etc. occur in Y
neighborhood before this
phenomenon occurs?
Restart the whole PLC system including
this module
N

It may be a momentary error of system


software because of noise or the like.
Y Was WDE LED lighted once again ? N If the module runs normally when you apply the
power again, wait for minutes.
In case an error occurs, contact our service
agency or a relative manufacture.

There is the fear that this module is


malfunctioning.
Please contact our service agency.

7-6
Chapter 7 Maintenance, Check, Troubleshooting

(2) ERR LED lighting

ERR LED lights

During a test ? N

Y Please correct the user program


Are IP address or communication Y accoreding to the status register
parameter set up now ? and the status register in each
connection.
N

See status area 1, 2, 3

Please remove the error factor


Is "1" set in the open error flag ? Y based on the value of the status
area in each connection.

Please remove the error factor


Is "1" set in the transmit error Y based on the value of the status
flag ? area in each connection.

Please remove the error factor


Is "1" set in the receive error Y based on the value of the status
flag ? area in each connection.

N
Error in LAN-ETH2, network
trouble or fault of other station
Is the task code communication Y may occur. Check a network and
function used ? other station.
If nothing is wrong with them,
N contact our service agency.

There is the fear that this module


is malfunctioning. Please contact
our service agency.

During a test of send/receive ? N

Y
During the external loop N
test ?

Does ERR LED light in the external Y Y


loop back test ?

N Y
Does ERR LED light in the internal
loop back test ?

It is though that there is network It is thought that something wrong is found There is the fear that this module
connection defect or something in HUB with which the cable connected is malfunctioning. Please contact
wrong is found in other station. with this module or the cable is previously our service agency.
Please consult the network connected.
management person and solve Please consult the network management
the problem. person and solve the problem.

7-7
Chapter 7 Maintenance, Check, Troubleshooting

(3) Open error (Only active side)

Open error

Check connection number where an error


occurred on status area 1. See error
Dose ERR LED lights ? Y
contents on status area in each connection,
and correct the user program according to
the err display.
N

It is necessary to set IP address information


Is IP address setting N
of own station. Moreover, confirm again that
completed ? is not a set value wrong (Refer to paragraph
5.1.2).
Y

It is necessary to set communication


Is configuration of transmission N
parameter completed ? parameter. Moreover, confirm again that is
not a set value wrong (Refer to paragraph
5.3.1).
Y

Correct your program to the user program


Is open procedure right ? N based on the handshaking procedure
referring to paragraph 5.3.3.

Does CPU module run N Remove an errorl factor of CPU module.


normally ?

Is "1" set in the open completion N


flag?

Y
N Apply the power to other station.
Is the other station power supply
ON ?
Y
Close connection once and
perform open processing again.
If the other station is not an
Is the other station an opening N opening waiting state, the
waiting state ? connection cannot be opened.

Do network equipments run N Remove the error factor such as


normally ? the network equipments

It may be a momentary error because of noise


or the like. If the module runs normally when
you apply the power again, wait for minutes.
In case an error occurs in spite of restarting
the module, there is an error in LAN-ETH2 or
network equipments. Contact our service
agency or a relative manufacturer.

Refernce
It seems that the debugging efficiency of the communication procedure improves rapidly when there is a tool that can
observe the status of the open/close processing and of the communication data.

7-8
Chapter 7 Maintenance, Check, Troubleshooting

(4) Send error

Send error

It is necessary to establish the


Does OPN LED of a pertinent N corresponding connection before the
connection light ? message is transmitted. Correct the user
program referring to the sample program.
Y

Please investigate the value of the status


Does ERR LED lights ? Y
area 2 and of the status area in each
connection, and investigate the cause of
error.
N

Correct your program to the user program


Is send procedure rigth ? N
based on the handshaking procedure
referring to paragraph 5.3.4.

Does CPU module run N Remove an error factor of CPU module.


normally ?

When the mistake is found in setting the


Is your setting of service type N service type, the message transmission
right ? processing is not normally processed.
Correct the service type.
Y

Is not error found in the network N Review the kind of the cable and the
equipments other than this module? connection etc. of the cable and HUB.

Y
Confirm whether the transmission data is
sent on the line by using the Ethernet
Is there problem in the setting and the N analyzer tool etc. The problem of cannot
receiving part on the other station ? the reception on the other station side etc.
might occur though the transmission data is
Y sent on the line.

When the service type is specified only for


Is "1" set in the transmission N the reception, the transmission processing
response flag ? is not processed. Moreover, the
transmission response is not obtained.
Y Correct the service type.

Close the connection once.


Please reconnect the connection after
securing a suitable interval of time, and do
the transmission processing.

It may be a momentary error because of noise


or the like. If the module runs normally when
you apply the power again, wait for minutes.
Was an error transmission N
In case an error occurs in spite of restarting
generated again?
the module, there is an error in LAN-ETH2 or
network equipments. Contact our service
Y agency or a relative manufacturer.

Confirm whether the transmission data is sent on


the line by using the Ethernet analyzer tool etc.
There is a possibility that abnormality is found in this
module or the network equipment when the
transmission data is not confirmed on the line
though the transmission processing is requested.
Contact our service agency or relative
manufacturer.

7-9
Chapter 7 Maintenance, Check, Troubleshooting

Send error (In case of ERR LED lighting)

Send error

Is "1" set in the communication Y


error flag ?

N
Is the other station set up ? N Please transmit the data again after setting up
the other station.

Is not the network Y


Repair network.
disconnected?

Is it a error except a
Y
communication error ?

Y
N Send byte number error ? Check the communication software.

Y
Time out error ? Check the time out value.

Close the connection once.


Please reconnect the connection after securing
a suitable interval of time, and do the
transmission processing.

Confirm whether the transmission data is sent on


the line by using the Ethernet analyzer tool etc.
There is a possibility that abnormality is found in
this module or the network equipment when the
transmission data is not confirmed on the line
though the transmission processing is requested.
Contact our service agency or relative
manufacturer.

7-10
Chapter 7 Maintenance, Check, Troubleshooting

(5) Receive error

Receive error

N You need to open connection.


Does OPN LED lights ?
Perform open processing.

Check connection number where an error


Y occurred on status area 3.
Does ERR LED lights ?
See the error on status area iin each
connection, correct them.

Is receive procedure right ? N Receive in right procedure.

Does CPU module run N Set CPU run normally.


normally ?

Y Close own station. If you need, perform


Is the close request ON ?
open processing again.

Y Check service type setting.


Is time out detected Is service type setting right ? N
(You can’t receive them only send
in user program ? is set.)

Y
N

Is the other station set up ? N Set up other station.

Own station Other station


Connect Is not the network Repair network.
N
disconnected?
Connection O.K.

Timer Send data Y


observation
of reaction for Set time out vaule depending on
send data Receive data Y your system. After close once,
Error in reaction
open again. Re-execute from
for send ? transmission processing.

Error of waiting Y Set time out vaule depending on


your system. After close once,
for receive ?
open again. Re-execute from
processing.of wating for receive.
N

Close the connection once. Own station Other station


Please reconnect the connection after securing Connect
a suitable interval of time, and do the
transmission processing.
Connection O.K.

Receive
Confirm whether the transmission data is sent on the line by using
the Ethernet analyzer tool etc. Timer Send data
There is a possibility that abnormality is found in this module or the observation of
network equipment when the transmission data is not confirmed on arriving time Receive
of receive
the line though the transmission processing is requested. Contact
our service agency or relative manufacturer.

7-11
Chapter 7 Maintenance, Check, Troubleshooting

Receive error (In case of ERR LED lighting)

Receive error

Is “1” set in the communication Y


error flag ?

N Please transmit the data again after setting up


Is the other station set up ? N
the other station.

Is not the network Y Repair network.


disconnected ?

Is it error except a
Y
communication error ?

Y Check communication software again.


N Receive buffer over flow ? Communicate between sender and receiver
with good balance of same stage.

Close the connection once.


Please reconnect the connection after securing
a suitable interval of time, and do the
transmission processing.

Confirm whether the transmission data is sent on


the line by using the Ethernet analyzer tool etc.
There is a possibility that abnormality is found in
this module or the network equipment when the
transmission data is not confirmed on the line
though the transmission processing is requested.
Contact our service agency or relative
manufacturer.

7-12
Chapter 8 Sample program

Chapter 8 Sample program


8.1 Consideration for programming
When you make a program that is communicated with LAN-ETH2, the error may occur and the corresponding method
must be considered. They are shown in the following figure.

Passive station Active station

Power ON Power ON
RES SW ON RES SW ON

Configuration of Configuration of
transmission parameter transmission parameter

Following 2 cases are detected.


Passive station does not set up.
Connection can not be open even
Passive open if passive station sets up.
It closes once, and it opens again.
Active open

If a passive station is not be


Open completion prepared, many times close and
open enlarge the load of a circuit.
Keep the retry numbers several
Error
Timeout check

times.

Send
There is a case that even if active
open succeeds but error occurs
when actually send start. In this
Error

Timeout check

case, close once, and open again..


If there is no receive in the
constant time after connection
establishment, it closes. Receive It is possible to detect that the
other station is downed or the
Make the program to response for communication is not smooth.
Error

connection open request from


other station when active station is
down while a connection is
opened. If the other station can not answer
send data, it is considered as
If a receive error happens, it Send station error and connection is
closes. closed.
Error
Error

You can be told indirectly it could Make the program to open


not receive the data from an other Receive connection again, in case of
station to other station. passive station is down after
Error

connection open.

When receiving error occurs,it


Error

closes.
It closes and opens again. Close Close
You can be told indirectly that the
Make the program to take a proper data from other station was not
received correctly to the other
measure when other station is not
station.
condition to receive.

•If it opens again after closing connection once, please take more than 500ms for waiting time.
•The connection that received a requirement for close, must close own connection and open it again.

8-1
Chapter 8 Sample program

8.2 Message communication


This sample program describes the example of message communication using 2 set of the H series PLC.

(a) System configuration

Transceiver Transceiver

HUB HUB
PLC1 PLC2

LAN-ETH2 Node-A (Active open) LAN-ETH2 Node-B (Passive open)

(b) Configuration of H series equipment (PLC1 and PLC2 common)

Equipment Type
Power module AVRC-08H
CPU module CPU2-20H
Module LAN-ETH2
Memory cassete RAM2-48H
Basic base BSU-05H

(c) Setting of LAN-ETH2

Item LAN-ETH2 Node-A LAN-ETH2 Node-B


1 IP address of own station 158.213.81.213 158.213.81.216
2 Logical port number 3000 3000
3 MODE1 switch All OFF All OFF
4 MODE2 switch All OFF All OFF
5 Ladder program name TEST T TEST R

(d) I/O Assignment (PLC1 and PLC2 common)

0 1 2 3 4
RAM2-48H
CPU2-20H

COMM

8-2
Chapter 8 Sample program

(e) Explanation for operation

When CPU module does RUN, port 1 of Node-B (passive side) waits for an opening of connection.
After M0 (communication beginning/stop switch) becomes "1", Node-A opens connection 1 and demands the connection
establishment of connection 1 of Node-B. When the connection between Node-A and Node-B is established, Node-A
transmits the message.
Node-B stores the receiving message to the receiving table, if the receiving message is normal. The receiving area is a ring
buffer. That is, when the message is received on the state of no empty area for receiving data, the receiving message is
overwritten in the first part in the receiving area.
After Node-B stored the data on receiving table, Node-B sends a normal answer to Node-A.
If receiving data is error, Node-B sends an error answer to Node-A. At this time, the data of the receiving table is not updated.
If an answer is normal, Node-A sends the next data to Node-B. If an answer is error, Node-A sends the last data again to
Node-B.
This sample program repeats the above procedure.

When M0 of Node-A becomes "0", the connection cutting processing is started after the communication is completed.
Please set "1" in M0 if you want to restart the communication processing.
When various errors occur in communication processing, the error factor is stored in status work area (WM30-WM34).
Moreover, the communication is repeated according to the error factor.

Node-A Node-B

Communication
start/stop LAN-ETH2 Node-A LAN-ETH2 Node-B CPU module
M0 = 1 Open

Data
Data
Answer
Data
Data
:
: :
Answer :
Data
Data
M0 = 0 Answer
Close

8-3
Chapter 8 Sample program

(f) Data format

The data length which contains the end code becomes an even number byte.

data CR LF

CR LF (H0D0A) ••••••• End cord

(g) Answer format

ACK NUL (H0600) ••••••• Data format is normal

NAK NUL (H1500) ••••••• Data format is error

(h) Receiving table

WR0300 Data1
CR LF Data2

CR LF Data 3

CR LF NUL NUL

WR03FF End of a data group

8-4
Chapter 8 Sample program

(e) Internal output area


(e-1) Node-A (The active side)

WR0000 ∼ 00D4 Configuration area of transmission [Details of WM032]


parameter
WR00E0 Communication counter M0321 Error of the number of send byte
WR00E1 Send data number M0322 Timeout
WR0100 ∼ 1FF Send buffer M0327 Communication error
WR0200 ∼ 2FF Receive buffer M032F Send error representative flag
WM007 ∼ 00B Work area
WM020 ∼ 024 Work area [Details ofWM033]
M0330 Receive bufer overflow
[Error status area] M0337 Communication error
WM030 Configuration error status of transmission M033F Receive error representative flag
parameter
WM031 Open error status
WM032 Send error status [Details of WM034]
WM033 Receive error status M0340 Error of the number of receiving byte
WM034 Ladder detection error status M0341 Receiving of NAK
M0000 Communication start/stop switches (manual) M0342 Receiving of error answer cord
M0344 Answer timeout
[Details of WM030] M034F Ladder detection error representative
flag
M0300 Top word number error
M0301 Error in connection opening [Status flag]
M0308 I/O type error R000 Configuration of transmission parameter
has requested
M0309 I/O number error R001 Send/receive processing
M030A Buffer length error R002 Send processing
M030B Area error R003 distinguishing send result
M030C IP address error R004 Receive processing
M030D Port number error R005 Fatal error occurs
M030E Service type error R006 Close condition is completed
M030F Configuration error representative flag of R007 Close requesting
transmission parameter
R008 Reset processing
[Details of WM031]
M312 Timeout TD000 Server requirement waiting timer
M317 Communication error TD001 Answer monitor timer
M31F Open error representative flag CU002 Response timeout counter

8-5
Chapter 8 Sample program

(e-2) Node-B (The passive side)

WR0000 ∼ 00D4 Configuration area of transmission [Details of WM032]


parameter
WR00E0 Communication counter M0321 Error of the number of send byte
WR00E1 Data words number in the receiving table M0322 Timeout
WR00E2 ∼ 00E4 Work area M0327 Communication error
WR0100 ∼ 1FF Send buffer M032F Send error representative flag
WR0200 ∼ 2FF Receive buffer
WR0300 ∼ 03FF receive table [Details of WM033]
WM007 ∼ 00B Work area M0330 Receive bufer overflow
WM020 ∼ 024 Work area M0337 Communication error
M033F Receive error representative flag
[Error status area]
WM030 Configuration error status of transmission [Details of WM034]
parameter
WM031 Open error status M0340 Error of the number of receiving byte
WM032 Send error status M0343 Termination code error
WM033 Receiving error status M0345 Active side operation monitor timer
timeout
WM034 Ladder detection error status M034F Ladder detection error representative
flag

[Details of WM030] [Status flag]


M0300 Top word number error R000 Configuration of transmission parameter
has requested
M0301 Error in connection opening R001 Send/receive processing
M0308 I/O tyoe error R002 Complete of receiving process
M0309 I/O number error R003 Send processing
M030A Buffer length error R004 Distinguishing send processing result
M030B Area error R005 Fatal error occurs
M030C IP address error R006 Close requesting
M030D Port number error R007 Reset processing
M030E Service type error
M030F Configuration error representative flag of
transmission parameter
SS000 WAIT timer for retry
[Details of WM031] TD001 Active side operation monitor timer
M312 Timeout
M317 Communication error
M31F Open error representative flag

8-6
Chapter 8 Sample program

(Active side) TEST T

R7E3 (00001)
WY0011 = H0 Control register
1 scan ONs after WR0011 = 10 Timeout monitor timer value
running WR0013 = HBB8 Connection 1 own station logical port number
WR0014 = H9ED5 Connection 1 other station IP address Transmission
WR0015 = H51D8 Connection 1 other station IP address parameter set
WR0016 = HBB8 Connection 1 other station logical number
WR0017 = HA Connection 1 send buffer I/O type
WR0018 = H100 Connection 1 send buffer head number
WR0019 = H100 Connection 1 send buffer area length
WR001A = HA Connection 1 receive buffer I/O type
WR001B = H200 Connection 1 receive buffer head number
WR001C = H100 Connection 1 receive buffer area length
WR001D = H8007 Connection 1 service type

X115 R000 Configuration of parameter has requested Y131


WR0007 Status area 1 (00002)
== S
H0
Response of Request of configuration of transmission parameter
configuration of
transmission R7E4 R000
parameter S
Always ON
Configuration of parameter has requested

Y131
Y131 X115 Response of configuration of transmission parameter (00003)
Request of
Request of configuration of transmission parameter configuration of
Request of
transmission
configuration of TD0 parameter
R000
transmission 0.01s 500
parameter
Configuration of parameter has requested Server requirement waiting timer

X114 DIF0 WM020 = WR000B (00004)


Parameter error status work Connection 1 status area
Configuration SHL (WM020,8)
error of Parameter error status work Processing
transmission M0200 = X100 configuration
parameter First word number error error of
M0201 X101 transmission
Error in connection opening parameter
WM020 = WM020 AND H7F03
Parameter error status work
M020F = 1
Parameter error representative flag
WM030 = WM030 OR WM020
Parameter error status Error status work

8-7
Chapter 8 Sample program

X113 DM007 = DR0007 (00005)


DM009 = DR0009 Word Æ bit
Completion of configuration of
WM00B = WR000B development
transmission parameter
Connection 1 status copy Connection 1 status area

M000 TD0 X113 DIF1 WR0005 = WR0005 OR H100 (00006)


Control area 1
Communica- Server Completion of Open request
tion start requirement configuration of
waiting timer transmission
parameter
M070 DIF2 WM021 = WR000B (00007)
Open error status work Connection 1 status area
Connection 1 WM021 = WM021 AND H84
open error Open error status work Processing of
M021F = 1 open error
Open error representative flag
WM031 = WM031 OR WM021
Open error status Error status work
WR0005 = WR0005 AND HFEFF
Control area 1

M070 DFN3 TC0 = 0 (00008)


Server requirement waiting timer passage
Connection 1
open error

M078 R007 M088 R001R001 = 1 (00009)


Send / receive processing
Connection 1 Close Connection Send/ R002 = 1 Processing of
opening request- 1 response receive Send processing send
completed ing of sending processing CAL 0

WR0006 = WR0006 OR H100


Control area 2

R002 M088 DIF4 WR0006 = WR0006 AND HFEFF (00010)


Control area 2
Send Connection 1 response R003 = 1
processing of sending Distinguishing send result

8-8
Chapter 8 Sample program

R003 M088 CJMP 0 (M080) (00011)


Connection 1 sends error
Send result Connection 1
JMP 1
LBL 0 Send result
WM022 = WR000B distinguish-
ment
Send error status work Connection 1 status
WM022= WM022 AND H86
Send error status work
M022F = 1
Send error representative flag
WM032 = WM032 OR WM022
Send error status Send error status work
R005 = 1
Fatal error occurs
R001 = 0
Send/receive processing
LBL1
Distinguishing send result
R003 = 0
Processing of send
R002 = 0

TD1 (00012)
R001 R002 M098
0.01s 1000
Send/receive Send Receiving exists in Answer monitor timer Response
processing processing connection 1 monitor

TD1 M344
(00013)
S
Answer Answer timeout
monitor
M34F Processing at
timeout R7E4
S the time of no
response
Ladder detection error representative flag

R7E4 R001
R
Send /receive processing

CU2
3

Answer timeout frequency counter

CU2 R005
(00014)
S
Answer timeout Fatal error occurs
frequency counter

8-9
Chapter 8 Sample program

R001 R002 M098 DIF5 (00015)


R004 = 1 Received processing
CJMP 2 (M090) Connection1 receive error
Send/receive Send Receiving exist
processing processing in connection 1 CAL 1
JMP 3 Receiving
LBL 2 process
WM023 = WR000B
Receive error status work Connection 1 status area
WM023= WM023 AND H81
Receive error status work
M023F = 1
Receive error representative flag
WM033 = WM033 OR WM023
Receive error status Error status work
R005 = 1
Fatal error occurs
LBL3
WR0006 = WR0006 OR H1
Control area 2

R004 M098 WR0006 = WR0006 AND HFFFE (00016)


Control area 2
Receive exists in R004 = 0
Receive
connection1 Receive processing
processing
R001 = 0
Send/receive processing

R006
M078 R001 M000 (00017)

Completion Send/ Communication starts Close condition is completed


of receive
connection processing R005 Close
1 open requirement
Fatal error occurs

R001 M0A8

Send/receive Other close requirement


processing
R001 R002 R004

Send/receive Send Receive


processing processing processing

R006 DIF6 TC2 = 0 (00018)


Number of response timeout
Close condition is R005 = 0
completed Fatal error occurs
R001 = 0
Send/receive processing
WR0005 = WR0005 AND HFEFF
Control area 1
R007 = 1
Close requesting

8-10
Chapter 8 Sample program

R007 M078 R007


(00019)

Close Completion of connection 1 Closing


Close requesting
requesting

R007 TC0 = 0 (00020)


Server requirement waiting timer passage value
Close requesting

X113 DFN7 Y131 R008 = 1 (00021)


Reset processing
Completion of Request of COPY (WR0005,H0,HC)
Control area 1 Clear of
configuration of configuration of
COPY (WM007,H0,H5) various
transmission transmission
Status area 1 copy flags
parameter parameter
COPY (R000,0,H8)
Request of configuration of transmission parameter has requested

R008 R7D7 = 0 (00022)


Communication module error
Reset processing WRF004 = H0 Processing at
Error module slot number the time of
R7D7 reset

Communication module error

WRF004 Error module


<> slot number
H1

R008 R7D5 = 0 (00023)


I/O module error
Reset processing WRF005 = H0
Error module slot number
R7D5

I/O module error

WRF005 Error module


<> slot number
H10

R008 R7EB = 1
WRF000 Self diagnostic error (00024)
== CPU display clear
Reset H54 WRF000 = H0 Error display
Self-diagnostic error clear
process-
ing WRF000 Self diagnostic error
==
H51
R008
(00025)
R
Reset processing

(00026)
END

8-11
Chapter 8 Sample program

SB0 (00027)
DR0104 = H44494849
DR0106 = H48BC4320 Send data set
DR0108 = HBDDED8B0 subroutine

WR00E1 WR0103 = 24 (00028)


== DR010A = H50552043
H0 DR010C = H3230322D
DR010E = HD0A4820

WR00E1 WR0103 = 24 (00029)


== DR010A = H50552043
H1 DR010C = H3130322D
DR010E = HD0A4820

WR00E1 WR0103 = 24 (00030)


== DR010A = H50552043
H2 DR010C = H3037322D
DR010E = HD0A4820

WR00E1 WR0103 = 24 (00031)


== DR010A = H50552043
H3 DR010C = H3033322D
DR010E = HD0A4820

WR00E1 WR0103 = 24 (00032)


== DR010A = H414D2052
H4 DR010C = H3438332D
DR010E = HD0A4820

WR00E1 WR0103 = 24 (00033)


== DR010A = H414D2052
H5 DR010C = H3136332D
DR010E = HD0A4820

WR00E1 WR0103 = 24 (00034)


== DR010A = H414D2052
H6 DR010C = H3038332D
DR010E = HD0A4820

WR00E1 WR0103 = 22 (00035)


== DR010A = H414E204C
H7 DR010C = H54482D45
DR010E = HD0A

(00036)
RTS

8-12
Chapter 8 Sample program

(00037)
SB 1

M240
WR0203 Number of (00038)
<> receiving byte
2 Error of the number of receiving byte Process of
response
M241 distinguishment
WR0204 Receive data head
== subroutine
H1500
Receiving of NAK

M240 M241 WR0204 Receive data head M242


(00039)
<>
H600
Number of Receiving Receiving of error answer
receiving byte of NAK

M240 M24F = 1 (00040)


Ladder detection error representative flag
Error of the num- WM034 = WM034 OR WM024
Processing of
ber of receiving Ladder detection error status Ladder detection error work
byte error answer
M241 JMP 4

Receiving of
NAK

M242

Receiving of
error answer

WR00E1 = WR00E1 + 1 (00041)


Send data number
WR00E1= WR00E1 AND H7
Send data number Process for a
WR00E0 = WR00E0 + 1 normal
Communication counter response
LBL4
RTS

8-13
Chapter 8 Sample program

(Passive side) TEST R

R7E3 WY0011 = H0 Control register (00001)

1 scan ONs after WR0011 = 10 Timeout monitor timer value


running WR0013 = HBB8 Connection 1 own station logical port number
WR0017 = HA Connection 1 send buffer I/O type Transmission
WR0018 = H100 Connection 1 send buffer head number parameter set
WR0019 = H100 Connection 1 send buffer area length
WR001A = HA Connection 1 receive buffer I/O type
WR001B = H200 Connection 1 receive buffer head number
WR001C = H100 Connection 1 receive buffer area length
WR001D = H8004 Connection 1 service type

R000 Y131 (00002)


WR0007 Status area 1 X115 Configuration of parameter has requested
== S
H0
Response of Request of configuration of transmission parameter
configuration of
transmission R7E4 R000
parameter S
Always ON Configuration of parameter has requested

Y131
Y131 X115 Responseofconfigurationoftransmissionparameter (00003)
Request of
Request of configuration of transmission parameter Request of configuration of transmission parameter configuration of
transmission
parameter

X114 DIF0 WM020 = WR000B (00004)


Parameter error status work Connection 1 status area
Configuration SHL (WM020,8)
Parameter error status work Processing
error of configuration
transmission M0200 = X100
First word number error error of
parameter transmission
M0201 = X101
Error in connection opening parameter
WM020 = WM020 AND H7F03
Parameter error status work
M020F = 1
Parameter error representative flag
WM030 = WM030 OR WM020
Parameter error status Error status work

X113 DM007 = DR0007 (00005)


DM009 = DR0009
Completion of configuration of WM00B = WR000B Word Æ bit
transmission parameter development
Connection 1 status copy Connection 1 status area

8-14
Chapter 8 Sample program

X113 SS0 R006 DIF1 WR0005 = WR0005 OR H100 (00006)


Control area 1
Completion of Retry waiting Close Open request
configuration timer requesting
of transmission
parameter
M070 DIF2 WM021 = WR000B (00007)
Open error status work Connection 1 status area
Connection 1 WM021 = WM021 AND H84
open error Open error status work Processing of
M021F = 1 open error
Open error representative flag
WM031 = WM031 OR WM021
Open error status Open error status work
WR005 = WR0005 AND HFEFF
Control area 1

M070 SS0 (00008)


0.01s 300
Connection 1 open Retry waiting timer Active side
error monitor

M078 TD1 (00009)


R001
0.01s 3000
Connection 1 Send/receive Active side monitor timer Active side
open completed processing monitor
(00010)
TD1 WM034 = WM034 OR H8020
Ladder detection error status Process at the
R0005 = 1 time of an
Active side
Fatal error occurs active side stop
monitor timer

M078 R006 M098 DIF3 R001 = 1 (00011)


Send/receive processing
Connection 1 Close Receiving exist CJMP 0 (M090 Process of
open requesting in connection 1 Connection1 receive error receive
completed CAL 0
R002 = 1
Complete of receive process
JMP 1
LBL 0
WM023 = WR000B
Send error status work Connection 1 status area
WM023= WM023 AND H81
Receive error status work
M023F = 1
Receive error representative flag
WM033 = WM033 OR WM023
Receive error status Error status work
R005 = 1
Fatal error occurs
LBL1
WR0006 = WR0006 OR H1
Control area 2

8-15
Chapter 8 Sample program

R002 M088 R003 (00012)


R003 = 1
Send processing Send process
Receive Response for Send WR0006 = WR0006 OR H100
has connection 1 processing Control area 2
processed send

R003 M088 DIF4 (00013)


WR0006 = WR0006 AND HFEFF
Control area 2
Send Response from R004 = 1
processing connection 1 exists Distinguishing send result

R004 M088 CJMP 2 (M080) (00014)


Connection 1 sends error
Distinguishing Response from JMP 3
send result connection 1 exists LBL 2 Distinguish
WM022 = WR000B send result
Send error status work Connection 1 status area
WM022= WM022 AND H86
Send error status work
M022F = 1
Send error representative flag
WM032 = WM032 OR WM022
Send error status Error status work
R005 = 1
Fatal error occurs
LBL3

R004 = 0
Distinguishing send result
R003 = 0
Send processing
R002 = 0
Complete of receiving process

(00015)
R001 R002 M098 WR0006 = WR0006 AND HFFFE
Process of
Control area 2
completion of
Send/receive Complete of Receiving exists R001 = 0
send/receive
processing receiving in connection 1 Send/receive processing
process

M078 R001 M0A8 (00016)


DIF5 WR0005 = WR0005 AND HFEFF
Control area 1 Close
Connection Send/receive Other R005 = 0 request
close Fatal error occurs
1 open processing requirement
completed R006 = 1
R005 Close requesting

Fatal error occurs

R006 (00017)
R006 M078
Closing
Close Connection Close requesting
requesting 1 open
completed

8-16
Chapter 8 Sample program

X113 DFN6 Y131 R007 = 1 (00018)


Reset processing
Completion of Request of COPY (WR0005,H0,HC)
Control area 1 Clear of
configuration of configuration of
COPY (WM007,H0,H5) various
transmission transmission
Status area 1 copy flags
parameter parameter
COPY (R000,0,H7)
Request of configuration of transmission parameter has requested

R007 R7D7 = 0 (00019)


Communication module error
Reset processing WRF004 = H0 Processing at
Error module slot number the time of
R7D7 reset

Communication module error

WRF004 Error module


<> slot number
H1

R007 R7D5 = 0 (00020)


I/O module error
Reset processing WRF005 = H0
Error module slot number
R7D5

I/O module error

WRF005 Error module


<> slot number
H10

R007 R7EB = 1
WRF000 Self-diagnostic error (00021)
== CPU display clear
Reset H54 WRF000 = H0 Error display
Self-diagnostic error clear
process-
ing WRF000 Self-diagnostic error
==
H51

R007
(00022)
R
Reset processing

(00023)
END

SB 0 (00024)
WR00E2 = WR0203
LSR (WR00E2,1) Receiving
WR00E3 = WR0203(WR00E2) data
subroutine

8-17
Chapter 8 Sample program

M240
R7F0 R7E4
(00025)

Error of the number of receiving byte Process at the


Carry
time of a data
M243
WR00E2 Receive data WR00E3 Receive data error
== word number <> termination code
0 HD0A
Termination code
Error
M240 M24F = 1 (00026)
Ladder detection error representative flag
Error of the WM034 = WM034 OR WM024
number of
Ladder detection error status Ladder detection error work
receiving byte
M243 WR0103=2
Number of sending byte
WR0104=H1500
Termination Send data head
code error JMP4

WR00E1 = WR00E1 + WR00E2 (00027)


Word number of receive table Word number of receive data

HFF Word number of WR00E1 = WR00E2 (00028)


< receive table Word number of receive table Word number of receive data
WR00E1

WR0300(WR00E1) = H0 (00029)
Receive table head Word number of receive table
WR00E4 = WR00E1 - 1
Work receive data offset Word number of receive table
FOR 0 (WR00E2) Data set
Work receive data number process at
WR0300(WR00E4) = WR0203(WR00E2) the time of
Table head Work offset Number of receive byte normality
Number of work receive
WR00E4 = WR00E4 – 1
Work offset
NEXT 0

WR00E0 = WR00E0 + 1
Communication frequency counter
W0103 = 2
Number of send byte
WR0104 = H600
Send data head
LBL4
RTS

8-18
MEMO

You might also like