Manual Ethernet Interface
Manual Ethernet Interface
Manual Ethernet Interface
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.)
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.
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.
• 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.
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.
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
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.
*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
Chapter 1 Introduction
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.
HUB
Ethernet(UTP cable)
EH series PLC
LAN-ETH2 LAN-ETH2
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) Type : CPU2-**H, CPU3-40H or CPU module that is printed “FOR BASIC”
1-3
Chapter 1 Introduction
[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.
(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
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) 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
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-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
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
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
Memory Cassete
0 1 2 3 4 5 6 7 8 Slot No.
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
Chapter 3 Installation and System configuration
(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
To LAN-ETH2
Within 300mm
3-2
Chapter 3 Installation and System configuration
HUB
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
Database server
Personal computer Workstation
HUB
Ethernet(UTP cable)
EH series PLC
LAN-ETH2 LAN-ETH2
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.
3-4
Chapter 4 Name and function of each part
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
8
Note) : OFF
7
6
5 Function kind select : ON
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
(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
8
Note) : OFF
7
: ON
6
5
Unused
4
3
1 2
ON
Module configuration post
4-3
Chapter 4 Name and function of each part
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
Once
Twice
3 times
4-4
Chapter 4 Name and function of each part
4-5
Chapter 4 Name and function of each part
MEMO
4-6
Chapter 5 Communication function
(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
5-1
Chapter 5 Communication function
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
5-2
Chapter 5 Communication function
5-3
Chapter 5 Communication function
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 : 192.168.0.1
7
6
IP address
necessary to install IP address set software in the
5
4 information setting
4
personal computer.(*4)
(PORT1)
3
*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.
c-g of the figure below corresponds to the number of each diagram of next paragraph (2) - (4).
X00S10 g
Configuration errror of IP address Error
X00S11
5-5
Chapter 5 Communication function
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--
5-6
Chapter 5 Communication function
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--
5-7
Chapter 5 Communication function
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--
5-8
Chapter 5 Communication function
Host
WY0011 0 0 0 2 (HEX)
*1 : The part of "xx" corresponds to bit I/O number.
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
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
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".
5-11
Chapter 5 Communication function
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.
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
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.
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.)
5-13
Chapter 5 Communication function
LINK
Loop α
Station
Loop β
L U M P
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
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
5-15
Chapter 5 Communication function
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
Æ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).
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
Æ1 Æ1 Æ1 Æ1
5-17
Chapter 5 Communication function
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.
00 12 FFFF0000 1000
00 12 FFFF0000 00 10 ******
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
[Screen composition]
Each numerical value in the screen reaches the default value when this sample program starts.
5-19
Chapter 5 Communication function
5-20
Chapter 5 Communication function
5-21
Chapter 5 Communication function
5-22
Chapter 5 Communication function
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
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
Control area 1 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *05
Control area 2 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *06
5-24
Chapter 5 Communication function
Status area 1 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *07
Status area 2 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *08
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
Status area 4 (MSB) b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 (LSB)
WR* *0A
5-26
Chapter 5 Communication function
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
5-27
Chapter 5 Communication function
5-28
Chapter 5 Communication function
5-29
Chapter 5 Communication function
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)
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
Broadcast data
IP address IP address
192.168.0.6 192.168.0.5
Logical port No. Logical port No.
4200 4100
5-32
Chapter 5 Communication function
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
Default
gateway equipment
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
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
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
Is status register N
setting response "0" ?
Is status register
N
setting response "1" ?
Y Y
5-34
Chapter 5 Communication function
X00S14
: : : : :
: : : : :
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.
Other station B
IP address
172.16.0.2
Logical port No.
4100
Default
gateway equipment
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)
5-36
Chapter 5 Communication function
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
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
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
Start
Not complete
Setting of configuration of
transmission parameter completion?
Complete
1 : Opening state
0 : No closing request
End
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
Connection 1 Connection1
open completed open error
Timeout
Communication error
5-42
Chapter 5 Communication function
Passive
open
Waiting for connection open
Open request
Acceptance of
open request
Connection OPN LED
Connection open lighting
open
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)
Open error
(WR307.b0) (3) (5)
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
The handshake procedure that conformed to the sequence of figure 5.3.3.4 is shown in figure 5.3.3.5.
Open request
(WR305.b8) (6)
Open error
(WR307.b0) (5) (7)
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
Other station NG
FIN ACK
Data send
Provisional acceptance
of open request SYN ACK
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.
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
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)
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.
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
(Open process)
R012 M30B2
Processing of open error
(4)
R012 M30B7
Processing of open error
(5)
R013
(クローズ処理)
(8)
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
Start
End
5-50
Chapter 5 Communication function
Connection 1 Connection 1
send response send error
5-51
Chapter 5 Communication function
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
Processing of open
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
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
Start
Y
Analysis of an error factor
End
5-54
Chapter 5 Communication function
Connection 1 response of
receiving
5-55
Chapter 5 Communication function
Receive response
(WR306.b0) (4)
Open completed
(WR307.b8)
Receive notification (2)
(WR309.b8) (5)
Dta receive
(Internal process) (1)
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
Processing of open
R035 M30B0
Processing of receive error
(8) (9)
R035 M30B7
Processing of receive error
(8) (10)
Processing of close
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
Y00S28 (1)
(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
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
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
(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
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
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
Note
The operation mode does not change only by changing the state of ON/OFF of the MODE switch.
[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
6-5
Chapter 6 Other function
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.
Machine to be tested
[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.
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
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
8
7
6
5
4
Send/receive test
3
1 2
ON
Bit7 and bit8 are turned on.
[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.
6-7
Chapter 6 Other function
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
Transmit data
Receive data
Other station
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.
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
(*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.
7-2
Chapter 7 Maintenance, Check, Troubleshooting
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”.
7-3
Chapter 7 Maintenance, Check, Troubleshooting
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-5
Chapter 7 Maintenance, Check, Troubleshooting
7-6
Chapter 7 Maintenance, Check, Troubleshooting
During a test ? N
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.
Y
During the external loop N
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
Open error
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.
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
Send error
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.
7-9
Chapter 7 Maintenance, Check, Troubleshooting
Send error
N
Is the other station set up ? N Please transmit the data again after setting up
the other station.
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.
7-10
Chapter 7 Maintenance, Check, Troubleshooting
Receive error
Y
N
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
Is it error except a
Y
communication error ?
7-12
Chapter 8 Sample program
Power ON Power ON
RES SW ON RES SW ON
Configuration of Configuration of
transmission parameter transmission parameter
times.
Send
There is a case that even if active
open succeeds but error occurs
when actually send start. In this
Error
Timeout check
connection open.
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
Transceiver Transceiver
HUB HUB
PLC1 PLC2
Equipment Type
Power module AVRC-08H
CPU module CPU2-20H
Module LAN-ETH2
Memory cassete RAM2-48H
Basic base BSU-05H
0 1 2 3 4
RAM2-48H
CPU2-20H
COMM
8-2
Chapter 8 Sample program
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
The data length which contains the end code becomes an even number byte.
data CR LF
WR0300 Data1
CR LF Data2
CR LF Data 3
CR LF NUL NUL
8-4
Chapter 8 Sample program
8-5
Chapter 8 Sample program
8-6
Chapter 8 Sample program
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
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
8-7
Chapter 8 Sample program
8-8
Chapter 8 Sample program
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
CU2 R005
(00014)
S
Answer timeout Fatal error occurs
frequency counter
8-9
Chapter 8 Sample program
R006
M078 R001 M000 (00017)
R001 M0A8
8-10
Chapter 8 Sample program
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
(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
Receiving of
NAK
M242
Receiving of
error answer
8-13
Chapter 8 Sample program
Y131
Y131 X115 Responseofconfigurationoftransmissionparameter (00003)
Request of
Request of configuration of transmission parameter Request of configuration of transmission parameter configuration of
transmission
parameter
8-14
Chapter 8 Sample program
8-15
Chapter 8 Sample program
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
R006 (00017)
R006 M078
Closing
Close Connection Close requesting
requesting 1 open
completed
8-16
Chapter 8 Sample program
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)
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