QJ71E71 Manual

Download as pdf or txt
Download as pdf or txt
You are on page 1of 504
At a glance
Powered by AI
The document discusses safety precautions and design considerations for using a programmable logic controller and its modules.

The document emphasizes taking appropriate measures to prevent harm, such as not writing data to prohibited areas of memory and ensuring interlock circuits are used correctly.

The document warns against writing data to system areas of memory or using prohibited signals, and stresses separating signal wires from power wires.

MITSUBISHI ELECTRIC

MELSEC System Q

Programmable Logic Controllers

User's Manual (Basic)

QJ71E71-100/-B5/-B2
Ethernet Interface Module

Art. no. 130029


01 10 2008 MITSUBISHI ELECTRIC INDUSTRIAL AUTOMATION
SH(NA)-080009
Version M
• SAFETY PRECAUTIONS •
(Always read before starting use.)

Before using this product, please read this manual introduced in this manual carefully and pay full
attention to safety to handle the product correctly.
The instructions given in this manual are concerned with this product. For the safety instructions of the
programmable controller system, please read the user's manual for the CPU module to use.
In this manual, the safety instructions are ranked as "DANGER" and "CAUTION".

Indicates that incorrect handling may cause hazardous conditions,


! DANGER resulting in death or severe injury.

Indicates that incorrect handling may cause hazardous conditions,


! CAUTION resulting in medium or slight personal injury or physical damage.

Note that the ! CAUTION level may lead to a serious consequence according to the circumstances.
Always follow the instructions of both levels because they are important to personal safety.

Please store this manual in a safe place and make it accessible when required. Always forward it to the
end user.

[Design Precautions]
! DANGER
• For the operating status of each station after a communication failure, refer to relevant manuals
for the network. Erroneous outputs and malfunctions may lead to accidents.
Not doing so can cause an accident due to false output or malfunction.
• To prevent the malfunction of the programmable controller system due to harmful e-mails, take
preventive measures (such as antivirus measures) so that the mail server for this module does
not receive harmful e-mails.
• To maintain the safety of the programmable controller system against unauthorized access from
external devices via the Internet, take appropriate measures.
• When changing data of the running programmable controller from a peripheral connected to the
CPU module or from a personal computer connected to an intelligent function module or special
function module, configure an interlock circuit in the sequence program to ensure that the entire
system will always operate safely. For program modification and operating status change, read
relevant manuals carefully and ensure the safety before operation.
Especially in the above mentioned control operations that are performed from an external device
to a remote programmable controller, any problems on the programmable controller side may
not be dealt with promptly due to abnormal data communication. To prevent this, configure an
interlock circuit in the sequence program, and determine corrective actions to be taken between
the external device and CPU module in case of a communication failure.

A-1 A-1
[Design Precautions]
! DANGER
• Do not write any data in the “system area” of the buffer memory in the intelligent function
module.
Also, do not use any “use prohibited” signals as an output signal from the programmable
controller CPU to the intelligent function module.
Doing so may cause malfunction of the programmable controller system.

! CAUTION
• Do not bundle the control wires and the communication cables with the main circuit and the
power wires, and do not install them close to each other. They should be installed at least 100
mm (3.94 in.) away from each other. Failure to do so may generate noise that may cause
malfunctions.
• When changing the operating status of the programmable controller CPU (such as remote
RUN/STOP) from the external device, select "Always wait for OPEN (Communication possible
at STOP time)" for the “Initial timing” setting in the network parameter. The communication line
will be closed when "Do not wait for OPEN (Communications impossible at STOP time)" is
selected and the remote STOP is executed from the external device. Consequently, the
programmable controller CPU cannot reopen the communication line, and the external device
cannot execute the remote RUN.

[Installation Precautions]
! DANGER
• Use the programmable controller in an environment that meets the general specifications in the
user’s manual for the CPU module used. Using the programmable controller in any other
operating environments may cause electric shocks, fires or malfunctions, or may damage or
degrade the module.
• While pressing the installation lever located at the bottom of module, insert the module fixing tab
into the fixing hole in the base unit until it stops. Then, securely mount the module with the fixing
hole as a supporting point.
If the module is not installed properly, it may cause the module to malfunction, fail or fall off.
Secure the module with screws especially when it is used in an environment where constant
vibrations may occur.
• Be sure to tighten the screws using the specified torque. If the screws loose, it may cause the
module to short-circuit, malfunction or fall off. If the screws are tightened excessively, it may
damage the screws and cause the module to short-circuit, malfunction or fall off.
• Before mounting/dismounting the module, be sure to shut off all phases of external power supply
used by the system.
Failure to do so may cause product damage.
• Do not directly touch any conductive part or electronic component of the module.
This may cause the module to malfunction or fail.

A-2 A-2
[Wiring Instructions]
! CAUTION
• Connectors for external connection must be crimped or pressed with the tool specified by the
manufacturer, or must be correctly soldered.
If the connection is incomplete, it may cause the module to short circuit, catch fire, or
malfunction.
• Shut off the external power supply for the system in all phases before connecting the AUI cable.
• When connecting a cable with connector to the module, connect the connector part to the
module securely.
• Make sure to place the communication and power cables to be connected to the module in a
duct or fasten them using a clamp. If the cables are not placed in a duct or fastened with a
clamp, their positions may be unstable or moved, and they may be pulled inadvertently.
This may damage the module and the cables or cause the module to malfunction because of
faulty cable connections.
• Tighten the terminal screws using the specified torque. If the terminal screws are loose, it may
cause the module to short-circuit, malfunction or fall off. If the terminal screws are tightened
excessively, it may damage the screws and cause the module to short-circuit, malfunction or fall
off.
• When disconnecting the communication and power cables from the module, do not pull the
cables by hand. When disconnecting a cable with a connector, hold the connector to the module
by hand and pull it out to remove the cable. When disconnecting a cable connected to a terminal
block, loosen the screws on the terminal block first before removing the cable. If a cable is
pulled while being connected to the module, it may cause the module to malfunction or damage
the module and the cable.
• Be careful not to let any foreign matter such as wire chips get inside the module. They may
cause fire, as well as breakdowns and malfunctions of the module.
• A protective sheet is pasted on the upper part of the module in order to prevent foreign matter
such as wire chips to get inside the module while wiring.
Do not remove this protective sheet during wiring work. However, be sure to remove the
protective sheet before operating the module to allow heat radiation during operation.
• Correctly solder coaxial cable connectors. Incomplete soldering may result in malfunction.

A-3 A-3
[Setup and Maintenance Precautions]
! CAUTION
• Never disassemble or modify the module. This may cause breakdowns, malfunctions, injuries or
fire.
• Before mounting/dismounting the module, be sure to shut off all phases of external power supply
used by the system.
Failure to do so may cause module failure or malfunctions.
• Do not mount/remove the module onto/from base unit more than 50 times (IEC 61131-2
compliant), after the first use of the product.
Failure to do so may cause the module to malfunction due to poor contact of connector.
• Do not touch the terminals while the power is on. Doing so may cause electric shocks or
malfunctions.
• Before cleaning up and retightening terminal screws and module fixing screws, be sure to shut
off all phases of external power supply used by the system.
Not doing so may cause failure or malfunction of the module.
If the screws are loose, it may cause the module to fallout, short circuits, or malfunction.
If the screws are tightened too much, it may cause damages to the screws and/or the module,
resulting in the module falling out, short circuits or malfunction.
• Always make sure to touch the grounded metal to discharge the electricity charged in the body,
etc., before touching the module.
Failure to do so may cause a failure or malfunctions of the module.

[Operating Precautions]
! CAUTION
• When changing data and operating status, and modifying program of the running programmable
controller from a personal computer connected to an intelligent function module, read relevant
manuals carefully and ensure the safety before operation.
Incorrect change or modification may cause system malfunction, damage to the machines, or
accidents.

[Precautions When Disposing of This Product]


! CAUTION
• Dispose of this product as an industrial waste.

A-4 A-4
REVISIONS
The manual number is given on the bottom left of the back cover.
Print Date Manual Number Revision
Dec., 1999 SH (NA) -080009-A First Edition
Oct., 2000 SH (NA) -080009-B Reflect the contents of the function version B.
Put Windows® base software products together from Mitsubishi
Programmable Controller MELSEC series to Mitsubishi integrated FA
software MELSOFT series. Standardize the name from software package
(GPP function) to product name (GX Developer).

Correction
Entire manual (change MELSECNET/10H to MELSECNET/H), SAFETY
PRECAUTIONS, Contents, About Manuals, The Manual's Usage and
Structure (Structure of this manual (2)), About the Generic Terms and
Abbreviations, Section 1.1, 1.2, 1.3, Section 2.1, 2.2, 2.3, 2.5, 2.6,
Section 3.1, 3.2, 3.5, 3.6, 3.7, 3.8 (2), Section 4.1.1, 4.2, 4.3, 4.4.1, 4.5
(entire), 4.5.1 (Table), 4.6, 4.7, 4.8, 4.9 (entire), Section 5.2.1, 5.2.2, 5.3,
5.5, 5.6 (entire), 5.7.2, 5.8, Chapter 6 (entire), Section 7.1, 7.2, 7.3.1,
7.3.2, 7.4.2, 7.5.2, Chapter 8, Section 8.1, 8.2, 8.3.1, 8.3.2, 8.5.1, 8.6.2,
Section 9.2.3, Section 10.2 to 10.8, Chapter 11, Section 11.1.1, 11.1.2
(2), 11.2, 11.2.2, 11.2.4, 11.3 (5) (6), 11.3.1 to 11.3.3, 11.4, 11.4.4,
Appendix 1 (entire), Appendix 2 (entire), Appendix 3, Appendix 8 (entire),
Appendix 11

Addition
Entire manual (add the explanation on MELSECNET/H remote I/O
station), The Manual’s Usage and Structure (2) (e), Section 5.4, Section
11.2, 11.2.1, 11.2.3, 11.3.1 (error code 63H), 11.3.3 (error code 0063H,
C086H, C087H, C0DAH, C0DBH, C119H, C200H to C205H)
Jun., 2001 SH (NA)-080009-C Added the description of the model QJ71E71-100 Ethernet interface
module.

Additional model
QJ71E71-100

Correction
Compliance with the EMC and Low Voltage Directives, The Manual’s
Usage and Structure, About the Generic Terms and Abbreviations,
Product Configuration, Section 1.2, 1.3, 1.4 (Figure), Section 2.1, 2.2, 2.3
(POINT), 2.4, 2.5, 2.7, Chapter 3 (entire), Section 4.2, 4.3, 4.4, 4.7, 4.8.1,
Section 5.1 (Figure), 5.3 (1) (Figure), 5.4, 5.5, 5.6 (POINT), 5.6.1, 5.6.2,
5.8 (2) (3), 5.9.1 (1) (2), 5.9.3 (Figure), 5.9.5, 5.9.6 (3), 5.9.7, Section 6.2,
Section 7.1, 7.2 (Figure), 7.3.1 (Figure), 7.3.2 (2) (Figure), 7.5.2, Section
8.2 (Figure), 8.3.1 (Figure), 8.3.2 (2) (Figure), 8.5.1, 8.6.2, Section 9.2.3
(2) (Figure), Section 10.1 (POINT), 10.6, 10.8, Section 11.1.1, 11.1.2,
11.2.3, 11.3 (7) (Figure), 11.3.3 (error codes C113H, C114H, and C14EH),
11.4 (POINT), 11.4.6 (Figure), Appendix 1.1, Appendix 2.1, 2.2 (2),
Appendix 8.3, Appendix 11

A-5 A-5
The manual number is given on the bottom left of the back cover.
Print Date Manual Number Revision
Jun., 2001 SH (NA)-080009-C Addition
Section 1.2 (5) (6), Section 2.2 (1), 2.6, Section 5.4.2, Section 11.3 (6),
11.3.2 (error code 1FH), 11.3.3 (error codes C0F7H and C300H),
Appendix 4, Appendix 7, Appendix 9, Appendix 11
Oct., 2001 SH (NA)-080009-D Correction
Section 1.2 (4) (7), 1.3, 1.4 (1), Section 2.2 (POINT), 2.5 (1), 2.7 (1),
Section 3.1, 3.5, 3.8, Section 4.1.1 (2), 4.3, 4.4.1 (POINT), 4.7 (5),
Section 5.2.2 (REMARKS), 5.2.3, 5.4.2, 5.5 (Table), 5.6.1, 5.6.2, 5.6.3,
Section 10.1, Section 11.2.2 (2), 11.2.4, 11.3.3, Appendix 1.1, Appendix
8.2, Appendix 9

Addition
Section 10.9
Mar., 2002 SH (NA) -080009-E Correction
About the Generic Terms and Abbreviations, Section 1.2 (7), Section 2.1
(1), 2.7 (1), Section 3.7 (Table), Section 5.1 (Figure), 5.2.2 (REMARKS),
5.2.3, Section 7.5.1, Section 10.9, Section 11.3.1 (Table), 11.3.3
(REMARKS), 11.4.2 (Figure), Appendix 1.1 (2) (Table), Appendix 2.2 (2)
(a), Appendix 8

Addition
Section 11.3.3 (error code C1BAH), 11.4 2, Appendix 4 (4)
Apr., 2003 SH (NA)-080009-F Additional model
QJ71E71-B5

Deleted model
QJ71E71

Correction
SAFETY PRECAUTIONS, About the Generic Terms and Abbreviations,
Section 1.2 (1) (5) (6), 1.3, 1.4 (1), Section 2.1, 2.2, 2.5, 2.6, 2.7, Section
3.1, 3.4, 3.8, Section 4.1, 4.3, 4.4, 4.5, 4.6, Section 5.2.2 (REMARKS)
(5), 5.2.3 (REMARKS), 5.3, 5.4.2 (1)(c), 5.4.3, 5.5 (6), 5.6 (2) (POINT),
5.9.1, 5.9.6 (3) (6), Section 6.2, Section 10.8, 10.9, Section 11.1.1, 11.2.2
(2), 11.3, 11.4.5 (Figure), Appendix 1.1, Appendix 2, Appendix 4,
Appendix 7, Appendix 10, Appendix 11

Addition
Section 11.2.1 (POINT), 11.3.3 (error code C0B2H, C0E0H to C0EFH,
C171H to C17FH), Appendix 9
Jul., 2003 SH (NA)-080009-G Correction
The Manual's Usage and Structure, Section 1.4 (1), Section 2.2 (1), 2.7,
Section 3.8, Section 4.7, Section 5.2.2 (REMARKS), 5.5 (POINT), 5.6.1,
5.6.2, Section 7.5.2, Section 8.6.2, Section 11.4, Appendix 2, Appendix
8.1, Appendix 11, Appendix 12

A-6 A-6
The manual number is given on the bottom left of the back cover.
Print Date Manual Number Revision
Sep., 2003 SH (NA)-080009-H Correction
Section 1.4 (1), Section 3.8, Section 5.2.3, Appendix 2.1, Appendix 8
Jun., 2004 SH (NA)-080009-I Addition of the description of function version D
Correction
About the Generic Terms and Abbreviations, Section 1.1 (7), 1.3,
Chapter 2 (entire), Section 3.6, 3.8, Section 4.5, 4.6, Section 5.3, 5.5,
5.6 (2) (POINT), 5.8 (POINT), Section 6.1.4, Section 10.9, Appendix 1,
Appendix 4, Appendix 11, Appendix 12
Addition
Section 1.1 (9), Section 5.10, 5.11, Section 11.3.3,
Section 11.4.7, Appendix 8.2
Aug., 2005 SH (NA)-080009-J Correction
SAFETY PRECAUTIONS, Section 1.1 (5), 1.3, Section 2.2, 2.7, Section
5.2.3, 5.11.3, Section 10.9, Section 11.3.3 (error code C062H, C0B9H,
C0C0H, C0C4H, C0D7H), Appendix 1.1, Appendix 4 (4), Appendix 11
Addition
Appendix 8.1, 8.2, Appendix 9
Jun., 2006 SH (NA)-080009-K Correction
Section 2.1, Section 3.8, Section 5.6.3, 5.7.2, 5.9.3, Section 7.1, 7.3.1,
7.5.2, Section 8.1, 8.3.1, 8.6.2, Section 10.2, 10.6, 10.7, 10.8
Addition
Section 2.7, Section 3.4, Section 5.6, Section 7.3.1, Section 10.1
Jun., 2007 SH (NA)-080009-L Correction
About the Generic Terms and Abbreviations, Section 1.2 (9), 1.3, Section
2.1, 2.7, Section 3.6, Section 4.1.1, 4.5.2 (12), 4.6, 4.9.1, Section 5.6 (1)
(2) Point, 5.11, 5.11.3, Section 6.1.4, Section 10.2 to 10.9, Section
11.3.3, 11.4.7, Appendix 1.1, Appendix 4 (4), Appendix 9.1 (4)
Addition
Section 2.5.1, 2.5.2
Oct., 2008 SH (NA)-080009-M Correction
SAFETY PRECAUTIONS, Compliance with the EMC and Low Voltage
Directives, The Manual's Usage and Structure, About the Generic Terms
and Abbreviations, Section 1.2 to 1.4, Chapter 2, Section 3.1 to 3.6, 3.8,
Section 4.1.1, 4.3 4.4.2, 4.4.3, 4.5.2, 4.6 to 4.8, Section 5.1 to 5.5, 5.6.1,
5.6.2, 5.8, 5.9.1, 5.9.3, 5.9.5, 5.9.7, 5.11.3, 5.11.5, Section 6.1.1, 6.1.3,
6.1.4,6.2, Section 7.3.2, 7.5.2, Section 8.6.2, Chapter 10, Section11.2.1,
11.3, 11.4, Appendix 1.1, 2.1, 2.2, 4, 7, 9.1, 12

Japanese Manual Version SH-080004-R

This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent
licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property
rights which may occur as a result of using the contents noted in this manual.
© 1999 MITSUBISHI ELECTRIC CORPORATION

A-7 A-7
INTRODUCTION

Thank you for purchasing the MELSEC-Q series programmable controller.


Before using the equipment, please read this manual carefully to develop full familiarity with the functions
and performance of the Q series programmable controller you have purchased, so as to ensure correct use.
Please forward a copy of this manual to the end user.

CONTENTS (This manual)

SAFETY PRECAUTIONS..............................................................................................................................A- 1
REVISIONS ....................................................................................................................................................A- 5
CONTENTS....................................................................................................................................................A- 8
ABOUT MANUALS ........................................................................................................................................A-16
Compliance with the EMC and Low Voltage Directives................................................................................A-16
The Manual's Usage and Structure ...............................................................................................................A-17
About the Generic Terms and Abbreviations ................................................................................................A-21
Product Configuration ....................................................................................................................................A-22

1 OVERVIEW 1- 1 to 1-17
1.1 Overview of the Ethernet Module ........................................................................................................... 1- 1
1.2 Features of the Ethernet Module ............................................................................................................ 1- 2
1.3 Additional Functions in Function Version B or Later.............................................................................. 1-14
1.4 Software Configuration ........................................................................................................................... 1-16

2 SYSTEM CONFIGURATIONS 2- 1 to 2-25


2.1 Applicable Systems................................................................................................................................. 2- 1
2.2 Devices Required for Network Configuration......................................................................................... 2- 4
2.3 For Use in Multiple CPU System ............................................................................................................ 2- 9
2.4 For Use with Basic Model QCPU or Safety CPU .................................................................................. 2-11
2.5 For Use with Redundant CPUs .............................................................................................................. 2-13
2.5.1 When mounting on main base unit.................................................................................................. 2-13
2.5.2 When mounting on extension base unit .......................................................................................... 2-16
2.6 For Use at MELSECNET/H Remote I/O Station.................................................................................... 2-18
2.7 Checking the Function Version and Serial No. ...................................................................................... 2-22

3 SPECIFICATIONS 3- 1 to 3-28
3.1 Performance Specifications .................................................................................................................... 3- 1
3.2 Data Codes for Communication ............................................................................................................. 3- 3
3.3 Relationship between the External Devices and Additional Functions for Each Communication
Function................................................................................................................................................... 3- 5
3.4 Ethernet Module Function List................................................................................................................ 3- 6
3.5 Dedicated Instruction List........................................................................................................................ 3- 8
3.6 List of GX Developer Setting Items for Ethernet Modules..................................................................... 3- 9
3.7 List of Input/Output Signals to/from the Programmable Controller CPU............................................... 3-11
3.8 List of Applications and Assignments of the Buffer Memory ................................................................. 3-13

A-8 A-8
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION 4- 1 to 4-26
4.1 Loading and Installation .......................................................................................................................... 4- 1
4.1.1 Handling precautions ....................................................................................................................... 4- 1
4.1.2 Installation environment ................................................................................................................... 4- 2
4.2 Settings and Procedures Prior to Starting the Operation ...................................................................... 4- 3
4.3 Components of the Ethernet Module ..................................................................................................... 4- 5
4.4 Connecting to the Network ..................................................................................................................... 4- 7
4.4.1 Connecting to the 10BASE-T/100BASE-TX network ..................................................................... 4- 8
4.4.2 Connecting to the 10BASE5 network .............................................................................................. 4- 9
4.4.3 Connecting to the 10BASE2 network .............................................................................................. 4-11
4.5 Settings from GX Developer ................................................................................................................... 4-13
4.5.1 I/O assignment setting ..................................................................................................................... 4-13
4.5.2 Other settings ................................................................................................................................... 4-14
4.6 Network Parameters Setting the Number of Ethernet/CC IE/MELSECNET Cards ............................. 4-17
4.7 Operational Settings................................................................................................................................ 4-20
4.8 Self-Diagnostic Tests .............................................................................................................................. 4-23
4.8.1 Self refrain test ................................................................................................................................. 4-23
4.8.2 Hardware test (H/W Test) ................................................................................................................ 4-24
4.9 Maintenance and Inspection................................................................................................................... 4-25
4.9.1 Maintenance and inspection ............................................................................................................ 4-25
4.9.2 Mounting and dismounting the module ........................................................................................... 4-26

5 COMMUNICATION PROCEDURE 5- 1 to 5-115


5.1 Overview of the Communication Procedure .......................................................................................... 5- 1
5.2 Initial Processing ..................................................................................................................................... 5- 3
5.2.1 Initial processing............................................................................................................................... 5- 3
5.2.2 Initial settings.................................................................................................................................... 5- 4
5.2.3 Re-initial Processing ........................................................................................................................ 5-10
5.3 Router Relay Parameter ......................................................................................................................... 5-17
5.4 Confirming the Completion of the Initial Processing .............................................................................. 5-22
5.4.1 PING test using GX Developer (Via Ethernet board)...................................................................... 5-22
5.4.2 PING test using GX Developer (Via CPU) ...................................................................................... 5-27
5.4.3 Loop back test using GX Developer................................................................................................ 5-31
5.4.4 PING command (Personal computer Ethernet module) ............................................................ 5-36
5.4.5 Loop back test (Communication using the MC protocol)................................................................ 5-37
5.5 Open Settings.......................................................................................................................................... 5-38
5.6 Open Processing/Close Processing of the Connection......................................................................... 5-45
5.6.1 Active open processing/close processing ....................................................................................... 5-47
5.6.2 Passive open processing/close processing .................................................................................... 5-54
5.6.3 UDP/IP open processing/close processing ..................................................................................... 5-62
5.7 Pairing Open ........................................................................................................................................... 5-65
5.7.1 Pairing open ..................................................................................................................................... 5-65
5.7.2 Example of pairing open settings from GX Developer.................................................................... 5-66
5.8 Automatic Open UDP Port...................................................................................................................... 5-68

A-9 A-9
5.9 Corresponding with the QCPU Remote Password Function ................................................................ 5-70
5.9.1 Data communication when a remote password is set .................................................................... 5-71
5.9.2 Precautions when using the remote password check function ...................................................... 5-78
5.9.3 Data communication procedure....................................................................................................... 5-79
5.9.4 When the remote password unlock processing or lock processing is completed abnormally ...... 5-81
5.9.5 How to set the target connection for the remote password check ................................................. 5-83
5.9.6 Buffer memory for the remote password check function ................................................................ 5-85
5.9.7 Data communication when the remote password check is set ...................................................... 5-89
5.10 Hub Connection Status Monitor Function ............................................................................................ 5-90
5.11 Configuring a Network in Redundant System (Redundant System Support Function) ..................... 5-91
5.11.1 Issue of System Switching Request to Control System CPU....................................................... 5-91
5.11.2 Communication path bypass function ........................................................................................... 5-97
5.11.3 Settings for using Ethernet module in redundant system ............................................................. 5-99
5.11.4 Buffer memory for redundant system support function............................................................... 5-103
5.11.5 Data communication for using Ethernet module in redundant system ...................................... 5-104

6 COMMUNICATION USING THE MC PROTOCOL 6- 1 to 6- 5


6.1 Data Communication Function ............................................................................................................... 6- 1
6.1.1 Accessing the programmable controller CPUs using the MC protocol .......................................... 6- 1
6.1.2 Message format and control procedure for data communication ................................................... 6- 2
6.1.3 Programmable controller CPU setting for performing data communication................................... 6- 3
6.1.4 Applicability of multiple CPU system or redundant system ............................................................ 6- 4
6.1.5 Support for the QCPU remote password function .......................................................................... 6- 4
6.2 Utilizing the MX Component ................................................................................................................... 6- 5

7 FIXED BUFFER COMMUNICATION


(WITH THE PROCEDURE EXIST CONTROL METHOD) 7- 1 to 7-22
7.1 Control Method........................................................................................................................................ 7- 1
7.2 Sending Control Method ......................................................................................................................... 7- 3
7.3 Receiving Control Method ...................................................................................................................... 7- 5
7.3.1 Receive processing with the main program (dedicated instruction: ZP.BUFRCV)........................ 7- 5
7.3.2 Receive processing with an interrupt program (dedicated instruction: Z.BUFRCVS) ................... 7- 7
7.4 Data Format ............................................................................................................................................ 7-12
7.4.1 Header .............................................................................................................................................. 7-12
7.4.2 Application data................................................................................................................................ 7-13
7.5 Programming........................................................................................................................................... 7-17
7.5.1 Precautions when creating programs.............................................................................................. 7-17
7.5.2 Fixed buffer communication program example (with the procedure exist control method)........... 7-18

8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE CONTROL METHOD) 8- 1 to 8-21


8.1 Control Method........................................................................................................................................ 8- 1
8.2 Sending Control Method ......................................................................................................................... 8- 4
8.3 Receiving Control Method ...................................................................................................................... 8- 6
8.3.1 Receive processing with the main program (dedicated instruction: ZP.BUFRCV)........................ 8- 6
8.3.2 Receive processing with an interrupt program (dedicated instruction: Z.BUFRCVS) ................... 8- 8
8.4 Data Format ............................................................................................................................................ 8-10

A - 10 A - 10
8.5 Simultaneous Broadcast Using UDP/IP................................................................................................. 8-11
8.5.1 Sending by simultaneous broadcasting........................................................................................... 8-11
8.5.2 Receiving by simultaneous broadcasting........................................................................................ 8-13
8.5.3 Precautions when using the simultaneous broadcast function....................................................... 8-16
8.6 Programming........................................................................................................................................... 8-17
8.6.1 Precautions when creating programs.............................................................................................. 8-17
8.6.2 Fixed buffer communication program example (with the no procedure control method) .............. 8-18

9 COMMUNICATION USING THE RANDOM ACCESS BUFFER 9- 1 to 9-16


9.1 Control Method........................................................................................................................................ 9- 1
9.1.1 Control method by read requests from an external device............................................................. 9- 3
9.1.2 Control method by write requests from an external device ............................................................ 9- 4
9.2 Data Format ............................................................................................................................................ 9- 5
9.2.1 Header .............................................................................................................................................. 9- 5
9.2.2 Application data................................................................................................................................ 9- 6
9.2.3 Examples of the command/response formats................................................................................. 9-11
9.3 Physical and Logical Addresses of the Random Access Buffer ........................................................... 9-15
9.4 Precautions when Creating Programs ................................................................................................... 9-16

10 DEDICATED INSTRUCTIONS 10- 1 to 10-26


10.1 Dedicated Instruction List and Available Devices .............................................................................. 10- 1
10.2 ZP.BUFRCV........................................................................................................................................ 10- 2
10.3 Z.BUFRCVS........................................................................................................................................ 10- 5
10.4 ZP.BUFSND........................................................................................................................................ 10- 8
10.5 ZP.CLOSE........................................................................................................................................... 10-11
10.6 ZP.ERRCLR........................................................................................................................................ 10-14
10.7 ZP.ERRRD .......................................................................................................................................... 10-17
10.8 ZP.OPEN............................................................................................................................................. 10-19
10.9 ZP.UINI................................................................................................................................................ 10-23

11 TROUBLESHOOTING 11- 1 to 11-66


11.1 How to Check Errors Using LED Displays ......................................................................................... 11- 2
11.1.1 Checking error display ................................................................................................................. 11- 2
11.1.2 How to turn off COM.ERR.LED and to read/clear error information .......................................... 11- 4
11.2 How to Check an Error Through GX Developer ................................................................................ 11- 5
11.2.1 Ethernet diagnostics..................................................................................................................... 11- 6
11.2.2 System monitor ............................................................................................................................ 11- 8
11.2.3 Buffer memory that can be monitored with the GX Developer diagnostic function ................... 11-10
11.2.4 Checking the error information by the buffer memory batch monitoring function...................... 11-12
11.3 Error Code List .................................................................................................................................... 11-13
11.3.1 End codes (Complete codes) returned to an external device during data communication....... 11-22
11.3.2 Abnormal codes returned during communication using A compatible 1E frames..................... 11-25
11.3.3 Error codes stored in the buffer memory..................................................................................... 11-27

A - 11 A - 11
11.4 Troubleshooting Flowchart ................................................................................................................. 11-45
11.4.1 Sending errors during fixed buffer communication
(common to procedure exist and no procedure)......................................................................... 11-48
11.4.2 Receiving errors during fixed buffer communication
(common to procedure exist and no procedure)......................................................................... 11-50
11.4.3 Errors during random access buffer communication .................................................................. 11-53
11.4.4 Errors in communication using the MC protocol ......................................................................... 11-55
11.4.5 Sending errors during e-mail communication ............................................................................. 11-57
11.4.6 Receiving errors during e-mail communication........................................................................... 11-59
11.4.7 Error in redundant system............................................................................................................ 11-61

APPENDIX App- 1 to App-103


Appendix 1 Function Upgrade for the Ethernet Module ..........................................................................App- 1
Appendix 1.1 A comparison of functions of the Ethernet module........................................................App- 1
Appendix 1.2 Precautions when updating the module from function version A to
function version B or later...............................................................................................App- 3
Appendix 2 The QnA/A Series Module ....................................................................................................App- 4
Appendix 2.1 Functional comparisons between the Ethernet modules and QnA/A series modules .App- 4
Appendix 2.2 Using the programs designed for QnA/A series modules .............................................App- 6
Appendix 3 Installing the Ethernet Module on Existing Systems ............................................................App- 9
Appendix 4 Processing Time ....................................................................................................................App- 9
Appendix 5 ASCII Code List .....................................................................................................................App-20
Appendix 6 References.............................................................................................................................App-20
Appendix 7 External Dimensions..............................................................................................................App-21
Appendix 8 Program Examples ................................................................................................................App-23
® ®
Appendix 8.1 Program examples using Visual Basic .NET and Visual C++ .NET.............................App-25
Appendix 8.1.1 Program example for communication using the MC protocol -1 .............................App-25
Appendix 8.1.2 Program example of communication using the MC protocol -2...............................App-34
Appendix 8.1.3 Program example of communication using the MC protocol -3...............................App-45
® ®
Appendix 8.2 Program examples using Visual Basic 6.0/ Visual C++ 6.0 or earlier .........................App-54
Appendix 8.2.1 Program example for communication using the MC protocol -1 .............................App-54
Appendix 8.2.2 Program example of communication using the MC protocol -2...............................App-63
Appendix 8.2.3 Program example of communication using the MC protocol -3...............................App-74
Appendix 9 Communication Support Tool (MX Component) ..................................................................App-77
Appendix 9.1 Overview of MX Component ..........................................................................................App-77
Appendix 9.2 Usage procedure of MX Component .............................................................................App-81
Appendix 10 Differences between the Ethernet and the IEEE802.3 ......................................................App-89
Appendix 11 ICMP Protocol Supported by the Ethernet Module ............................................................App-89
Appendix 12 Setting Value Recording Sheets .........................................................................................App-90

INDEX Index- 1 to Index- 3

A - 12 A - 12
(Related Manual-1) ··· Q Corresponding Ethernet Interface Module User's Manual (Application)
SH-080010-L
1 OVERVIEW 5.3 FTP Parameter Settings for File Transfer from
1.1 Overview GX Developer
1.2 Additional Functions in Function Version B or 5.4 Procedure and Required Processing on the
Later External Device Side (FTP Client)
5.5 Precautions when Using the File Transfer
2 USING THE E-MAIL FUNCTION Functions
2.1 E-mail Function 5.6 FTP Commands
2.2 Configuration and Environment of the
Applicable System 6 DEDICATED INSTRUCTIONS
2.3 Precautions for Using the E-mail Function 6.1 Dedicated Instruction List and Available
2.4 E-mail Specifications Devices
2.5 Processing Procedure of the E-mail Function 6.2 ZP.MRECV
2.6 E-mail Setting from GX Developer 6.3 ZP.MSEND
2.7 Sending/Receiving E-mail (Attached Files) by 6.4 JP/GP.READ
the Programmable Controller CPU 6.5 JP/GP.RECV (for the Main Program)
2.8 Sending E-mail (Main Text) by the 6.6 Z.RECVS (for Interrupt Programs)
Programmable Controller CPU 6.7 J(P)/G(P).REQ (Remote RUN/STOP)
2.9 Sending E-mails Using the Programmable 6.8 J(P)/G(P).REQ (Clock Data Read/Write)
Controller CPU Monitoring Function 6.9 JP/GP.SEND
6.10 JP/GP.SREAD
3 WHEN COMMUNICATING WITH CC-Link IE 6.11 JP/GP.SWRITE
CONTROLLER NETWORK, MELSECNET/H, 6.12 JP/GP.WRITE
MELSECNET/10 RELAY 6.13 J(P).ZNRD
3.1 CC-Link IE controller network, 6.14 J(P).ZNWR
MELSECNET/H, MELSECNET/10 Relay
Communication
3.2 Range of Accessible Other Station's
Programmable Controller and Accessible
Stations
3.3 Settings for Accessing Other Stations
3.4 Procedure for Accessing Other Stations
3.5 Precautions for Accessing Other Stations

4 WHEN THE QCPU ACCESSES THE


PROGRAMMABLE CONTROLLER OF
ANOTHER STATION USING THE DATA LINK
INSTRUCTION
4.1 Other Station Access with the Data Link
Instruction
4.2 Precautions for Accessing Other Stations
4.3 Using the Data Link Instructions
4.4 Data Link Instructions
4.5 Data Sending/Receiving
4.6 Reading/Writing Word Devices of Other
Stations (READ/WRITE)
4.7 Reading/Writing Word Devices of Other
Stations (ZNRD/ZNWR)
4.8 Reading/Writing Clock Data, Remote
RUN/Remote STOP (REQ)
4.9 Error Codes for Data Link Instructions

5 WHEN USING FILE TRANSFER FUNCTIONS


(FTP SERVER)
5.1 File Transfer Functions
5.2 File Transferable Range
A - 13 A - 13
(Related Manual-2) ··· Q Corresponding Ethernet Interface Module User's Manual (Web function)
SH-080180-E
1 OVERVIEW
1.1 Overview

2 SYSTEM CONFIGURATIONS
2.1 System Configurations
2.2 Precautions for Using the Web Function

3 OPERATING PROCEDURE
3.1 General Procedure up to Communication
Using the Web Function
3.2 How to Obtain and Set Up the
Communication Library and the Sample
Screen

4 VERIFYING THE OPERATION OF THE WEB


FUNCTION USING A SAMPLE SCREEN
4.1 Web Function Items Available on the Sample
Screen
4.2 Operating Procedure
4.3 Explanation of the Sample Screen
4.4 Example of Data Communication on the
Sample Screen
4.5 Configurations of Files on the Sample Screen

5 EXAMPLE OF CREATING A FILE FOR


ACCESSING THE PROGRAMMABLE
CONTROLLER

6 COMMUNICATION LIBRARY FUNCTIONS

A - 14 A - 14
(Related Manual-3) … Q Corresponding MELSEC Communication Protocol Reference Manual
SH-080008-K
1 OVERVIEW 3.12 Initializing the Transmission Sequence: for
1.1 Overview of the MELSEC Communication Serial Communication Modules
Protocol 3.13 Mode Switching: for Serial Communication
1.2 Features of the MELSEC Communication Module
Protocol 3.14 Turning Off Displayed LEDs and Initializing
Communication Error Information and Error
2 DATA COMMUNICATION USING THE MELSEC Code: for Serial Communication Module
COMMUNICATION PROTOCOL 3.15 Turning Off the COM.ERR.LED: for Ethernet
2.1 Types and Applications of Data Modules
Communication Frames 3.16 Loopback Test
2.2 Accessible Range of Each Data 3.17 Registering or Canceling Programmable
Communication Frames Controller CPU Monitoring: for Serial
2.3 How to Read the Control Procedures of the Communication Modules
MC Protocol 3.18 Remote Password Unlock/Lock
2.4 Access Timing of the Programmable
Controller CPU Side 4 WHEN COMMUNICATING USING THE QnA
2.5 Setting Method for Writing to the COMPATIBLE 2C FRAMES
Programmable Controller CPU during RUN 4.1 Control Procedures and Message Formats
2.6 Accessing Other Stations 4.2 Contents of the Data Designation Items
2.7 Precautions on Data Communication 4.3 List of Commands and Functions for QnA
2.8 Time Chart and Communication Time of the Compatible 2C Frames
Transmission Sequence of the Serial 4.4 Precautions on the Data Communication
Communication Module 4.5 Example of Data Communication Using QnA
2.9 Transmission Time When Accessing Other Compatible 2C Frames
Stations via CC-Link IE controller network,
MELSECNET/H, MELSECNET/10 5 WHEN COMMUNICATING USING THE A
2.10 Compatibility with Multiple CPU Systems COMPATIBLE 1C FRAMES
2.11 Compatibility with the Q00CPU, Q01CPU 5.1 Control Procedures and Message Formats
Serial Communication Function 5.2 Device Memory Read/Write
2.12 Compatibility with the Built-in Ethernet port 5.3 Extension File Register Read and Write
QCPU 5.4 Reading and Writing in the Buffer Memory of
an Intelligent Function Module
3 WHEN COMMUNICATING USING THE QnA 5.5 Loopback Test
COMPATIBLE 3E/3C/4C FRAMES OR 4E
FRAME 6 WHEN COMMUNICATING USING THE A
3.1 Message Formats COMPATIBLE 1E FRAMES
3.2 List of Commands and Functions for the QnA 6.1 Message Formats and Control Procedures
Compatible 3E/3C/4C Frames and 4E Frame 6.2 List of Commands and Functions for A
3.3 Device Memory Read/Write Compatible 1E Frames
3.4 Buffer Memory Read/Write 6.3 Device Memory Read/Write
3.5 Reading from and Writing to the Buffer 6.4 Extension File Register Read and Write
Memory of an Intelligent Function Module 6.5 Reading and Writing in the Buffer Memory of
3.6 Programmable Controller CPU Status Control an Intelligent Function Module
3.7 Drive Memory Defragmentation (for Other
Station QnACPU) APPENDIX
3.8 File Control Appendix 1 Reading and Writing by Designation
3.9 Registering, Deleting and Reading User of the Device Memory Extension
Frames: for Serial Communication Modules Appendix 2 Reading from and Writing to the
3.10 Global Function: for Serial Communication Buffer Memory
Modules Appendix 3 Processing Time of the
3.11 Data Transmission to an External Device Programmable Controller CPU Side
(On-Demand Function): for Serial While Communicating Using
Communication Modules the MC Protocol

A - 15 A - 15
ABOUT MANUALS

The following manuals are also related to this product.


In necessary, order them by quoting the details in the tables below.

Related Manuals

Manual number
Manual name
(Model code)
Q Corresponding Ethernet Interface Module User’s Manual (Application)
This manual explains the e-mail function of the Ethernet module, the programmable controller CPU status
monitoring function, the communication function via CC-Link IE controller network, MELSECNET/H, SH-080010
MELSECNET/10 as well as the communication function using data link instructions, and how to use file (13JL89)
transfer (FTP server), etc.
(sold separately)

Q Corresponding Ethernet Interface Module User’s Manual (Web function) SH-080180


This manual explains how to use the Web function of the Ethernet module. (sold separately) (13JR40)
Q Corresponding MELSEC Communication Protocol Reference Manual
This manual explains the communication methods and control procedures through the MC protocol for the SH-080008
external devices to read and write data from/to the programmable controller CPU using the serial (13JF89)
communication module/ Ethernet module. (sold separately)

Compliance with the EMC and Low Voltage Directives

(1) For programmable controller system


To configure a system meeting the requirements of the EMC and Low Voltage
Directives when incorporating the Mitsubishi programmable controller (EMC
and Low Voltage Directives compliant) into other machinery or equipment, refer
to Chapter 9 "EMC AND LOW VOLTAGE DIRECTIVES" of the QCPU User's
Manual (Hardware Design, Maintenance and Inspection).
The CE mark, indicating compliance with the EMC and Low Voltage Directives,
is printed on the rating plate of the programmable controller.

(2) For the product


For the compliance of this product with the EMC and Low Voltage Directives,
refer to Section 9.1.3 "Cables" in Chapter 9 "EMC AND LOW VOLTAGE
DIRECTIVES" of the QCPU User's Manual (Hardware Design, Maintenance
and Inspection).

A - 16 A - 16
The Manual's Usage and Structure

How to use this manual


In this manual, explanations are given for each application of the Ethernet modules
(QJ71E71-100, QJ71E71-B5 and QJ71E71-B2).
Please use this manual using the following key items below as a reference.

(1) To find out about the features and utility lists


(a) To find out about the features and functions
• Chapter 1 describes the features of the Ethernet modules.
• Chapter 3 describes the common functions and specifications of the
Ethernet modules.
(b) To find out about the packaged items and network configured items
• The section prior to Chapter 1, "Product Configuration" describes the items
that are supplied together with the Ethernet module.
• Section 2.2 describes the system configuration of the Ethernet module.
Parts and components other than those packaged with the module must be
purchased separately by the user.

(2) To find out about the processing required prior to starting the
operation of the Ethernet module
(a) To find out about the startup procedure
• Section 4.2 describes an outline of the procedures prior to starting the
operation of the Ethernet module.
(b) To find out about the connection to the Ethernet network system.
• Section 2.2 describes the devices required to connect to the Ethernet
network system.
• Section 4.4 describes the connection methods for each type of interface.
(c) To find out about the parameter settings required prior to starting the
operation of the Ethernet module
• Section 4.5 describes the types of the parameter setting screens for GX
Developer in order to use the Ethernet module.
• Section 3.6 describes the parameter settings required for each function to
be used.
Confirm the required parameters, set them according to the relevant
section providing detailed explanation, and save the setting values in the
programmable controller CPU to which the Ethernet module is installed.
(d) To find out how to check for Ethernet module failures
• Section 4.8 describes the self-diagnostic test for the Ethernet module.

A - 17 A - 17
(e) To find out how to check for connection errors with the external devices
• Sections 5.4.1 to 5.4.3 describe how to check for connection errors by
performing the PING test and loop back test through GX Developer.
• Section 5.4.4 describes how to check for connection errors using the
"PING" command.
• Section 5.4.5 describes how to check for connection errors by performing
the loopback test through MC protocol-based communication.
For details of the loopback test commands through MC protocol, refer to the
Q Corresponding MELSEC Communication Protocol Reference Manual.

(3) To find out about the connection between the Ethernet module and
the external devices
(a) To find out about the communication procedures
• Section 5.1 describes an outline of the communication procedures
(b) To find out about the connections with the external devices
• Section 5.6 describes the connections (open and close processing) for
each of the communication method (TCP/IP, UDP/IP) and the open method
(Active, Passive), including programming procedures.

(4) To find out about the details of the data communication functions
(a) To find out about the communication functions
• Section 1.2 describes an overview of the Ethernet module communication
functions and related section numbers and manual names that can be
referenced for more detailed explanations.
• Special functions of the Ethernet module are described in the User's
Manual (Application).
• Web functions of the Ethernet module are described in the User's Manual
(Web function).

(5) To find out about the data communication functions and


programming
(a) To find out how data is read from and written to the programmable controller
CPU
• Data is read from and written to the programmable controller CPU with
communication functions using the MC protocol.
• Chapter 6 describes an overview of the communication functions using the
MC protocol.
For details, refer to the Q Corresponding MELSEC Communication
Protocol Reference Manual.

A - 18 A - 18
(b) To find out how to send and receive data between the programmable
controller CPU and the external devices
• Data communication between the programmable controller CPU and the
external devices is performed with the communication functions using
either the fixed buffers or the random access buffers.
• Chapters 7 and 8 explains details of the communication functions and
programming using the fixed buffers.
• Chapter 9 explains details of the communication functions and
programming using the random access buffers.

(6) To find out how to check for error occurrences and take corrective
actions
(a) To find out about the contents of the error codes
• Chapter 11 describes troubleshooting, how to check for errors, and
contents and reference manual of error codes.
(b) To find out about the storage area of the error codes in the buffer memory of
the Ethernet module
• Section 11.3 describes the error code storage areas in the buffer memory.

(7) To learn about functions that have been added to function version
B and later
• Section 1.3 provides the added function list and detailed explanation manual.
• Appendix 1.1 provides the comparison of the Ethernet module functions.

Structure of this manual


(1) Setting parameters with GX Developer
(a) Using GX Developer to set parameters, the sequence programs for
communicating with external devices can be simplified in the Ethernet
module.
(b) In this manual, parameter settings using GX Developer are explained as
follows.
1) Section 4.5 describes the types of setting screens, objectives of settings,
items and an outline of settings.
2) Details are explained in the detailed explanatory sections on the screens
or in the text in Section 4.5.
(c) Confirm the required parameters and set them according to the relevant
explanatory section or manual, and save the values in the programmable
controller CPU to which the Ethernet module is installed.

A - 19 A - 19
(2) Setting screen of GX Developer
This manual explains the parameter settings with GX Developer in the following
format:

1) Shows how to start


Ethernet/CC the setting screen.
IE/MELSECNET cards] - [Operational settings].

2) Shows the setting


screen of GX Developer.

3) Indicates storage
destination of setting
items and setting
vales. ( 1)
4) Shows the value of
the settings and
relevant section that
provides detailed
explanation.

The value in parentheses (address: H…b ) indicates the buffer


memory address and the bit position of the Ethernet module that store a
setting value entered from GX Developer.
For details on the buffer memory, see Section 3.8, "List of Applications and
Assignments of the Buffer Memory."

A - 20 A - 20
About the Generic Terms and Abbreviations

This manual uses the following generic terms and abbreviations to describe the
Model QJ71E71-100, QJ71E71-B5 and QJ71E71-B2 Ethernet interface modules,
unless otherwise specified.

Generic Term/Abbreviation Description


ACPU Generic term for AnNCPU, AnACPU, and AnUCPU
Generic term A2ACPU, A2ACPU-S1, A2ACPUP21/R21, A2ACPUP21/R21-S1,
AnACPU
A3ACPU, A3ACPUP21/R21
Generic term A1NCPU, A1NCPUP21/R21, A2NCPU, A2NCPU-S1,
AnNCPU
A2NCPUP21/R21, A2NCPUP21/R21-S1, A3NCPU, A3NCPUP21/R21
Generic term for A2UCPU, A2UCPU-S1, A2ASCPU, A2ASCPU-S1, A3UCPU, and
AnUCPU
A4UCPU
BUFRCV Abbreviation for ZP.BUFRCV
BUFRCVS Abbreviation for Z.BUFRCVS
BUFSND Abbreviation for ZP.BUFSND
CLOSE Abbreviation for ZP.CLOSE
ERRCLR Abbreviation for ZP.ERRCLR
ERRRD Abbreviation for ZP.ERRRD
A machine-specific address that is also referred to as the MAC (Media Access Control)
address. This is used to identify the addresses of external devices over a network.
Ethernet Address
The Ethernet address of the Ethernet module can be verified on the MAC ADD
column of the rating plate.
Abbreviation for Model QJ71E71-100, QJ71E71-B5 and QJ71E71-B2 Ethernet
Ethernet module Interface Modules
(Described as the Ethernet module or E71 in the figures)
Ethernet network system Abbreviation for 10BASE2,10BASE5, 10BASE-T and 100BASE-TX network systems
Generic term for personal computers, computers, workstations (WS) and Ethernet
External device
module etc. that are connected by the Ethernet for data communication
Generic product name for SWnD5C-GPPW-E, SWnD5C-GPPW-EA, SWnD5C-GPPW-
GX Developer EV, and SWnD5C-GPPW-EVA. ("n" means version 4 or later.)
"-A" and "-V" mean "volume license product" and "version-upgrade product" respectively.
MELSECNET/10 Abbreviation for MELSECNET/10 Network system
MELSECNET/H Abbreviation for MELSECNET/H Network system
MRECV Abbreviation for ZP.MRECV
MSEND Abbreviation for ZP.MSEND
MX Component Abbreviation for MX Component (SW0D5C-ACT-E or later)
Network module Abbreviation for interface modules compatible with the MELSECNET/10 (H) network
(N/W module) system
OPEN Abbreviation for ZP.OPEN
Generic term for the partner product installed with redundant system-compatible
EZSocket (operator station).
OPS
The OPS can make communication using the Ethernet module's user connection for
OPS connection. (Refer to Section 5.5.)
Personal computer Generic term for IBM PC/AT (or 100% compatible) personal computer
Generic term for Q00JCPU, Q00CPU, Q01CPU, Q02CPU, Q02HCPU, Q06HCPU,
Q12HCPU, Q25HCPU, Q02PHCPU, Q06PHCPU, Q12PHCPU, Q25PHCPU,
QCPU Q12PRHCPU, Q25PRHCPU, Q02UCPU, Q03UDCPU, Q04UDHCPU, Q06UDHCPU,
Q13UDHCPU, Q26UDHCPU, Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU,
Q13UDEHCPU, and Q26UDEHCPU.

A - 21 A - 21
Generic Term/Abbreviation Description
Basic model QCPU Generic term for Q00JCPU, Q00CPU, and Q01CPU.
High Performance model
Generic term for Q02CPU, Q02HCPU, Q06HCPU, Q12HCPU, and Q25HCPU.
QCPU
Process CPU Generic term for Q02PHCPU, Q06PHCPU, Q12PHCPU, and Q25PHCPU.
Redundant CPU Generic term for Q12PRHCPU, and Q25PRHCPU.
Generic term for Q02UCPU, Q03UDCPU, Q04UDHCPU, Q06UDHCPU,
Universal model QCPU Q13UDHCPU, Q26UDHCPU, Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU,
Q13UDEHCPU, and Q26UDEHCPU.
Generic term for Q03UDECPU, Q04UDEHCPU, Q06UDEHCPU, Q13UDEHCPU and
Built-in Ethernet port QCPU
Q26UDEHCPU.
Safety CPU Generic term for QS001CPU.
QCPU-A Generic term for for Q02CPU-A, Q02HCPU-A, and Q06HCPU-A
QCPU station Abbreviation for the programmable controller with QCPU installed.
Generic term for Q2ACPU, Q2ACPU-S1, Q2ASCPU, Q2ASCPU-S1, Q2ASHCPU,
QnACPU
Q2ASHCPU-S1, Q3ACPU, Q4ACPU, and Q4ARCPU
Q/QnA Generic term for QCPU and QnACPU
READ Abbreviation for JP.READ and GP.READ
RECV Abbreviation for JP.RECV and GP.RECV
RECVS Abbreviation for Z.RECVS
REQ Abbreviation for J.REQ, JP.REQ, G.REQ, GP.REQ
SEND Abbreviation for JP.SEND and GP.SEND
SREAD Abbreviation for JP.SREAD and GP.SREAD
SWRITE Abbreviation for JP.SWRITE and GP.SWRITE
UINI Abbreviation for ZP.UINI
WRITE Abbreviation for JP.WRITE and GP.WRITE
ZNRD Abbreviation for J.ZNRD and JP.ZNRD
ZNWR Abbreviation for J.ZNWR and JP.ZNWR
Abbreviation for the Q Corresponding MELSEC Communication Protocol Reference
Reference Manual
Manual
Abbreviation for the Q Corresponding Ethernet Interface Module User's Manual
User's Manual (Application)
(Application)
Abbreviation for the Q Corresponding Ethernet Interface Module User's Manual
User's Manual (Basic)
(Basic)
Abbreviation for the Q Corresponding Ethernet Interface Module User's Manual
User's Manual (Web function)
(Web function)

A - 22 A - 22
Product Configuration

The following lists the product configuration of the Ethernet interface modules.

Model Item name Quantity


QJ71E71-100 QJ71E71-100 Ethernet interface module 1
QJ71E71-B5 QJ71E71-B5 Ethernet interface module 1
QJ71E71-B2 QJ71E71-B2 Ethernet interface module 1

A - 23 A - 23
1 OVERVIEW
MELSEC-Q

1 OVERVIEW
1 This manual provides information on the specifications of the Ethernet interface
modules, models QJ71E71-100, QJ71E71-B5 and QJ71E71-B2 (hereinafter called the
Ethernet module), as well as the procedures prior to starting the operation, the control
procedures and data communication method for communicating with external devices,
maintenance, inspection, and troubleshooting.
When applying the following program examples to the actual system, make sure to
examine the applicability and confirm that it will not cause system control problems.

1.1 Overview of the Ethernet Module


The Ethernet module is an interface module on the programmable controller side for
connecting the Q series programmable controller with the host system, such as a
personal computer and a work station, and between programmable controllers using
the TCP/IP or UDP/IP communication protocol via Ethernet (100BASE-TX, 10BASE-T,
10BASE5, 10BASE2).
Internet
(Public dial-up line)

Internet service Internet service


Provider Provider

Router Router
Power supply
Power supply

Ethernet

Ethernet
module

module
CPU
CPU

Local station External device

External device External device Web server

GX Developer

1) Collection and modification of programmable controller CPU data


(Communication using the MELSEC communication protocol)
2) Transmission and reception of arbitrary data to/from external devices
(Communication using fixed buffers or random access buffers)
3) Data transmission/reception by e-mails
(When using the e-mail function)
4) Data transmission/reception by Web function
(User’s Manual (Web function))
By using the GX Developer, the sequence programs for communication
can significantly be simplified.

1-1 1-1
1 OVERVIEW
MELSEC-Q

1.2 Features of the Ethernet Module


(1) Data communication using the MELSEC communication protocol 1
(Details are explained in Chapter 6 of the MELSEC Communication
Protocol Reference Manual)
In the "data communication using the MELSEC communication protocol
(hereinafter called the MC protocol)", the device data and program files of the
programmable controller can be read from/written to the host system.
This protocol is a passive protocol that communicates data solely according to
the requests from the host system. It does not require a sequence program for
data communication after a connection is established.
If the host system is a personal computer running one of the basic operation
systems below, it is possible to create a communication program for the host
system without considering the detailed MC protocol (transmission/reception
procedures) using one of the following separately sold communication support
tools.
(Supported basic operation systems)
® ®
• Microsoft Windows 95 Operating System
® ®
• Microsoft Windows 98 Operating System
® ®
• Microsoft Windows NT Workstation Operating System Version 4.0
® ®
• Microsoft Windows Millennium Edition Operating System
® ®
• Microsoft Windows 2000 Professional Operating System
® ®
• Microsoft Windows XP Professional Operating System
® ®
• Microsoft Windows XP Home Edition Operating System
® ®
• Microsoft Windows Vista Home Basic Operating System
® ®
• Microsoft Windows Vista Home Premium Operating System
® ®
• Microsoft Windows Vista Business Operating System
® ®
• Microsoft Windows Vista Ultimate Operating System
® ®
• Microsoft Windows Vista Enterprise Operating System
Depending on the version of MX Component used, different operating
systems are supported.
See the manual of MX Component for the details.
(Separately sold communication support tools)
• MX Component (SW0D5C-ACT-E or later, hereinafter abbreviated as MX
Component)
See Appendix 9 for the overview of MX Component.
Command

Response
Power supply

Ethernet
module
CPU

Local station

External device

1-2 1-2
1 OVERVIEW
MELSEC-Q

REMARKS
The communication functions using the MC protocol correspond to the
communication functions for reading/writing data from/to the programmable
controller CPU that are supported by the A/QnA series Ethernet modules
(A1SJ71E71/A1SJ71QE71, etc.).

1-3 1-3
1 OVERVIEW
MELSEC-Q

(2) Communication using fixed buffers (Details are explained in


Chapters 7 and 8)
In the "communication using fixed buffers," a maximum of 1 k words of arbitrary
data can be sent or received among programmable controllers or between the
programmable controller and the host system.
An Ethernet module is provided with 16 fixed buffer data areas of 1 k word
storage space, and each is assigned as either a sending or receiving buffer for
an arbitrary device.
While the communication using the MC protocol is passive, the communication
using fixed buffers is an active protocol. Data can be sent from the programmable
controller side to the host system when errors occur in machine equipment or
when some conditions are satisfied. Furthermore, by using the data receiving
function in an interrupt program, retrieval of receive data to the programmable
controller CPU may be expedited.

Receive/ Receive/
send send
Power supply

Power supply
Ethernet

Ethernet
module

module
CPU

CPU

External device Local station

External device

(3) Communication using random access buffers (Details are


explained in Chapter 9)
In the "communication using random access buffers," data of larger size (up to
6 k words of data) can be communicated. This protocol can be used when the
data size is too large for communication using fixed buffers (up to 1 k words of
data).

Read/write Read/write
Power supply

Ethernet
module
CPU

Local station

External device External device \

1-4 1-4
1 OVERVIEW
MELSEC-Q

(4) Communication by e-mails (Details are explained in the User’s


Manual (Application))
With “sending/receiving e-mail,” data can be sent to and received from an
external device at a remote location using e-mail via an Internet line.
(a) Sending/receiving e-mail by the programmable controller CPU
The following data can be sent/received by using dedicated instructions
(MSEND, MRECV).
1) Sending/receiving data as attached files
Up to 6K words of data can be sent to or received from a personal
computer or other Ethernet module as a file attached to e-mail.
2) Sending data as main text
Up to 960 words of data can be sent to a personal computer or
portable terminal as main text of e-mail.
(b) Sending e-mail by the programmable controller CPU Monitoring function
By setting up the Ethernet parameters, the notification conditions
(programmable controller CPU status or device value) set by the user can
be monitored at constant intervals, and up to 960 words of data can be sent
by either of the following methods when the notification conditions are
satisfied:
1) Sending data as an attached file
2) Sending data as main text

Internet
(Public dial-up line)

E-mail
sending/
receiving

Internet service Internet service


provider provider

Router Router
Power supply

Ethernet
module
CPU

Local station

External device

1-5 1-5
1 OVERVIEW
MELSEC-Q

(5) Communication by the Web function (Details are explained in the


User’s Manual (Web function))
With “communication using the Web function,” the system administrator can
monitor a Q Series CPU at a remote location via the Internet using a
commercially available Web browser.
(a) By setting up a communication library in the Web server, data
communication with the programmable controller can be performed.
A sample screen to be displayed by a Web browser is also available for
your use.
Contact your local agency or marketing company.
(b) A Web server and a Web browser are required to use the Web function.
(Basic operating systems)
® ®
• Microsoft Windows 2000 Server Operating System
® ®
• Microsoft Windows 2000 Professional Operating System
® ®
• Microsoft Windows NT Server Network Operating System Version
4.0
® ®
• Microsoft Windows NT Workstation Operating System Version 4.0
® ®
• Microsoft Windows 98 Operating System
(Web servers)
®
• Microsoft Internet Information Server 5.0
®
• Microsoft Internet Information Server 4.0
®
• Microsoft Peer Web Services 4.0
®
• Microsoft Personal Web Server 4.0
(Web browsers)
®
• Internet Explorer 4.0 or later (Microsoft Corporation)
® ®
• Netscape Communicator 4.05 or later (Netscape Communications
Corporation)

HTTP MC protocol
HTTP
Power supply

header (Command message)


Ethernet
module
CPU

MC protocol HTTP
(Response message) header
Local station

Web server External device

Web browser
HTML
Display of
Execution of requests/results
ASP the ASP file

Communication
library

1-6 1-6
1 OVERVIEW
MELSEC-Q

(6) Connecting GX Developer, GT SoftGOT and GOT (Details are


explained in the Operating Manuals for GX Developer and GT
SoftGOT, and User’s Manual for GOT (Connection System
Manual))
(a) Simplifying sequence programs using GX Developer
GX Developer supports the parameter setting function to perform the
Ethernet module initialization and the open processing with external
devices. By setting up the following parameters with “network parameter
settings” of GX Developer, access from the external device to the
programmable controller is enabled. It can also significantly simplify
sequence programs used to perform communication by Ethernet modules.
• IP address setting
• Port number setting
• Protocol type setting
• Notification condition setting
For more information on setting up Ethernet modules, see Section 3.6, “List
of GX Developer Setting Items for Ethernet Modules” and other applicable
reference sections.
Power supply

Power supply
Ethernet

Ethernet
module

module
CPU

CPU

Local station External device

External device

Parameter setting

GX Developer

(b) Programming and monitoring function via the Ethernet


By establishing an Ethernet connection, programming and monitoring of
programmable controllers can be performed using GX Developer, as well
as monitoring and testing of programmable controllers can be performed
using GOT or GT SoftGOT.
In ether case, remote operations utilizing long-distance connection and
high-speed communication of Ethernet become possible.

Program/monitor Monitor/test
Power supply

Ethernet
module
CPU

GX Developer External device GOT GT SoftGOT

1-7 1-7
1 OVERVIEW
MELSEC-Q

(c) Connecting multiple MELSOFT products (GX Developer, GT SoftGOT, and


MX Component) or GOTs
This product can be connected with one or more MELSOFT product (GX
Developer, GT SoftGOT, and MX Component) or GOT simultaneously via
TCP/IP communication or UDP/IP communication. 1 2
1) Connection via TCP/IP communication
• The Ethernet module side can connect up to 17 units of MELSOFT
product via TCP/IP communication simultaneously by using one
dedicated system connection and up to 16 user connections. 3
• If only one MELSOFT product is to be connected, the following
settings using GX Developer are not required.
If two or more MELSOFT product are to be connected, the following
settings using GX Developer are required since user connections
will be used.
On the "Ethernet open settings" screen for network parameters, set
"TCP" in the protocol field of the connection number to be used, and
"MELSOFT connection" in the open method field. (See Section 5.5.)
2) Connection via UDP/IP communication. 4
By using one dedicated system connection, the Ethernet module side
can connect MELSOFT product or GOT via UDP/IP communication.
[Connections used by the Ethernet module side when connecting a MELSOFT product or GOT]

(External device) (Protocol used) (Connection used on the Ethernet module side)
One unit
Power supply

Connection via TCP/IP • • • • Uses a dedicated system connection.


Ethernet
module

The Ethernet open settings parameter is


CPU

Multiple units not required.

Connection via TCP/IP • • • • Uses a dedicated system connection and user


connections set up by the user for MELSOFT
connection.
The Ethernet open settings parameter is required.
One unit Multiple units

or Connection via UDP/IP • • • • Uses a dedicated system connection.


The Ethernet open settings parameter is not required.

1 It is possible to use the same station number if two or more MELSOFT


products are started up from one personal computer in order to perform
TCP/IP communication and UDP/IP communication with one Ethernet module.
(It is not necessary to use different station numbers for TCP/IP and UDP/IP.)
2 GT SoftGOT and GOT support UDP/IP communication only.
3 Dedicated connections will be used to connect MELSOFT products for data
communication. These dedicated connections cannot be used to perform data
communication with external devices other than MELSOFT product.
4 It is possible to access other stations without performing Conversion setting
(Network No., Station No., and IP address) if they are accessed from a
MELSOFT product via the Ethernet module using the Communication with CC-
Link IE controller network, MELSECNET/H or MELSECNET/10 relay.
See Chapter 3 of User's Manual (Application) for the relay function of CC-Link
IE controller network, MELSECNET/H and MELSECNET/10.

1-8 1-8
1 OVERVIEW
MELSEC-Q

(7) Functions supporting Multiple CPU systems (Details are explained


in the Reference Manual.)
(a) When performing the following data communication with QCPUs in a
multiple CPU system, it is possible to perform data communication such as
reading/writing device data or reading/writing files by specifying the QCPU
to be accessed.
1) Communication by MC protocol
2) Communication by GX Developer
3) When using the file transfer function (FTP server)
When using the Ethernet module in a multiple CPU system, a QCPU
controlling the Ethernet module (hereinafter referred to as the control
CPU) should be specified through GX Developer.
It is also possible to mount an Ethernet module of function version A on
a multiple CPU system and access to the only control CPU (the CPU
No.1).
External device

Communication through GX Developer


Communication using the MC protocol
File transfer
(FTP server) function

Ethernet module
control CPU

1) : CPU No.1
2) : CPU No.2
1) 2) 3) 4) 1 2 1 3) : CPU No.3
4) : CPU No.4
1 : Module controlled by
CPU No.1
Ethernet module
non-control CPUs 2 : Module controlled by
Setting from GX Developer
Ethernet module CPU No.2

(b) When the Ethernet module of function version B or later is used in a multiple
CPU system, the following data can be transferred to/from the Ethernet
module.
1) Communication using the fixed buffer, communication using data link
instructions and sending/receiving of e-mail are possible from the
control CPU.
2) It is possible to read the buffer memory from non-control CPUs.
Input/output signals can be used as contacts.
Non-control CPU Control CPU Ethernet module External device
FROM/TO
instruction Buffer memory
Dedicated Data communication

FROM instruction
instruction

Use the input/output Use the input/output X


signal as a contact signal as a contact
It should be output Y
to an output signal

1-9 1-9
1 OVERVIEW
MELSEC-Q

3) It is possible to access the control CPU and non-control CPUs using


the MC protocol and through GX Developer and file transfer (FTP
server) from the external device.
Also, communication using the fixed buffer and sending/receiving of e-
mail are possible with respect to the Ethernet module control CPU.
(Example)
When communicating by MC protocol
Non-control CPU Control CPU Ethernet module External device
Command message
Communication using the
transmitted using
MC protocol (read/write)
a QnA compatible
03E0H to 03E3H 03FFH Specify the QCPU to be 3E frame or 4E frame
accessed by the I/O number
of the requested module. Response message
Data
Device memory, etc.
Data
Device memory, etc.

If the MC protocol or GX Developer is used to access other stations, it is


possible to access the control CPU and non-control CPUs of the station
to be accessed even if the relay station and the accessed station are
multiple CPU systems.
(Example)
It is possible to access other stations regardless of whether the control
CPU of the module to be routed through is of the same kind or different.

Local station
External device

1) 2) 3) 4) 1 2 1' Communication through GX Developer


Communication using the MC protocol
Setting from GX Developer
Ethernet
CC-Link IE
controller network 1) : CPU No.1
Relay station 2) : CPU No.2
3) : CPU No.3
1) 2) 3) 4) 2 2 4) : CPU No.4
1 : Module used for routing, controlled
by CPU No.1
CC-Link IE 1' : Ethernet module controlled by
Station to be accessed controller network CPU No.1
2 : Module used for routing, controlled
1) 2) 3) 4) 2 by CPU No.2
Module for routing : CC-Link IE controller network module

The QnA compatible 3E frame or 4E frame should be used for


access to non-control CPUs when communicating using the MC
protocol.
Note, however, that the available functions differ, depending on the
QCPU to be accessed (whether it is a control CPU or a non-control
CPU).
See the Reference Manual for the available functions and
accessible range.
The modules used for routing are indicated the following when
accessing other stations:
• CC-Link IE controller network, MELSECNET/H, MELSECNET/10
network module
• Q series C24 • Ethernet module

1 - 10 1 - 10
1 OVERVIEW
MELSEC-Q

If there is a module of function version A among the modules for


routing, it is possible to access the control CPU of module used for
routing only. In addition, it is possible to access other stations via a
module controlled by the same control CPU.

1 - 11 1 - 11
1 OVERVIEW
MELSEC-Q

(8) Remote password check function (Details are explained in Chapter


5 of the Reference Manual.)
(a) The remote password check function of the Ethernet module prevents
improper access to the QCPU by users at a remote location.
The Ethernet module performs a remote password check with respect to
data communication from the external device that uses the connection set
as a parameter in the QCPU.
The remote password function is one of the QCPU functions for
preventing improper access to the QCPU by other users.
When setting a remote password for the QCPU using GX Developer the
remote password function of the QCPU can be used.
(b) All the remote password checks during data communication from the
external device to the local station or other stations are performed for the
remote passwords set in the local station QCPU.
(c) When communicating data using the applicable connection for the remote
password check, data communication from external device can be
performed by the remote password unlocked (canceled) processing after
completing open processing.
1) When communicating using the MC protocol, fixed buffer or random
access buffer
Use the dedicated instruction for communication using the MC protocol
to unlock the remote password from the external device.
2) When accessing the programmable controller through GX Developer
Unlock the remote password through GX Developer at the start of
online operation.
3) When using the file transfer (FTP server) function
Use a dedicated FTP command to unlock the remote password from
the external device.
4) When using the Web function
Unlock the remote password in the dialog box displayed by a Web
browser while accessing the QCPU.
The user performs remote password lock processing prior to closing the
connection.
Accessing source
external device

Ethernet

Remote Remote
password password
check (Local station)
Ethernet
QCPU
module

Setting from GX Developer


Set the applicable connection for the remote
password check with the parameters.

1 - 12 1 - 12
1 OVERVIEW
MELSEC-Q

(9) Redundant system support function (Detailed explanation: Chapter


5)
(a) Backup of Ethernet communication
By mounting the Ethernet communication of function version D or later on
the main base units of a redundant system, the Ethernet modules can be
backed up. If a failure or communication error occurs in the Ethernet
module, the system can be switched between the control system and
standby system to continue the communication of the Ethernet module. 1
(b) Issue of system switching request to control system CPU
When the Ethernet module mounted on the main base unit of the control
system CPU in the redundant system detects a communication error or
disconnection, it can issue a system switching request to the control system
CPU.
(c) Access to redundant system
Communication using MC protocol or data link instruction enables data
communication, such as read/write of device data and files, from/to the
control system/standby system or system A/system B of the redundant
system.
(d) Connection with OPS
The Ethernet module can communicate with the OPS using the user
connection for OPS connection.
Set the user connection for OPS connection in the open setting of GX
Developer. (Refer to Section 5.5.)
1 It also can be mounted on the extension base unit or MELSECNET/H
remote I/O station of the redundant system. Note that there is restriction on
applicable functions. For details, refer to Section 2.5.2 or 2.6.
OPS
Personal
computer
Ethernet
(Communication with host) AnACPU AnUCPU AnNCPU
(Normal station) (Normal station) (Normal station)

MELSECNET/H (MELSECNET/10 mode) PLC to PLC network


(Communication with other stations)

QCPU QnACPU Q4ARCPU


(Normal station) (Normal station) (Normal station/
control station)

Tracking cable
CC-Link
(I/O control, communication with outside)

Remote I/O Remote Intelligent


station device station device station

MELSECNET/H remote I/O network


(I/O control, communication with outside)

Remote I/O Remote I/O Remote I/O


station station station

1 - 13 1 - 13
1 OVERVIEW
MELSEC-Q

1.3 Additional Functions in Function Version B or Later


The following table shows the functions that have been added to the Ethernet modules
of function version B and later.
POINT
(1) The added/changed functions shown in this section includes the functions
added in the first products or later of function version B and function version
D. For the function version, serial No., and software version of the Ethernet
module and related products (CPU module, and GX Developer) that can use
the added/changed functions, refer to Section 2.7.
(2) Refer to Appendix 1.1 concerning a comparison of functions in the different
Ethernet module function versions.
(1) Functions added to function version B

Function Overview Reference section

Sends/receives data using IEEE802.3 frames.


• When sending data, selects and sends either an Ethernet frame or IEEE802.3 Section 4.7
Support for IEEE802.3 frames
frame. Appendix 10
• When receiving data, receives either an Ethernet frame or IEEE802.3 frame.
Re-initial processing is performed in the following cases:
• When updating the Ethernet address of the external device with which data
Re-initial processing of the Ethernet module Secstion 5.2.3
communication will be performed
• When changing the data communication conditions.
Existence check Perform a target existence check by sending an ACK message to a remote device Section 5.2.2,
Checking by KeepAlive
function and waiting to see whether or not a response is received. REMARKS (5)
Simultaneous connection of up to 17 Simultaneously connects up to 17 MELSOFT product (such as GX Developer) via Sections 1.2 (6) and 5.5
MELSOFT products via TCP/IP TCP/IP communication. This is achieved by using up to 16 user connections and one Applicable MELSOFT
communication dedicated system connection. product manual
It is possible to access other stations without performing conversion setting (network
Simplifying access to
Simplifying number, station number, and IP address) if they are accessed from a MELSOFT
other stations Section 1.2 (6)
connection with product via the Ethernet module.
Manual of each
MELSOFT It is possible to use the same station number if two or more MELSOFT products are
Access with the same MELSOFT product
products started up from one personal computer in order to perform TCP/IP communication
station number
and UDP/IP communication with one Ethernet module.
The Ethernet diagnostic function of GX Developer enables the following diagnoses:
Ethernet diagnostic function of GX • Monitoring the module status and error status of the Ethernet module.
Sections 5.4 and 11.2
Developer • Confirming the completion of the Ethernet module’s initial processing by performing
the PING test and loop back test.
Sending files in CSV
Sends a file in CSV format as attachment to e-mail from the Ethernet module.
format as attachment
Sending main text Sends main text of up to 960 words from the Ethernet module.
When using the Chapter 2 of User’s
e-mail function The following encoding/decoding is supported. Manual (Application)
Support for • Encode the Subject using 7 bits encoding and send it from the Ethernet module.
encoding/decoding • Decode and receive an e-mail encoded with Quoted Printable by the Ethernet
module.
Accesses the programmable controller from a personal computer at a remote location User’s Manual (Web
Communication using the Web function
via an Internet, using a commercially available Web browser. Function)
In data communication via the connection set up using the parameters for the QCPU,
Overview of function this function enables data communication after unlock processing from the external Section 5.9
device is completed normally for the remote password set in the QCPU.
Communication using the Section 3.18 of
Remote Reference Manual
MC protocol Unlocks/locks the remote password of the QCPU. The unlock processing enables
password check
File transfer (FTP server) access to the QCPU using various commands. Section 5.6 of User’s
function Manual (Application)
Communication using the Unlock the remote password through the dialog box displayed by a Web browser User’s Manual (Web
Web function while accessing the QCPU. Function)
Communication using the Section 2.10 of
MC protocol Reference Manual
Support for
Accessing QCPU from This function enables access to the control CPU/non-control CPU specified by the GX Developer
multiple CPU
GX Developer user when performing data communication with a multiple CPU system. Operating Manual
systems
File transfer (FTP server) Chapter 5 of User’s
function Manual (Application)
When an Ethernet module is mounted to the MELSECNET/H remote I/O station, access
Mounting an Ethernet module to the
to the local station (station on which the Ethernet module is mounted) or other stations is Section 2.6
MELSECNET/H remote I/O station
enabled from the external device.

1 - 14 1 - 14
1 OVERVIEW
MELSEC-Q

(2) Functions added to function version D

Function Overview Reference section

• The Ethernet modules can be mounted and used on the main base units of the
redundant system. (Redundant Ethernet communication)
Redundant system support function Section 5.11
• When a communication error or disconnection is detected, a system switching
request can be issued to the control system CPU.
In the buffer memory, the connection status of the Ethernet module and hub and
Hub connection status monitor function Section 5.10
the current transmission speed can be checked.
Sending character
strings in the e-mail's
When using the main text by the The programmable controller CPU monitoring function allows transmission of Chapter2 of User's
e-mail function programmable character string information stored in word devices by the e-mail's main text. Manual (Application)
controller CPU
monitoring function
Target station No. 65 to 120 can be specified by the following data link instructions.
(The station No. 65 to 120 of the CC-Link IE controller network can be specified.)
Target station No. specification of data link • SEND
instruction • READ/SREAD
• WRITE/SWRITE
• REQ
Target station CPU type ((S1)+3) can be specified with the following data link
instructions. (The control system/standby system or System A/System B of the
Target station CPU type specification for redundant system can be specified.) Chapter 4, Chapter 6 of
data link instructions • READ/SREAD User's Manual
• WRITE/SWRITE (Application)
• REQ
The data length can be specified up to 960 words in the following data link
instructions: 1
Increased data length of data link
instructions • SEND
(From 480 to 960 words) • RECV/RECVS
• READ/SREAD
• WRITE/SWRITE
Compatible with the message format (4E frame) for which any given number (serial
No.) has been added to the QnA compatible 3E frame for message identification.
Communication by MC protocol Chapter 3 of Reference
By the serial No. which is added by the external device for message identification,
Compatible with the 4E frame Manual
the correspondence between multiple command and response messages can be
checked.
Access to link direct device LW10000 or
higher using MC protocol Section 3.2 of Reference
This function allows access to link direct device LW10000 or higher.
(4E frame and QnA compatible 3E frame Manual
only)
Access to extended data register D65536 or
higher or extended link register W10000 or
This function allows access to extended data register D65536 or higher and Section 3.2 of Reference
higher using MC protocol
extended link register W10000 or higher. Manual
(4E frame and QnA compatible 3E frame
only)

1 In a multiple network system, when transferring data exceeding 480 words to


a station of another network No., specify the Q series models to all of the
request source, relay station and request target.

1 - 15 1 - 15
1 OVERVIEW
MELSEC-Q

1.4 Software Configuration

The Ethernet modules support the TCP/IP and UDP/IP protocols.


OSI reference model corres-
ponding to the programmable
Personal computer/work-station Programmable controller controller configuration
(Layers)
User program Q Series programmable controller CPU

CPU
Dedicated instruction

Buffer memory 7 Application layer


System call 6 Presentation layer
Commun- Commu- Commun- Commun-
Commun-
FTP Commun- Commun- 5 Session layer
ication
ication nication ication ication ication ication
via by
using using using using by
CC-Link IE
fixed random the MC data e-mails Web
controller
buffers access protocol link
network, SMTP HTTP
buffers instructi- POP3
NET/H,
Socket ons DNS Ethernet
NET/10
module
TCP UDP TCP/UDP 4 Transport layer

IP ICMP IP ICMP
3 Network layer
ARP ARP

Ethernet Ethernet 2 Data link layer


(100BASE-TX, 10BASE-T, 10BASE5,10BASE2) (100BASE-TX,10BASE-T,10BASE5,10BASE2) 1 Physical layer

(1) TCP (Transmission Control Protocol)


This protocol guarantees data credibility or reliability in a communication between
a personal computer/work station and the programmable controller that are
connected via network, and provides the following functions:
• Creates a logical connection by establishing a connection (logical line) as if a
dedicated line was created between external devices.
• A maximum of 16 connections can be established and communication to
multiple buffers can be performed at the same time in the Ethernet module.
• Data reliability is maintained by the sequence control using the sequence
numbers, the data retransmission function and the check sum.
• The communication data flow can be controlled by operations using Windows.
• Supports the Maximum Segment option.
The Maximum Segment option can be made valid for TCP transmission or
TCP re-transmission.
The data reception side must check the length of received data before
processing the message.

1 - 16 1 - 16
1 OVERVIEW
MELSEC-Q

(2) UDP (User Datagram Protocol)


This protocol may not guarantee data credibility and reliability in a communication
between a personal computer/work station and the programmable controller that
are connected via network. Thus, even if the data does not reach the target
node, it will not be retransmitted.
• Because it is connectionless, high-speed transmission is possible.
• A check sum is used to increase the reliability of the communication data.
However, when greater reliability must be maintained, a user application or the
TCP should be utilized.

(3) IP (Internet Protocol)


• Communication data is sent and received in datagram format.
• Communication data can be divided and reassembled.
• Routing option is not supported.

(4) ARP (Address Resolution Protocol)


• This protocol is used to get the Ethernet physical addresses from the IP
addresses.

(5) ICMP (Internet Control Message Protocol)


• This protocol is used to exchange errors occurred on an IP network and
various information related to the network.
• Provides a function to transmit IP error messages.
• See Appendix for information regarding the option support type (ICMP
protocol).

(6) FTP (File Transfer Protocol)


• This protocol is used to transfer files.
• Can upload and download programmable controller CPU files.

(7) DNS (Domain Name System)


• This system translates IP addresses to names that are easy to remember by
the user.

(8) SMTP (Simple Mail Transfer Protocol)


• This protocol transfers mails.

(9) POP3 (Post Office Protocol Ver. 3)


• This protocol transfers mails received by a mail server to a local computer.

(10) HTTP (Hyper Text Transfer Protcol)


• This protocol is used to perform data communication for world wide web of the
internet.

1 - 17 1 - 17
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2 SYSTEM CONFIGURATIONS

This section explains the system configurations that may be combined with the
Ethernet modules.

2.1 Applicable Systems


2
This section describes the applicable systems.

(1) Applicable modules and base units, and No. of modules


(a) When mounted with a CPU module
The table below shows the CPU modules and base units applicable to the
Ethernet module and quantities for each CPU model.
Depending on the combination with other modules or the number of
mounted modules, power supply capacity may be insufficient.
Pay attention to the power supply capacity before mounting modules, and if
the power supply capacity is insufficient, change the combination of the
modules.
*2
Applicable CPU module *1 Base unit
No. of mountable
CPU type CPU model Main base unit Extension base unit
Q00JCPU
Basic model QCPU Q00CPU 1
Q01CPU
Q02CPU
Q02HCPU
High Performance
Q06HCPU 4
model QCPU
Q12HCPU
Q25HCPU
Q02PHCPU
Q06PHCPU
Process CPU 4
Q12PHCPU
Q25PHCPU
Programmable Q12PRHCPU *3
Redundant CPU 4
controller CPU Q25PRHCPU
Q02UCPU 2
Q03UDCPU
Q04UDHCPU
Q06UDHCPU
Q13UDHCPU
Universal model
Q26UDHCPU
QCPU 4
Q03UDECPU
Q04UDEHCPU
Q06UDEHCPU
Q13UDEHCPU
Q26UDEHCPU
*4
Safety CPU QS001CPU 1
Q06CCPU-V
C Controller module N/A
Q06CCPU-V-B
: Applicable, : N/A
*1 Limited within the range of I/O points for the CPU module.
*2 Can be installed to any I/O slot of a base unit.
*3 Indicates the number of modules that can be used for one of two systems.
Use an Ethernet module of function version D or later.
*4 Connection of extension base units is not available with any safety CPU.

2-1 2-1
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(b) Mounting to a MELSECNET/H remote I/O station


The table below shows the network modules and base units applicable to
the Ethernet module and quantities for each network module model.
Depending on the combination with other modules or the number of
mounted modules, power supply capacity may be insufficient.
Pay attention to the power supply capacity before mounting modules, and if
2 the power supply capacity is insufficient, change the combination of the
modules.
Base unit*2
*1
Applicable network module No. of mountable Main base unit of remote Extension base unit of
I/O station remote I/O station
QJ72LP25-25
QJ72LP25G *3
4
QJ72LP25GE
QJ72BR15
: Applicable, : N/A
*1 Limited within the range of I/O points for the network module.
*2 Can be installed to any I/O slot of a base unit.
*3 Use an Ethernet module of function version B or later.

REMARKS
The Basic model QCPU module or C Controller module cannot create the
MELSECNET/H remote I/O network.

(2) Support of the multiple CPU system


When using the Ethernet module in a multiple CPU system, refer to the QCPU
User’s Manual (Multiple CPU System) first.
(a) Applicable Ethernet module
When using the Ethernet module in a multiple CPU system, use the
Ethernet module of function version B or later.

(b) Network parameter


Perform Write to PLC of network parameters only to the control CPU of the
Ethernet module.

2-2 2-2
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(3) Supported software packages


(a) Software for programmable controller ( 1)
The following table shows the systems and software packages applicable to
the Ethernet module.
When using the Ethernet module, GX Developer is required.
Software version
GX Developer
Single CPU system Version 7 or later
Q00J/Q00/Q01CPU
Multiple CPU system Version 8 or later
Q02/Q02H/Q06H/ Single CPU system Version 4 or later
Q12H/Q25HCPU Multiple CPU system Version 6 or later
Single CPU system
Q02PH/Q06PHCPU Version 8.68W or later
Multiple CPU system
Single CPU system
Q12PH/Q25PHCPU Version 7.10L or later
Multiple CPU system
Redundant system
(When mounted on main Version 8.18U or later
base unit)
Q12PRH/Q25PRHCPU
Redundant system
(When mounted on Version 8.45X or later
extension base unit)
Q02U/Q03UD/Q04UDH/ Single CPU system
Version 8.48A or later
Q06UDHCPU Multiple CPU system
Single CPU system
Q13UDH/Q26UDHCPU Version 8.62Q or later
Multiple CPU system
Q03UDE/Q04UDEH/ Single CPU system
Q06UDEH/Q13UDEH/ Version 8.68W or later
Q26UDEHCPU Multiple CPU system
QS001CPU Single CPU system Version 8.65T or later
When installing to MELSECNET/H remote I/O station Version 6 or later

1 Refer to Section 2.7 for the GX Developer versions that support the
additional functions of the improved Ethernet module.
(b) Communication support tool for external devices
Item name Model Remarks
Active X control library.
MX Component SWnD5C-ACT-E 1)
The “n” in the model name is 0 or greater. (

1 Depending on the version of MX Component used, different versions of


Ethernet modules are supported.
Refer to the manual of MX Component for the details.

2-3 2-3
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.2 Devices Required for Network Configuration

This section explains the devices that are required to configure a network.
Network installation work requires sufficient safeguard; ask a network specialist for
installation.
(1) When configuring an Ethernet system with a QJ71E71-100
When connecting a QJ71E71-100 to a network, either a 10BASE-T or 100BASE-
TX can be used.
The Ethernet module detects whether it is 10BASE-T or 100BASE-TX, and the
full-duplex or half-duplex transmission mode according to the hub.
For connection to the hub without the auto detection function, set the half-duplex
mode on the hub side.
(a) Connection using the 100BASE-TX
Hub
Twisted pair cable Up to 2 levels are allowed
for cascade connection

External device

E
7
1

Use devices that satisfy the standards of IEEE802.3 and 100BASE-TX.


(About the devices under the hub in the illustration above)
• Shielded twisted pair cable (STP), category 5 or higher
Straight cables can be used.
(Correct operation is not guaranteed if a crossed cable is used to connect to
an external device via the 100BASE-TX of the Ethernet module. However, it
is possible to use crossed cables to connect two Ethernet modules (i.e., two
QJ71E71-100 modules) for data communication or to connect an Ethernet
module to a GOT.)
• RJ45 jacks
• 100Mbps hub
POINT
During the high-speed communication (100 M bps) via 100BASE-TX connection, a
communication error may occur due to the effect of high frequency noise from
devices other than programmable controller in a given installation environment.
The following describes countermeasures on the QJ71E71-100 side to prevent the
effect of high frequency noise for construction of a network system.
(1) Wiring connection
• Do not bundle the twisted pair cables with the main circuit and power wires,
and do not install them close to each other.
• Make sure to place the twisted pair cables in a duct.
(2) Communication method
• Data communication with an external device is performed using TCP/IP
communication.
• Increase the number of communication retries as necessary.
(3) 10 M bps communication
• Communication is performed at a data transmission rate of 10 M bps by
changing the connection hub for the QJ71E71-100 to a hub capable of
handling 10 M bps.

2-4 2-4
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(b) Connection using the 10BASE-T

Hub
Twisted pair cable Up to 4 levels are allowed
for cascade connection

External device

E
7
1

Use devices that satisfy the standards of IEEE802.3 and 10BASE-T.


(About the devices under the hub in the illustration above)
• Unshielded twisted pair cable (UTP) or shielded twisted pair cable (STP),
category 3,4,5.
Straight cables can be used.
(Correct operation is not guaranteed if a crossed cable is used to connect to
an external device via the 10BASE-T of the Ethernet module. However, it is
possible to use crossed cables to connect two Ethernet modules (i.e., two
QJ71E71-100 modules) for data communication or to connect an Ethernet
module to a GOT.)
• RJ45 jacks
• 10Mbps hub

2-5 2-5
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(2) When configuring the Ethernet system with a QJ71E71-B5


(a) Connecting using the 10BASE5

N-type terminator Coaxial cable for 10BASE5 Transceiver

AUI cable

External device

E
7
1
DC
Power
supply

1) Use a 10BASE5 coaxial cable, an N-type terminator, a transceiver, and


an AUI cable (transceiver cable) that meet the Ethernet standards.
2) Use a transceiver with SQE TEST (Signal Quality Error TEST) or a
heart beat function.
3) Use a DC power supply (power supply for transceiver) that meets the
specifications of the transceiver and the AUI cable. (Refer to
REMARKS.)

REMARKS
The transceiver power characteristics are as follows:
• Input terminal voltage: 12 V-6% to 15 V+5%
• AUI cable direct resistance: 40 Ω/km or less, maximum length 50 m (164 ft.)
• Maximum current consumption: 500 mA or less
Thus, the applicable transceiver supply power will be from 13.28 V to 15.75 V.
Calculation of the transceiver supply power's voltage drop (V)
Voltage drop (V) = AUI cable direct current resistance (Ω/m)
AUI cable length (m) 2 (both directions) transceiver
consumption current (A)
(Example)
2.0 (V) = 0.04 (Ω/m) 50 (m) 2 0.5 (A)
In this case, the recommended transceiver supply power is more than 13.28 V.
-6%
13.28 (V) = 12 V (11.28 V) + 2.0 (V)

2-6 2-6
2 SYSTEM CONFIGURATIONS
MELSEC-Q

POINT
(1) Consult a network specialist for required devices.
(2) The following can be used as a countermeasure for errors due to high-
frequency noise according to the installation environment.
• Mount a ferrite core using the method shown in (3) below.
• Increase the retry number when communicating by TCP/IP.
(3) Use the following method to mount a ferrite core when connected to the
network by 10BASE5.
(Mounting the ferrite core)
Mount the ferrite core ( 1) to the Ethernet module side and the external
device side/the transceiver side for AUI cable.
1 ZCAT 2032-0930 manufactured by TDK Corporation is usable.
QJ71E71-B5

AUI cable

Coaxial cable for 10BASE5


Ferrite core

Transceiver

2-7 2-7
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(3) When configuring the Ethernet system with a QJ71E71-B2

(a) Connecting using the 10BASE2

RG58A/U coaxial cable T-Type connector


Terminator or RG58C/U coaxial cable

External device

E
7
1

Use devices that meet the standards of IEEE802.3 and 10BASE2.


• RG58A/U or RG58C/U (coaxial cable 50 )
• BNC-type Terminator (product equivalent to 221629-4 manufactured
by Tyco Electronics AMP K. K.)
• T-shaped adapter (product equivalent to UG-274/U(15)
manufactured by Hirose Electric Co., Ltd.)

POINT
Consult a network specialist for required devices.

2-8 2-8
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.3 For Use in Multiple CPU System

This section describes the use of the Ethernet module in a multiple CPU system.

(1) When making access from the external device to the non-control CPU of the
Ethernet module using any of the following functions, use the Ethernet module of
function version B or later.
When the Ethernet module of function version A is used, only the control CPU
can be accessed. (Access to the non-control CPU will result in an error.)
• Communication using MC protocol
• Communication using GX Developer
• File transfer (FTP server) function
External device
Communication using MC protocol
Communication using GX Developer
File transfer (FTP server) function

Ethernet

Multiple CPU system

Ethernet module of function


version B or later

2-9 2-9
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(2) When the other station at the access destination is in a multiple CPU system and
access is to be made to the non-control CPU of the relayed module of the
accessed station, use the modules of function version B or later as the relayed
modules and QCPUs of the local station and all the relayed and accessed
stations. 1
(Example)
Other station access is enabled independently of whether the control CPUs
of the relayed modules are the same or different.

Local station
External device

1) 2) 3) 4) 1 2 1' Communication using GX Developer


Communication using MC protocol
Setting from
GX Developer Ethernet
CC-Link IE
controller network
Relayed station 1) : QCPU No. 1
2) : QCPU No. 2
1) 2) 3) 4) 2 2 3) : QCPU No. 3
4) : QCPU No. 4
1 : Relayed module controlled by QCPU No. 1
CC-Link IE 1' : Ethernet module controlled by QCPU No. 1
controller network
Accessed station 2 : Relayed module controlled by QCPU No. 2

Relayed module: CC-Link IE controller network module


1) 2) 3) 4) 2

1 The targets of the relayed modules for other station access are as follows.
• CC-Link IE controller network, MELSECNET/H, MELSECNET/10 network
modules
• Q series C24 • Ethernet module

2 - 10 2 - 10
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.4 For Use with Basic Model QCPU or Safety CPU

This section describes the use of the Ethernet module with the Basic Model QCPU or
Safety CPU.

(1) Available functions


The following functions are available when the Ethernet module is mounted on
the main base unit of the Basic Model QCPU or Safety CPU.
Availability
Function Basic Model
Safety CPU
QCPU
Communication using the MC protocol ( 1) ( 1)
Communication using the fixed buffer ( 4)

Reception processing by an interrupt program ( 3)


Communication using the random access buffer
Sending/receiving of e-mail ( 3)
Communication using the data link instruction ( 2) ( 2)
( 3)
Reception processing by an interrupt program
File transfer (FTP server function)
Communication using the Web function
CC-Link IE controller network, MELSECNET/H,
MELSECNET/10 relay communication
Router relay communication (Router relay function)
External device existence confirmation
Pairing open communication
Communication via automatic open UDP port
Simultaneous broadcast
Support for the QCPU remote password function ( 3)
Setting the Ethernet parameters through GX Developer
Access to QCPU with GX Developer (TCP/IP or UDP/IP)
: Available : Available with restriction : Unavailable

1 For the number of its processing time, refer to the Reference Manual.
The devices that can be accessed and its range are different according to
the frame used for data communication.
2 When the target station of the SREAD/SWRITE instruction is the Basic
Model QCPU or Safety CPU, the read reporting device to the target station
set to the argument (D3) is ignored.
The operation of the SREAD/SWRITE instruction is the same as that of the
READ/WRITE instruction.
For the SREAD/SWRITE instruction, refer to Chapter 4 or Chapter 6 of the
User's Manual (Application).
3 Available for the Basic Model QCPU (function version B) or later.
To use the function, GX Developer Version 8 or later is required.
4 Connections No.1 to No.8 only can be specified. If the specified value is out
of range, an OPERATION ERROR (error code: 4101) occurs.

2 - 11 2 - 11
2 SYSTEM CONFIGURATIONS
MELSEC-Q

REMARKS
(1) For the MC protocol that can be used for safety CPUs, refer to the reference
manual.
(2) For dedicated instructions available for safety CPUs, refer to Section 3.5.
For dedicated instruction programming, refer to the QSCPU User’s Manual
(Function Explanation, Program Fundamentals).

2 - 12 2 - 12
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.5 For Use with Redundant CPUs

This section describes the use of the Ethernet module with Redundant CPUs.

2.5.1 When mounting on main base unit

(1) System configuration


The configuration of a redundant system is shown below.
(a) Basic configuration of redundant system
The basic system configuration of the redundant system is shown below.
Access can be made from the external device to the control
system/standby system of the redundant system.
(Refer to Section 5.11 when configuring a network with the redundant
system.)

External device LAN card


Network No. :1
Station No. :3
IP address : 10.97.14.3
Sub-net mask : 255.255.255.0

Ethernet

Control system Standby system

Tracking cable
QJ71E71-100 1) QJ71E71-100 2)
Network No. : 1 Network No. : 1
Station No. : 1 Station No. : 2
IP address : 10.97.14.1 IP address : 10.97.14.2
Sub-net mask : 255.255.255.0 Sub-net mask : 255.255.255.0

2 - 13 2 - 13
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(b) System configuration with communication path backed up 1


The following shows a system configuration having a pair of communication
paths (backed up) that connect the external device and Ethernet module.
Access can be made from the external device to the control
system/standby system of the redundant system in the communication path
1 or communication path 2.
(Example) If a communication error occurs during access to the control
system in the communication path 1, access can be made to the
control system in the communication path 2. 2
Further, if a communication error occurs in the communication
path 2, system switching is performed between the control
system and standby system, and communication can be
continued to the new control system. 3
LAN card 1) LAN card 2)
Network No. : 1 External device Network No. : 2
Station No. : 3 Station No. : 3
IP address : 10.97.14.3 IP address : 10.97.24.3
Sub-net mask : 255.255.255.0 Sub-net mask : 255.255.255.0

Ethernet Ethernet
network No. 1 network No. 2

: Communication path 1
Control system Standby system
: Communication path 2

Tracking cable
QJ71E71-100 1) QJ71E71-100 4)
2 2
Network No. : 1 Network No. : 2
Station No. : 1 Grouped Grouped Station No. : 2
IP address : 10.97.14.1 IP address : 10.97.24.2
Sub-net mask : 255.255.255.0 Sub-net mask : 255.255.255.0

QJ71E71-100 2) QJ71E71-100 3)
Network No. : 2 Network No. : 1
Station No. : 1 Station No. : 2
IP address : 10.97.24.1 IP address : 10.97.14.2
Sub-net mask : 255.255.255.0 Sub-net mask : 255.255.255.0

1 When using two LAN cards in the external device, use them at different
sub-net addresses to the set IP address using the sub-net mask.
2 Perform "Network module redundant group settings" on GX Developer.
(Refer to the QnPRHCPU User's Manual (Redundant System) for "Network
module redundant group settings ".)
The system switches when both of the grouped Ethernet modules become
faulty.
3 Make the redundant setting of GX Developer to set whether a system
switching request will be issued or not from the Ethernet module at
detection of a communication error or disconnection. (Refer to Section
5.11.3.)

2 - 14 2 - 14
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(2) Available functions


The following functions are available when the Ethernet module is mounted on
the main base unit of Redundant CPUs.
Function Availability
Communication using the MC protocol
Communication using the fixed buffer
Communication using the random access buffer
Sending/receiving of e-mail
Communication using the data link instruction
File transfer (FTP server function)
Communication using the Web function
CC-Link IE controller network, MELSECNET/H,
MELSECNET/10 relay communication
Router relay communication (Router relay function)
External device existence confirmation
Pairing open communication
Communication via automatic open UDP port
Simultaneous broadcast
Support for the QCPU remote password function
Setting the Ethernet parameters through GX Developer
Access to QCPU with GX Developer (TCP/IP or UDP/IP)
: Available : Available with restriction ( 1) : Unavailable

1 Refer to Section 5.11.5 for the precautions for using the functions on
Redundant CPUs.

2 - 15 2 - 15
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.5.2 When mounting on extension base unit

(1) System configuration


The following shows the system configuration of the redundant system.
Control system Standby system

Tracking cable

Extension cable QJ71E71-100


Network No. : 1
Station No. : 1
IP address : 10.97.14.1
Sub-net mask : 255.255.255.0

Ethernet

LAN card
Network No. : 1
Station No. : 2
IP address : 10.97.14.2
Sub-net mask : 255.255.255.0

External device

POINT
To continue the communication even when the Ethernet module has a
communication error or when the cable is disconnected, mount the Ethernet
module on the main base unit. (Refer to Section 2.5.1)
When mounting on the extension base unit, communication cannot be continued by
the system switching, since the Ethernet module does not issue the system
switching request.

(2) Available functions


For details, refer to QnPRHCPU User's Manual (Redundant System) "Section
6.2.3 Ethernet''.

(3) Dedicated instructions


The dedicated instructions are not applicable.
When using the dedicated instructions, mount the Ethernet module on the main
base unit. (Refer to Section 2.5.1)

2 - 16 2 - 16
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(4) Restrictions on communication via module mounted on the


extension base unit
There are restrictions as shown below.
• The access destination (control system CPU or standby system CPU, or
system A CPU and system B CPU) that can be specified varies depending on
each command in MC protocol.
• When the system switching occurs during communication by the MC protocol
or dedicated instructions, the communication timeout may occur.
For details, refer to QnPRHCPU User's Manual (Redundant System) "Appendix 7
Cautions on Communications Made via Module on Extension Base Unit".

2 - 17 2 - 17
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.6 For Use at MELSECNET/H Remote I/O Station

This section describes the use of the Ethernet module at a MELSECNET/H remote I/O
station.
When using the Ethernet module with the QCPU, it is not necessary to read this
section.

(1) System configuration


(Example)

(Remote master station) (Remote I/O station)


QJ71 QJ72
QJ71
QCPU LP21 LP25
E71
-25 -25

MELSECNET/H External device


Remote I/O network

QJ72
LP25
-25
(Remote I/O station)

(2) Available functions


The following functions are available when the Ethernet module is mounted on
the MELSECNET/H remote I/O station.
Function Availability

Initial processing Sequence program


GX Developer parameter setting (See (3) (4))
Open/close Sequence program
processing GX Developer parameter setting (See (3) (4))
Communication using the MC protocol ( 1)
Communication using the fixed buffer
Communication using the random access buffer
Sending/receiving of e-mail
Communication using data link instruction (Can be relayed)
File transfer (FTP server)
Communication using the web function
CC-Link IE controller network, MELSECNET/H,
MELSECNET/10 relay communication
Router relay communication (Router relay function)
External device existence confirmation
Pairing open communication
Communication while the automatic open UDP port
Simultaneous broadcast
Support for the QCPU remote password function ( 2)
Setting the Ethernet parameters through GX Developer (See (3))
Access to QCPU with GX Developer (TCP/IP or UDP/IP)
: Available : Unarailable

1 The following explains access made to the MELSECNET/H remote I/O station
using the MC protocol and other station access via the MELSECNET/H remote
I/O station.
(a) Perform communication using a QnA compatible 3E frame. (Communication
cannot be done with the A compatible 1E frame.)
2 - 18 2 - 18
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(b) The following functions are available for the MELSECNET/H remote I/O
station. For the QnA/A series compatible MELSECNET/10 remote I/O
station, only read/write of the intelligent function module buffer memory can
be performed.
Available function Function
Read/write of device memory Batch read, batch write
Random read, test (random write)
Monitor data registration, monitor
Multiple-block batch read, multiple-block batch write
Read/write of buffer memory Read/write of Ethernet module buffer memory
Read/write of intelligent Read/write of specified intelligent function module buffer memory
function module buffer memory

(c) The following devices of the MELSECNET/H remote I/O station are
accessible by read/write of the device memory.
See the Reference Manual for a detailed explanation.
Device name Device symbol Device name Device symbol
Special relay SM Link relay B
Special register SD Data register D
Input relay X Link register W
Output relay Y Link special relay SB
Internal relay M Link special register SW

(d) Other station access via the MELSECNET/H remote I/O station enables
access to the MELSECNET/H remote master station and access to the
MELSECNET/H remote I/O station.
1) In the following figure, access can be made from the external device to
the MELSECNET/H remote master station and to the MELSECNET/H
remote I/O station.

QJ71 QJ72
station
(Remote master station) QCPU LP21 LP25 QJ71 Access allowed
-25 -3 -25 E71 Access prohibited

External device
MELSECNET/H
Remote I/O net

QJ72 QJ72
station QJ71 station QJ71 QJ71
LP25 LP25 (Remote I/O station)
-1 E71 -2 E71 E71
-25 -25

2) Other station access via the following MELSECNET/H remote I/O


stations cannot be made.
• Other station access from the MELSECNET/H remote master station
via the Ethernet module mounted on the MELSECNET/H remote I/O
station. (Station 1 in the above figure)
• Other station access via between the Ethernet modules. (Station 2 in
the above figure)

2 This function is available for the MELSECNET/H remote I/O station of function
version D and later.
GX Developer Version 8.18U or later is required to use the function.
2 - 19 2 - 19
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(3) Setting parameters for the Ethernet module through GX Developer


The following parameters should be set through GX Developer in order to use
the Ethernet module mounted on MELSECNET/H remote I/O station.
The setting can be made in the same way as when setting the parameters for the
Ethernet module mounted on a QCPU station. See Section 4.5 and later.
See the operating manual for GX Developer for how to display each setting
screen.
(Parameter setting items for the Ethernet module mounted on MELSECNET/H
remote I/O station)
Parameter setting item Setting Remarks
Setting not
I/O assignment Set the module mounting information.
required
Network Parameters Setting the
Perform settings to allow the Ethernet module to be used as a network
number of Ethernet/CC IE/
module.
MELSECNET Cards
Operational settings Perform settings for items common to Ethernet modules.
Initial settings Set timer values for data communication.

Open settings Perform settings relating to open/close processing for connections.
Router relay parameter Perform settings when communicating using routing relays.
Perform settings when communicating via the CC-Link IE controller network,
Station No. <-> IP information
MELSECNET/H, MELSECNET/10.
Remote password settings Perform settings for the remote password.

POINT
(1) Connect GX Developer to MELSECNET/H remote I/O station and use it to set
the parameters.

(2) Always set the "Network parameters setting the number of Ethernet/CC IE/
MELSECNET cards" and "Operational settings."

(3) Reset MELSECNET/H remote I/O station after changing the setting.

REMARKS
It is not necessary to set the “Intelligent function module switch settings” with GX
Developer’s I/O assignment.
Each type of setting corresponding to the switch settings is performed in the above
mentioned “Operational settings,” “Initial settings, “ and “Open settings.”

2 - 20 2 - 20
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(4) Data communication procedure


(a) Connect GX Developer to MELSECNET/H remote I/O station and perform
the following settings:
1) Communicating with TCP/IP
• Select "Always wait for OPEN" for the "Initial Timing" under the
"Operational Settings."
• Select "Unpassive or Full passive" for the "Open system" setting
under "Open settings."
2) Communicating with UDP/IP (when using the user port)
Select "Always wait for OPEN" for the "Initial Timing" under the
"Operational Settings."
Data communication can also be done using the automatic open UDP
port for the Ethernet module.

(b) Start up MELSECNET/H remote I/O station.

(c) Perform the open processing.


1) When communicating using TCP/IP, always perform "Active open"
from the external device. (The status of the Ethernet module side is
"Wait for open" because of "Passive open.")
2) When communicating using UDP/IP, perform the open processing on
the external device side. (The status of the Ethernet module side is
"Data communication enabled" through internal processing.)

(d) Perform data communication.

(e) After completing data communication, perform the close processing.


1) When communicating using TCP/IP, always perform the close
processing from the external device. (The Ethernet module side
performs the close processing at a request from the external device
and its status becomes able to receive another open request.)
2) When communicating using UDP/IP, perform the close processing for
the external device. (The close processing on the Ethernet module
side is not required.)

2 - 21 2 - 21
2 SYSTEM CONFIGURATIONS
MELSEC-Q

2.7 Checking the Function Version and Serial No.


This section explains the function version, serial No. and how to check them for related
products that can use functions added through improvements in the Ethernet module.

(1) Compatibility with related products designed for using functions


added to the Ethernet module
Version of Ethernet module Version of related product
Added function
QJ71E71-100 QJ71E71-B5 QJ71E71-B2 CPU module GX Developer
Function version B or
Support for IEEE802.3 frames later, whose first 5 digits of Version 7 or later
the serial No. are 03102
Re-initial processing Function version B or
using sequence Function version B or later, whose first 5 digits of
programs later, whose first 5 the serial No. are 03061
Re-initial Re-initial processing via digits of the serial No. Function version B or
processing of dedicated instruction are 03102 later, whose first 5 digits of
the Ethernet (UINI instruction) the serial No. are 03102
module Function version B or
Function version B or
TCP Maximum Segment later, whose first 5
later, whose first 5 digits of
split transmission digits of the serial No.
the serial No. are 05051
are 05051
Function version B or
Function version B or
Re-open processing of the Ethernet later, whose first 5
later, whose first 5 digits of
module ( 1) digits of the serial No.
the serial No. are 05051
are 05051
Function version B or
Function version B or
Existence later, whose first 5 Version 8.05F or
Checking by KeepAlive later, whose first 5 digits of
check function digits of the serial No. later
the serial No. are 05051
are 05051
Function version B or
Connection of up to 17 MELSOFT Version 6.05F or
later, whose first 5 digits of
products via TCP/IP communication later
the serial No. are 02122
Simplifying Simplifying access to
Function version B or
connection other stations Function version B or
later, whose first 5
with later, whose first 5 digits of
Access with the same digits of the serial No.
MELSOFT the serial No. are 05051
station number are 05051
products
Monitoring of various Function version
Ethernet
Ethernet module statuses A or later, whose
diagnostic Version 6 or later
PING test/loopback test Function version B or later first 5 digits of the
function of GX
via Ethernet board serial No. are
Developer
PING test via CPU 02092 Version 7 or later
Function version D or
Hub connection status monitor function
later
Sending files in CSV
Function version B or later Version 6 or later
format as attachment
Function version B or
Sending main text later, whose first 5 digits of Version 7 or later
the serial No. are 03102
Function version B or
When using Function version B or
Support for later, whose first 5
the e-mail later, whose first 5 digits of
encoding/decoding digits of the serial No.
function the serial No. are 03102
are 03102
Sending character Function version D or Function version D
strings in the e-mail’s Function version D or
later, whose first 5 or later, whose first Version 8.27D or
main text by the later, whose first 5 digits of
digits of the serial No. 5 digits of the serial later.
programmable controller the serial No. are 07082.
are 07082. No. are 07082.
CPU monitoring function
Universal model
Specification of station No.65 to 120 of Function version D or QCPU of function
data link instruction later, whose first 5 version B or later
(For accessing to CC-Link IE controller digits of the serial No. whose first 5
network) are 09042. digits of serial No.
are 09042
: Available (no restrictions on version) : Unavailable
(Continues on the next page)

2 - 22 2 - 22
2 SYSTEM CONFIGURATIONS
MELSEC-Q

Version of Ethernet module Version of related product


Added function
QJ71E71-100 QJ71E71-B5 QJ71E71-B2 CPU module GX Developer
Target station CPU type specification for Function version D or Function version D
Function version D or later
data link instructions later or later
Function version D or Function version D
Increased data length of data link Function version D or
later, whose first 5 or later, whose first
instructions later, whose first 5 digits of
digits of the serial No. 5 digits of the serial
(From 480 to 960 words) the serial No. are 07082.
are 07082. No. are 07082.
Function version B or
Multiple CPU system compatibility of file Function version
later, whose first 5 digits of
transfer (FTP server) function B or later
the serial No. are 03102
Function version D or Function version D
Function version D or
Communication by MC protocol later, whose first 5 or later, whose first
later, whose first 5 digits of
Compatible with the 4E frame digits of the serial No. 5 digits of the serial
the serial No. are 07082.
are 07082. No. are 07082.
Universal model
Communication by MC protocol
Function version D or QCPU of function
Access to link direct device LW10000 or
later, whose first 5 version B or later
higher
digits of the serial No. whose first 5
(4E frame and QnA compatible 3E frame
are 09042. digits of serial No.
only)
are 09042
Communication by MC protocol Universal model
Access to extended data register D65536 Function version D or QCPU of function
or higher or extended link register W10000 later, whose first 5 version B or later
or higher digits of the serial No. whose first 5
(4E frame and QnA compatible 3E frame are 09042. digits of serial No.
only) are 09042
Function version B or
Communication using the Web function later, whose first 5 digits of
the serial No. are 05051
Function version
A or later, whose
Remote password check Function version B or later first 5 digits of the Version 6 or later
serial No. are
02092
: Available (no restrictions on version) : Unavailable

1 Change was made to the operation of the Ethernet module to be performed when the Active open request is
received again from the external device in the open completion status of TCP. (Refer to POINT in Section 5.6 (2).)

2 - 23 2 - 23
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(2) Checking the function version and serial No. of the Q series
programmable controller
The serial No. and function version of the Ethernet module can be confirmed on
the rating plate and GX Developer's system monitor.

(a) Confirming the serial number on the rating plate


The rating plate is situated on the side face of the Ethernet module.

Serial No. (first 5 digits)


Function version
09042 D

Relevant regulation standards

(b) Checking on the front of the module


The serial No. on the rating plate is also indicated on the front of the
module (lower part).

100915000000000-D

Serial No.

REMARKS
Serial No. labelling on the front of the module was started from August in 2008.
Note that, however, some of the modules manufactured around the time of change
may not have the serial No. label attached.

2 - 24 2 - 24
2 SYSTEM CONFIGURATIONS
MELSEC-Q

(C) Confirming the serial number on the system monitor (Product Information
List)
To display the screen for checking the serial number and function version,
select [Diagnostics] [System monitor] and click the Product Inf. List
button in GX Developer.
Function version
Serial No. Production number

1) Production number display


Since the Ethernet module does not support the production number
display, "-" is displayed.

POINT
The serial No. described on the rated plate and the front of the module may not
match with the serial No. displayed on the product information list of GX Developer.
• The serial No. on the rated plate and the front of the module describes the
management information of the product.
• The serial No. displayed on the product information list of GX Developer
describes the function information of the product.
The function information of the product is updated when adding functions.

2 - 25 2 - 25
3 SPECIFICATIONS
MELSEC-Q

3 SPECIFICATIONS

This section explains the Ethernet module performance specifications and


transmission specifications.
For more details on the general specifications, refer to the User's Manual for the QCPU
(Q mode).

3.1 Performance Specifications

The following explains the performance specifications of the Ethernet module.


3 Specification
Item QJ71E71-100 QJ71E71-B5 QJ71E71-B2
100BASE-TX 10BASE-T 10BASE5 10BASE2
100 M bps (Full-
Data transmission speed 10 M bps (Half-duplex)
duplex/Half-duplex)
Transmission method Base band
Transmission Maximum node-to-node distance — 2500 m (8202.10 ft.) 925 m (3034.77 ft.)
100 m (328.08 ft.) ( 1)
specifications Maximum segment length 500 m (1640.42 ft.) 185 m (606.96 ft.)
Cascade connection Cascade connection
Maximum number of nodes/connection 100 units/segment 30 units/segment
Maximum 2 stages Maximum 4 stages
Interval between the minimum nodes — 2.5 m (8.20 ft.) 0.5 m (1.64 ft.)
Number of simultaneously open
16 connections (Connections usable by the sequence program)
connections allowed
Transmission data Fixed buffer 1 k words × 16
storage memory Random access buffer 6 k words × 1
Attached file 6 k words × 1 ( 4)
E-mail
Main text 960 words × 1 ( 4)

Number of I/O points occupied 32 points/1 slot (I/O assignment: intelligent)


0.60 A ( 3)
5 V DC internal current consumption 0.50 A 0.50 A
( 2)
12 V DC external power supply capacity (Transceiver) — —
External dimensions 98 (3.86 in.) (H) × 27.4 (1.08 in.) (W) × 90 (3.54 in.) (D) [mm]
0.13 kg (0.29 Ib) ( 3)
Weight 0.11 kg (0.24 Ib) 0.12 kg (0.26 Ib)

1 Length between the Hub and nobe.


2 It is necessary to apply a transceiver, or a device that meets AUI cable
specifications. (Refer to Section 2.2)
3 The product with first 5 digits of serial number "05049" or earlier is different as
follows:
y 5V DC internal current consumption: 0.70A
y Weight: 0.14kg (0.31lb.)
4 The following table outlines the specifications of the e-mail transmission and
reception function.
The e-mail transmission and reception function of the programmable controller
CPU and the random access buffer communication function cannot be used
together; only one of the functions can be used at a time. (The e-mail transmitting
function of the Ethernet module's programmable controller CPU monitoring
function and the random access buffer communication function can be used
together.)

3-1 3-1
3 SPECIFICATIONS
MELSEC-Q

Item Specification
Attached file 6 k words x 1
Data size
Main text 960 words x 1
When sending: Sends either a file as attachment or main text (select one).
Data transfer method
When receiving: Received a file as attachment.
Subject Us-ASCII format or ISO-2022-JP (Base64)
Attached file format MIME format
MIME Version 1.0
Binary/ASCII/CSV can be selected.
Data of attached file format File name: XXXX.bin (binary), XXXX.asc (ASCII), XXXX.csv (CSV)
(CSV: Comma Separated Value)
Cannot be divided (only one file can be sent/received)
Transmission Division of attached file * If any divided files are received, only the first file will be received and the remaining files will be
specifications discarded.
Transmission
and reception
Subject : Base64/7 bits 3
When sending (encode) Main text : 7 bits
data Attached file : Base64
Subject : (Does not decode)
Main text : (Cannot be received)
When receiving (decode) Attached file : Base64/7 bits/8 bits/Quoted Printable
* If e-mail is sent from the external device to the programmable controller side, specify the encoding
method (Base64/7 bits/8 bits/Quoted Printable) of the attached file.
Encryption No
Compression No
SMTP (sending server) Port number = 25
Communication with mail server
POP3 (receiving server) Port number = 110
®
Microsoft Corporation Internet Explorer 5.0 (Outlook Express 5.5/Outlook Express 5)
Operation check mailer
Netscape® Communications Corporation Netscape® 4.05

REMARKS
The following explains each of the transmission specification items.

[Connecting using the 10BASE2/10BASE5] [Connecting using the 10BASE-T/100BASE-TX]


Segment length
Hub
Node Transciver
Maxmum
Maxmum 100m(5m) 100m Up to 4 (2) levels are
Terminator
allowed for cascade
connection.
Repeater Repeater
Segment length

Segment length

Node Node
Maxumum
node-to-node E
distance 7
1
Node Node

* There is no transceiver when connecting using the 10BASE2. The item in parentheses ( ) indicates when a connection is
established using a 100BASE-TX.

3-2 3-2
3 SPECIFICATIONS
MELSEC-Q

3.2 Data Codes for Communication

This section explains the data codes used in the communication between the Ethernet
module and the external device or the programmable controller CPU.

(1) The data codes used while communicating are listed below.

1) Ethernet module External device


Data can be communicated by selecting either binary code or ASCII
code in the data code setting of GX Developer, as shown below.
The switching between binary code and ASCII code is set using GX
Developer:
[GX Developer] - [Network parameter] - [Operational settings] -
[Communication data code]
For more details, see the Section 4.7 "Operational Settings."

Communication data code


Data communication function Reference chapter
Binary code ASCII code
1
Automatic open UDP port ( ) —
Communication using MC protocol Chapter 6
User open port
Procedure exist Chapter 7
Communication using fixed buffer 1
No procedure ( ) — Chapter 8
Communication using random access buffer Chapter 9

: Selectable : Cannot be communicated

1 Communication is performed in binary code regardless of the setting in [Operational Settings] – [Communication
data code] (see Section 4.7).

REMARKS
When the following data communication functions are used, communication is
performed using the data code handled by each function, regardless of the setting of
the communication data code.
• Sending/receiving e-mail
• CC-Link IE controller network, MELSECNET/H, MELSECNET/10 relay
communication
• Communication using data link instructions
• File transfer (FTP server function)
• Communication using the Web function

3-3 3-3
3 SPECIFICATIONS
MELSEC-Q

2) Ethernet module Programmable controller CPU


Data is sent and received in binary code.

Ethernet module

Binary code
Communi-
Programmable cation
Binary code External
controller data
device
CPU storage
area ASCII code
BIN/ASCII conversion

(2) When communicating using ASCII code, 1-byte binary code data is automatically
converted into 2-byte ASCII code data and then transmitted.
(Example)
Binary code data ASCII code data
31 H , 35 H
15 H "1", "5"
(One byte) (Two bytes)

31 H , 32 H , 33 H , 34 H
1234 H
"1", "2", "3", "4"
(Two bytes)
(Four bytes)

(3) The size of data that can be communicated between the Ethernet module and an
external device at a time is determined by the function used and the data code
(binary/ASCII) that is set by selecting [GX Developer] – [Communication data
code].
The following shows the maximum sizes of communication data that can be sent
and received at a time with each data communication function.
Data communication function Exchangeable data size
The maximum number of point that can be designated with
Communication using MC protocol
each command/instruction : Maximum of 1920 bytes
Procedure exist 1017 words (Binary code) 508 words (ASCII code)
Communication using fixed buffer
No procedure 2046 words
Communication using random access buffer 1017 words (Binary code) 508 words (ASCII code)
Attached file : Maximum of 6 k words,
Sending/receiving by e-mail
Main text : Maximum of 960 bytes
CC-Link IE controller network, MELSECNET/H,
480 words
MELSECNET/10 relay communication
The maximum number of point that can be designated with
Communication using data link instruction
each command/instruction : Maximum of 960 words
File transfer (FTP server function) Maximum of one file
The maximum number of point that can be designated with
Communication using web function
each command/instruction : Maximum 1920 bytes.

3-4 3-4
3 SPECIFICATIONS
MELSEC-Q

3.3 Relationship between the External Devices and Additional Functions for Each
Communication Function

This section explains with which external devices data communication can be
performed and which additional functions can be used for each function.

(1) Communicability with external devices using various functions


The following table lists the communicability with external devices using various
functions.
External device
Personal computer Personal computer QJ71E71 QJ71E71 Conventional model
Function
↓ ↑ ↓ ↑ ↓ ↓
QJ71E71 QJ71E71 QJ71E71 Conventional model QJ71E71
Communication using the MC protocol
Communication using the fixed buffer
Communication using the random access
buffer
Sending/receiving e-mail
Communication using data link ( 1)
instructions
File transfer (FTP server function)
Communication using the Web function
: Can communicate : Can communicate (with restrictions) : Cannot communicate
QJ71E71: Q Series Ethernet interface module
Conventional model: QnA or A Series Ethernet interface module
1 Communication can be performed with the QnA Series Ethernet interface
module.

(2) Relationship with additional functions


The following table lists the correspondence between functions and their
additional functions that can be used.
Communication
Additional function
method
CC-Link IE
Router relay
controller network, Existence
Communication function communic- Communication Communication Remote
MELSECNET/H, check of Simultaneous
ation (router via pairing via automatic password TCP/IP UDP/IP
MELSECNET/10 external broadcast
relay open open UDP port check
relay device
function)
communication
Communic- QnA
ation using compatible ( 2) ( 1)
the MC 3E frame
protocol 4E frame
A
compatible
1E frame
Communic- Procedure
ation using exist
the fixed No ( 1)
buffer procedure
Communication using the
random access buffer
Sending/receiving e-mail
Communication using
data link instructions
File transfer
(FTP server function)
Communication using the
Web function
: Available : Not available or this function does not correspond to any of the functions in the function column.

1 Valid only for UDP.


2 The automatic open UDP port is excluded.
3-5 3-5
3 SPECIFICATIONS
MELSEC-Q

3.4 Ethernet Module Function List

This section shows a list of Ethernet module functions.

(1) Basic functions of the Ethernet module


The Ethernet module can perform the communications shown in the table below
via the TCP/IP or UDP/IP communication.
Function Description Reference section
4E frame
QnA compatible
Communication using Reads/writes programmable controller CPU data from/to an Chapter 5
3E frame
the MC protocol external device. Reference Manual
A compatible 1E
frame
Procedure exist Sends/receives arbitrary data between the programmable Chapter 7
Communication using
controller CPU and the external device using the fixed buffer of
the fixed buffer No procedure Chapter 8
the Ethernet module.
Communication using the random access Reads/writes data from multiple external devices to the random
Chapter 9
buffer access buffer of the Ethernet module.
Sends/receives data via e-mail.
• Sending/receiving by the programmable controller CPU Chapter 2 of User’s
Sending/receiving e-mail
• Sending by the programmable controller CPU monitoring Manual (Application)
function (automatic notification function)
Reads/writes the programmable controller CPU data of other Chapter 4 of User’s
Communication using data link instructions
station via Ethernet using data link instructions. Manual (Application)
Reads/writes in file units using the FTP command from the Chapter 5 of User’s
File transfer (FTP server function)
external device. Manual (Application)
Reads/writes the programmable controller CPU data via the User’s Manual
Communication using the Web function
Internet using a commercially available Web browser. (Web Function)

(2) Additional functions of the Ethernet module


The following table lists the additional functions of the Ethernet module that can
be used.
Function Description Reference section
In a network system on which an Ethernet and a CC-Link IE
CC-Link IE controller network, controller network, MELSECNET/H or MELSECNET/10 coexist
Chapter 3 of User’s
MELSECNET/H, MELSECNET/10 relay or in a network system that relays multiple Ethernets, data
Manual (Application)
communication communication is performed via multiple number of such
networks.
Performs data communication via a router or gateway. (The
Router relay communication
router relay function is not a function by which the Ethernet Section 5.3
(router relay function)
module works as a router.)
Existence check of external device Checks whether or not the external device is working normally Sections 5.2.2 and
(Existence check function) after a connection is established (open processing). 5.5
Pairs and then opens a reception connection and a transmission
Communication via pairing open Section 5.7
connection (for fixed buffer).
Enables communication after the station in which an Ethernet
Communication via automatic open UDP
module is mounted has been started. (Open/close processing by Section 5.8
port
sequence programs is not required.)
Remote password check Prevents unauthorized access by a remote user to a QCPU. Section 5.9
Sends/receives data for all external devices on the same
Simultaneous broadcast Ethernet as for the Ethernet module in data communication via Section 8.5
UDP/IP. (Simulatianeous broadcast)
MELSOFT products (GX Developer, MX Component etc.) and
Connecting MELSOFT products (GX Section 1.2 (6)
GOTs are connected via TCP/IP communication or UDP/IP
Developer, MX Component etc.) and Manual of each
communication. It is also possible to connect multiple MELSOFT
GOTs MELSOFT product
products and GOTs simultaneously.

3-6 3-6
3 SPECIFICATIONS
MELSEC-Q

(3) Status check of the Ethernet module


Whether the Ethernet module is working normally and whether it can
communicate normally are checked.
Function Description Reference section
Checks the Ethernet module’s sending/receiving function and line
Self refrain test Section 4.8.1
connection status.
Hardware test Tests the RAM and ROM of the Ethernet module. Section 4.8.2
When a data communication error occurs, this function stores the error
information (error log), including the message subheader and IP
Communication error storage Chapter 11
address of the external device for a maximum of 16 pairs in the buffer
memory.

3-7 3-7
3 SPECIFICATIONS
MELSEC-Q

3.5 Dedicated Instruction List

The following table lists the dedicated instructions that can be used by the Ethernet
module.

Application Instruction name Description Reference section


3
For opening and closing a OPEN Opens a connection. Section 10.8
3
connections CLOSE Closes a connection. Section 10.5
For reinitialization UINI Reinitializes the Ethernet module. Section 10.9
3
BUFRCV Reads data received in the fixed buffer. Section 10.2
Reads data received in the fixed buffer
BUFRCVS 1 Section 10.3
For fixed buffer communication using an interrupt program.
Sends data to the external device using the
BUFSND 3 Section 10.4
fixed buffer.
Clears the error (turns off the [COM. ERR.]
For reading and clearing error ERRCLR Section 10.6
LED, clears the error log).
information
ERRRD Reads error information. Section 10.7
1 Section 6.2 of User’s
MRECV Receives e-mail.
For sending and receiving Manual (Application)
e-mail 1 Section 6.3 of User’s
MSEND Sends e-mail.
Manual (Application)
Section 6.4 of User’s
READ Reads word devices of other stations.
Manual (Application)
Reads word devices of other stations Section 6.10 of User’s
SREAD
(with complete device). Manual (Application)
2 Section 6.12 of User’s
For reading/ WRITE Writes to word devices of other stations.
Manual (Application)
writing device
Writes to word devices of other stations Section 6.11 of User’s
data SWRITE 2
For (with complete device). Manual (Application)
communications 1 Section 6.13 of User’s
ZNRD Reads word devices of other stations.
with Manual (Application)
programmable 1 Section 6.14 of User’s
ZNWR Writes word devices of other stations.
controller CPU of Manual (Application)
another station 1 Section 6.9 of User’s
For sending/ SEND Sends data to other stations.
(instructions for Manual (Application)
receiving
data link) Reads data received from other stations Section 6.5 of User’s
messages RECV 1
(for main program). Manual (Application)
(arbitrary
Reads data received from other stations Section 6.6 of User’s
data) RECVS 1
(for interrupt programs). Manual (Application)
Reading/ Runs/stops other stations in remote Section 6.7 of User’s
1
writing clock mode. Manual (Application)
REQ
data, remote Reads/writes the clock data of other Section 6.8 of User’s
2
RUN/STOP stations. Manual (Application)
1 If the source or target station is a safety CPU, it cannot be used.
2 Writing to a safety CPU is not allowed from other stations.
3 For safety CPUs, connections No.1 to No.8 only can be specified. If the specified value is out of range, an
OPERATION ERROR (error code: 4101) occurs.

3-8 3-8
3 SPECIFICATIONS
MELSEC-Q

3.6 List of GX Developer Setting Items for Ethernet Modules

The following table lists the parameter setting items that are set using GX Developer.
Function and parameter setting requirement ( 1) Refer-
ence
Parameter setting item Description of setting Data Automatic section
MC Fixed Random FTP Mail Web
link notification ( 2)
PLC parameter — — —
Set the module mount information.
I/O assignment Section
This is set when an Ethernet module is
settings 4.5
used in a multiple CPU system.
Set the relationship between the
control number (SI) on the Ethernet
Interrupt pointer Section
module side and the interrupt pointer — — — — — —-
settings 7.3
used on the programmable controller
CPU side.
Network parameters
Setting the number of Perform settings for using the Ethernet Section
Ethernet/CC IE/ module as a network module. 4.6
MELSECNET cards
Set the common items of the modules.
Operational Section
These settings are required for initial
settings 4.7
processing.
Set the data communication timer Section
values. 5.2
Chapter
Initial settings
2 of
Set the DNS server’s IP address. — — — — — —
Applicati-
on
Set up the open processing for
connection in order to perform data Section
Open settings — — — — —
communication with the external 5.5
device.
Router relay Section
Set the router relay of Ethernet.
parameter 5.3
Perform settings so that Ethernet can
be treated equivalent to a CC-Link IE
Chapter 3
controller network, MELSECNET/H or
Station No. <-> IP of
MELSECNET/10 network system in — — — — —
information Applicati-
order to communicate with
on
programmable controllers of other
stations.
Chapter
5 of
FTP parameters Perform settings for file transfer (FTP). — — — — — — —
Applicati-
on
Perform settings for sending/receiving
E-mail settings e-mail and for using the automatic — — — — — — Chapter 2
notification function. of
Send mail Applicati-
Set the destination mail address. — — — — — —
address setting on
News setting Set the notification conditions. — — — — — — —
Set the control number (SI) on the
Ethernet module side when requesting Section
Interrupt settings — — — — — —
an interrupt to the programmable 7.3
controller CPU.
Section
Redundant setting Perform settings for using the Ethernet
5.11.3
module in the main base unit of the — — — — — — — —
Section
Group settings redundant system.
4.6
Perform settings of the relay station so
that Ethernet can be treated equivalent
Chapter 3
to a CC-Link IE controller network,
Routing of
MELSECNET/H or MELSECNET/10 — — — — —
parameters Applicati-
network system in order to
on
communicate with programmable
controllers of other stations.
Remote password Set the target connection of the remote Section
— —
settings password check. 5.9.5
: Must be set when the applicable function is used. : Set as needed : Setting is not required.

3-9 3-9
3 SPECIFICATIONS
MELSEC-Q

1 The meanings of the abbreviations used in the table above are as follows:
MC: Communication using the MC protocol
Random: Communication using the random access buffer
FTP: File transfer protocol
Mail: E-mail
Fixed: Communication using the fixed buffer
Data link: Communication using data link instructions
Automatic notification: Data transmission via automatic notification
Web: Communication using the Web function
2 “Application” in the Reference Section column refers to the User’s Manual (Application).

3 - 10 3 - 10
3 SPECIFICATIONS
MELSEC-Q

3.7 List of Input/Output Signals to/from the Programmable Controller CPU

This section explains the input/output signals of the Ethernet module.


The following I/O signal assignment is based on the case where the start I/O No. of the
Ethernet module is "0000" (installed to slot 0 of the main base unit).
Device numbers starting with X indicate input signals from the Ethernet module to the
programmable controller CPU.
Device numbers starting with Y indicate output signals from the programmable
controller CPU to the Ethernet module.
The following shows the input/output signals to/from the programmable controller CPU.
Signal direction: Ethernet module Programmable controller CPU Signal direction: Programmable controller CPU Ethernet module
Device Reference Device Reference
Signal name Signal name
number section number section
Connection No. 1
For fixed buffer communication of connection No. 1
ON : At sending request or reception complete
X0 ON : Sending normal completion or reception completion Y0
confirmation signal
OFF:
OFF:
Connection No. 2
For fixed buffer communication of connection No. 1
ON : At sending request or reception complete
X1 ON: Detection of sending error or reception error Y1
confirmation signal
OFF:
OFF:
Connection No. 3
For fixed buffer communication of connection No. 2
ON : At sending request or reception complete
X2 ON : Sending normal completion or reception completion Y2
confirmation signal
OFF:
OFF:
Connection No. 4
For fixed buffer communication of connection No. 2
ON : At sending request or reception complete
X3 ON: Detection of sending error or reception error Y3
confirmation signal
OFF:
OFF:
Connection No. 5
For fixed buffer communication of connection No. 3
ON : At sending request or reception complete
X4 ON : Sending normal completion or reception completion Y4
confirmation signal
OFF:
OFF:
Connection No. 6
For fixed buffer communication of connection No. 3
ON : At sending request or reception complete
X5 ON: Detection of sending error or reception error Y5
confirmation signal
OFF:
OFF:
Connection No. 7
For fixed buffer communication of connection No. 4
ON : At sending request or reception complete
X6 ON : Sending normal completion or reception completion Y6
confirmation signal
OFF:
OFF:
Connection No. 8
For fixed buffer communication of connection No. 4
ON : At sending request or reception complete
X7 ON: Detection of sending error or reception error Y7
confirmation signal
OFF:
OFF:
For fixed buffer communication of connection No. 5 Connection No. 1
X8 ON : Sending normal completion or reception completion Y8 ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 5 Connection No. 2
X9 ON: Detection of sending error or reception error Y9 ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 6 Connection No. 3
XA ON : Sending normal completion or reception completion YA ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 6 Connection No. 4
XB ON: Detection of sending error or reception error YB ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 7 Connection No. 5
XC ON : Sending normal completion or reception completion YC ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 7 Connection No. 6
XD ON: Detection of sending error or reception error YD ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 8 Connection No. 7
XE ON : Sending normal completion or reception completion YE ON : Open request
OFF: OFF:
For fixed buffer communication of connection No. 8 Connection No. 8
XF ON: Detection of sending error or reception error YF ON : Open request
OFF: OFF:

3 - 11 3 - 11
3 SPECIFICATIONS
MELSEC-Q

Signal direction: Ethernet module Programmable controller CPU Signal direction: Programmable controller CPU Ethernet module
Device Reference Device Reference
Signal name Signal name
number section number section
Open completed for connection No. 1
X10 ON : Open complete signal Y10
OFF:
Open completed for connection No. 2
X11 ON : Open complete signal Y11
OFF:
Open completed for connection No. 3
X12 ON : Open complete signal Y12
OFF:
Open completed for connection No. 4
X13 ON : Open complete signal Y13 Use prohibited
OFF:
Open completed for connection No. 5
X14 ON : Open complete signal Y14
OFF:
Open completed for connection No. 6
X15 ON : Open complete signal Y15
OFF:
Open completed for connection No. 7
X16 ON : Open complete signal Y16
OFF:
Open completed for connection No. 8 COM.ERR.LED Off request
Section
X17 ON : Open complete signal Y17 ON : At off request
11.1
OFF: OFF:
Open abnormal detection signal
Section
X18 ON : Abnormal detection Y18 Use prohibited
5.6
OFF:
Initial normal completion signal Initial request signal
Section
X19 ON : Normal completion Y19 ON : At request
5.1
OFF: OFF:
Initial abnormal completion signal
Section
X1A ON : Abnormal completion Y1A
5.1
OFF:
X1B Use prohibited Y1B
COM.ERR.LED lit confirmation
Section
X1C ON : Lit (See Section 11.1) Y1C
11.1 Use prohibited
OFF: Off
X1D Y1D
Use prohibited
X1E Y1E
Watchdog timer error detection
Section
X1F ON : Watchdog timer error Y1F
11.1
OFF:

Important
Among the input/output signals for the programmable controller CPU, do not output
(ON) the signals marked with "Use prohibited." If any of the "Use prohibited" signals
is output, the programmable controller system may malfunction.

POINT
(1) The input/output signals shown in this section are used when the QnA series
Ethernet interface module programs are also used for the Q series Ethernet
module (see Section 2 in Appendix).
In the QCPU, the input/output signals for intelligent function modules are
turned on/off with dedicated instructions.
It is not necessary to turn on/off the signals by a sequence program, except
for those that are shown in the programming examples in each of function
explanation sections.

(2) When the QnA series Ethernet interface module programs are also used for
the Q series Ethernet module, it is also recommended to replace the
instructions with the dedicated instructions shown in the corresponding
function explanation section of each manual for the Q series Ethernet module.

3 - 12 3 - 12
3 SPECIFICATIONS
MELSEC-Q

3.8 List of Applications and Assignments of the Buffer Memory

This section explains details of the buffer memory.

(1) Configuration of the buffer memory


Buffer memory consists of a user area and a system area, as listed below.

(a) User areas


1) The areas where the user writes/reads data.
2) A user area consists of a parameter area for initial processing and
data communication, an area for data communication, and an area for
storing communication status and communication error data.
3) Reading/writing data to the user area should be performed according
to the instructions in the corresponding detailed explanation section.
Data communication may take long if continually executed; therefore,
execute only when needed.

(b) System areas


The areas used by the Ethernet module

Important
Do not write data in the "system areas" of the buffer memory.
If data is written to any of the system areas, the programmable controller system
may not be operated properly.
Some of the user areas contain partially system areas. Care must be taken when
reading/writing to the buffer memory.

POINT
(1) Use the FROM/TO instructions or other applicable commands to access the
buffer memory addresses shown in this section when the QnA series
Ethernet module programs are used for the Q series Ethernet module (see
Section 2 in Appendix).
In the QCPU, the buffer memory of an intelligent function module is accessed
by dedicated instructions.
It is not necessary to access directly using the FROM/TO or other instructions
from the sequence program, except when accessing the buffer memory as
shown in the programming examples in each of function explanation sections.

(2) When the QnA series Ethernet module programs are used for the Q series
Ethernet module, it is also recommended to replace the instructions with the
dedicated instructions shown in the corresponding function explanation
section of each manual for the Q series Ethernet module.

3 - 13 3 - 13
3 SPECIFICATIONS
MELSEC-Q

(2) Assignments of the buffer memory


A buffer memory consists of 16 bits per address.

<Bit configuration diagram>

The following shows the buffer memory addresses.

Address GX Developer
Reference
Initial value setting
Decimal Application Name section
(Hexadecimal) applicability
(Hexadecimal) ( 2)
( 1)
0 to 1
Local station Ethernet module IP address C00001FEH Section 4.7
(0 to 1H)
2 to 3
System area
(2 to 3H)
Special function settings
• Router relay function (b5, b4) Section 5.3
00: Do not use (default)
01: Use
• Conversion system setting for CC-Link IE controller network, Chapter 3 of
MELSECNET/H, MELSECNET/10 relay function (b7, b6) Application
4 00: Automatic response system (default)
01: IP address computation system 0100H
(4H)
10: Table exchange system
11: Use-together system
• FTP function setting (b9, b8)
00: Do not use Chapter 5 of
01: Use (default) Application
Bits other than above are reserved for system use.
5 to 10
System area
(5 to A H)
Initial processing
11 TCP ULP timer value
parameter setting 3CH (60)
(BH) Setting time = setting value × 500 ms
area
12 TCP zero window timer value
14H (20)
(CH) Setting time = setting value × 500 ms
13 TCP resend timer value
14H (20)
(DH) Setting time = setting value × 500 ms
14 TCP end timer value
28H (40)
(EH) Setting time = setting value × 500 ms
15 IP assembly timer value
Monitoring timer AH (10) Section 5.2
(FH) Setting time = setting value × 500 ms
16 Response monitoring timer value
3CH (60)
(10H) Setting time = setting value × 500 ms
17 Destination existence confirmation starting interval
4B0H (1200)
(11H) Setting time = setting value × 500 ms
18 Destination existence confirmation interval timer
14H (20)
(12H) Setting time = setting value × 500 ms
19
Destination existence confirmation resend timer 3H (3)
(13H)
20
Automatic open UDP port number 1388H Section 5.8
(14H)
21 to 29
System area
(15 to 1DH)

(Continues on the next page)


1 Setting from GX Developer allowed/prohibited
: Setting allowed : Setting prohibited
2 "Application" in the reference section column refers to the User’s Manual (Application).

3 - 14 3 - 14
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
TCP Maximum Segment Transmission setting area
TCP Maximum 0H : Enable TCP Maximum Segment Size Option
30 Segment transmission
8000H
(1EH) Transmission 8000H: Disable TCP Maximum Segment Size Option
setting area transmission
• Re-initialization makes the set value effective.
Communication condition setting (Operational
Settings) area
• Communication data code setting (b1)
0: Communication in binary code
1: Communication in ASCII code
• TCP Existence confirmation setting (b4)
0: Use the Ping
Initial processing 1: Use the KeepAlive
parameter setting • Send frame setting (b5) Section
area (For 0: Ethernet frame 5.2.3
Communication
reinitialization) 1: IEEE 802.3 frame
condition setting
31 • Setting of write enable/disable at RUN time (b6)
area 0H
(1FH) 0: Disable
(Operational
1: Enable
Settings)
• Initial timing setting (b8)
0: Do not wait for OPEN (communication
impossible at STOP time)
1: Always wait for OPEN (communication
possible at STOP time)
• Re-initial specification (b15)
0: Re-initial processing complete (reset by the
system)
1: Re-initial processing request (set by the user)
Bits other than above are reserved for system use.
Connection No. 1
• Usage of fixed buffer (b0)
0: For sending or fixed buffer communication
is not executed
1: For receiving
• Destination existence confirmation (b1)
0: No confirm
1: Confirm
• Pairing open (b7)
0: No pairs
32 1: Pairs
0H Section 5.5
(20H) • Communication method (protocol) (b8)
0: TCP/IP
Communication Connection
1: UDP/IP
parameter setting usage setting
• Fixed buffer communication (b9)
area area
0: Procedure exist
1: No procedure
• Open system (b15, b14)
00: Active open or UDP/IP
10: Unpassive open
11: Fullpassive open
Bits other than above are reserved for system use.
33 Connection No. 2
(Same as connection No.1)
(21H) (bit configuration is the same as connection No.1)
34 Connection No.3
(Same as connection No.1)
(22H) (bit configuration is the same as connection No.1)
35 Connection No.4
(Same as connection No.1)
(23H) (bit configuration is the same as connection No.1)

(Continues on the next page)

3 - 15 3 - 15
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
36 Connection No.5
(Same as connection No.1)
(24H) (bit configuration is the same as connection No.1)
37 Connection No.6
(Same as connection No.1)
(25H) (bit configuration is the same as connection No.1)
38 Connection No.7
(Same as connection No.1)
(26H) (bit configuration is the same as connection No.1)
39 Connection No.8
(Same as connection No.1)
(27H) (bit configuration is the same as connection No.1)
40
Local station Port No. 0H Section 5.5
(28H)
41 to 42
Destination IP address 0H Section 5.5
(29 to 2AH) Connection
43 No. 1
Destination Port No. 0H Section 5.5
(2BH)
Communication
44 to 46
Communication address setting Destination Ethernet address FFFFFFFFFFFFH
(2C to 2EH)
parameters area
47 to 53 Connection
setting area (Same as connection No. 1)
(2F to 35H) No. 2
54 to 60 Connection
(Same as connection No. 1)
(36 to 3CH) No. 3
61 to 67 Connection
(Same as connection No. 1)
(3D to 43H) No. 4
68 to 74 Connection
(Same as connection No. 1)
(44 to 4AH) No. 5
75 to 81 Connection
(Same as connection No. 1)
(4B to 51H) No. 6
82 to 88 Connection
(Same as connection No. 1)
(52 to 58H) No. 7
89 to 95 Connection
(Same as connection No. 1)
(59 to 5FH) No. 8
96 to 102
System area
(60 to 66H)
103 to 104
System area
(67 to 68H)
105
Initial error code 0H Section 11.3
(69H)
106 to 107
Local station IP address 0H
(6A to 6BH)
108 to 110
Local station Ethernet address 0H
(6C to 6EH)
Communication
111 to 115
status storage System area
(6F to 73H) Area for initial
area
116 processing
Automatic open UDP port number 0H
(74H)
117
System area
(75H)
118
Local station network number/station number 0H
(76H)
119
Local station group number 0H
(77H)

(Continues on the next page)

3 - 16 3 - 16
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
120
Local station Port No. 0H
(78H)
121 to 122
Destination IP address 0H
(79 to 7AH)
123
Destination Port No. 0H
(7BH)
124
Open error code 0H Section 11.3
(7CH)
125 Connection
Fixed buffer sending error code 0H Section 11.3
(7DH) No. 1
126
Connection end code 0H Section 11.3
(7EH)
127
Maximum value 0H
(7FH)
Fixed buffer
128
communication Minimum value 0H
(80H) Connection
time
129 information area
Current value 0H
(81H)
130 to 139 Connection
(Same as connection No. 1)
(82 to 8BH) No. 2
140 to 149 Connection
(Same as connection No. 1)
(8C to 95H) No. 3
150 to 159 Connection
(Same as connection No. 1)
(96 to 9FH) No. 4
160 to 169 Connection
(Same as connection No. 1)
(A0 to A9H) No. 5
170 to 179 Connection
(Same as connection No. 1)
(AA to B3H) No. 6
180 to 189 Connection
(Same as connection No. 1)
(B4 to BDH) No. 7
190 to 199 Connection
(Same as connection No. 1)
(BE to C7H) Communication No. 8
status storage LED on/off status
area (Stores the on/off status of the LEDs on the front of
the Ethernet module)
• [INIT.] LED (b0)
0: off
1: on (initial processing completed)
• [OPEN] LED (b1)
0: off
200
1: on (connection open processing completed) 0H
(C8H)
• [ERR.] LED (b3)
0: off
1: on (setting error)
• [COM.ERR.] LED (b4)
0: off
1: on (communication error)

Area for module Bits other than above are reserved for system use.
status Hub connection status area
• Communication mode (b9)
0: Half duplex
1: Full duplex
• Hub connection status (b10)
201 0: Hub not connected/disconnected
0H Section 5.10
(C9H) 1: Hub connected
• Data transmission speed (b14)
0: Operating at 10BASE-T
1: Operating at 100BASE-TX

Bits other than above are reserved for system use.


• Switch status (operational mode setting)
0: Online
202
1: Offline 0H Section 4.6
(CAH)
2: Self refrain test
3: Hardware test (H/W test)

(Continues on the next page)

3 - 17 3 - 17
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
Status of settings with GX Developer
• Communication data code setting (b1)
0: Communication in binary code
1: Communication in ASCII code
• Initial/open method setting (b2)
0: No parameter setting
(start up according to the sequence
program)
1: Parameter setting
(start up according to the parameters)
• TCP Existence confirmation setting (b4)
0: Use the Ping
203 Module status 1: Use the KeepAlive
0H Section 4.7
(CBH) area • Send frame setting (b5)
0: Ethernet frame
1: IEEE802.3 frame
• Setting of write enable/disable at RUN time (b6)
0: Disable
1: Enable
Communication • Initial timing setting (b8)
status storage 0: Do not wait for OPEN
area (Communications impossible at STOP time)
1: Always wait for OPEN
(Communication possible at STOP time)

Bits other than above are reserved for system use.


204
System area
(CCH)
205 Chapter 4 of
RECV instruction execution request 0H
(CDH) Application
206
System area
(CEH) Area for
207 sending/ Chapter 4 of
ZNRD instruction 0H
(CFH) receiving Application
208 instructions
System area
(D0H) Data link instruction
209 execution result Chapter 4 of
ZNWR instruction 0H
(D1H) Application
210 to 223
System area
(D2 to DFH)

(Continues on the next page)

3 - 18 3 - 18
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
224 to 226
System area
(E0 to E2H)
227
Number of error occurrence
(E3H)
0H Section 11.3
228
Error log write pointer
(E4H)
229
Error code/end code
(E5H)
230
Subheader
(E6H)
231
Command code
(E7H)
232
Connection No. 0H Section 11.3
(E8H) Error log
233 block 1
Local station Port No.
(E9H)
234 to 235
Destination IP address
(EA to EBH)
236
Destination Port No.
(ECH)
237
System area
(EDH)
238 to 246 Error log
(Same as error log block 1)
(EE to F6H) block 2
247 to 255 Error log
(Same as error log block 1)
(F7 to FFH) block 3
256 to 264 Error log
Error log area (Same as error log block 1)
(100 to 108H) block 4
265 to 273 Error log block Error log
(Same as error log block 1)
(109 to 111H) area block 5
274 to 282 Error log
(Same as error log block 1)
(112 to 11AH) block 6
283 to 291 Error log
(Same as error log block 1)
(11B to 123H) block 7
292 to 300 Error log
(Same as error log block 1)
(124 to 12CH) block 8
301 to 309 Error log
(Same as error log block 1)
(12D to 135H) block 9
310 to 318 Error log
(Same as error log block 1)
(136 to 13EH) block 10
319 to 327 Error log
(Same as error log block 1)
(13F to 147H) block 11
328 to 336 Error log
(Same as error log block 1)
(148 to 150H) block 12
337 to 345 Error log
(Same as error log block 1)
(151 to 159H) block 13
346 to 354 Error log
(Same as error log block 1)
(15A to 162H) block 14
355 to 363 Error log
(Same as error log block 1)
(163 to 16BH) block 15
364 to 372 Error log
(Same as error log block 1)
(16C to 174H) block 16
373 to 375
(175 to 177H) System area

(Continues on the next page)

3 - 19 3 - 19
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
376 to 377
Received IP packet count
(178 to 179H)
378 to 379 Received IP packet count discarded
0H Section 11.3
(17A to 17BH) due to sum check error
380 to 381
Sent IP packet total count
(17C to 17DH)
IP
382 to 397
System area
(17E to 18DH)
398 to 399 Simultaneous transmission error Section 11.4
0H
(18E to 18FH) detection count POINT (3)
400 to 407
System area
(190 to 197H)
408 to 409
Received ICMP packet count
(198 to 199H)
410 to 411 Received ICMP packet count
(19A to 19BH) discarded due to sum check error
412 to 413
Sent ICMP packet total count
(19C to 19DH)
414 to 415 Echo request total count of received
0H
(19E to 19FH) ICMP packets
ICMP
416 to 417 Echo reply total count of sent ICMP
(1A0 to 1A1H) packets
418 to 419 Echo request total count of sent ICMP
(1A2 to 1A3H) packets
420 to 421 Echo reply total count of received
(1A4 to 1A5H) ICMP packets
422 to 439 Status for each
Error log area System area
(1A6 to 1B7H) protocol
440 to 441
Received TCP packet count
(1B8 to 1B9H)
442 to 443 Received TCP packet count discarded
0H
(1BA to 1BBH) due to sum check error
TCP —
444 to 445
Sent TCP packet total count
(1BC to 1BDH)
446 to 471
System area
(1BE to 1D7H)
472 to 473
Received UDP packet count
(1D8 to 1D9H)
474 to 475 Received UDP packet count discarded
0H
(1DA to 1DBH) due to sum check error
UDP
476 to 477
Sent UDP packet total count
(1DC to 1DDH)
478 to 481
System area
(1DE to 1E1H)
482 to 491
System area
(1E2 to 1EBH)
492 to 493
Framing error count 0H
(1EC to 1EDH)
494 to 495 Receiving
Overflow count 0H
(1EE to 1EFH) error
496 to 497
crc error count 0H
(1F0 to 1F1H)
498 to 511
System area
(1F2 to 1FFH)

(Continues on the next page)

3 - 20 3 - 20
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
512 to 513
Sub-net mask
(200 to 201H)
514 to 515
Default router IP address 0H Section 5.3
(202 to 203H)
516
Number of registered routers
(204H)
517 to 518
Sub-net address
(205 to 206H)
Router 1 0H Section 5.3
519 to 520
Router IP address
(207 to 208H)
521 to 524
Router 2 (Same as router 1)
(209 to 20CH)
Router relay
525 to 528
parameter Router 3 (Same as router 1)
(20D to 210H)
setting area
529 to 532
Router 4 (Same as router 1)
(211 to 214H)
533 to 536
Router 5 (Same as router 1)
(215 to 218H)
537 to 540
Router 6 (Same as router 1)
(219 to 21CH)
541 to 544
Router 7 (Same as router 1)
(21D to 220H)
545 to 548
Router 8 (Same as router 1)
(221 to 224H)
549
System area
(225H)
550 to 551
System area
(226 to 227H)
552
Number of conversion table data 0H
(228H)
553 to 554 Communication request destination/source stations
(229 to 22AH) network number and station number Chapter 3 of
Conversion 0H
555 to 556 Application
information External station Ethernet module IP address
(22B to 22CH)
number 1
557 to 558
Station No. System area
(22D to 22EH)
<-> IP information
Conversion
559 to 564 setting area
information (Same as conversion information No. 1)
(22F to 234H)
number 2
to to
Conversion
931 to 936
information (Same as conversion information No. 1)
(3A3 to 3A8H)
number 64
937 to 938 Net mask pattern for CC-Link IE controller network, MELSECNET/H, Chapter 3 of
0H
(3A9 to 3AAH) MELSECNET/10 routing Application
939 to 943
System area
(3AB to 3AFH)
944 to 949
FTP login name "QJ71E71"
(3B0 to 3B5H)
950 to 953
Password "QJ71E71"
(3B6 to 3B9H) Chapter 3 of
954 Application
FTP setting area Command input monitoring timer 708H
(3BAH)
955
Programmable controller CPU monitoring timer AH
(3BBH)
956 to 1663
System area
(3BC to 67FH)

(Continues on the next page)

3 - 21 3 - 21
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
1664
Data length
(680H) Fixed buffer Chapter 7,
0H
1665 to 2687 No. 1 Chapter 8
Fixed buffer data
(681 to A7FH)
2688 to 3711 Fixed buffer
(Same as fixed buffer No. 1)
(A80 to E7FH) No. 2
3712 to 4735 Fixed buffer
(Same as fixed buffer No. 1)
(E80 to 127FH) No. 3
4736 to 5759 Fixed buffer data Fixed buffer
(Same as fixed buffer No. 1)
(1280 to 167FH) area No. 4
5760 to 6783 Fixed buffer
(Same as fixed buffer No. 1)
(1680 to 1A7FH) No. 5
6784 to 7807 Fixed buffer
(Same as fixed buffer No. 1)
(1A80 to 1E7FH) No. 6
7808 to 8831 Fixed buffer
(Same as fixed buffer No. 1)
(1E80 to 227FH) No. 7
8832 to 9855 Fixed buffer
(Same as fixed buffer No. 1)
(2280 to 267FH) No. 8
Shared area for random access buffers and e-mail buffers
1) When communicating with the random access buffer, refer to
9856 to 16383 Shared area for
Chapter 9. 0H See the left
(2680 to 3FFFH) random access
2) When using the E-mail function, refer to Chapter 2 in the User’s
buffers and e-mail
Manual (Application).
buffers
16384 to 20479
System area
(4000 to 4FFFH)
Open complete signal
0: Open incomplete
1: Open completed
20480
• Connection No. 1 (b0) 0H Section 5.6
(5000H)
• Connection No. 2 (b1)
to
• Connection No. 16 (b15)
20481
Connection System area
(5001H)
status
Open request signal
information area
0: No open request
1: Open being requested
20482
• Connection No. 1 (b0) 0H Section 5.6
(5002H)
• Connection No. 2 (b1)
to
Connection status • Connection No. 16 (b15)
20483 to 20484 storage area
System area
(5003 to 5004H)
Fixed buffer reception status signal
0: Data not received
1: Data being received
20485 Fixed buffer
• Connection No. 1 (b0) 0H Chapter 7
(5005H) information area
• Connection No. 2 (b1)
to
• Connection No. 16 (b15)
Remote password status
0: Unlock status/no remote password setting
Remote 1: Lock status
20486
password status • Connection No. 1 (b0) 0H Section 5.9
(5006H)
storage area • Connection No. 2 (b1)
to
• Connection No. 16 (b15)

(Continues on the next page)

3 - 22 3 - 22
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
Remote password status
0: Unlock status/no remote password setting
Remote 1: Lock status
20487
password status • Automatic open UDP port (b0) 0H
(5007H)
storage area • GX Developer (UDP port) (b1)
• GX Developer (TCP port) (b2)
System port
• FTP port (b3) Section 5.9
information area
System port use prohibited designation
0: Use allowed
System port use
20488 1: Use prohibited
prohibited 0H
(5008H) • Automatic open UDP port (b0)
designation area
• GX Developer (UDP port) (b1)
• GX Developer (TCP port) (b2)
20489 to 20591
System area
(5009 to 506FH)
Remote password mismatch notification
accumulated count designation
20592
(For user open port) 1H
(5070H)
0: No designation
1 or higher: Notification accumulated count
Remote password mismatch notification
accumulated count designation
(For automatic open UDP port, GX Developer
20593
communication port (TCP, UDP) and FTP 2H
(5071H)
communication port)
0: No designation Section
1 or higher: Notification accumulated count 5.9.6
20594 Accumulated count of unlock process
(5072H) normal completion
20595 Accumulated count of unlock process
(5073H) abnormal completion
20596 Connection Accumulated count of lock process
0H
(5074H) No.1 normal completion
20597 Accumulated count of lock process
(5075H) Remote abnormal completion
Monitoring area
20598 password Accumulated count of lock process
(5076H) function based on close
20599 to 20603 monitoring area Connection
(Same as connection No.1)
(5077H to 507B H) No.2
20604 to 20608 Connection
(Same as connection No.1)
(507CH to 5080 H) No.3
20609 to 20613 Connection
(Same as connection No.1)
(5081H to 5085 H) No.4
20614 to 20618 Connection
(Same as connection No.1)
(5086H to 508A H) No.5
20619 to 20623 Connection
(Same as connection No.1)
(508BH to 508F H) No.6
20624 to 20628 Connection
(Same as connection No.1)
(5090H to 5094 H) No.7
20629 to 20633 Connection
(Same as connection No.1)
(5095H to 5099 H) No.8
20634 to 20638 Connection
(Same as connection No.1)
(509AH to 509E H) No.9
20639 to 20643 Connection
(Same as connection No.1)
(509FH to 50A3 H) No.10
20644 to 20648 Connection
(Same as connection No.1)
(50A4H to 50A8 H) No.11

(Continues on the next page)

3 - 23 3 - 23
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
20649 to 20653 Connection
(Same as connection No.1)
(50A9H to 50ADH) No.12
20654 to 20658 Connection
(Same as connection No.1)
(50AEH to 50B2H) No.13
20659 to 20663 Connection
(Same as connection No.1)
(50B3H to 50B7H) No.14
20664 to 20668 Connection
(Same as connection No.1)
(50B8H to 50BCH) No.15
20669 to 20673 Connection
(Same as connection No.1)
(50BDH to 50C1H) Remote No.16
password Automatic
20674 to 20678 Monitoring area
function open UDP (Same as connection No.1)
(50C2H to 50C6H)
monitoring area port
GX Developer
20679 to 20683
communication (Same as connection No.1)
(50C7H to 50CBH)
UDP port
GX Developer
20684 to 20688
communication (Same as connection No.1)
(50CCH to 50D0H)
TCP port
FTP
20689 to 20693
communication (Same as connection No.1)
(50D1H to 50D5H)
port
20694 to 20736
System area — — —
(50D6 H to 5100H)
20737
Error log pointer
(5101H)
20738
Log counter (HTTP response code 100 to 199)
(5102H)
20739
Log counter (HTTP response code 200 to 299)
(5103H)
0H Section 11.3
20740
Log counter (HTTP response code 300 to 399)
(5104H)
20741
Log counter (HTTP response code 400 to 499)
(5105H)
20742
Log counter (HTTP response code 500 to 599)
(5106H)
20743
System area — — —
(5107H)
20744 Status storage
HTTP response code
(5108H) area
20745 to 20746
Error log block 1 Destination IP address 0H Section 11.3
(5109 to 510AH)
20747 to 20750
Error time
(510B to 510EH)
20751 to 20757
Error log block 2 (Same as the error log block 1)
(510F to 5115H)
20758 to 20764
Error log block 3 (Same as the error log block 1)
(5116 to 511CH)
20765 to 20771
Error log block 4 (Same as the error log block 1)
(511D to 5123H)
20772 to 20778
Error log block 5 (Same as the error log block 1)
(5124 to 512AH)
20779 to 20785
Error log block 6 (Same as the error log block 1)
(512B to 5131H)
20786 to 20792
Error log block 7 (Same as the error log block 1)
(5132 to 5138H)

(Continues on the next page)

3 - 24 3 - 24
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
20793 to 20799
Error log block 8 (Same as the error log block 1)
(5139 to 513FH)
20800 to 20806
Error log block 9 (Same as the error log block 1)
(5140 to 5146H)
20807 to 20813 Error log block
(Same as the error log block 1)
(5147 to 514DH) 10
20814 to 20820 Error log block
(Same as the error log block 1)
(514E to 5154H) 11
20821 to 20827 Status storage Error log block
(Same as the error log block 1)
(5155 to 515BH) area 12
20828 to 20834 Error log block
(Same as the error log block 1)
(515C to 5162H) 13
20835 to 20841 Error log block
(Same as the error log block 1)
(5163 to 5169H) 14
20842 to 20848 Error log block
(Same as the error log block 1)
(516A to 5170H) 15
20849 to 20855 Error log block
(Same as the error log block 1)
(5171 to 5177H) 16
20856 to 20991
Use prohibited System area — — —
(5178 to 51FFH)
"Issue system switch in cable disconnection timeout"
20992
0: Not set 1H Section 5.11
(5200H)
"Issue system 1: Set
20993 switching request Cable disconnection timeout setting
4H Section 5.11
(5201H) at disconnection Set time = set value 500ms (setting range: 0 to 60)
20994 detection" status
System area — — —
(5202H) storage area
20995
Disconnection detection count 0H Section 5.10
(5203H)
20996 to 21007
Use prohibited System area — — —
(5204 to 520FH)
"System switching settings when communication error occurs"
(Connection for user)
0: Not set
21008 1: Set
0H Section 5.11
(5210H) • Connection No. 1 (b0)
• Connection No. 2 (b1)
"System
to
switching settings
• Connection No. 16 (b15)
when
"System switching settings when communication error occurs"
communication
(Connection for system)
error occurs"
0: Not set
status storage
1: Set
area
21009 • Auto open UDP port settings
0H Section 5.11
(5211H) • GX Developer (UDP port) (b1)
• GX Developer (TCP port) (b2)
• FTP port (b3)
• HTTP port (b4)
MELSOFT connection included
21010 to 22559
Use prohibited System area — — —
(5212 to 581FH)
22560
Local station Port No. 0H —
(5820H)
22561 to 22562
Communication Destination IP address 0H —
(5821 to 5822H) Connection Connection
status storage
22563 information area No. 9
area Destination Port No. 0H —
(5823H)
22564
Open error code 0H Section 11.3
(5824H)

(Continues on the next page)

3 - 25 3 - 25
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
22565
Fixed buffer sending error code 0H Section 11.3
(5825H)
22566
Connection end code 0H Section 11.3
(5826H)
22567 Connection
Maximum value 0H —
(5827H) No. 9
Fixed buffer
22568
communication Minimum value 0H —
(5828H)
time
22569
Current value 0H —
(5829H)
22570 to 22579 Connection
Communication (Same as connection No.9)
(582A to 5833H) Connection No. 10
status storage
22580 to 22589 information area Connection
area (Same as connection No.9)
(5834 to 583DH) No. 11
22590 to 22599 Connection
(Same as connection No.9)
(583E to 5847H) No. 12
22600 to 22609 Connection
(Same as connection No.9)
(5848 to 5851H) No. 13
22610 to 22619 Connection
(Same as connection No.9)
(5852 to 585BH) No. 14
22620 to 22629 Connection
(Same as connection No.9)
(585C to 5865H) No. 15
22630 to 22639 Connection
(Same as connection No.9)
(5866 to 586FH) No. 16
22640
Number of mails remaining on the server
(5870H)
22641
Dedicated instruction normal completion count
(5871H)
22642
Dedicated instruction abnormal completion count
(5872H)
22643
Normal receiving count
(5873H)
22644
Attached file receiving count 0H Section 11.3
(5874H)
22645
Server inquiry count
(5875H)
22646
Server communication error count
(5876H)
22647
Error log write count
(2877H)
22648 E-mail status
Receive Receiving error log write pointer
(5878H) storage area
22649
Error code
(5879H)
22650
Command code
(587AH)
22651 to 22658 Error log
From 0H Section 11.3
(587B to 5882H) block 1
22659 to 22662
Date
(5883 to 5886H)
22663 to 22692
Subject
(5887 to 58A4H)
22693 to 22736 Error log
(Same as error log block 1)
(58A5 to 58D0H) block 2
22737 to 22780 Error log
(Same as error log block 1)
(58D1 to 58FCH) block 3
22781 to 22824 Error log
(Same as error log block 1)
(58FD to 5928H) block 4

(Continues on the next page)

3 - 26 3 - 26
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
22825 to 22868 Error log
(Same as error log block 1)
(5929 to 5954H) block 5
22869 to 22912 Error log
(Same as error log block 1)
(5955 to 5980H) block 6
22913 to 22956 Error log
(Same as error log block 1)
(5981 to 59ACH) block 7
22957 to 23000 Error log
(Same as error log block 1)
(59AD to 59D8H) block 8
23001 to 23044 Error log
(Same as error log block 1)
(59D9 to 5A04H) block 9
23045 to 23088 Error log
(Same as error log block 1)
(5A05 to 5A30H) block 10
Receive
23089 to 23132 Error log
(Same as error log block 1)
(5A31 to 5A5CH) block 11
23133 to 23176 Error log
(Same as error log block 1)
(5A5D to 5A88H) block 12
23177 to 23220 Error log
(Same as error log block 1)
(5A89 to 5AB4H) block 13
23221 to 23264 Error log
(Same as error log block 1)
(5AB5 to 5AE0H) block 14
23265 to 23308 Error log
(Same as error log block 1)
(5AE1 to 5B0CH) block 15
23309 to 23352 Error log
(Same as error log block 1)
(5B0D to 5B38H) block 16
23353
Dedicated instruction normal completion count
(5B39H)
23354
Dedicated instruction abnormal completion count
(5B3AH)
23355 E-mail status Number of mails normally completed
(5B3BH) storage area
23356
Attached file sending count
(5B3CH)
0H Section 11.3
23357
Sending to the server count
(5B3DH)
23358
Number of mails abnormally completed
(5B3EH)
23359
Error log write count
(5B3FH)
23360
Error log write pointer
(5B40H)
23361
Send Error code
(5B41H)
23362
Command code
(5B42H)
23363 to 23370 Error log
To 0H Section 11.3
(5B43 to 5B4AH) block 1
23371 to 23374
Date
(5B4B to 5B4EH)
23375 to 23404
Subject
(5B4F to 5B6CH)
23405 to 23448 Error log
(Same as error log block 1)
(5B6D to 5B98H) block 2
23449 to 23492 Error log
(Same as error log block 1)
(5B99 to 5BC4H) block 3
23493 to 23536 Error log
(Same as error log block 1)
(5BC5 to 5BF0H) block 4
23537 to 23580 Error log
(Same as error log block 1)
(5BF1 to 5C1CH) block 5

(Continues on the next page)

3 - 27 3 - 27
3 SPECIFICATIONS
MELSEC-Q

(Continued from the previous page)

Address GX Developer
Initial value Reference
Decimal Application Name setting
(Hexadecimal) section
(Hexadecimal) applicability
23581 to 23624 Error log
(Same as error log block 1)
(5C1D to 5C48H) block 6
23625 to 23668 Error log
Send (Same as error log block 1)
(5C49 to 5C74H) E-mail status block 7
23669 to 23712 storage area Error log
(Same as error log block 1)
(5C75 to 5CA0H) block 8
23713 to 24575
System area
(5CA1 to 5FFFH)
24576
Data length
(6000H) Fixed buffer
0H
24577 to 25599 No. 9
Fixed buffer data
(6001 to 63FFH)
25600 to 26623 Fixed buffer
(Same as fixed buffer No. 9)
(6400 to 67FFH) No. 10
26624 to 27647 Fixed buffer
(Same as fixed buffer No. 9)
(6800 to 6BFFH) No. 11
27648 to 28671 Fixed buffer data Fixed buffer
(Same as fixed buffer No. 9)
(6C00 to 6FFFH) area No. 12
28672 to 29695 Fixed buffer
(Same as fixed buffer No. 9)
(7000 to 73FFH) No. 13
29696 to 30719 Fixed buffer
(Same as fixed buffer No. 9)
(7400 to 77FFH) No. 14
30720 to 31743 Fixed buffer
(Same as fixed buffer No. 9)
(7800 to 7BFFH) No. 15
31744 to 32767 Fixed buffer
(Same as fixed buffer No. 9)
(7C00 to 7FFFH) No. 16

3 - 28 3 - 28
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4 SETTINGS AND PROCEDURES PRIOR TO OPERATION

This chapter explains the settings and procedures required prior to starting the
operation of the Ethernet module in a system.

4.1 Loading and Installation

This section explains precautions for Ethernet module handling from unpacking to
installation, as well as the installation environment common to all modules.
For more details on the module mounting and installation, refer to the User's Manual
for the programmable controller CPU module used.

4.1.1 Handling precautions

4 The following explains precautions for Ethernet module handling:

(1) Since it is made of resin, the Ethernet module case should not be dropped or
subjected to any shock.

(2) Tighten the screws such as module fixing screws within the following ranges.
Screw location Tightening torque range
1
External power supply terminal screw (M2.5 screw) ( ) 0.40 N•m
2
Module fixing screw (usually not required) (M3 screw) ( ) 0.36 to 0.48 N•m

1 This terminal is used as an external power input terminal for supplying power to the transceiver when being

connected to a 10BASE5.

2 The module can be easily fixed onto the base unit using the hook at the top of the module. However, it is

recommended to secure the module with the module fixing screw if the module is subject to significant vibration.

• Do not touch the terminals while the power is on. Doing so may cause electric
DANGER
shocks or malfunctions.
• Before cleaning up and retightening terminal screws and module fixing screws, be
sure to shut off all phases of external power supply used by the system.
If the screws are loose, it may cause the module to short circuit, malfunction or fall
off.
Tightening the screws excessively may damage the screws and/or the module and
cause the module to short circuit, malfunction or fall off.
• Check the safety before performing control operations to the running programmable
controller (especially, modifications of data, programs and operation status (status
control)).

4-1 4-1
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

• While pressing the installation lever located at the bottom of module, insert the
CAUTION
module fixing tab into the fixing hole in the base unit until it stops. Then, securely
mount the module with the fixing hole as a supporting point.
If the module is not installed properly, it may cause the module to malfunction, fail or
fall off.
Secure the module with screws especially when it is used in an environment where
constant vibrations may occur.
• Be careful not to let any foreign matter such as wire chips get inside the module.
They may cause fire, as well as breakdowns and malfunctions of the module.
• Never disassemble or modify the module.
This may cause breakdowns, malfunctions, injuries or fire.
• Before mounting or dismounting the module, make sure to switch all phases of the
external power supply off.
Failure to do so may cause the module to breakdown or malfunction.
• Tighten the terminal screws using the specified torque.
If the terminal screws are loose, it may cause the module to short-circuit, 4
malfunction or fall off.
Tightening the terminal screws excessively may damage the screws and/or the
module and cause the module to short-circuit, malfunction or fall off.
• Do not directly touch the conducting parts and electronic parts of the module.
This may cause the module to malfunction or fail.
• When disposing of this product, treat it as industrial waste.
• A protective sheet is pasted on the upper part of the module in order to prevent
foreign matter such as wire chips to get inside the module while wiring.
Do not remove this protective sheet during wiring work.
However, be sure to remove the protective sheet before operating the module to
allow heat radiation during operation.

4.1.2 Installation environment

This section explains the installation environment for the programmable controller.
When installing the programmable controller, the following environments must be
avoided:
• Locations where the ambient temperature exceeds the range of 0 to 55 °C.
• Locations where the ambient humidity exceeds the range of 5 to 95 % RH.
• Locations where condensation occurs due to a sudden temperature change.
• Locations where there are corrosive or inflammable gases.
• Locations exposed to considerable amounts of conductive powdery substances such
as dust and iron filing, oil mist, salt, or organic solvents.
• Locations exposed to direct sunlight.
• Location exposed to strong electric or magnetic fields.
• Location where vibrations or impacts are directly applied to the main unit.

• Use the programmable controller in the operating environment that meets the
CAUTION
general specifications described in the user’s manual of the CPU module to use.
Using the programmable controller in any other operating environments may cause
electric shocks, fires or malfunctions, or may damage or degrade the module.

4-2 4-2
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.2 Settings and Procedures Prior to Starting the Operation

The following shows a flow of the procedure that is required prior to starting the
operation:
Procedures prior
to operation

Install the Ethernet module to the base unit

Connect the Ethernet module to the Ethernet network ……… See Section 4.4, "Connecting to the Network."

Connect GX Developer and QCPU with a cable

Set the network parameters for the Ethernet module


……… See Section 4.5, "Settings from GX Developer."
with GX Developer

Perform self-diagnostics tests with GX Developer ……… See Section 4.8, "Self-Diagnostic Tests."

Set the operation mode to "Online" with GX Developer ……… See Section 4.5, "Settings from GX Developer."

Send the "Ping" command from an external device and See Section 5.4, "Confirming the Completion
………
confirm the completion of the Ethernet module initial processing of the Initial Processing."

Perform loopback test ……… See Section 5.4.3, "Loopback Test."

Create a program for each communication ……… See applicable communication function

Operation

POINT
To operate the Ethernet module after the parameter settings are added or modified
with GX Developer, the programmable controller CPU must be reset after saving
the parameter values in the programmable controller CPU.

4-3 4-3
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

Important
(1) Do not write any data in the "System area" of the buffer memory of the
intelligent function module.

(2) Do not output (turn on) the "Use prohibited" signal, which is one of the output
signals.

(3) When status control (such as remote RUN/STOP) from a external device is
used for the programmable controller CPU, the user should make the
selection beforehand using the selecting parameters "Always wait for OPEN".
(Select using initial timing in the operation settings.)
If "Do not wait for OPEN" is selected, the communication line will be closed
during remote STOP After that it cannot be reopened from the programmable
controller CPU side and remote run from the external device also cannot be
started.

(4) When using sequence programs created for Ethernet modules of conventional
models, do not use the open request signals (Y8 to YF), fixed buffer
communication signals (Y0 to Y7) and the dedicated OPEN/CLOSE and
BUFSND/BUFRCV instructions for the same connection simultaneously in the
program. It may result in malfunctioning.

(5) When the Ethernet module is replaced, reset the external device as well. (If
the external device retains the Ethernet address, it may be impossible to
continue the communication because a module is replaced and the Ethernet
address changes.)
In the same may, when the external device (personal computer, etc.)is
replaced, restart the Ethernet module.

4-4 4-4
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.3 Components of the Ethernet Module

This section shows the components of the Ethernet module.

1) 1) 1)

3)

4)
2)

5)

6) 6) 6)

Name Description
1) LED display Refer to the contents of the LED displays (1).
Connector for connecting the Ethernet module to the 10BASE-T/100BASE-TX.
10BASE-T/100BASE-TX
2) (Ethernet module discriminate between 10BASE-T and 100BASE-TX according to
connector (RJ45) ( 1)
the hub.)
Connector for connecting the Ethernet module to the 10BASE5
3) 10BASE5 connector
(for connecting AUI cable (transceiver cable) of 10BASE5)
Connector for connecting the Ethernet module to the 10BASE2
4) 10BASE2 connector
(for connecting 10BASE2 coaxial cable)
Power supply terminal for supplying power to the transceiver when connecting by
5) External power supply terminal
10BASE5 (13.28 V to 15.75 V)
6) Serial number plate Indicates the serial No. of the Ethernet module.

1 The LED on the connector does not light up.


For connectors with first 5 digits of serial No. "05059" or earlier, the
orientation of the connectors has been rotated by 180 degrees.

4-5 4-5
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

1
(1) LED display contents ( )
1) LED display
QJ71E71-100 QJ71E71-B5 QJ71E71-B2
RUN ERR. RUN ERR. RUN ERR.
INIT. COM.ERR. INIT. COM.ERR. INIT. COM.ERR.
OPEN 100M OPEN OPEN
SD RD SD RD SD RD

LED name
QJ71E71-B5, Display description When the LED is on When the LED is off
QJ71E71-100
QJ71E71-B2
RUN RUN Normal operation display Normal Abnormal
INIT. INIT. Initial processing status display Normal completion Not processed
2 2 Normally opened connection Normally opened connection not
OPEN OPEN Open processing status display
available available
SD SD Data sending display Data being sent Data is not sent
3
ERR. ERR. Setting abnormal display Abnormal Normal setting
Communication abnormal
COM.ERR. COM.ERR. Communication abnormal display Normal communication in progress
occurrence 4
100 M (Not used) Transmission speed display 100Mbps 10Mbps/When not connected
RD RD Data receiving status display Data being received Data not received

1 Refer to Section 11.1.1 for causes of error displays and the corresponding
corrective actions.
2 The [OPEN] LED turns on/off depending on the open states of user
connections 1 to 16.
(The open states of the system connections (e.g., automatic open UDP port)
are not included.)
3 The [ERR.] LED turns on in the following cases:
• When setting values in GX Developer (mode, station number, and/or
network number) are incorrect.
• When an error has occurred in the Ethernet module or programmable
controller CPU and the operation is disabled due to the error.
4 Refer to Section 11.1.2 for the time when "COM.ERR." LED is on.

4-6 4-6
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.4 Connecting to the Network

The following explains how to connect the Ethernet module to the 100BASE-TX,
10BASE-T, 10BASE5 and 10BASE2 networks.
Some precautions that should be observed while connecting the Ethernet module are
also shown below. Pay strict attention to the safety and use the Ethernet module
properly.

(1) Sufficient safety precautions are required when installing the 100BASE-TX,
10BASE-T, 10BASE5 and 10BASE2 networks. Consult a specialist when
connecting cable terminals or installing trunk line cables, etc.

(2) Use a connection cable conforming to the standards shown in Section 2.2.

(3) The allowable bending radius for coaxial cable is preset. When bending coaxial
cables to connect them, a space that is larger than the coaxial cables’ allowable
radius is required.
For information regarding the coaxial cables’ allowable bending radius, please
consult the cable manufacturer.

• Do not bundle the control wires and the communication cables with the main circuit
CAUTION
and the power wires, and do not install them close to each other. They should be
installed at least 100 mm (3.94 in.) away from each other. Failure to do so may
generate noise that may cause malfunctions.
• Do not connect the AUI cables while the power to the module installed station is on.
• Make sure to place the communication and power cables to be connected to the
module in a duct or fasten them using a clamp.
If the cables are not placed in a duct or fastened with a clamp, their positions may
be unstable or moved, and they may be pulled inadvertently. This may damage the
module and the cables or cause the module to malfunction because of faulty cable
connections.
• When disconnecting the communication and power cables from the module, do not
pull the cables by hand.
When disconnecting a cable with a connector, hold the connector to the module by
hand and pull it out to remove the cable.
When disconnecting a cable without a connector, loosen the screws on the terminal
block first before removing the cable.
If a cable is pulled while being connected to the module, it may cause the module to
malfunction or damage the module and the cable.

4-7 4-7
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.4.1 Connecting to the 10BASE-T/100BASE-TX network

This section explains how to connect the Ethernet module to the 10BASE-T,
100BASE-TX network.
(Object module for the explanation: QJ71E71-100)
The following shows the connection diagram for the twisted paid cable.

<Operating procedure>
(Step 1) Connect the twisted-pair cable to the hub.
(Step 2) Connect the twisted-pair cable to the Ethernet module.

POINT
(1) The Ethernet module detects whether it is 10BASE-T or 100BASE-TX, and the
full-duplex or half-duplex transmission mode according to the hub.
For connection to the hub without the auto detection function, set the half-
duplex mode on the hub side.

(2) For devices required for 10BASE-T or 100BASE-TX connection and a sample
system configuration, refer to Section 2.2 (1) and (2).

4-8 4-8
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.4.2 Connecting to the 10BASE5 network

This section explains how to connect the Ethernet module to the 10BASE5 network.
(Object module for the explanation: QJ71E71-B5)

(1) Connecting an AUI cable


The following shows the AUI cable connection diagram.

Retainer
A

B
AUI cable

Transceiver DC power supply


(Refer to REMARKS in Section 2.2.)

<Operating procedure>
(Step 1) Slide the retainer toward the direction B as shown above.
(Step 2) Push in the AUI cable connector all the way.
(Step 3) Slide the retainer toward the direction A as shown above.
(Step 4) Confirm that the AUI cable is locked.

CAUTION • Do not connect the AUI cable while the power to the module installed station is on.

POINT
(1) When the network connection is performed using the 10BASE5 and
preventing high-frequency noise is required in the installation environment of
the Ethernet module, attach a ferrite core to the AUI cable to eliminate the
effect of noises. See POINT in Section 2.2 a(2).

(2) See Section 2.2 (2) (b) for the device and system configration explanation that
is required for 10BASE5 connection.

4-9 4-9
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(2) Wiring to the external power supply terminal (DC power supply for
1
transceiver )
The following explains how to connect a cable to the external power supply
terminal (DC power supply for transceiver).
2
1) Strip the cable jacket back 13mm.
2 2
The applicable cable size is 0.13mm (AWG26) to 2.5mm (AWG14).

13mm
(0.51 in.)

2) Loosen the terminal screw and insert the cable into the terminal.
3) Tighten the terminal screw within the torque range shown in Section
4.1.1.

1 Use a transceiver with a function that is generally called SQE TEST or heart
beat (a transceiver function that emits signals to notify whether the
transceiver is operating normally at the end of communication).
2 If the wire strip length is too long, the conductive part is exposed and it may
increase the risk of electric shock or short circuit between the adjacent
terminals. If the wire strip length is too short, it may result in poor contact.

4 - 10 4 - 10
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.4.3 Connecting to the 10BASE2 network

This section explains how to connect the Ethernet module to the 10BASE2 network.
(Object module for the explanation: QJ71E71-B2)
The following shows the 10BASE-2 coaxial cable connection diagram.

[2]

[1]

<Operating procedure>
(Step 1) Push in the connector by aligning the groove [1] and tab [2] as shown
above.
(Step 2) While pushing in the connector, rotate it clockwise a 1/4 turn.
(Step 3) Turn until the connector locks.
(Step 4) Check that the connector is locked.

POINT
See (3) in Section 2.2 for the device and system configuration example that is
required for 10BASE2 connection.

4 - 11 4 - 11
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

REMARKS
Attaching the connector for the coaxial cable
The following section explains how to attach the BNC connector (connector plug for
the coaxial cable) to the cable.

(1) Structure of the BNC connector and coaxial cable


The following shows the composition of the BNC connector and coaxial cable.
Parts comprising the BNC connector Structure of the coaxial cable
External conductor
Insulation
Outer sheath
Nut Washer Gasket material

Plug shell
Internal conductor
Clamp Contact

(2) How to attach the BNC connector and the coaxial cable
The following shows how to attach the BNC connector and the coaxial cable.
(a) Cut the length shown in the diagram to the
right off the outer sheath of the coaxial cable. 10 mm
(0.4 in.)
Be careful not to damage the external Cut this portion of the
conductor. outer sheath

(b) Fix the nut, washer, gasket and clamp unto Clamp

the coaxial cable as shown in the diagram


to the right and unfasten the external Nut
Washer
conductor. Gasket

(c) Cut the external conductor, insulation


Insulation material
material, and internal conductor to the Internal conductor

dimensions shown in the diagram to the right.


However, cut the external conductor to the 5 mm
(0.2 in.) 7 mm
same dimensions as those of the tapered
(0.28 in.) Clamp and
Section of the clamp, and smooth it down to external conductor
the clamp.
Solder here
(d) Solder the contact to the internal conductor.

(e) Insert the connector assembly (d) into the


plug shell and screw the nut into the plug
shell.

POINT
Pay attention to the following when soldering the internal conductors and contacts:
(1) Make sure that the solder does not bead up on the soldered section.
(2) Make sure that there are no gaps between the connector and the cable
insulator and that they do not cut into each other
(3) Solder as quickly as possible to prevent the insulation material from deforming.

4 - 12 4 - 12
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.5 Settings from GX Developer

This section explains the names of the setting screens for GX Developer that are
available for the Ethernet module.
Perform the settings according to the function used by referring to Section 3.6,
"Ethernet Module GX Developer Setting Item List."
For details on how to display each screen, refer to the GX Developer Operating
Manual.

4.5.1 I/O assignment setting

[Setting purpose]
The I/O assignment settings perform the settings for the types of modules to be
mounted on a base unit and the range of input/output signals.
[Startup procedure]
[GX Developer] [PLC Parameter] I/O assignment
For screen display, see the operating manual for GX Developer.
[Setting screen]

[Display contents]
Item name Setting for item Remarks
Type Select "Intelli."
Model name Enter the module model name to be mounted (Example: QJ71E71-100).

Points Select 32 points.
I/O assignment
Start-XY Enter the start I/O signal (hexadecimal) for the target module.
Select the control CPU of the Ethernet module when a multiple CPU system is
Detailed setting See QCPU User's Manual
employed.
(Multiple CPU System).
Multiple CPU setting Select when using a multiple CPU system.

4 - 13 4 - 13
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.5.2 Other settings

This section explains the names of the setting screens for various Ethernet module
functions. For setting contents, see the sections that describe respective screens in
detail.

(1) "Network parameters Setting the number of Ethernet/CC IE/


MELSECNET cards" (Details are explained in Section 4.6.)
This screen is for setting the Ethernet module as a network module.
It is also the main screen when setting the "Operational settings" and "Initial
settings" to use for the Ethernet module.
The settings found on this screen must always be set in order to use the Ethernet
module.

(2) "Operational settings" (Details are explained in Section 4.7.)


This screen is for setting common items for when other modules use the Ethernet
module.
The settings on this screen must always be set, since they are required for the
Ethernet initial processing.

(3) "Initial settings" (Details are explained in Section 5.2 and Chapter 2
of the User’s Manual (Application).)
This screen is for setting common timer values for TCP/IP communication to be
used in the Ethernet module as well as for setting the DNS server in order to use
the e-mail function.
It is not necessary to set the timer values when communicating using the default
timer values.

4 - 14 4 - 14
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(4) "Open settings" (Details are explained in Section 5.5.)


This screen is for connection open processing settings and settings related to
buffer memory usage when using fixed buffer communication to communicate
data with an external device.

(5) "Router relay parameter (Routing information)" (Details are


explained in Section 5.3.)
The following settings for data communication with external devices are
performed on this screen:
• Communicating data with external devices connected to other Ethernet via a router
• Classifying each device connected to the Ethernet into groups and
communicating data with an external device in an arbitrary group using the
data link instructions

(6) "Station No. <-> IP information (MELSECNET/Ethernet routing


information)" (Details are explained in Chapter 3 of the User’s
Manual (Application).)
This setting is for communicating with programmable controller CPUs on other
stations via the Ethernet or CC-Link IE controller network, MELSECNET/H,
MELSECNET/10.

(7) "FTP Parameters" (Details are explained in Chapter 5 of the User’s


Manual (Application).)
This setting is for using the file transfer (FTP server) function.
By using the file transfer function, an external device can read/write data from/to
the files in the QCPU to which the Ethernet module is installed.

(8) "E-mail settings" (Details are explained in Chapter 2 of the User’s


Manual (Application).)
These settings are for using the e-mail transmission/reception and automatic
news (notification) functions.

(9) "Send mail address setting" (Details are explained in Chapter 2 of


the User's Manual)
This screen is for setting sending destination mail addresses when using the e-
mail sending/receiving function.

(10) "News settings" (Details are explained in Chapter 2 of the User’s


Manual (Application).)
On this screen, the settings for news (notifying) the programmable controller CPU
monitoring results using the e-mail function are performed.

4 - 15 4 - 15
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(11) "Interrupt settings" and "Interrupt pointer setting" (Details are


explained in Section 7.3.)
On this screen, the settings for reading the receive data using the following
functions by means of the programmable controller CPU interrupt program are
performed.
• Reading the reception data in fixed buffer communication using a dedicated
instruction (BUFRCVS).
• Reading data transmitted from another station’s programmable controller CPU
using a data link instruction (RECVS).

(12) "Redundant setting", "group setting" (Detailed explanation: Section


5.11, QCPU User's Manual)
Perform settings for using the Ethernet module in the main base unit of the
redundant system.

(13) "Routing parameters" (Details are explained in Chapter 3 of the


User’s Manual (Application).)
This screen is for setting which stations are passed through when communicating
with programmable controller CPUs of other stations via the Ethernet or CC-Link
IE controller network, MELSECNET/H, MELSECNET/10.

(14) "Multiple CPU settings" (Details are explained in QCPU User's


Manual.)
This screen is for setting the control CPU for the Ethernet module when it is used
in a multiple CPU system.

(15) "Remote Password" (Details are explained in Section 5.9.5.)


This screen is for setting connections subject to the remote password check
performed by the Ethernet module when the QCPU remote password function is
used.

REMARKS
It is not necessary to set the "Intelligent function module switch settings" with GX
Developer’s I/O assignment.
Each type of setting corresponding to the switch settings is performed in the above
mentioned "Operational settings," "Initial settings," and "Open settings."

4 - 16 4 - 16
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.6 Network Parameters Setting the Number of Ethernet/CC IE/MELSECNET Cards

This section explains one of the network parameters, setting the number of
Ethernet/CC IE/MELSECNET cards.
Start the "Network parameters Setting the number of Ethernet/CC IE/MELSECNET
cards" screen by selecting [GX Developer] - [Network parameter]. For details on how
to display the screen, refer to the GX Developer Operating Manual.

Item name Description of setting Setting range/selection


Select the module by which the access is made when the access request does not
Valid unit during other station access 1 to 8
specify the network number.
Ethernet
Network type Select the mounting module. Ethernet (Main base) *1
Ethernet (Extension base) *1
Starting I/O No. Set the head address of the module. 0000 to 0FE0H
Network No. Set the network number of the module. 1 to 239
Group No. Set the group number of the module. 1 to 32
Station No. Select the station number of the module. 1 to 64
• Online
• Offline
Mode Select the operation mode of the module.
• Self refrain test
• H/W test
Operational settings Set the common items for modules.
Initial settings Set the common timer values for modules.
Open settings Settings for connection open processing.
Router relay parameter Settings for using the router relay function.
Settings for using the CC-Link IE controller network, MELSECNET/H,
Station No. <-> IP information
MELSECNET/10 relay communication function.
FTP Parameters Settings for using the file transfer (FTP) function.
E-mail settings Settings for transmitting/receiving e-mails.

Interrupt settings Settings for executing an interrupt program.
Redundant setting Settings for using the Ethernet module in the main base unit of the redundant system.
Settings for disabling system switching if an error occurs in one communication path
when the redundant communication paths are used for the external device and
Group settings
Ethernet module in the redundant system.
(Refer to the QnPRHCPU User's Manual (Redundant System).)
Settings for using the CC-Link IE controller network, MELSECNET/H,
Routing parameters
MELSECNET/10 relay communication function.
*1 Selectable only when Redundant CPUs is used.

4 - 17 4 - 17
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(1) Valid module during other station access


(a) This item designates the network module to which the request is directed,
when the local station issues a data communication request and it cannot
specify the network number of the access destination programmable
controller station. This should be one of the following:
• A network module for the CC-Link IE controller network, MELSECNET/H,
MELSECNET/10
• An Ethernet module

(2) Network type


(a) When used with Basic model QCPU, High Performance model QCPU,
Process CPU, Universal model QCPU, or safety CPU
Select "Ethernet".
The following items must be set.
• Starting I/O No.
• Network No.
• Group No.
• Station No.
• Mode
• Operational settings
• Initial settings (Settings not required when using the default values)
(b) When used with Redundant CPUs
Select "Ethernet (Main base)" when mounting the Ethernet module on the
main base unit of the redundant system.
Select "Ethernet (Extension base)" when mounting the Ethernet module on
the extension base unit of the redundant system.
The following items must be set.
• Starting I/O No.
• Network No.
• Group No.
• Station No.
• Mode
• Operational settings
• Initial settings (Settings not required when using the default values)
• Redundant setting (Only when "Ethernet (Main base)" is selected)

(3) Starting I/O No.


(a) Set the head I/O number of the Ethernet module in units of 16 points
(hexadecimal).
(b) An example of the setting is shown below.
(Example)
1) CPU type : Q25 (H) CPU
2) Existing mounted module : Serial communication module QJ71C24
3) I/O usage status : X/Y000 to X/Y01F (used by QJ71C24)
X/Y020 to X/Y03F (used by the Ethernet
module)
The head I/O number is "0020" in the above environment.

4 - 18 4 - 18
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(4) Network No.


(a) Set the network number of the target Ethernet module (setting range from 1
to 239) for the CC-Link IE controller network, MELSECNET/H,
MELSECNET/10.
(b) Do not set the network number to a value already assigned to existing
systems and other Ethernet and CC-Link IE controller network,
MELSECNET/H, MELSECNET/10 network systems.

(5) Group No.


(a) Set the group number of the target Ethernet module (setting range from 1 to
32) for the MELSECNET/G, MELSECNET/H, MELSECNET/10.
(b) By designating a group number, data can be communicated with multiple
QCPU stations using the same group number.

(6) Station No.


(a) Set the station number of the target Ethernet module (setting range from 1
to 64) for the CC-Link IE controller network, MELSECNET/H,
MELSECNET/10.
(b) Do not set the number to a value already assigned to existing systems and
other Ethernet modules.

(7) Mode (address: CAH)


(a) Select the operating mode of the Ethernet module.
Name of setting Description of setting
Online Communicate with the external device in normal operation mode.
Offline Disconnecting the local station from the network.
1
Self refrain test Execute a self refrain test for self-diagnostics. ( )
1
H/W test Execute tests of RAM and ROM. ( )

1 See Section 4.8, "Self-Diagnostic Tests."

(b) When the operation mode is changed, reset the programmable controller
CPU.

(8) Operational settings through Routing parameters


Set the parameters from operational settings through routing settings according
to the explanations in Section 4.5.

POINT
(1) Both the "Setting the number of Ethernet/CC IE/MELSECNET cards" and
"Operational setting" parameters must always be specified. If the settings are
changed, the QCPU (CPU No.1 when used in a multiple CPU system) must
be reset.

(2) Write the network parameters in the control CPU of the Ethernet module when
the module is used in a multiple CPU system.

4 - 19 4 - 19
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.7 Operational Settings

This section explains how to set the operations parameters.


Start the "Ethernet operations" screen by selecting [Setting the number of Ethernet/CC
IE/MELSECNET cards] - [Operational settings].

Item name Setting description of item Setting range/selection


• Binary code
Communication data code Select the communication data code.
• ASCII code
• Do not wait for OPEN
Initial Timing Perform the setting for opening.
• Always wait for OPEN
• Decimal
Input format Select the IP address input format.
IP Address • Hexadecimal
IP address Set the IP address of the local station.
• Ethernet (V2.0)
Send frame setting Select the frame format to send
• IEEE 802.3
Enable Write at RUN time Set to allow writing to the programmable controller CPU during • Check mark (enable)
(for the MC protocol) RUN. • No check mark (disable)
• Use the KeepAlive
TCP Existence confirmation setting Select the existence check method for TCP communication
• Use the Ping

(1) Communication data code (address: CBH … b1)


(a) Select the format of the communication data when communicating with an
external device.
Name of setting Description of setting
Binary code Communicate using binary data.
ASCII code Communicate using ASCII data.

(b) For more details on the data communication codes, see Section 3.2, "Data
Codes for Communication."

4 - 20 4 - 20
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(2) Initial Timing (address: CBH … b8)


(a) Select the timing to open for connections for which TCP-Passive open or
UDP open are selected with the "Open settings" parameter ( 1).
1 For more details on the open settings, see Section 5.5 "Open Settings".
Name of setting Description of setting
Do not wait for OPEN • Execute open/close processing using a sequence program.
(Communication impossible at • Communication cannot be performed while the programmable controller CPU is in the
STOP time) STOP status.
• Passive open and UDP open connections always wait for open according to the
Always wait for OPEN parameter settings (a sequence program for open/close processing is not required)
2
(Communication possible at ( ).
STOP time) • Communication can be performed while the programmable controller CPU is in the
STOP status.

2 If the sequence program of the local station's programmable controller CPU executes the close

processing, the station is not placed in the OPEN request wait status after the connection is shut off.

(b) In the following cases, a dedicated instruction is required to execute an


open/close processing.
• When "Do not wait for OPEN" is selected in the initial timing settings.
• If the "Open settings" are not performed for a connection.
• If "TCP-Active" is selected in the "Open settings" for a connection.
For detail on the open/close processing, see Section 5.6 "Open
Processing/Close Processing of the Connection".

(3) IP Address settings – Input format


(a) Select the IP address input format (decimal or hexadecimal)

(4) IP Address settings – IP address (address: 0H to 1H)


(a) Set the IP address of the local station according to the specified input format
(decimal or hexadecimal).
It should be set so that the local station Ethernet module and the
communicating external device have the same class and sub-net address
(two words).
[IP address]

Values bits 7 to 0

to

Values bits 31 to 24

(b) It is necessary to use the router relay function in order to communicate with
an external device on another Ethernet (different sub-net address).
For more details, see Section 5.3, "Router Relay Parameter".

(c) Set the IP address after consulting a network administrator (the person who
plans the network and manages IP addresses).

4 - 21 4 - 21
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

(5) Send frame setting


(a) Select the frame of the Ethernet header for the data link layer to be sent by
the Ethernet module.
Setting item Description of setting
Ethernet (V2.0) Transmits using an Ethernet frame.
IEEE802.3 Transmits using an IEEE802.3 frame.

(b) When receiving data from the external device, reception should occur
regardless of whether the Ethernet frame or IEEE802.3 frame is used

REMARKS
(1) Transmission using Ethernet frames is generally recommended.
(2) When communication with the external device fails, check whether or not
communication is possible using a PING command.

(6) Enable Write at RUN time (address: CBH … b6)


(a) Select enable/disable external devices to write data while communicating
through the MC protocol while the programmable controller CPU is running.
Name of setting Description of setting
Check mark
Allows an external device to write while the programmable controller CPU is running.
(Enable write at RUN time)
No check mark
Prohibits an external device to write while the programmable controller CPU is running.
(Disable write at RUN time)

(7) TCP Existence confirmation setting


Select the existence check method for TCP communication. *1
For the existence check function, refer to Section 5.2.2.
Name of setting Description of setting
Use the KeepAlive Checks connection status with KeepAlive.
Use the Ping Checks connection status with Ping.

*1 Do not use GX Developer incompatible with this setting together with compatible GX Developer. (Doing
so may change the setting to "Use the Ping".)
This setting is ignored when the Ethernet module does not support the KeepAlive check function. (Ping is
used for the existence check.)
Refer to Section 2.7 for applicable versions of the Ethernet module and GX Developer.

POINT
(1) The "Setting the number of Ethernet/CC IE/MELSECNET cards" and
"Operational settings" parameters must always be set.
If the settings are changed, the programmable controller CPU must be reset.
(2) If the re-initial processing of the Ethernet module is required due to the
occurrence of an error, perform re-initial processing using sequence programs
(see Section 5.2.3).
(3) When using the programs for conventional models, be sure to delete or disable
the program for initial processing that uses I/O signals.

4 - 22 4 - 22
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.8 Self-Diagnostic Tests

This section explains the self-diagnostic tests for checking the hardware and
transmission and reception function of the Ethernet module.
The self-diagnostic test is performed on the "Network parameters setting the number of
Ethernet/CC IE/MELSECNET cards" screen of GX Developer.

4.8.1 Self refrain test

The following explains the self refrain test that is used to check the hardware including
the Ethernet module’s transmission and reception circuit.
The self refrain test transmits a test message addressed to the Ethernet module’s local
station to a line and checks whether or not the same message can be received via the
network.
The following explains the procedure for performing the self refrain test. The test takes
approximately five seconds to complete.
The test result can be determined from the LED displays on the front of the Ethernet
module.
Status of LED
Step Description of operation
[RUN] [OPEN] [ERR.]
1 Connect the Ethernet module to the line. ( 1) (See Section 4.4.)
2 Stop QCPU.
Select [Setting the Number of Ethernet/CC IE/MELSECNET Cards] – [Mode] to
3 choose [self refrain test] and save the parameter values in the programmable
controller CPU. (See Section 4.6.)
4 Reset QCPU. (Test starts)
Normal
5 Check status of each LED after 5 seconds.
Error
Select [Setting the Number of Ethernet/CC IE/MELSECNET Cards] – [Mode],
6 change the mode to "Online" or another test mode, and save the parameter
values in the programmable controller CPU. (See Section 4.6.)
7 Reset QCPU.

: Lit : Off
1 For QJ71E71-100, when the line is not connected, the self refrain test is not performed and end normally.

The following are probable causes of errors.


• Ethernet module hardware error
• Ethernet line error
• External power supply 12 V DC error (only 10BASE5)
An error code is stored in the error log area (address: E5H) in the buffer memory of the
Ethernet module; the error content can then be checked from GX Developer. (See
Sections 11.2 and 11.3.)

POINT
There will be no hardware interference even if the self refrain test is conducted
while an external device is online. If the packets are congested over the line, packet
collisions may occur and the test may not finish with the error end or within the
expected 5-second time frame.
In this case, perform the test again after terminating the data communication
between other devices.

4 - 23 4 - 23
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.8.2 Hardware test (H/W Test)

This section explains the RAM and ROM tests for the Ethernet module. The procedure
for the hardware test is as shown in the table below.
The test results are judged from the LED displays on the front of the Ethernet module.
Status of LED
Step Description of operation
[RUN] [OPEN] [ERR.]
1 Stop QCPU.
Select [Setting the Number Ethernet/CC IE/MELSECNET Cards] – [Mode] to
2 choose [H/W test] and save the parameter values in the programmable
controller CPU. (See Section 4.6.)
3 Reset QCPU. (Test starts.)
Normal
4 Check status of each LED after 5 seconds.
Error
Select [Setting the Number of Ethernet/CC IE/MELSECNET Cards] – [Mode],
5 change the mode to "Online" or another test mode, and save the parameter
values in the programmable controller CPU. (See Section 4.6.)
6 Reset QCPU.

: Lit : Off

The following are probable causes of errors.


• Ethernet module RAM/ROM error
An error code is stored in the error log area (address: E5H) in the buffer memory of the
Ethernet module; the error content can then be checked from GX Developer. (See
Sections 11.2 and 11.3.)

POINT
If the result of the hardware test shows an error, conduct the test again.
If this test result also shows an error, the hardware of the Ethernet module may be
faulty.
Please consult the nearest branch office or dealer with details of the errors.

4 - 24 4 - 24
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.9 Maintenance and Inspection

This section explains the maintenance and inspection as well as the mounting and
dismounting of the Ethernet module.

4.9.1 Maintenance and inspection

The Ethernet module does not need to be inspected for anything particular other than
checking whether or not the connections of terminators and cables are loose. Maintain
and inspect the system according to the same inspection items as described in the
user’s manual for the programmable controller CPU in order to use it in optimal
operating conditions.

• Do not touch the terminals and connectors while the power is on.
DANGER
Doing so may cause in electric shocks and malfunctions.
• Do not touch the connector inside the cover at the upper section of the module.
Doing so may cause damages and malfunctions of the module.
• Before cleaning up and retightening terminal screws and module fixing screws, be
sure to shut off all phases of external power supply used by the system.
Not doing so may cause failure or malfunction of the module.
If the screws are loose, it may cause the module to fallout, short circuits, or
malfunction.
If the screws are tightened too much, it may cause damages to the screws and/or
the module, resulting in the module falling out, short circuits or malfunction.

• Be careful not to let any foreign matter such as wire chips get inside the module.
CAUTION
They may cause fire, as well as breakdowns and malfunctions of the module.
• Never disassemble or modify the module.
This may cause breakdowns, malfunctions, injuries or fire.

4 - 25 4 - 25
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q

4.9.2 Mounting and dismounting the module

Before mounting or dismounting the Ethernet module, make sure to read Section 4.1,
"Handling Precautions" thoroughly, secure the safety, and handle the module properly
according to the instructions.
The following explains the procedures when mounting/dismounting the Ethernet
module.

<Operation procedure when replacing the Ethernet module>


(Step 1) Turn off the power supply to the Ethernet module installed station.
(Step 2) Remove the network cable and Ethernet module.
(Step 3) Install and start up the new Ethernet module according to Section 4.2,
"Settings and Procedures Prior to Starting the Operation."
(Step 4) Reset the external device. ( 1)

<Operation procedure when replacing the QCPU>


(Step 1) Read the parameters for the Ethernet module from the programmable
controller CPU and save them using GX Developer. ( 2)
(Step 2) Replace the QCPU. (See the applicable QCPU User’s Manual.)
(Step 3) Load the parameters for the Ethernet module that have been saved in
GX Developer to the new QCPU.
(Step 4) Reset the external device.

1 When the Ethernet module is replaced, reset the external device as well. (If the
external device retains the Ethernet address, it may be impossible to continue the
communication because a module is replaced and the Ethernet address
changes.)
In the same may, when the external device (personal computer, etc.)is replaced,
restart the Ethernet module.
2 It is recommended to record and save parameters not only when the CPU is
replaced but also when parameters for the Ethernet module are created or
modified.

4 - 26 4 - 26
5 COMMUNICATION PROCEDURE
MELSEC-Q

5 COMMUNICATION PROCEDURE

This chapter explains an overview of the communication procedure using the Ethernet
module, as well as the required initial processing of the Ethernet prior to starting data
communication and the open processing for communication with an external device.
The sequence program for setting the parameters required to perform communication
can be greatly simplified by setting the parameters of the Ethernet module supported
by GX Developer.
The following explains the communication procedure using GX Developer.

REMARKS
When utilizing a sequence program for a conventional module, see Appendix,
"Using Programs Designed for Conventional Modules".

5.1 Overview of the Communication Procedure

This section explains an overview of the procedure for performing data communication
with external devices via the Ethernet module.
To start data communication, establish connections with external devices via the initial
5 or open processing.
To end the data communication, perform close and end processing to shut off the
connection and, as a result, all communication processing is terminated.
The following diagram illustrates the communication procedure:
See Section 4.6, "Network Parameters Setting
Set parameters for the
the Number of Ethernet/CC IE/MELSECNET Cards."
Ethernet module using GX Developer ... See Section 4.7, "Operational Settings."
See Section 5.2, "Initial Processing.
See Section 5.3, "Router Relay Parameter."
Start up the programmable
See Section 5.5, "Open Settings."
controller CPU

Initial processing ... Automatically processed.

Open processing See Section 5.6.

(Conection for User


(Connection for system)
No.1 to 16)

Communi- CC-Link IE Communi- Communi- Communi-


Communi- Communi- Communi- E-mail controller network,
cation using cation cation using File transfer cation using cation using
cation using cation using sending/ MELSECNET/H
the MC fixed random using the MELSECNET/10 data link (FTP) Web GX
access receiving
protocol buffers NC protocol relay communication instructions function Developer
buffers

Close processing See Section 5.6.

5-1 5-1
5 COMMUNICATION PROCEDURE
MELSEC-Q

REMARKS
Each of the following three types of communication can be performed with an
external device opened by the user.
• Communication using the MC protocol
• Sending/receiving in fixed buffer communication (procedure exists)
• Communication using random access buffers
When receiving communication request data from an external device

Programmable controller CPU Ethernet module


(Subheader code)

Receive completion signal on Fixed buffer communication


Store data
(Procedure exists)
received
Execute dedicated instruction - (communication)
BUFRCV
For receiving when the
communication is open 60H
Dedicated instruction - BUFRCV
execution completion E0H
Request from an external
OS device (receive)
Random access buffers Header

Application data
61H/62H Confirm the

Sub header
Random access buffer
Data request contents
communication (read/write)

Ethernet
with the

TCP
IP
subheader.

E1/E2H 5
00H to 3CH, 50H
Response to the request (send)

Header

Application data

Sub header
Communication using the
MC protocol (read/write)

Ethernet
TCP

IP
Device memory, etc.

Data

80H to BCH, D0H

5-2 5-2
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.2 Initial Processing

This section explains the initial processing of the Ethernet module.

5.2.1 Initial processing

The initial processing is for enabling data communication with an external device by
setting the minimum parameters required for data communication by the Ethernet
module.
Set the following parameters using GX Developer, save them in the programmable
controller CPU, and reset the programmable controller CPU; the initial processing of
the Ethernet module is then performed. (Sequence programs for initial processing are
not required.)

(1) Parameters required for initial processing (set using GX Developer)


• "Network parameter Setting the number of : (See Section 4.6.)
Ethernet/CC IE/MELSECNET cards"
• "Operational settings" : (See Section 4.7.)
• "Initial settings" : (See Section 5.2.2.)

(2) Confirmation of initial processing result


Ethernet module
Initial processing I/O signal
INIT.LED
Initial normal completion signal X19 Initial abnormal completion signal X1A
At normal completion : On ON OFF
At abnormal completion : Off OFF ON

If the initial processing does not complete normally, correct the above parameter
setting value and write to the programmable controller CPU. Then reset the
programmable controller CPU.

5-3 5-3
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.2.2 Initial settings

This section explains the initial settings using GX Developer.


Select [Setting the number of Ethernet/CC IE/MELSECNET cards] – [Initial settings] to
start the [Ethernet initial settings] screen.

Item name Description of setting Setting range/options


TCP ULP timer Set the time of packet existence at TCP data transmission. 2 to 32767
TCP zero window timer Set the interval for checking the reception enabled status. 2 to 32767
TCP resend timer Set the time to resend at TCP data transmission. 2 to 32767
TCP end timer Set the confirmation wait time at TCP close processing. 2 to 32767
IP assembly timer Set the wait time for division data packets. 1 to 32766
Timer setting Response monitoring timer Set the response wait time. 2 to 32767
Destination existence confirmation starting Set the time to start confirming existence of an external device
1 to 32767
interval after communication with it has terminated.
Destination existence confirmation interval timer Set the time interval between reconfirming existence. 1 to 32767
Set the number of times to reconfirm existence when a response
Destination existence confirmation resend timer 1 to 32767
to the existence confirmation is not received.
Input format Select IP address input format of DNS server. Decimal/hexadecimal
IP address of DNS server 1 Set IP address of DNS server 1.
DNS setting
1 IP address of DNS server 2 Set IP address of DNS server 2.
( )
IP address of DNS server 3 Set IP address of DNS server 3.
IP address of DNS server 4 Set IP address of DNS server 4.

1: For details, see Chapter 2 of the User’s Manual (Application).

5-4 5-4
5 COMMUNICATION PROCEDURE
MELSEC-Q

(1) Timer setting – TCP ULP timer (address: BH)


(a) This item sets the time of packet existence during TCP data sending.
This timer is passed through the parameter when TCP opens or data is
sent.
(b) Designate the setting value in a range from 2 to 32767.
(When the default value is used, setting is not required.)
(c) Timer setting = setting value × 500 ms

(2) Timer setting - TCP zero window timer (address: CH)


(a) The window indicates the reception buffer on the receiving side.
(b) When there is no more space in the receiving buffer (window size = 0) on
the receiving side, data communication has to wait until enough space is
made.
When this occurs, the sending side sends a sending window confirmation
packet to the receiving side after the TCP zero window timer value has
been reached, and confirms the reception enabled status.
(c) Designate the setting value in a range from 2 to 32767.
(When the default value is used, setting is not required.)
(d) Timer setting = setting value × 500 ms

(3) Timer setting – TCP resend timer (address: DH)


(a) Set the resend time if ACK is not returned at TCP opening or data
transmission. This timer is also used for the existence time of the ARP
function.
(ARP is resent in TCP resend timer value/2 if a response is not returned in
reply to the sent ARP request.)
It also serves as the minimum setting time for the data link instruction
arrival monitoring time.
(b) Designate the setting value in a range from 2 to 32767.
(When the default value is used, setting is not required.)
(c) Timer setting = setting value × 500 ms

(4) Timer setting – TCP end timer (address: EH)


(a) When the TCP connection is closed from the local station, this timer sets the
monitoring time for how long the local station waits for a FIN request from
an external device after it sends an FIN request and the external device
returns an ACK.
(b) If the FIN request cannot be received from the external device before the
time designated by the TCP end timer setting, a RST should be sent to the
external device to forcefully close the connection.
(c) Designate the setting value in a range from 2 to 32767.
(When the default value is used, setting is not required.)
(d) Timer setting = setting value × 500 ms

5-5 5-5
5 COMMUNICATION PROCEDURE
MELSEC-Q

(5) Timer setting - IP assembly timer (address: FH)


(a) Communication data may be divided on the IP level due to the restriction on
the buffer on the sending or receiving station.
(b) Designate the setting value in a range from 1 to 32766.
(When the default value is used, setting is not required.)
(c) Timer setting = setting value × 500 ms

(6) Timer setting - Response monitoring timer (address: 10H)


(a) This timer setting sets the following times.
1) The time to wait for a response after sending a command.
2) The time to wait for the last message after receiving the first message
when the message is divided.
(b) Designate the setting value in a range from 2 to 32767.
(When the default value is used, setting is not required.)
(c) Timer setting = setting value × 500 ms

(7) Timer setting - Destination existence confirmation starting interval


(address: 11H)
(a) This timer sets the time interval before starting to confirm the existence of
an external side when an open connection for which existence confirmation
is set to confirm stops dead.
(b) Designate the setting value in a range from 1 to 32767.
(When the default value is used, setting is not required.)
(c) Timer setting = setting value × 500 ms

(8) Timer setting - Destination existence confirmation interval timer


(address: 12H)
(a) This timer sets the time interval before reconfirming the existence of an
external device on an open connection for which existence confirmation is
set to confirm that does not respond.
(b) Designate the setting value in a range from 1 to 32767.
(When the default value is used, setting is not required.)
(c) Timer setting = setting value × 500 ms

(9) Timer setting - Destination existence confirmation resend timer


(address: 13H)
(a) This timer sets the number of times to reconfirm existence when there is no
response from an external device on an open connection for which
existence confirmation is set to confirm.
(b) Designate the setting value in a range from 1 to 32767.
(When the default value is used, setting is not required.)

5-6 5-6
5 COMMUNICATION PROCEDURE
MELSEC-Q

(10) DNS setting - Input format ( 1)


(11) DNS setting - IP address of DNS server n ( 1)
1 The DNS setting is set when the e-mail sending/receiving function is used.
Refer to Chapter 2, "E-mail Function" of the User’s Manual (Application).

REMARKS
(1) Designate the setting value of each timer on the Ethernet module side in such a
way that the following relations are met.
Response TCP
TCP ULP TCP end IP assembly
• monitoring timer >
= >
= >
= resend >
timer value timer value timer value
value timer value

TCP
TCP zero window
• resend =
timer value
timer value

Furthermore, when connecting a line using our products, you should make sure
that both nodes have the same settings.
(2) Designate the setting value of each timer on the external device side in such a
way that the following relations are met.
Communication errors such as transmission timeouts may occur more
frequently if the timer values are not set so that they satisfy the following
relationships.
TCP resend timer TCP resend timer
• >
value on the external device side value on the Ethernet module side

Monitoring timer value for the TCP ULP timer value


• external device application software
>
on the Ethernet module side
n 1

11 n is the number of TCP segment transmissions and can be obtained via the following calculation:
Size of the message transmitted by the Ethernet module (fractions below
n=
Maximum segment size decimal point are rounded up)

Example1: Number of TCP segment transmissions when communicating via the


same line
The maximum segment size is 1460 bytes via the same line (without
going through a router) and the number of TCP segment
transmissions is as follows:
n = 1, if the size of the message transmitted by the Ethernet module
is 1460 bytes or less.
n = 2, if the size of the message transmitted by the Ethernet module
is greater than 1460 bytes.
Example2: Number of TCP segment transmissions when communicating via
separate lines
The maximum segment size is at least 536 bytes on a separate line (via
dialup router, etc.) and the number of TCP segment transmissions is as
follows:
n = 1, if the size of the message transmitted by the Ethernet module is
536 bytes or less.
n = 2, if the size of the message transmitted by the Ethernet module is
greater than 536 bytes and no more than 1072 bytes.
n = 3, if the size of the message transmitted by the Ethernet module is
greater than 1072 bytes and no more than 1608 bytes.
5-7 5-7
5 COMMUNICATION PROCEDURE
MELSEC-Q

(3) When communication errors occur due to noise or other factors, the settings
should be changed to increase the number of retries.
The number of retries is obtained by using the following equation:
(In case of the default values, 2 = (60/20) - 1)

Number TCP ULP timer value


• = – 1
of retries TCP resend timer value

Example: Assuming the values are set in such a way that the number of retries is
two, a data transmission error will occur at the timing shown in the figure
below if data transmission fails (when communicating using fixed buffer).

BUFSND instruction

1 scan
BUFSND instruction
completion device + 1

Ethernet module
Data First retry Second retry
command

A A A

TCP ULP timeout value

A: TCP resend timer value


(The time after which the data should be retransmitted when an "ACK" is not returned after sending data.)

(4) Perform the following setting in order to eliminate the retries explained in (3)
(i.e., to set the number of retries to 0).
TCP ULP TCP end TCP resend
• = =
timer value timer value timer value

(Each timer value should be identical.)

(5) The target existence check is a function whereby the Ethernet module checks
whether or not a remote device is functioning normally by sending an existence
check message and then waiting to see whether a response message is
received. It is used if a connection to a remote device is open but
communication with the remote device has not been performed for a certain
period of time.
(a) The existence check function has two methods of checking: PING and
KeepAlive.
The Ethernet module performs each of the existence checks based on the
setting values explained in (7) to (9) of this section and the existence
check setting of the open settings (refer to Section 5.5 (6)).
The existence check function (Ping or KeepAlive) can be selected at the
time of operation setting or re-initialization.
For the operation setting, refer to Section 4.7.
Refer to Section 5.2.3 for the explanation about the re-initial processing.

5-8 5-8
5 COMMUNICATION PROCEDURE
MELSEC-Q

1) Checking by KeepAlive
This method is used for a connection opened via the TCP/IP protocol.
The Ethernet module performs an existence check by sending an
existence check ACK message to a remote device with which
communication has not been performed for a certain period of time
and waiting to see whether or not a response is received. ( 1)
1 The connection may be cut off if the remote device does not
support the TCP KeepAlive function (response to KeepAlive ACK
messages).
2) Checking by PING
This method is used for a connection opened via the TCP/IP or
UDP/IP protocol.
The Ethernet module performs an existence check by sending a PING
command (using the ICMP echo request/response function) to a
remote device with which communication has not been performed for
a certain period of time and waiting to see whether or not a response
is received. ( 2)
2 Note that the Ethernet module automatically returns an echo
response packet when it receives a PING echo request
command. (It sends a response to the received PING command
even if the connection used in the data communication with the
remote device is closed.)

(b) The following actions are taken if a response message cannot be received
(an error is detected) from the remote device.
• The corresponding connection will be forcibly closed (the line is
disconnected). ( 3)
3 It is possible to reopen it with a user program.
• The Ethernet module turns off the open completion signal (the
corresponding bit in address: 5000H) and stores the error code (C035H)
in places such as the open error code storage area.

Example: Assuming the values are set under the condition that the
number of retries is three, the Ethernet module performs
target existence check at the timing shown in the figure
below. (An example of existence check by PING)

Open completion signal


(address: 5000H)
Ethernet module

Last PING PING PING


communication command command command

Target
existence Target Target
check starting existence existence
interval timer check interval check interval
value timer value timer value

5-9 5-9
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.2.3 Re-initial Processing

Re-initial processing is performed in order to place the Ethernet module into its startup
status without actually restarting the programmable controller (e.g., resetting the
programmable controller CPU).
Re-initial processing of the Ethernet module can be performed in a sequence program.
The purposes of and how to program the re-initial processing of the Ethernet module
are explained below.
(1) Purposes of performing re-initial processing
(a) To update address information of an external device maintained by the
Ethernet module
The Ethernet module maintains the IP address of the external device with
which it has been communicating and the corresponding Ethernet address
(MAC address). This is done in order to prevent other devices from
accessing the programmable controller illegally using the IP address of an
external device with which communication was performed normally. ( 1)
For this reason it is necessary to perform a re-initial processing in order to
clear the address information of the external device maintained by the
Ethernet module in case a module or board on the external device side has
been replaced due to failure.
1 Ethernet address is unique to a device. No devices share the same
Ethernet address.
(b) To change the IP address of the Ethernet module of the local station
If the system is changed, it is possible to restart communication with
external devices by changing the IP address (for the Ethernet module of the
local station) in the operation settings (see Section 4.7) set by GX
Developer.
(c) To change the communication condition setting values
It is possible to restart communication with external devices by changing
the communication conditions in the operation settings (see Section 4.7)
set by GX Developer.

(2) Programming and timing for performing a re-initial processing


The programming and timing for performing a re-initial processing is shown
below:
<<Re-initial processing via the dedicated instruction UINI>>
U0\
Instruction G20480.
Store control data in D250 to D255 Store data in [D250]
to [D255] according
to the changes
ZP.UINI "U0" D250 M250
M250 M251
Processing upon normal completion
X19
Data communication enabled
M251
Processing upon abnormal completion

X19
Data communication enabled

5 - 10 5 - 10
5 COMMUNICATION PROCEDURE
MELSEC-Q

Close processing Re-initial processing

Initial normal completion signal X19 1)

Open completion signal


2)
(address: 5000H)

UINI instruction 3)

UINI instruction completion device


1 scan

UINI instruction completion device + 1


4)
Communication condition setting area
(address: 1FH, b15)

Module initialization

1) It is confirmed whether the initial processing has been completed normally.


2) All data communication currently being performed with external devices
is terminated, and close processing will be performed on all connections.
3) Dedicated instruction UINI is executed.
(Initial normal completion signal (X19): ON)
(Open completion signal (address: 5000H (20480)): All OFF (0H))
The Ethernet module is initialized after the parameters (local station IP
address, operation settings) have been specified via the control data of
the dedicated instruction.
4) When the re-initial processing is completed, the re-initial specification
(address: 1FH, bit 15) becomes "0" and the initial processing
completion signal X19 turns on.
If the re-initial processing is completed abnormally, the error code is
stored in the following area.
Initial error code storage area (address: 69H (105))

(3) Precautions for combination with the MELSOFT products when the
setting is changed to "Enable TCP Maximum Segment Size Option
transmission" in re-initial processing
(a) MELSOFT series products supporting the TCP Maximum Segment
transmission function
For setting the "Enable TCP Maximum Segment Size Option transmission",
use the following MELSOFT products.
GX Developer : Version8.07H or later
MX Component : Version3.03D or later
MX Links : Version3.08J or later

(b) MELSOFT series products not listed above (a)


When using a MELSOFT product that is not listed above (a) to make
communication via Ethernet, set it to "Disable TCP Maximum Segment
Size Option transmission" or use UDP/IP type communication.
Otherwise, the sequence program may not function correctly (read/write is
incorrect).

5 - 11 5 - 11
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
Please keep the following points in mind when re-initializing the Ethernet module.
(Failure to do so may cause errors in the data communication with the external
devices.)
(1) Be sure to end all current data communication with external devices and close
all connections before performing a re-initial processing.
(2) Do not mix a re-initial processing done by writing directly into buffer memory, for
instance by using a TO instruction, with a re-initial processing via UINI instruction.
Also, do not request another re-initial processing while a re-initial processing
is already being performed.
(3) Be sure to reset external devices if the IP address of the Ethernet module has
been changed. (If an external device maintains the Ethernet address of a
device with which it communicates, the communication may not be continued
after the IP address of the Ethernet module has been changed.)

REMARKS
It is possible to change the operational settings when performing re-initial processing
by a sequence program.
In the case of Ethernet module, parameters other than the operational settings, the
settings should be changed via GX Developer, after which the QCPU (CPU No. 1 in
the case of a multiple CPU system) should be reset.
Applicable buffer memory
Parameter setting item Parameter changes Reference section
address (hexadecimal)
PLC parameters — —
I/O assignment settings — Section 4.5
Interrupt pointer settings — Section 7.3
Network parameters
Setting the number of
— Section 4.6
Ethernet/CC IE/MELSECNET
cards
Operational settings 1FH Section 4.7, 5.2.3
Timer setting BH to 13H ( 1) Section 5.2
Initial
DNS settings User's Manual (Application),
settings —
Chapter 2
Open settings 20H to 5FH ( 1) Section 5.5
Router relay parameter 4H, 200H to 224H ( 1) Section 5.3
Station No. <-> IP User's Manual (Application),
4H, 229H to 3A9H ( 1)
information Chapter 3
User's Manual (Application),
FTP parameters 4H, 3B0H to 3BBH ( 1)
Chapter 5
E-mail settings —
Send mail address User's Manual (Application),

setting Chapter 2
News setting —
Interrupt settings — Section 7.3
Redundant setting — Section 5.11.3
User's Manual (Application),
Routing parameters —
Chapter 3
Remote password settings — Section 5.9.5

: Valid, : Invalid
*1 The programmable controller CPU operates with the settings performed during the
re-initial processing in the applicable buffer memories. Do not change the settings in
the applicable buffer memories.
5 - 12 5 - 12
5 COMMUNICATION PROCEDURE
MELSEC-Q

(4) Sample Program


The following figure shows a sample program that performs a re-initial processing.
When I/O signals of the Ethernet module are X/Y00 to X/Y1F
U0\

Always ON Connection 1
open completion
signal

Re-initial Re-initial
instruction instruction

<Specify the change of operation settings >

Re-initial
Connection 1
instruction
open
completion
signal Connection 2
open <Read the current operation setting status>
completion U0\
signal

<Set write enable during RUN >

UINI
instruction
completion
device

Initial
completion
status

Processing upon norm al com pletion


UINI UINI
instruction instruction
completion abnormal
device completion
device

D ata com m unication enabled


Initial normal
completion signal

Processing upon abnorm al com pletion


UINI
instruction
abnormal
completion
device

Re-initial
instruction

D ata com m unication enabled


Initial normal
completion signal

POINT
This is an example program that can be used to perform re-initial processing when
communicating with connections 1 and 2. The corresponding numbers and bits for
each connection should be specified if other connections are used.

5 - 13 5 - 13
5 COMMUNICATION PROCEDURE
MELSEC-Q

REMARKS
Direct write to the following buffer memory addresses enables the re-initial
processing of the Ethernet module.
The procedure for performing the re-initial processing by directly writing to the buffer
memory is explained below:
(a) Change the value stored in the TCP Maximum Segment transmission area
(address: 1EH).
0000H: Enable TCP Maximum Segment Size Option transmission
8000H: Disable TCP Maximum Segment Size Option transmission
(b) Change the values stored in the communication condition setting area (address:
1FH).
Bits 0 to 14 : Specify the values set in the operation settings.
Bit 15 : "1"
b15 b8 b6 b5 b4 b1
Buffer memory
6) 0 5) 0 4) 3) 2) 1) 0
address 1FH

1) Communication data code setting (b1)


0: Communication in binary code
1: Communication in ASCII code
2) TCP Existence confirmation setting (b4)
0: Use the Ping
1: Use the KeepAlive
3) Send frame setting (b5)
0: Ethernet frame
1: IEEE802.3 frame
4) Setting of write enable/disable at RUN time (b6)
0: Disable
1: Enable
5) Initial timing setting (b8)
0: Do not wait for OPEN (communication impossible at STOP time)
1: Always wait for OPEN (communication possible at STOP time)
6) Re-initial specification (b15)
0: Re-initial processing complete (reset by the system)
1: Re-initial processing request (set by the user)
(c) Once the re-initial processing is complete, the re-initial specification
(address: 1FH, bit 15) is set to "0." The initial processing completion signal
X19 also turns ON.
If the re-initial processing completed abnormally, an error code will be
stored in the following area:
Initial error code storage area (address: 69H(105))
(Sample Program)
The following figure shows a sample program that performs a re-initial
processing by writing directly to buffer memory.
Create a program that contains contacts (user flags, etc.) indicating the
conditions shown below within a sequence program.
• Open completion signal storage area (address: 5000H (20480))

5 - 14 5 - 14
5 COMMUNICATION PROCEDURE
MELSEC-Q

U0\

Always ON Connection 1
open completion
signal

Re-initial Re-initial
instruction instruction

<Set to Disable TCP segment trans. >


U0\

Re-initial Connection 1
instruction open
completion
signal
Connection 2
open <Set to ASCII code communication >
completion
signal U0\

<Set to KeepAlive >


U0\

<Set to the Ethernet frame >


U0\

<Set to "Enable write at RUN time" >


U0\

<Set to "Do not wait for OPEN" >


U0\

<Re-initial instruction request >


U0\

Initial
completion
status

\ U0\
Processing upon norm al com pletion
Initial error
code
storage area

D ata com m unication enabled


Initial normal
completion signal

U0\
Processing upon abnorm al com pletion
Initial error
code
storage area

Re-initial
instruction

D ata com m unication enabled


Initial normal
completion signal

5 - 15 5 - 15
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
This is an example program that can be used to perform re-initial processing when
communicating with connections 1 and 2. The corresponding numbers and bits for
each connection should be specified if other connections are used.

5 - 16 5 - 16
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.3 Router Relay Parameter

This section explains the router relay parameter using GX Developer.


Select [Setting the number of Ethernet/CC IE/MELSECNET cards] – [Router relay
parameter] to start the [Setting the Ethernet router relay parameter] screen.

Item name Description of setting Setting range/options


• Use
Router relay function Select whether the router relay function is not used or is used.
• Not used
Sub-net mask pattern Set the sub-net mask. C0000000H to FFFFFFFCH
Default router IP address Set the IP address of the default router to be routed through. Other than 00000000H and FFFFFFFFH
• Decimal
Input format Select the input format of setting items.
• Hexadecimal
Set the sub-net address or network address of the external device when
Sub-net address communicating with an external device on another Ethernet via a router other Other than 00000000H and FFFFFFFFH
than the default router.
Set the IP address of a router used when communicating with an external device
Router IP address —
on another Ethernet via a router other than the default router.

5 - 17 5 - 17
5 COMMUNICATION PROCEDURE
MELSEC-Q

(1) Router relay function (Address: 4H ... b5, b4)


(a) Set whether the router relay function will be used or not.
The router relay function is not needed when the Ethernet module
communicates with the target device on the same Ethernet (the subnet
address of the IP address is the same).
(b) The router relay function allows communication with devices on other
Ethernets via routers and gateways.
(The router relay function does not mean a function with which the Ethernet
module acts as a router.)
(c) One default router and a maximum of any eight routers can be set for the
router relay function.

(2) Subnet mask pattern (Address: 200H, 201H)


(a) Set the subnet mask. 1 (Setting range: C0000000H to FFFFFFFCH)
Consult the network administrator for the setting.
(b) When not using the subnet mask, set any of the following table values
according to the class.
Class Mask value
Class A FF000000H
Class B FFFF0000H
Class C FFFFFF00H

1 Networks constructed by Ethernet include small-scaled network systems


where multiple devices are connected to one Ethernet, and medium- and
large-scaled network systems where multiple small-scaled networks are
connected by routers, etc.
The subnet mask logically divides one network, where many devices are
connected, into multiple sub-networks to facilitate administration.

(Example) Class B
Network address

81H 05H 2FH 01H


IP address
1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1

FFH FFH FCH 00H


Subnet mask
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

Subnet address Host address

81H 05H 2FH 01H


IP address
1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1

POINT
(1) All devices on the same sub-network must have common subnet masks.
(2) When not administrated by the sub-network, the connected devices need not
have subnet masks. (Set the network address of the corresponding class.)

5 - 18 5 - 18
5 COMMUNICATION PROCEDURE
MELSEC-Q

(3) Default router IP address (Address: 202H, 203H)


Set the IP address of the router (default router) to be used when the Ethernet
module communicates with the target device on another Ethernet via other than
the router specified in the router information (refer to (4) below).
Set the value that satisfies the following conditions.
• Condition 1: The IP address class is any of A, B and C.
• Condition 2: The sub-net address of the default router is the same as that of
the local station Ethernet module.
• Condition 3: The host address bits are not all "0" or all "1".

POINT
If the corresponding sub-net address does not exist in the router information (refer
to (4) in this section) when the connection is opened or data communication is
made, communication is made via the default router.

(4) Router information: Subnet address (Address: 205H, 206H and


later)
(a) Set the network address ( 1) or subnet address ( 2) of the target device
when the Ethernet module communicates with the target device on another
Ethernet via other than the default router.
Set the value that satisfies the following conditions.
• Condition 1: The IP address class is any of A, B and C.
• Condition 2: The host address bits are all "0".

1 If the class (network address) of the local station differs from that of
the external device, set the network address of the external device.
2 If the class (network address) of the local station is the same as that of
the external device, set the sub-net address of the external device.

(b) Subnet address setting examples


Local station Ethernet module
Class B
IP address : 81052F01H (129.5.47.1)
Subnet mask: FFFFFC00H (255.255.252.0)
Ethernet4

Router 1 Router 2 Router 3

Ethernet1 Ethernet2 Ethernet3

Setting example 1 Setting example 2 Setting example 3


Target device 1) Target device 2) Target device 3)
Class B Class A Class B
IP address: 81044001H IP address: 71044001H IP address: 81052902H
(129.4.64.1) (113.4.64.1) (129.5.41.2)

5 - 19 5 - 19
5 COMMUNICATION PROCEDURE
MELSEC-Q

(Setting example 1) When the network addresses of the local station Ethernet module and target device differ
Network address
Local station Ethernet
module 81H 05H 2FH 01H
IP address (Class B) 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1

Target device 1) 81H 04H 40H 01H


IP address (Class B) 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Set the network address of the target device 1)


Network address

Subnet address set 81H 04H 00H 00H


value 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

(Setting example 2) When the classes of the local station Ethernet module and target device differ
Network address
Local station Ethernet
module 81H 05H 2FH 01H
IP address (Class B) 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1

Target device 2) 71H 04H 40H 01H


IP address (Class A) 0 1 1 1 0 0 0 1 0 0 0 0 0 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1

Set the network address of the target device 2)


Network address

Subnet address set 71H 00H 00H 00H


value 0 1 1 1 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

(Setting example 3) When the network addresses of the local station Ethernet module and target device are
the same
Network address
Local station Ethernet
module 81H 05H 2FH 01H
IP address (Class B) 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 1 1 1 0 0 0 0 0 0 0 1

FFH FFH FCH 00H


Subnet mask
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0

Target device 3) 81H 05H 29H 02H


IP address (Class B) 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 1 0 0 0 0 0 0 1 0

Set the subnet address of the target device 3)


Subnet address

Subnet address set 81H 05H 28H 00H


value 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0

5 - 20 5 - 20
5 COMMUNICATION PROCEDURE
MELSEC-Q

(5) Router information: Router IP address (Address: 207H, 208H and


later)
Set the IP addresses of the routers to be used when the Ethernet module
communicates with the target devices on other Ethernets via other than the
default router.
Set the value that satisfies the following conditions.
• Condition 1: The IP address class is any of A, B and C.
• Condition 2: The sub-net address of the router is the same as that of the local
station Ethernet module.
• Condition 3: The host address bits are not all "0" or all "1".

POINT
(1) When the Ethernet module communicates with the external device via the
router in Passive open (TCP/IP) status, communication can be made without
use of the router relay function.
(2) The router relay function is not needed in a system that uses the Proxy router.

5 - 21 5 - 21
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.4 Confirming the Completion of the Initial Processing

The initial processing of the Ethernet module completes by saving the following
parameters in the programmable controller CPU of the station to which the Ethernet
module is installed and by restarting the programmable controller CPU.
(When the processing is completed normally, the [INIT.] LED on the front of the
Ethernet module turns on.)
• "Network parameters Setting the number of Ethernet/CC IE/MELSECNET cards"
parameter
• "Operational settings" parameter
• "Initial settings" parameter
This section explains how to check the completion of the initial processing.

POINT
The status of the Ethernet module becomes communication enabled when the
initial processing is completed normally. See reference sections for each
communication function to perform communication.
When the initial processing has not been completed normally, do the following to
check the contents of the error, take corrective actions, then execute the initial
processing again.
• Check the error code using the "Parameter status" of the Ethernet diagnostics.
(See Section 11.2.)
• Check the contents of the error corresponding to the error code, then take
corrective actions. (See Section 11.3.3.)

5.4.1 PING test using GX Developer (Via Ethernet board)

This section explains how to check the completion status of the initial processing for
the Ethernet module using the PING test function of the GX Developer Ethernet
diagnostics.

(1) PING test


(a) The PING test is used to check, through GX Developer, the existence of an
Ethernet module on the same Ethernet line that has completed the initial
processing ( 1) or an external device (such as a personal computer) with
the designated IP address.
1 The PING test can also be performed for the QnA/A Series Ethernet
modules. However, the PING test can be performed for the following
A Series Ethernet modules starting with software version S:
AJ71E71, AJ71E71-B2, AJ71E71-B5

(b) The following can be checked by performing the PING test for the Ethernet
module:
• Whether a line has been properly connected to the test target Ethernet
module
• Whether the parameters for the Ethernet module have been correctly set
• Whether the initial processing for the Ethernet module has been
completed normally

5 - 22 5 - 22
5 COMMUNICATION PROCEDURE
MELSEC-Q

(c) The PING test can be performed for an Ethernet module in the same
Ethernet as the local station (same sub-net address.)

(d) If the external device subject to the PING test is an Ethernet module, do not
designate the UDP port for GX Developer of the Ethernet module as a valid
port for the remote password check. If it is designated as a valid port for the
remote password check, the PING test cannot be performed.

(2) Executing the PING test


The example below explains the PING test methodology and GX Developer
settings when performing a PING test for the Ethernet module in the same
Ethernet from a peripheral device.
GX Developer

Station No.: 3
[10.97.85.223]

Network No. 1 Ethernet

Station No.: 2 QCPU Ethernet QCPU Ethernet Station No.: 1


[10.97.85.222] 2) module 1) module [10.97.85.221]

(PING test target station)

(a) Setting the PING test target station


1) Set the following Ethernet module parameters for the PING test target
station through GX Developer.
Use default values for setting items other than those listed below.
Setting description
Setting screen Setting item
QCPU 1) QCPU 2)
Network type Ethernet Ethernet
Network parameters setting Starting I/O No. 0000 0000
the number of Ethernet/CC Network No. 1 1
IE/MELSECNET cards Group No. 1 1
Station No. 1 2
Operational setting IP address [10.97.85.221] [10.97.85.222]

2) Write the parameters to the applicable station.


3) The initial processing is completed when the programmable controller
CPU restarts.
(When the initial processing is completed normally, the [INIT.] LED of
the Ethernet module lights up.)

5 - 23 5 - 23
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) Designating GX Developer connection destination (connecting to QCPU [2])

(c) Executing the PING test through GX Developer


1) Select the PING test on the Ethernet diagnostics screen.
GX Developer [Diagnostics] [Ethernet diagnostics]
PING test

2) Perform the settings indicated below, then click the Execute button.
The execution results of the PING test are displayed.
(Example) The following shows the flow of the PING test when "4" is
designated as the transmission count.
Time of the communication time check: 1 s
Normal Normal Abnormal Normal
response response response response
GX Developer

Number of transmissions: 4 times


Ethernet line
Success/transmissions = 3/4

Ethernet module

Normal response occurs when the PING test response is received


within the time of the communication time check.

5 - 24 5 - 24
5 COMMUNICATION PROCEDURE
MELSEC-Q

[PING test screen]

(Example of normal completion) (Example of abnormal completion)

[Display contents]
Item name Description of item setting Setting range/options
IP address Specify the IP address for the PING test target station. (Target station IP address)
Address
IP address input form Select the input format for the IP address. Decimal/hexadecimal
specification
Host name Specify the host name for the PING test target station. —
Display the host Results are displayed using the host name corresponding to the IP address in

name the result display field.
1 to 8192 bytes (Specify 1460 bytes or
Specify the data size Specify the size of the system data transmitted during the PING test.
less for the Ethernet module.)
Option
Specify the time of
specification
the communication Specify the completion wait time for the PING test. 1 to 30 s
time check
Specify the number • Specify the number of times.
Specify the transmission count.
of transmission • Execute till interrupting.
Result Display results of the PING test. —
Display the total packet transmission count and the number of successes
Success/transmissions —
during the PING test.

5 - 25 5 - 25
5 COMMUNICATION PROCEDURE
MELSEC-Q

(Address specification)
The PING test target station (external device subject to the PING test) is
specified by the IP address or the host name.
1) Specification using the IP address
• Select the input format for the IP address (select: Decimal or
hexadecimal)
• Specify the IP address of the external device according to the input
format (decimal or hexadecimal).
2) Specification using the host name
Specify the host name of the external device set in the DNS server or
the HOSTS file for the personal computer on which GX Developer is
mounted.
The IP address can also be entered in the host name specification
field.
(Option specification)
Set the details for the PING test. (No setting required if the default is used.)
1) Display the host name.
Select this to display the host name instead of the IP address for the
PING test destination device in the result display field.
2) Specify the data size.
Specify the size of the system data to be transmitted for the test during
the PING test.
Input range: 1 to 8192 bytes (default: 32 bytes)
The Ethernet module will return a response of 1460 bytes if the
PING test is performed when a data size of 1460 bytes or greater
for transmitting to the Ethernet module is specified.
3) Specify the time of the communication time check.
Specify the response wait time for the PING test.
Input range: 1 to 30 s (default: 1 s)
4) Specify the number of transmissions.
Specify the number of times the PING test is to be performed.
Selection item Description of item Remarks
Transmission count: 1 to 50 times
Specify the number of times The PING test is performed for the number of specified times.
(default: 4 times)
Execute till interrupting The PING test is performed until the interrupt button is pressed. —

(Result)
Results of the PING test are displayed.
<When the test is completed abnormally>
Check the following, then perform the PING test again.
• How the Ethernet module is mounted on the base unit.
• Status of the connection to the Ethernet.
• Contents of the parameters written to the programmable controller CPU.
• Operating status of the programmable controller CPU (whether any errors
have occurred).
• IP addresses set in GX Developer and the PING test target station.
• Whether the external device has reset when the Ethernet module was
changed.
(Success/transmissions)
The number of successes and the total packet transmission count when the
PING test is performed are displayed.
5 - 26 5 - 26
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.4.2 PING test using GX Developer (Via CPU)

This section explains how to check the completion status of the initial processing for
the Ethernet module using the PING test function of GX Developer’s Ethernet
diagnostics.

(1) PING test


(a) The PING test is used to check the existence of an Ethernet module on the
same Ethernet line as the connection station of GX Developer that has
completed the initial processing ( 1) or an external device (such as a
personal computer) with the designated IP address.
1 The PING test can also be performed for the QnA/A Series Ethernet
modules. However, the PING test can be performed for the following A
Series Ethernet modules starting with software version S:
AJ71E71, AJ71E71-B2, AJ71E71-B5

(b) The following items can be checked by performing the PING test for the
Ethernet module:
• Whether a line has been properly connected to the test target Ethernet
module.
• Whether the parameters for the Ethernet module have been correctly set.
• Whether the initial processing for the Ethernet module has been
completed normally.

(c) The PING test can be performed for an Ethernet module on the same
Ethernet as that of the local station (same sub-net address).
Note that the PING test is not available for the Ethernet module mounted on
the station to which GX Developer is directly connected (local station). (The
PING test addressed to the local station is not available.)

(d) If the external device subject to the PING test is an Ethernet module, do not
designate the UDP port for GX Developer of the Ethernet module as a valid
port for the remote password check. If the port is designated as such, the
PING test cannot be performed.

5 - 27 5 - 27
5 COMMUNICATION PROCEDURE
MELSEC-Q

(2) Executing the PING test


The example below explains the PING test methodology and GX Developer
settings when a PING test is performed for an Ethernet module of other station
from GX Developer connected to the QCPU.
GX Developer

(GX Developer connecting station)


QCPU Ethernet Station number: 2
2) module [10.97.85.222]
Ethernet

Network No. 1
QCPU Ethernet Station number: 1
1) module [10.97.85.221]
(PING test target station)

(a) Settings on the QCPU station side


1) Set the following Ethernet module parameters for each QCPU using
GX Developer.
Use default values for setting items other than those listed below.
Setting description
Setting screen Setting item
QCPU 1) QCPU 2)
Network type Ethernet Ethernet
Network parameters setting Starting I/O No. 0000 0000
the number of Ethernet/CC Network No. 1 1
IE/MELSECNET cards Group No. 1 1
Station No. 1 2
Operational setting IP address [10. 97. 85. 221] [10. 97. 85. 222]

2) Write the parameters to the applicable station.


3) The initial processing is completed when the programmable controller
CPU restarts.
(When the initial processing is completed normally, the [INIT. ] LED of
the Ethernet module lights up.)

5 - 28 5 - 28
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) Designating the GX Developer connection destination (connecting to QCPU


2)

(c) Executing the PING test through GX Developer


1) Select the PING test on the Ethernet diagnostics screen.
GX Developer → [Diagnostics] → [Ethernet diagnostics] → PING test
2) Perform the settings indicated below, then click the Execute button.
The execution results of the PING test are displayed.
(Example) The following shows the flow of the PING test when "4" is
designated as the transmission count.
Time of the communication time check: 1 s
Normal Normal Abnormal Normal
response response response response
GX Developer

Number of transmissions: 4 times


Ethernet line
Success/transmissions = 3/4

Ethernet module

Normal response occurs when the PING test response is received


within the time of the communication time check.

5 - 29 5 - 29
5 COMMUNICATION PROCEDURE
MELSEC-Q

[PING test screen (via CPU)]

(Example of normal completion) (Example of abnormal completion)


[Display contents]
Item name Description of item setting Setting range/option
Specify the network number of the Ethernet module in the PING executing
Execute Network No. 1 to 239
station.
station of
Specify the station number of the Ethernet module in the PING executing
PING Station No. 1 to 64
station.
IP address Specify the IP address of the PING test target station. 00000001H to FFFFFFFEH
Target of
IP address input
PING Select the input format of the IP address. Decimal/hexadecimal
form
Specify the time of
the communication Specify the response wait time for the PING test. 1 to 30 s
Option
time
specification
Specify the number • Specify the number of times.
Specify the transmission count.
of transmissions • Execute till interrupting.
Result Display the result of the PING test. —
Display the total packet transmission count and its success count during the
success/transmissions —
PING test execution.

(Connection Setup)
1) Execute station of PING (station connected to GX Developer)
Specify the network number and station number of the Ethernet module that will
execute the PING test.
The network number and the station number will be set on the " network
parameters setting the number of Ethernet/CC IE/MELSECNET cards" screen of
GX Developer.
2) Target of PING
Specify the IP address of the PING test target station (the External device subject
to the PING test).
• Select the input format of the IP address (select decimal or hexadecimal).
• Specify the IP address of the PING test target station according to the input
format (decimal or hexadecimal).
(Option specification, result, success/transmissions)
The information displayed is the same as that displayed when performing a PING test
via the Ethernet board. See Section 5.4.1.

5 - 30 5 - 30
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.4.3 Loop back test using GX Developer

This section explains how to check the completion status of the initial processing for
the Ethernet module using the loop back test function of GX Developer Ethernet
diagnostics.

(1) Loop back test


(a) The loop back test is performed in the network for GX Developer connection
destination. The test involves transmission of loop back test messages in
order with respect to the network specified by the loop back test request
destination and all Ethernet modules within the station number range
(function version B and later) to check whether the initial processing for
each module has been completed.
A loop back test can be performed on a network connected via the
Ethernet board.
Since the Ethernet module of function version A and QnA/A series
Ethernet module do not have a function to respond to this request, the
test results cannot be checked.
GX Developer
(Station to which GX Developer is connected)
Station No.: 1 Station No.: 3 Station No.: 5 Station No.: 7 Station No.: 9
Ethernet Ethernet Ethernet Ethernet Ethernet
module module module module module
Network No.1

Ethernet Ethernet Ethernet Ethernet


Loop back test is performed module module module module
for network No. 1 from
Station No.: 2 Station No.: 4 Station No.: 6 Station No.: 8
station 1 to station 5.

(b) The following can be checked by performing the loop back test:
• Whether a line has been properly connected to the test target Ethernet
module
• Whether the parameters for the Ethernet module have been correctly set
• Whether the initial processing for the Ethernet module has been
completed normally
(c) The loop back test can be performed for an Ethernet module in the same
Ethernet as the local station (same sub-net address).
(d) In the station on which the Ethernet module subject to the loop back test is
mounted, do not designate the UDP port for GX Developer of the Ethernet
module as a valid port for the remote password check. If it is designated as
a valid port for the remote password check, the loop back test cannot be
performed.

(e) When performing a loop back test using GX Developer, set the router relay
function in the router relay parameter of GX Developer to "Not used."

5 - 31 5 - 31
5 COMMUNICATION PROCEDURE
MELSEC-Q

(2) Executing the loop back test


The example explains the loop back test methodology and GX Developer
settings when performing a loop back test for the Ethernet module in the same
Ethernet from the GX Developer.
GX Developer

Station No.: 3
[10.97.85.223]

Network No.1 Ethernet

QCPU Ethernet QCPU Ethernet


1) module 2) module

Station No.: 1 Station No.: 2


[10.97.85.221] [10.97.85.222]

(a) QCPU station side settings


1) Set the following Ethernet module parameters for each programmable
controller CPU through GX Developer.
Use default values for setting items other than those listed below.
Setting description
Setting screen Setting item Remarks
QCPU 1) QCPU 2)
Network type Ethernet Ethernet
Network parameters
Starting I/O No. 0000 0000 See Section 4.6
setting the number of
Network No. 1 1 Set the local station
Ethernet/CC IE/
Group No. 1 1 network No., etc.
MELSECNET cards
Station No. 1 2
See Section 4.7
Operational setting IP address [10.97.85.221] [10.97.85.222] Enter the local station IP
address.
Station No. <-> IP
Table exchange system Table exchange system
information system See Section 3.3.1 of
Station No. <-> IP
Network No. 1 1 User's Manual
information
Station No. 3 3 (Application).
IP address [10.97.85.223] [10.97.85.223]

It is not necessary to set the network No., station No. and IP address for
GX Developer (station performing the loop back test) when "Automatic
response system" is specified as the Station No. <-> IP information
system under the Station No. <-> IP information.

2) Write the parameters to the applicable station.


3) The initial processing is completed when the programmable controller
CPU reboots.
(When the initial processing is completed normally, the [INIT.] LED of
the Ethernet module lights up.)

5 - 32 5 - 32
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) Designating GX Developer connection destination (connecting to QCPU [1])

(c) Executing the loop back test through GX Developer


1) Select the loop back test on the Ethernet diagnostics screen.
GX Developer [Diagnostics] [Ethernet diagnostics]
Loop back test

2) Perform the settings indicated below, then click the Execute button.
The execution results of the loop back test are displayed.

[Loop back test screen]

[Display contents]
Item name Description of item setting Setting range/options
Network No. Specify the network No. for the loop back test target module. 1 to 239
Number of
Specify the station number range for the loop back test target module. 1 to 64
Setting item confirmation node
Check at
Specify the response wait time for the loop back test. 1 to 99 s
communication time

5 - 33 5 - 33
5 COMMUNICATION PROCEDURE
MELSEC-Q

(Network No. (1 to 239))


Specify the loop back test request destination network No.
Input range: 1 to 239

(Number of confirmation node (1 to 64))


1) Specify the range (starting node and end node) of the Ethernet module
subject to the loop back test using the station No.
Input range: 1 to 64
2) The loop back test is performed in order from the starting node.
Upon the reception of a response from the station performing the
loop back test or after the time of the communication time check
elapses, the loop back test is performed for the next target station
and so on in order until the end station.

(Check at communication time)


Specify the response wait time for the loop back test for each station.
Input range: 1 to 99 s (default: 10 s)

(Result)
Results of the loop back test are displayed.
1) The IP address for the Ethernet module that has completed the loop
back test normally is displayed.
If the same IP address or station number has been set to multiple
stations due to a parameter setting error on the loop back test
target module side, only the results for the station that issued a
response first will be displayed.
2) "No response" or an error code will be displayed for an Ethernet
module in which the loop back test is completed abnormally.
"No response" is not shown with GX Developer Version 6.03D or former products.

3) If the local station is specified as a loop back test target station (station
performing a loop back test), "No response" will be displayed as the
loop back test results for the local station.
"No response" is not shown with GX Developer Version 6.03D or former products.

(d) Corrective action when the test is completed abnormally


The table below shows the display contents, status of the target Ethernet
module, causes and corrective actions when the loop back test has been
completed abnormally.
Display contents of Status of the target
Cause Corrective action
loop back test results Ethernet module
Initial processing normal
"IP address" completion status — —
([INIT.] LED ON status)
Check the setting values for the following
parameters:
The initial processing for the target Ethernet module • Network parameters setting the number of
has not been completed normally. Ethernet/CC IE/MELSECNET cards
"No response" No error • Operational setting
• Initial setting
There is an error in the line connection to the target
• Check the cable.
Ethernet module. (Cable disconnection, breakage,
• Check the transceiver.
etc.)

5 - 34 5 - 34
5 COMMUNICATION PROCEDURE
MELSEC-Q

Display contents of Status of the target


Cause Corrective action
loop back test results Ethernet module
IP address for the target Ethernet module is
incorrect. (Class or sub-net address differs from the
Check the parameter setting values for the
Ethernet module setting.)
operation setting.
The same IP address has been set to multiple target
Ethernet modules.
Perform a PING test for the "No response"
No error module.
The same network number or station number has If the test has been completed normally,
"No response" been set to multiple target Ethernet modules. check the parameter setting value for the
network parameters setting the number of
Ethernet/CC IE/MELSECNET cards.
The Ethernet line is in the high load status (including
Perform another test when the load on the
a case in which an error equivalent to the error code
Ethernet line is low.
C030H, C031H is occurring).
Error exists Check the setting value for the routing
Routing parameter is not set. (An error equivalent to
parameter. (See Chapter 3 of User's Manual
the error code C080H is occurring.)
(Application))
Cancel the remote password setting and write
The remote password status of GX Developer UDP
the parameter to the programmable controller
for the target Ethernet module is in the lock status.
CPU.
No error
The target Ethernet module is a function version A Check the model and function version for the
"Error code"
module. subject module.
The Ethernet line is in the high load status (including
Perform another test when the load on the
a case in which an error equivalent to the error code
Error exists Ethernet line is low.
C030H, C031H is occurring)

POINT
(1) The loop back test can only be performed for the Ethernet module of function
version B and later.
Test results cannot be checked for the following modules. ("No response" will
be displayed. However, nothing is shown under the use of GX Developer
version 6.03D or former products.)
Also, they will not be counted in the total number of stations.
• Ethernet module of function version A, QnA/A series Ethernet module
(This is because there is no function to respond to this request.)
• Ethernet module that has not completed the initial processing
(This is because the initial processing has not been completed.)
If the Ethernet module of function version A or QnA/A series Ethernet
module that does not have a function to respond to the loop back test
receives a loop back test request, the following error codes will be stored
in the error log area of the buffer memory.
• Error code 4080H in the case of an Ethernet module of function version
A or QnA series Ethernet module of function version B
• Error code 50H in the case of a QnA series Ethernet module of function
version A or A series Ethernet module.
(2) After checking the contents of the error and taking corrective actions for an
Ethernet module in which the loop back test has been completed abnormally,
reboot the station on which the Ethernet module is mounted.
With rebooting, the initial processing for the Ethernet module will be
performed.
Check the completion of the initial processing for the Ethernet module using
the PING test.
The PING test can also be performed on the "Loop back test" screen.
(3) If an error code is displayed due to abnormal completion of the loop back test,
check the contents of the error corresponding to the error code, then take
corrective actions by referring to Section 11.3.3.

5 - 35 5 - 35
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.4.4 PING command (Personal computer Ethernet module)

The following example illustrates how to confirm the completion of the initial processing
by issuing the PING command to the local station’s Ethernet module from an external
device connected on the same Ethernet. (In the example, the confirmation is made
between devices whose IP address class and sub-net address are identical.)
<Designation method>
ping IP address
<Example>
IP address of the Ethernet module: 192.0.1.254
Example of screen at normal completion

C:\>ping 192.0.1.254…Execute the ping command

Pinging 192.0.1.254 with 32 bytes of data:

Reply from 192.0.1.254: bytes=32 time=1ms TTL=128


Reply from 192.0.1.254: bytes=32 time<10ms TTL=128
Reply from 192.0.1.254: bytes=32 time<10ms TTL=128
Reply from 192.0.1.254: bytes=32 time<10ms TTL=128

Ping statistics for 192.0.1.254:


Packets: Sent = 4, Received = 4, Lost = 0 (0% loss)
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms

C:\>_

Example of screen at abnormal completion

C:\>ping 192.0.1.254…Execute the ping command

Pinging 192.0.1.254 with 32 bytes of data:

Request timed out:


Request timed out:
Request timed out:
Request timed out:

Ping statistics for 192.0.1.254:


Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms

C:\>_

<When the PING command does not respond successfully>


Check the following items and send the PING command again.
• Check the Ethernet module's attachment to the base unit.
• Check the connection to the Ethernet network.
• Check the contents of each parameter written to the programmable controller
CPU.
• Check the operation condition of the programmable controller CPU (are there
any irregularities?).
• Check the IP address of the Ethernet module dictated by the PING command.
5 - 36 5 - 36
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.4.5 Loop back test (Communication using the MC protocol)

The loop back test can be performed with communication using the MC protocol in
order to check the completion status of the initial processing for the target Ethernet
module.
The following is an overview of the loop back test for communication using the MC
protocol. See the Q Corresponding MELSEC Communication Protocol Reference
Manual for details.

(1) Loop back test for communication using the MC protocol


The loop back test is a function designed to check the following:
• Whether a line has been properly connected to the test target Ethernet module.
• Whether the parameters for the Ethernet module have been correctly set.
• Whether the initial processing for the Ethernet module has been completed
normally.
• Whether the program for the external device is running correctly.

(2) It is necessary to connect lines when performing communication using the MC


protocol with the user port on the Ethernet module side.
Perform the open processing for the connection to be used on the Ethernet
module side.

(3) This function can only be used for the Ethernet module of the local station. The
function cannot be used for the Ethernet module of another station via a network
system.

(Station sending a loop back test command)

Ethernet

Ethernet Ethernet Ethernet (Loop back test target station)


QCPU QCPU QCPU
module module module

5 - 37 5 - 37
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.5 Open Settings

This section explains the open setting using GX Developer.


Select [Setting the number of Ethernet/CC IE/MELSECNET cards] – [Open settings] to
start the [Ethernet open settings] screen.

A sequence program can perform open processing (establishing connection) with


external devices up to a maximum of 16 stations
Once a connection is established with an external device, it is possible to communicate
using the MC protocol, fixed buffer communication, and random access buffer
communication.
Thus, the open processing is required even when communication using the MC
protocol and random access buffer communication.
Item name Description of setting Setting range/options
• TCP/IP
Protocol Set the communication method (protocol).
• UDP/IP
1
• Active open
1
• Unpassive open
1
Open system Select the connection open system. • Fullpassive open
• MELSOFT connection
• OPS connection
• Send
Fixed buffer Select the usage of the fixed buffer.
• Receive
• Procedure exist
Fixed buffer communication Select which protocol is used for fixed buffer communication.
• No procedure
• Pairs
Pairing open Select whether paring open is used or not.
• No pairs
Select whether the continued existence of a destination station for a • No confirm
Existence confirmation
connection should be confirmed or not. • Confirm
Local station Port No. Set the local station’s port No. 401H to 1387H or 138BH to FFFEH
1H to FFFFFFFFH
Destination IP address Set the IP address of an external device.
(FFFFFFFFH: Simultaneous Broadcast)
401H to FFFFH
Dest. Port No. Set the port No. of an external device. (FFFFH: Simultaneous Broadcast, can be
set only when receiving)

1 For safety CPUs, connection No.1 to No.8 can be used.


Connection No.9 to No.16 is available for "MELSOFT connection" only.

5 - 38 5 - 38
5 COMMUNICATION PROCEDURE
MELSEC-Q

(1) Protocol
(connection numbers 1 to 8; addresses: 20H to 27H … b8)
(connection numbers 9 to 16; addresses: System area is used)
(a) Select the protocol for each connection.
Name of setting Description of setting
TCP Communicate using TCP/IP.
UDP Communicate using UDP/IP.

(b) For protocols (TCP/UDP), see 1.4, "Software Configuration".

(2) Open system


(connection numbers 1 to 8; addresses: 20H to 27H … b15, b14)
(connection numbers 9 to 16; addresses: System area is used)
(a) Select the connection open system for each connection for which "TCP" is
selected in "(1) Protocol". If "UDP" is selected, the specification of this item
is not required.
Name of setting Description of setting
Perform active open processing to an external device that waits for a passive open
Active
(Fullpassive/Unpassive) on the TCP connection.
Perform passive open processing on the TCP connection addressing all the devices connected
Unpassive to a network.
(The local station is placed in the wait status to wait for an Active open request to be sent.
Perform passive open processing on the TCP connection, only addressing specific devices.
(The local station is placed in the wait status to wait for an Active open request to be sent.)
Fullpassive
The local station waits for an Active open request from the opposite station set in "(8)
Destination IP address".
Used to connect MELSOFT products via TCP/IP communication.
MELSOFT connection Perform passive open processing on the TCP connection, addressing all the MELSOFT
1 2 3 products connected to a network.
(The local station is placed in the wait status for an Active open request to be sent.)
Used to connect the OPS via TCP/IP communication.
OPS connection 1 4 Perform passive open processing on the TCP connection, addressing only specific OPSs. (The
local station waits for an Active open request from the OPS set in "(8) Destination IP address".)

1 Regardless of the initial timing setting in the operation setting (refer to Section 4.7),
this connection will always wait for the open status.
2 The set connection is dedicated to data communication with the MELSOFT products.
3 When simultaneously connecting to multiple MELSOFT products, set the connections
as many as the number of MELSOFT products. (Setting is unnecessary when only
one product is connected. The connection dedicated to the system is used.)
4 When using the MELSOFT product, such as GX Developer, on the OPS to make
TCP/IP communication with the Ethernet module, use the dedicated connection for
system (GX Developer communication TCP port) or set "MELSOFT connection" in
this setting.

Programmable controller CPU Ethernet module Ethernet module Programmable controller CPU

Initial processing Initial request Initial request Initial processing

Initial Initial processing


completion completion
Initial completion Initial completion
Fullpassive/ Open
Unpassive Active open
open Wait for open Open request
request

Open completion Open completion


Open completion Open completion

5 - 39 5 - 39
5 COMMUNICATION PROCEDURE
MELSEC-Q

(3) Fixed buffer


(connection numbers 1 to 8; addresses: 20H to 27H … b0)
(connection numbers 9 to 16; addresses: System area is used)
(a) Here it is selected whether the fixed buffer corresponding to each applicable
connection number will be used for sending or receiving when
communicating using the fixed buffers.
Name of setting Description of setting
Send For sending or fixed buffer communication is not executed.
Receive For receiving.

(b) When both sending and receiving are performed with an external device
using fixed buffer communication, one buffer for sending and one for
receiving are required. Thus, two connections should be set.

(c) Whether the fixed buffers are set for sending or receiving, external devices
can communicate using the MC protocol or the random access buffers.

(4) Fixed buffer communication


(connection numbers 1 to 8; addresses: 20H to 27H … b9)
(connection numbers 9 to 16; addresses: System area is used)
(a) For this item, select the communication method when communicating using
the fixed buffers.
Name of setting Description of setting
• In fixed buffer communication, data is communicated in 1:1 by handshaking with the
external device.
Procedure exist
• Communication using the MC protocol and the random access buffers can be
performed as well.
• The no procedure fixed buffer communication uses dedicated connections.
• The programmable controller CPU and external devices communicate data in 1:1 or
No procedure 1:n mode through simultaneous broadcasting. ( 1)
• The handshaking with an external device must be performed using a sequence
program.

1 For details on the simultaneous broadcasting, see Section 8.3, "Simultaneous Broadcasting When

UDP/IP is Used".

(5) Pairing open


(connection numbers 1 to 8; addresses: 20H to 27H … b7)
(connection numbers 9 to 16; addresses: System area is used)
(a) Select whether or not the Ethernet module’s receiving and sending
connections should be made into one pair and connected to one port of an
external device when using fixed buffer communication (both of the
procedure exists and no procedure can be designated).
For more details on this, see Section 5.7, "Pairing Open".
Name of setting Description of setting
No pairs Does not use the pairing open method.
Pairs Uses the pairing open method.

5 - 40 5 - 40
5 COMMUNICATION PROCEDURE
MELSEC-Q

(6) Existence confirmation


(connection numbers 1 to 8; addresses: 20H to 27H … b1)
(connection numbers 9 to 16; addresses: System area is used)
(a) This setting selects whether or not the Ethernet module should confirm that
an external device still operates normally when there is no communication
for a fixed period of time. The open processing for the connection with the
external device must have been completed.
Name of setting Description of setting
No confirm Do not confirm the existence of the external device.
Confirm the existence of the external device.
Confirm For details on the settings of the existence confirmation time and others, see Section
5.2, "Initial Settings".

(b) When an error occur in the existence confirmation, the Ethernet module
performs the following processing.
• Forcefully closes the line and stores the error information in the error log
area (addresses: E0H to 1FFH) of the buffer memory.
• Turns off the open completion signal (address: corresponding bit of
5000H) and turns on the open abnormal detection signal (X18).

(c) If the external device will be changed while a UDP/IP connection is open,
"No confirm" should be selected.
If "Confirm" is selected, the Ethernet module will confirm the existence of
the first destination after the UDP/IP connection is opened. Existence
confirmation is not performed for the changed destination, i.e. the newly
selected external device.

(d) Select "No confirm", when transmitting data in simultaneous broadcast in


the no procedure fixed buffer communication.

(7) Local station Port No.


(connection numbers 1 to 8; addresses: 28H to 5FH)
(connection numbers 9 to 16; addresses: System area is used)
(a) In this item the port number of each connection for the Ethernet module is
set in hexadecimal.

(b) The setting values are designated in a range from 401H to 1387H and from
138BH to FFFEH. Set port numbers that are not already used by other port.
(Port numbers 1388H to 138AH cannot be designated because they are
used by the operating system of the Ethernet module.)

(c) Set the port numbers for the Ethernet module upon consulting a network
administrator.

5 - 41 5 - 41
5 COMMUNICATION PROCEDURE
MELSEC-Q

(8) Destination IP address


(connection numbers 1 to 8; addresses: 28H to 5FH)
(connection numbers 9 to 16; addresses: System area is used)
(a) Select the input format of the IP address (options: decimal/hexadecimal).

(b) Set the IP addresses (two words) for external devices in the chosen input
format (decimal/hexadecimal).

(c) The IP addresses of external devices must be given values other than 0H.
Furthermore, FFFFFFFFH is the setting value for simultaneous broadcast
communication.

(d) Set the IP addresses of external devices upon consulting a network


administrator.

5 - 42 5 - 42
5 COMMUNICATION PROCEDURE
MELSEC-Q

(9) Destination Port No.


(connection numbers 1 to 8; addresses: 28H to 5FH)
(connection numbers 9 to 16; addresses: System area is used)
(a) Set the port numbers of the external devices for each connection in
hexadecimal.

(b) The port numbers of the external devices are set in a range from 401H to
FFFFH. Furthermore, FFFFH is the setting value for simultaneous broadcast
communication.

(c) Set the port numbers for the external device upon consulting a network
administrator.

(d) The following table provides some precautions that should be observed
when setting port numbers.
( in the diagram indicates a device and indicates a port number.)
Communication
Status of connection establishment
Description of connection protocol
( : Port (indicates port number))
TCP UDP
External device
Ethernet module
When connecting to multiple external devices,
External device set multiple port numbers for the local station.

External device
When connecting to multiple external devices,
Ethernet module set single port number for the local station.
(However, it is necessary to open a connection
External device for each external device)
This cannot be chosen when the local station is
Unpassive.

Ethernet module External device When connecting to multiple ports of an external


device, set multiple port numbers for the
Ethernet module.
When connecting to multiple ports of an external
Ethernet module External device device, set single port number for the Ethernet
module. (However, it is necessary to open a
connection for each external device port)
This cannot be chosen when the local station is
Unpassive.
When connecting to the same ports of an
Ethernet module External device external device, set multiple port number for the
Ethernet module. (However, it is necessary to
open a connection for each Ethernet module
port)
Ethernet module External device Setting multiple ports numbers for the same port
of an external device and the Ethernet module is
possible only when paring open is set.

Important
Parameters for connections that communicate by Passive open and UDP open
must always be set from this screen when "Always wait for OPEN (communication
possible at STOP time)" is selected in the Operational settings (see Section 4.7).

5 - 43 5 - 43
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
Set parameters according to the open method to be used for open connection.
Communication system TCP
open system UDP
Active Passive
ARP function of ARP function of
external device Un-passive Full-passive external device

Parameter Yes No Yes No


Local station Port
No.
Destination IP
address
Communication
Destination Port
address
No.
Destination
1 1
Ethernet address ( ) ( )
( 2)

1 Use the default value (FFFFFFFFFFFFH) or "0".


2 When using the "Open settings" of GX Developer, the default value is used.
When communicating with an external device without the ARP function, use the dedicated OPEN instruction and
set the external device’s Ethernet address in the control data.

5 - 44 5 - 44
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.6 Open Processing/Close Processing of the Connection

This section explains the open processing/close processing using sequence programs.

(1) Open processing


(a) The purpose of the open processing is to establish a connection with an
external device in order to perform the following forms of data
communication.
They can all be performed with an external device opened by the user.
• Communication using the MC protocol
• Sending/receiving using the fixed buffers (Procedure exists)
• Communication using the random access buffers
(b) When the following is set by the parameter settings of GX Developer, the
open processing should be performed in a sequence program.
1) In the Operational settings (Section 4.7)
When "Do not wait for OPEN" is set in the "Initial timing setting".
2) In the open settings (Section 5.5)
When "Active" is set in the "OPEN system" setting.
(c) In order to perform the open processing, the initial processing must have
been completed.
(d) A connection with an external device must be established (open processing)
when communicating using either the MC protocol, fixed buffers, or random
access buffers. ( 1)
All the three types of data communication mentioned above can also by
performed with an external device opened by the user.
1 Since the Ethernet module recognizes the external device to
communicate with by the IP address, the open processing is required
for UDP communication.
(e) Up to a maximum of 16 connections can be opened to external devices.
However, two buffers are required when communicating with the same
external device using fixed buffer communication, so in this case the
number of external devices that can be communicated with will be lower.

Important
If the OPEN instruction failed, execute the CLOSE instruction and then the OPEN
instruction again.

POINT
(1) During communication using the MC protocol or random access buffers, if data
communication still continues even after the programmable controller CPU in a
station where an Ethernet module is installed has been placed in the STOP
status, set "Always wait for OPEN (communication possible at STOP time)"
under "Initial timing setting" (see 4.7, "Operation Settings").
(2) When performing open processing again after sending the close request (FIN)
from the external device, open processing should be performed at least 500ms
after the close request.

5 - 45 5 - 45
5 COMMUNICATION PROCEDURE
MELSEC-Q

(2) Close processing


(a) The purpose of the close processing is to disconnect (cancel) the
connection with the external device that has been established by the open
processing mentioned previously.

(b) The close processing is used when terminating a connection with an


external device, changing an external device of a connection, changing
communication conditions, etc.

(c) Perform the close processing for connections that have been established by
the open processing using sequence programs.

(d) Determine the timing of close processing with the external device.

The examples in the following sections describe the procedures for establishing a
connection from the Ethernet module to an external device and subsequently closing it
again by open and close processing for connection number 1.
• TCP/IP Active open : See 5.6.1, "Active open processing/close processing".
• TCP/IP Passive open : See 5.6.2, "Passive open processing/close processing".
• UDP/IP Open : See 5.6.3, "UDP/IP open processing/close processing".

Important
(1) Never execute the open/close processing to the same connection using the
input/input signals and use together with dedicated OPEN/CLOSE instructions
for OPEN/CLOSE processing. It may result in malfunctions.
(2) If the OPEN instruction failed, execute the CLOSE instruction and then the
OPEN instruction again.

POINT
Except when the close processing is requested, the open completion signal
(address: applicable bit of 5000H) automatically turns off and the communication
line is closed in the following cases:
(1) When the existence confirmation function times out occur (see Section 5.5).
( 1)
(2) When a close or the ABORT (RST) instruction is received from an external
device.
(3) When the Active open request is received again from the external device in the
open completion status of TCP.
Depending on its version, the Ethernet module operates as described below.
(a) Ethernet module whose first 5 digits of the serial No. are 05051 or later
After returning ACK to the external device, the Ethernet module closes
the connection when the RST command is received from the external
device.
(b) Ethernet module whose first 5 digits of the serial No. are 05049 or earlier
After sending the RST command, the Ethernet module closes the
connection.
However, when receiving the Active open request again from the external
device with a different IP address or port No., the Ethernet module only sends
the RST command. (It does not close the connection.)
(4) When timeout occurs at the time of sending TCP.

5 - 46 5 - 46
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.6.1 Active open processing/close processing

This section explains the procedure for opening and closing a connection with an
external device from the Ethernet module.
<<Open processing for connection No. 1
using the dedicated OPEN instruction>>
direction
Set the control data to D0 to D8 When setting the application of GX Developer in the "Open settings"
• Control data [D0]:H0
ZP.OPEN "U0" K1 D0 M0 When setting the application of OPEN instruction in the "Control data"
• [D0]: H8000
• Set [D1] to [D9] according to the application.
M0 M1
Processing for normal completion
M1
Processing for abnormal completion

<<Close processing for connection No. 1


using the dedicated instruction CLOSE>>
direction
ZP.CLOSE "U0" K1 D100 M100

M100 M101
Processing for normal completion
M101
Processing for abnormal completion

Parameter
communication
Power-on completed
Open status
1)
Open allowed status
(closed)

Closed status

Initial normal completion X19


2)
OPEN instruction
One scan

OPEN instruction complete


device
OPEN instruction complete
device + 1

Open abnormal detection


signal X18 5)

CLOSE instruction One scan


CLOSE instruction complete
device

CLOSE instruction complete


device + 1

Open completion signal


(Address: 5000H)

Open request signal


(Address: 5002H)
SYN FIN
3) 4) 6) 7)
SYN + ACK FIN + ACK

5 - 47 5 - 47
5 COMMUNICATION PROCEDURE
MELSEC-Q

1) After communicating the parameter settings, confirm the normal


completion of the Ethernet module initial processing.
(Initial normal completion signal (X19): ON)
2) Start the open processing using the dedicated OPEN instruction.
(Open request signal (address: 5002H … b0): ON)
3) The Ethernet module executes the open processing.
• Sends the open request (SYN).
4) When the open processing completes normally
• Open completion signal (address: 5000H … b0) : ON
• OPEN instruction complete device : ON
• OPEN instruction complete device + 1 : OFF
• OPEN instruction complete status area ( 1) : 0000H
Data communication is enabled.
When the open processing completes abnormally ( 2)
• Open completion signal : OFF
• OPEN instruction complete device : ON
• OPEN instruction complete device + 1 : ON
• The open error code is stored in the buffer memory. ( 3)
• OPEN instruction complete status area ( 1) : Value other than
0000H
• Open abnormal detection signal (X18) : ON
5) Start the close processing using the dedicated CLOSE instruction.
(Open request signal: OFF)
6) The Ethernet module executes the close processing.
• Sends the close request (FIN).
7) When the close processing completes normally
• Open completion signal : OFF
• CLOSE instruction complete device : ON
• CLOSE instruction complete device + 1 : OFF
• CLOSE instruction complete status area ( 1) : 0000H
When the close processing completes abnormally ( 4)
• Open completion signal : OFF
• CLOSE instruction complete device : ON
• CLOSE instruction complete device + 1 : ON
• CLOSE instruction complete status area ( 1) : Value other than
0000H

5 - 48 5 - 48
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
This example uses connection number 1 for explanation. Use the corresponding
signals and bits for other connection numbers.

1 The end code at completion is stored in the dedicated instruction


complete status area. For details on the dedicated instructions, see
Chapter 10, "Dedicated Instructions".
2 Processing when the open processing is abnormally completed (TCP)
When opening from the Ethernet module under a normal situation, if the
Ethernet module sends a SYN, the external device returns an ACK and
a SYN.
However, if the Ethernet module sends a SYN and then the external
device returns a RST, the open abnormal completion (X18) is
immediately turned on and open processing ends.
3 The open status and error code at abnormal end can be confirmed with
the following buffer memory.
• Each connection open abnormal code area of the communication
status storage area
(Connection numbers 1 to 8; addresses: 78H to C7H)
(Connection numbers 9 to 16; addresses: 5020H to 586FH)
• Error log area (addresses: E0H to 177H)
• Error codes stored in the open abnormal code area are cleared
(n 0) when the dedicated OPEN instruction is executed again.
4 Processing when the close processing is abnormally completed (TCP)
When closing normally from the Ethernet module, the Ethernet module
sends a FIN request and the external device returns an ACK and a FIN.
However, if an ACK and a FIN are not returned because the external
device is faulty, the Ethernet module forcefully disconnects the
connection (send a RST message).

Programmable Open request signal 1)


controller CPU
(CLOSE instruction
execution)
Open completion signal

2)

Ethernet Close abnormal processing


module 5) 7)
FIN is not sent after waiting for the time of
TCP end timer value
3)

Ethernet
At normal completion

6)
FIN 4) FIN RST
ACK

5 - 49 5 - 49
5 COMMUNICATION PROCEDURE
MELSEC-Q

1) The open request signal is turned off by the dedicated CLOSE


instruction.
2) The Ethernet module executes the close processing.
3) The Ethernet module sends a FIN request to the external device.
4) The external device sends back FIN and ACK messages in reply to the
FIN request sent by the Ethernet module.
(When the reply is not returned, the Ethernet module sends the FIN
request again.)
In response to the FIN sent by the Ethernet module, if an ACK RST is
sent back from the external device, the Ethernet module determines
that the close processing is completed and turns OFF the open
completion signal.
5) The Ethernet module waits for the external device to send an ACK and
a FIN.
(The module waits for the amount of time set in the TCP end timer
value. For details on how to set it, see Section 5.2, "Initial Settings".)
If the ACK and FIN messages are received at this point, it returns an
ACK as in the normal processing.
6) If an ACK and a FIN are not received within the time designated in the
TCP end timer value, an RST message is sent to the external device.
7) The Ethernet module determines that the close procedure is completed
and turns off the open completion signal regardless of the status of the
external device.

REMARKS
(1) When the procedure above is performed, the Ethernet module determines that
the closing of the external device is executed normally, thus the close
processing result is not stored in the error log area.

(2) The procedure described above is a special function of the Ethernet module; it
is not available for general TCP/IP protocols.

5 - 50 5 - 50
5 COMMUNICATION PROCEDURE
MELSEC-Q

Program example
This example explains a program for open processing/close processing when
Active open is selected in the Open system setting.

(1) Execution environment for the program example


(a) The Ethernet module is installed in the "0" slot of the basic base unit.
(b) The [Network Parameters Setting the number of Ethernet/CC IE/
MELSECNET cards] settings are assumed to have been set using GX
Developer as follows.
• Network type : Ethernet
• Starting I/O No. : 0000
• Network No. : 1
• Group No. : 1
• Station No. : 1
(c) The [Operational settings] are assumed to have been set using GX
Developer as follows.

Local station IP address : 0A.61.55.DEH (10.97.85.222)


(d) The [Open settings] parameters are assumed to have been performed
using GX Developer as follows.

Local station Port No. : 1000H


Destination IP address : 0A.61.55.DFH (10.97.85.223)
Destination Port No. : 2000H

5 - 51 5 - 51
5 COMMUNICATION PROCEDURE
MELSEC-Q

(e) The following contact signals are used in the program.


Connection No. 1 open completion signal : M0
Connection No. 1 open request signal : M20
Connection No. 1 OPEN instruction control data : Stored in D100 to
D109
Connection No. 1 CLOSE instruction control data : Stored in D200
and D201

(f) The area enclosed with in the program example should be used when
the [Open settings] Ethernet module parameters are not set for GX
Developer.
This part of the program is not required when the [Open settings]
parameters are used for GX Developer.

(g) For details on the dedicated OPEN instruction, see Chapter 10, "Dedicated
Instructions".

(2) Outline of the program example


(a) After each parameter is set from GX Developer and write to programmable
controller CPU, restart the programmable controller CPU and confirm the
completion of the initial processing.

(b) The Ethernet module performs the open processing for connection No. 1 to
the external device set in the [Open settings] or control data.

(c) The close processing for connection No. 1 is performed according to the
close instruction to the Ethernet module or the close request from the
external device.

REMARKS
The "U0\G20480" and "U0\G20482" codes shown in the program designate the
following areas in the buffer memory.
U0\G20480: Open completion signal storage area (address: 5000H (20480))
U0\G20482: Open request signal storage area (address: 5002H (20482))

5 - 52 5 - 52
5 COMMUNICATION PROCEDURE
MELSEC-Q

X19: Initial normal completion signal

M0: Connection 1 open completion signal

M20: Connection 1 open request signal

Open processing of connection No. 1


\ (TCP/IP Active open)
Read the open completion signal information

\
Read the open request signal information

Change the open command to pulse


Designate the control data for the OPEN instruction

When using the open setting parameters


of GX Developer
Designate the execution type/complete type
When not using the open setting parameters
of GX Developer
Designate the execution type/complete type

Designate the application information

Designate the Local station Port No. (1000H)

Designate the external device IP address


(10. 97. 85. 223)
Designate the external device Port No. (2000H)

Execute the open processing to the external device

Set the normal completion flag of the open


processing
Set the abnormal completion flag of the open
processing

Set the flag by the close processing from the external


device
Change the close processing from the external
device to pulse
Change the close request from the Local station side to
pulse
Perform close processing

Set the close processing executing flag

Set the normal completion flag

Set the abnormal completion flag

Reset the open processing flag

Reset the close processing execution flag

5 - 53 5 - 53
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.6.2 Passive open processing/close processing

This section explains the procedure for opening and closing a connection with the
Ethernet module from an external device.
The operations of Passive open processing/close processing differ depending on
whether "Always wait for OPEN" or "Do not wait for OPEN" is selected, as shown in
this section.

(1) When "Always wait for OPEN" is selected in the operational setting
When [Operational setting] - [Initial timing setting] - [Always wait for OPEN
(Communication possible at STOP time)] is selected from GX Developer, the
open processing/close processing is performed as explained below.
In this case, sequence programs for open processing and close processing are
not required because the Ethernet module keeps the connection in the always
wait for the OPEN status according to the [Open settings] parameter setting.
For detail on the [Open settings] parameter, see Section 5.5, "Open Settings".
Parameter
communication
Open status Power-on completed 1)

Open allowed status ( 1)


(closed)
(Active open
acknowledge enabled)
Close status

Initial normal completion


x19
4)
Open completion signal
(Address: 5000H)

Open request signal


SYN + ACK FIN + ACK
(Address: 5002H)
2) 3)
SYN FIN

5 - 54 5 - 54
5 COMMUNICATION PROCEDURE
MELSEC-Q

1) After the parameters are sent, the normal completion of the Ethernet
module initial processing is confirmed (Initial normal completion signal
(X19): ON)
After the initial processing is normally completed, the connection is
placed in the open allowed status and Ethernet module waits for an
open request from the external device.
2) The Ethernet module starts the open processing upon receiving the
open request (SYN) from the external device.
When the open processing is normally completed, the open
completion signal (address: 5000H… b0) turns on and data
communication is enabled.
3) The Ethernet module starts the close processing upon receiving the
close request (FIN) from the external device.
When the close processing is completed, the open completion signal
turns off and data communication is disabled.
4) After the Ethernet module’s internal processing is completed, the
connection returns to the open acknowledge enabled status.

1 An open request (SYN) received after the normal completion of an


initial processing and before the Ethernet module is placed in the open
acknowledge enabled status generates an error, and the Ethernet
module sends a connection forced close (RST).

REMARKS
For Passive open connections for which [Always wait for OPEN (Communication
possible at STOP time)] is selected in [Operational settings], the connection
open/close processing of Ethernet module side is performed according to the
open/close request from the external device.
When the close processing is performed from the Ethernet module side using the
dedicated CLOSE instruction, the applicable connection will not return to the open
acknowledge enabled status after the close processing. (It requires the same open
processing as for Passive open connection for which "Do not wait for OPEN
(Communications impossible at STOP time)" is selected).

5 - 55 5 - 55
5 COMMUNICATION PROCEDURE
MELSEC-Q

(2) When "Do not wait for OPEN" is selected in the operational setting
When [Operational setting] - [Initial timing setting] – [Do not wait for OPEN
(communications impossible at STOP time)] is selected from GX Developer, the
open processing/close processing is performed as explained below.
Since open processing/close processing is executed by a sequence program, an
external device can be changed while the connection is established.
<<Open processing for connection No. 1
using the dedicated OPEN instruction>>
direction
Set the control data to D0 to D9 When setting the application of GX Developer in the "Open settings"
• Control data [D0] H0
ZP.OPEN "U0" K1 D0 M0 When setting the application of OPEN instruction in the "Control data"
• [D0]: H8000
• Set [D1] to [D9] according to the application.
M0 M1
Processing for normal completion
M1
Processing for abnormal completion

<<Close processing for connection No. 1


using the dedicated CLOSE instruction>>
direction
ZP.CLOSE "U0" K1 D100 M100

M100 M101
Processing for normal completion
M101
Processing for abnormal completion

Parameter
communication
Open status Power-on completed
1)
Open allowed status
(closed) ( 1)
(Active open acknowledge
enabled)
Closed status

Initial normal completion X19


2)
OPEN instruction
One scan

OPEN instruction complete


device
OPEN instruction complete
device + 1

Open abnormal detection


signal X18 5)
CLOSE instruction
(For Open abnormal processing) One scan

CLOSE instruction complete


device

CLOSE instruction complete


device + 1
Open completion signal
(Address: 5000H)

Open request signal


(Address: 5002H) SYN + ACK FIN + ACK
3) 4)

SYN FIN

5 - 56 5 - 56
5 COMMUNICATION PROCEDURE
MELSEC-Q

1) After communicating the parameter settings, confirm the normal


completion of the Ethernet module initial processing.
(Initial normal completion signal (X19): ON)
2) Start the open processing using the dedicated OPEN instruction.
(Open request signal (address: 5002H … b0): ON)
3) The Ethernet module starts the open processing upon receiving the
open request (SYN) from the external device.
At normal completion
• Open completion signal (address: 5000H … b0) : ON
• OPEN instruction complete device : ON
• OPEN instruction complete device + 1 : OFF
• OPEN instruction complete status area ( 2) : 0000H
Data communication is enabled.
At abnormal completion
• Open completion signal : OFF
• OPEN instruction complete device : ON
• OPEN instruction complete device + 1 : ON
• The open error code is stored in the buffer memory
• OPEN instruction complete status area ( 2) : Value other
than 0000H
• Open abnormal detection signal (X18) : ON
4) The Ethernet module starts the close processing upon receiving the
close request (FIN) from the external device.
When the close processing is completed, the open completion signal
turns off and data communication is disabled.
5) Start the close processing using the dedicated CLOSE instruction.
(Open request signal: OFF)
At normal completion of internal processing
• Open completion signal : OFF
• CLOSE instruction complete device : ON
• CLOSE instruction complete device + 1 : OFF
• CLOSE instruction complete status area ( 2) : 0000H
At abnormal completion of internal processing
• Open completion signal : OFF
• CLOSE instruction complete device : ON
• CLOSE instruction complete device + 1 : ON
• CLOSE instruction complete status area ( 2) : Value other
than 0000H

POINT
This example uses connection number 1 for explanation. Use the corresponding
signals and bits for other connection numbers.

5 - 57 5 - 57
5 COMMUNICATION PROCEDURE
MELSEC-Q

1 An open request (SYN) received after the normal completion of an


initial processing and before the Ethernet module is placed in the
open acknowledge enabled status generates an error, and the
Ethernet module sends a connection forced close (RST).
2 The end code at completion is stored in the dedicated instruction
complete status area. For details on the dedicated instructions,
see Chapter 10, "Dedicated Instructions".

REMARKS
(1) If the settings of the connection need modifying, the modifications should be
done before executing the dedicated OPEN instruction.

(2) Once open processing is executed, an open request cannot be canceled


before the open processing completes.
Perform close processing (CLOSE instruction) after the open processing has
completed.

5 - 58 5 - 58
5 COMMUNICATION PROCEDURE
MELSEC-Q

Program example
This example explains a program for open processing/close processing when
Unpassive open is selected in the open system setting.

(1) Execution environment for the program example


(a) The Ethernet module is installed in the "0" slot of the basic base unit.

(b) The [Network Parameters Setting the number of Ethernet/CC IE/


MELSECNET cards] settings are assumed to have been set using GX
Developer as follows.
• Network type : Ethernet
• Starting I/O No. : 0000
• Network No. : 1
• Group No. : 1
• Station No. : 2
(c) The [Operational settings] parameters are assumed to have been set using
GX Developer as follows.

Local station IP address : 0A.61.55.DFH (10.97.85.223)

(d) The [Open settings] are assumed to have been set using GX Developer as
follows.

Local station Port No. : 2000H

5 - 59 5 - 59
5 COMMUNICATION PROCEDURE
MELSEC-Q

(e) The following contact signals are used in the program.


Connection No. 1 open completion signal : M0
Connection No. 1 open request signal : M20
Connection No. 1 OPEN instruction control data : Stored in D100 to
D109
Connection No. 1 CLOSE instruction control data : Stored in D200
and D201

(f) The area enclosed with in the program example should be used when
the [Open settings] Ethernet module parameter are not set for GX
Developer.
This part of the program is not required when the [Open settings]
parameters are used for GX Developer.

(g) For details on the dedicated OPEN instruction, see Chapter 10, "Dedicated
Instructions".

(2) Outline of the program example


(a) After each parameter is set from GX Developer and write to programmable
controller CPU, restart the programmable controller CPU and confirm the
completion of the initial processing.

(b) The open processing for connection No. 1 of the Ethernet module is
performed.
After the completion of the open processing, connection No. 1 waits for the
open request from the external device.

(c) The close processing for connection No. 1 is performed according to the
close instruction to the Ethernet module or the close request from the
external device.

REMARKS
The "U0\G20480" and "U0\G20482" codes shown in the program designate the
following areas in the buffer memory.
U0\G20480: Open completion signal storage area (address: 5000H (20480))
U0\G20482: Open request signal storage area (address: 5002H (20482))

5 - 60 5 - 60
5 COMMUNICATION PROCEDURE
MELSEC-Q

X19: Initial normal completion signal

M0: Connection 1 open completion signal

M20: Connection 1 open request signal

Open processing of connection No. 1


(TCP/IP Unpassive open)

\
Read the open completion signal information
\
Read the open request signal information

Change the open command to pulse


Designate the control data for the OPEN instruction

When using the open setting parameters


of GX Developer
Designate the execution type/complete type
When not using the open setting parameters
of GX Developer
Designate the execution type/complete type
Designate the information of the application

Designate the Local station Port No. (2000H)

Execute the open processing to the external device

Set the normal completion flag of the open


processing
Set the abnormal completion flag of the open
processing

Set the flag when the close processing is performed


from the external device
Change the close processing from the external
device to pulse
Change the close request from the Local station side
to pulse
Perform close processing

Set the close processing executing flag

Set the normal completion flag

Set the abnormal completion flag

Reset the open processing flag

Reset the close processing execution flag

5 - 61 5 - 61
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.6.3 UDP/IP open processing/close processing

The following explains the UDP/IP open processing.

The operations of the open processing/close processing in UDP/IP differ depending on


whether "Always wait for OPEN" or "Do not wait for OPEN" is selected in the settings
using GX Developer, [Operational settings] – [Initial settings], as shown below.

(1) When "Always wait for OPEN" is selected in the operational


settings (Communications possible at STOP time)
According to the [Open settings] with GX Developer, a connection for which the
UDP/IP communication is selected is established automatically after the Ethernet
module installed station has been restarted, and the data transmission/reception
is enabled.
Sequence programs for open processing and close processing are not required.
For details on the [Open settings] parameter, see Section 5.5, "Open Settings".

REMARKS
Even when "Always wait for OPEN (Communication possible at STOP time)" is
selected at "Operational settings", if there is a dedicated OPEN instruction from the
Ethernet mudule, open processing using the CLOSE instruction and close
processing, there is a need to perform all open processing and close processing
after the relevant connection using the sequence program.
If "Do not wait for OPEN (Communication impossible at STOP time) is selected,
there is a need to perform open processing and close processing in the same
manner as a connection.

(2) When "Do not wait for OPEN" is selected in the operational settings
(Communications impossible at STOP time)
In this case, the open processing and close processing in the sequence program
shown in the next page are required. Data transmission and reception are
enabled after the open processing is normally completed.
Perform the open processing and close processing using the applicable
dedicated instructions.
For more details, see Chapter 10, "Dedicated Instructions".

5 - 62 5 - 62
5 COMMUNICATION PROCEDURE
MELSEC-Q

<<Open processing for connection No. 1


using the dedicated OPEN instruction>>
direction
Set the control data to D0 to D9 When setting the application of GX Developer in the "Open settings"
• Control data [D0]: H0
ZP.OPEN "U0" K1 D0 M0 When setting the application of OPEN instruction in the "Control data"
• [D0]: H8000
• Set [D1] to [D9] according to the application.
M0 M1
Processing for normal completion
M1
Processing for abnormal completion

<<Close processing for connection No. 1


using the dedicated CLOSE instruction>>
direction
ZP.CLOSE "U0" K1 D100 M100

M100 M101
Processing for normal completion
M101
Processing for abnormal completion

Parameter
communication
Power-on completed
1)
Open status

Open allowed status


(closed)

Closed status

Initial normal completion X19


2)
OPEN instruction
One scan

OPEN instruction complete


device

OPEN instruction complete


device + 1
5)
CLOSE instruction
One scan

CLOSE instruction complete


device

CLOSE instruction complete


device + 1

Open completion signal


(Address: 5000H) 3) 4) 6) 7)
Internal Internal
processing processing

5 - 63 5 - 63
5 COMMUNICATION PROCEDURE
MELSEC-Q

1) After communicating the parameter settings, confirm the normal


completion of the Ethernet module initial processing.
(Initial normal completion signal (X19): ON)
2) Start the open processing using the dedicated OPEN instruction.
(Open request signal (address: 5002H … b0): ON)
3) The Ethernet module executes the open processing. (Internal
processing only)
4) When the open processing completes normally
• Open completion signal (address: 5000H … b0) : ON
• OPEN instruction complete device : ON
• OPEN instruction complete device + 1 : OFF
• OPEN instruction complete status area ( 1) : 0000H
Data communication is enabled.
When the open processing completes abnormally
• Open completion signal : OFF
• OPEN instruction complete device : ON
• OPEN instruction complete device + 1 : ON
• The open error code is stored in the buffer memory
• OPEN instruction complete status area ( 1) : Value other than
0000H
• Open abnormal detection signal (X18) : ON
5) Start the close processing using the dedicated CLOSE instruction.
(Open request signal: OFF)
6) The Ethernet module executes the close processing. (Internal
processing only)
7) When the close processing completes normally
• Open completion signal : OFF
• CLOSE instruction complete device : ON
• CLOSE instruction complete device + 1 : OFF
• CLOSE instruction complete status area ( 1) : 0000H
When the close processing completes abnormally
• Open completion signal : OFF
• CLOSE instruction complete device : ON
• CLOSE instruction complete device + 1 : ON
• CLOSE instruction complete status area ( 1) : Value other than
0000H

1 The end code at completion is stored in the dedicated instruction


complete status area. For details on the dedicated instructions,
see Chapter 10, “Dedicated Instructions“.

5 - 64 5 - 64
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.7 Pairing Open

The following explains communication using the paring open method via the Ethernet
module.

5.7.1 Pairing open

Pairing open is an opening method for establishing a connection in which the local
station and the external device use a single port for each, by pairing the receiving and
sending connections through fixed buffer communication (both the procedure exists
and no procedure are allowed) of the Ethernet module.
By designating the paring open method, data communication can be performed with
two connections by performing open processing for only one port.
Communications using the MC protocol and the random access buffers can also be
performed using these paring-opened connections.
The procedure for performing the open/close processing for pairing open is explained
below.

[Example]
Ethernet module (TCP/IP or UDP/IP communication)
Send data
Connection No. 1 fixed buffer
Port External device
(for receiving)
Receive data
Connection No. 2 fixed buffer
(for sending)

POINT
(1) When setting the pairing open method, the fixed buffer of the applicable
connection number (for receiving only) and the fixed buffer of the immediately
succeeding connection number (for sending only) are paired.
For the applicable connection (for receiving only), designate in ranges of
connection No. 1 to 7 and 9 to 15.
(2) The range of external devices that can be communicated by the pairing open
method are limited to devices in the Ethernet to which the Ethernet module is
connected and devices connected with the router relay function (see Section
5.3, "Router Relay Parameter").
(3) By the open/close processing of the applicable connection (for receiving only)
for which the pairing open method has been set, the open/close processing of
the next connection (for sending only) will automatically be performed.

5 - 65 5 - 65
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.7.2 Example of pairing open settings from GX Developer

This section explains the settings using GX Developer in order to communicate in the
pairing open method by giving an example.
The screen below shows an example of the settings under the following conditions.
• Connection No. 1 and 2 are used.
• The Ethernet module port number is 0500H.
• The Unpassive open system is used.

(1) Protocol
Both "TCP/IP" and "UDP/IP" are allowed.

(2) Open system


All the open systems - "Active", "Unpassive", and "Fullpassive" - can be set.

(3) Fixed buffer


In the Pairing open, a connection No. and the subsequent connection No. are
paired.
When "Enable" is set for Pairing open, the relevant and next connection numbers
are set as "Receive" and "Send" respectively.

(4) Fixed buffer communication


Both "Procedure exist" and "No procedure" can be selected.

(5) Pairing open


Set the pairing open for receiving connection to "Enable".
The next connection is set as a sending connection.

(6) Existence confirmation


To enable the existence check, set "Confirm" for the receiving connection.
To disable the check, select "No confirm" for it.

5 - 66 5 - 66
5 COMMUNICATION PROCEDURE
MELSEC-Q

(7) Local station Port No.


Set this for the receiving connection for receiving only. (Setting is not required for
the sending connection.)
Set the port number upon consulting a network administrator.

(8) Destination IP address


(a) If the Unpassive system is chosen
Setting is not required.

(b) If either Active or Fullpassive system is chosen


Setting is required.
Set for the receiving connection only upon consulting a network
administrator.

(9) Destination Port No.


(a) If the Unpassive system is chosen
Setting is not required.

(b) If either Active or Fullpassive system is chosen


Setting is required.
Set for the receiving connection only upon consulting a network
administrator.

5 - 67 5 - 67
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.8 Automatic Open UDP Port

Normally, when communicating with an external device, it is necessary to establish a


communication line with the external device when starting the data communication and
to disconnect the communication line with the external device again when terminating
the data communication following the arrangement with the external device.
The automatic open UDP port automatically opens/closes under the following
conditions.
The port is placed in the communication enabled status after the initial processing is
completed and communication can be performed without programming and regardless
of the open status of connection No. 1 to 16.

Communication enabled at automatic open UDP port


Initial
Programmable
controller CPU Normal completion
signal X19

Ethernet
module

Ethernet
Request Response Request Response

(1) Open and close timing of automatic open UDP port


(a) Open timing
The port opens automatically according to the parameters registered by the
user after the Ethernet module completes the initial processing, and the
communication line is connected.

(b) Close timing


It automatically closes again when the station in which the Ethernet module
is installed is reset/powered off.

(2) Functions that accommodate data communication using the


automatic open UDP port
(a) Communication from an external device
1) Reading/writing data from/to the programmable controller CPU (the port
number is designated by the user; default: 1388H (5000)) when
communicating using the MC protocol (QnA compatible 3E frame or 4E
frame command).
2) Regardless of the communication data code setting for the GX Developer
(See Section 4.7). Communicate with the binary code.

5 - 68 5 - 68
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) Communication from the station in which the Ethernet module is installed
In this case, it is possible to communicate using data link instructions (using
port numbers of the operating system of the Ethernet module).

POINT
(1) The Ethernet module enables communication through the automatic open
UDP port numbers after the initial processing is normally completed, and
waits for communication requests to the local station Ethernet module.
(Automatic open)
(2) It acknowledges and processes requests from anywhere as long as they are
requests addressed to the Ethernet module itself.
(3) When a communication request is acknowledged, the applicable port number
is occupied until the processing is completed. Even if the next communication
request is acknowledged during this time, the communication processing has
to wait.
(4) The automatic open UDP port can be used in communication between
Ethernet modules using the CC-Link IE controller network, MELSECNET/H,
MELSECNET/10 relay communication function.
(5) Re-initial processing is required to change the port number of the automatic
open UDP port. (Refer to Section 5.2.3 for re-initial processing.)

(3) Accessible range


The accessible range differs depending on the data communication function.
Reference
Data communication function Accessible range
section
Communication using the MC • The QCPU of the Ethernet module installed station
protocol (QnA comparatible 3E • Programmable controller CPU in the network system containing the
frame or 4E frame) Ethernet module installed station
• Programmable controller CPU in the Ethernet to which the Ethernet
module is connected
Chapter 4 of
Data link instruction • Programmable controller CPU in the Ethernet connected via a router
Application
• Programmable controller CPU in the network system containing the
Ethernet module installed station

(4) Maximum size of data per communication


The maximum size of data per communication differs depending on the data
communication function.
Reference
Data communication function Maximum size of data per communication
section
Communication using the MC
The number of data that can be designated with the commands for the
protocol (QnA comparatible 3E Chapter 6
QnA compatible 3E frame or 4E frame.
frame or 4E frame)
The number of data that can be designated with the commands for data Chapter 4 of
Data link instruction
link Application

5 - 69 5 - 69
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9 Corresponding with the QCPU Remote Password Function

The remote password function is one of the QCPU functions for the purpose of
preventing improper access to the QCPU from users at the remote location.
The remote password function can be used by setting a remote password in the
QCPU.
This section explains Ethernet module data communication in relation to the QCPU
remote password function.

The remote password function is a function that has been added to the QCPU as a means of preventing
improper access (such as destroying a program or data) from an external device. However, this function
cannot completely prevent improper access.
The user should incorporate his/her own safeguards when it is need to keep the security of the
programmable controller system against improper access from an external device.
The company cannot assume any responsibility for any problems that may arise from system troubles
caused by improper access.
Examples of measures to prevent improper access
• Establish a firewall.
• Set up a personal computer as a relay station and control the relay of sending/receiving data using an
application program.
• Set up an access controllable external device as a relay station.
Please consult with a network connection vendor or equipment sales vendor regarding access
controllable external devices.

5 - 70 5 - 70
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.1 Data communication when a remote password is set


This section explains the use and setting of the QCPU remote password function and
data communication between the external device and the QCPU when a remote
password has been set.
(1) Overview of the remote password function
(a) Remote password function
1) The remote password function enables/disables access from the
external device to the QCPU via the following modules:
• Ethernet module
• Q series C24
• Built-in Ethernet port QCPU
2) When the remote password function is enabled for the Ethernet
module, the remote password check is performed for access from the
external device to the following connections:
Users can select desired connections to which the remote password
check is to be applied.
• User connection No.1 to 16
• Auto open UDP port
• FTP transmission port (TCP/IP)
• GX Developer transmission port (TCP/IP)
• GX Developer transmission port (UDP/IP)
• HTTP port
(b) Station that the remote password and remote password check are set
1) In the case of single network system
Accessing source
external device
Ethernet
GX Developer
parameter setting
• Remote password Remote Remote
• Applicable connection for the remote password password
check (Local station)
password check (See (3).)
Ethernet
QCPU
module

2) In the case of multiple network system


Set in the QCPU station that serves as the entrance to the
programmable controller system as viewed from the external device
(the local station QCPU in the diagram below).
Accessing source
external device

Ethernet

Remote password Remote


password check
(Local station)
Ethernet Ethernet
QCPU
module module

Ethernet Ethernet
Set in the local station to allow/
prohibit access from the external
device to the network system 1. Ethernet Ethernet (Relay Ethernet (Station to
QCPU QCPU
module module station) module be accessed)

Do not set in the relay station or station to be accessed. ( )


Network system 1
Setting in a station other than the QCPU station that serves as the entrance to the
programmable controller system (relay station and station to be accessed in the
above diagram), access to other stations beyond the set station is prohibited. (See
(3).)

5 - 71 5 - 71
5 COMMUNICATION PROCEDURE
MELSEC-Q

(2) Processing for allowing/prohibiting access to the programmable


controller from the external device
1) Access allow processing (unlock processing)
• To access the specified QCPU, the external device performs the remote
password unlock processing for the Ethernet module ( ) of the directly
connected station (local station).
• If the unlock processing has not been performed, access to the specified
station is prohibited by the remote password check performed by the
Ethernet module ( ) that has received a communication request. (See (3).)
• All data receiving before the unlock processing will be processed as an error.
The Ethernet module of the QCPU station for which the remote
password is set.

2) Access processing
• Normal completion of the remote password unlock processing allows to
access the specified station.
• Perform any access.

3) Access prohibit processing (lock processing)


• The remote password lock processing is performed from the external
device to disable any further access when access to the specified station
has been completed.
(When accessing the local station QCPU) (When accessing the other station QCPU)
A station A station
( 1) ( 1)

1) Unlock processing 1) Unlock processing


Ethernet Ethernet

2) Access 3) Lock processing 3) Lock processing

Remote password Remote Remote Remote


password password check ( 2)
password check (Local station) (Local station)
Ethernet Ethernet Ethernet
QCPU QCPU module module
module
Ethernet

1 The remote password unlock processing and lock processing are


Ethernet Ethernet
possible for the local station. QCPU (Relay station)
module module
The remote password unlock processing and lock processing
cannot be performed for the relay station and station to be accessed. Ethernet
2 The unlock processing and lock processing are not need for the
2) Access
Ethernet module sending a communication request to another
Ethernet even if it has been set as a target of the remote password Ethernet
QCPU (Station to be accessed)
check. module

5 - 72 5 - 72
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
(1) The remote password unlock processing and lock processing are performed
for the only Ethernet module in the local station directly connected to the
external device.
The remote password unlock processing and lock processing cannot be
performed for an Ethernet module in any other station (relay station and
station to be accessed).

(2) The remote password unlock processing and lock processing are performed from
the external device using dedicated instructions for MC protocol communication.
(They are performed with dedicated FTP commands when using the file
transfer (FTP server) function. The remote password is input with the dialog
box when using the Web function or GX Developer.)

(3) Remote password check performed by the Ethernet module


(a) Communication in which a remote password check is performed
1) When the following parameters have been set for the Ethernet module
mounted on the QCPU station, the Ethernet module performs a remote
password check for communication requests as indicated below:
• When a remote password is set in the QCPU.
• When the connection that is communicating data with the external
device is set as a target for the remote password check.
2) The Ethernet module performs a remote password check with respect
to a communication request to the local station/other station received
from the external device.
3) The Ethernet module performs transmission with respect to the following
transmission requests without performing a remote password check:
• Transmission request from the local station QCPU (such as
transmission using the fixed buffer).
• Communication request from the external device (including GX
Developer connected to the local station QCPU) to send to another
station upon request from the QCPU.

5 - 73 5 - 73
5 COMMUNICATION PROCEDURE
MELSEC-Q

Ethernet module

QCPU
Remote password check
Remote password Remotepassword applicable path
check 1)
(Local station) Out of remote password
2) check applicable path
(Other station) 3)

3)

GX Developer
QCPU

Remote Remote
password password check

( 1)

GX Developer
Ethernet module

1 In the above diagram, a communication request from the external


device cannot be received since a remote password check has
been set.
If the remote password check has not been set, a communication
request can be received and data communication from the
external device is possible.

(b) Selecting a connection for which the remote password check is performed
The user can select any connection for which the Ethernet module
performs a remote password check and set this using QCPU parameters.
(This is set on the "Setting the remote password" screen of GX Developer.)
1) User connections (connections 1 to 16)
2) System connections (such as GX Developer communication port)

(c) Stations that can be accessed when the remote password check is
performed
The stations that can be accessed from the external device when a remote
password is set in the QCPU and the QCPU stations for which the remote
password unlock processing and lock processing can be performed are
indicated.

5 - 74 5 - 74
5 COMMUNICATION PROCEDURE
MELSEC-Q

(Example 1)
When a remote password is set in the QCPU station of the programmable
controller system station 1-1, and the remote password check is set in 1) of
station 1-1

Station 1-2 1) External device that can perform the unlock


A station processing and lock processing
1) of station 1-1: By A station only
QCPU Ethernet
module

Network No.1 Ethernet

Station 1-1 1) 2) Station 3-2 1)


Remote Remote
password password Ethernet
check QCPU
module
B station Ethernet Ethernet
GX Developer QCPU module module

Ethernet Network No.2 Network No.3 Ethernet

Station 2-1 1) Station 2-2 1) 2) Station 3-1 1)

Ethernet Ethernet Ethernet QCPU Ethernet


QCPU QCPU
module module module module

C station D station

Network system -1

(Request destination) Applicable programmable controller station


Station 1-1 Station 1-2 Station 2-1 Station 2-2 Station 3-1 Station 3-2
(Request source) QCPU QCPU QCPU QCPU QCPU QCPU
A station
External
B station
device
( 2) C station
D station

: Stations that can be accessed form the external device after the remote password unlock processing
: Stations that can be accessed from the external device without performing the remote password unlock
processing

2 A station can access the stations after the remote password unlock processing
for the module 1) of station 1-1 is completed. The stations can be accessed if
the communication line is open. B station, C station and D station can access the
stations if the communication line to those stations is open.

5 - 75 5 - 75
5 COMMUNICATION PROCEDURE
MELSEC-Q

(Example 2)
When a remote password and the remote password check are set in
multiple QCPU stations in the programmable controller system

Station 1-2 1) External device that can perform the unlock


A station processing and lock processing
1) of station 1-1: By A station only
QCPU Ethernet 1) of station 2-2: By C station only
module
1) of station 3-2: By D station only

Network No.1 Ethernet

Station 1-1 1) 2) Station 3-2 1)


Remote Remote Remote Remote
password password password password
check check
B station Ethernet Ethernet Ethernet
GX Developer QCPU module module QCPU module

Ethernet Network No.2 Network No.3 Ethernet

Station 2-1 1) Station 2-2 1) 2) Station 3-1 1)


Remote Remote
Ethernet password password Ethernet
QCPU
QCPU
module check module
Ethernet Ethernet
QCPU module module
C station D station

Network system -1

(Request destination) Applicable programmable controller station


Station 1-1 Station 1-2 Station 2-1 Station 2-2 Station 3-1 Station 3-2
(Request source) QCPU QCPU QCPU QCPU QCPU QCPU
A station
External
B station
device
( 3) C station
D station

: Stations that can be accessed form the external device after the remote password unlock processing
: Stations that can be accessed from the external device without performing the remote password unlock
processing
: Stations that cannot be accessed from the external device

3 A station can access the stations after the remote password unlock processing
for the module 1) of station 1-1 is completed. The stations can be accessed if
the communication line is open.
B station can access the stations if the communication line to those stations is
open.
C station can access the stations after the remote password unlock processing
for the module 1) of station 2-2 is completed. The stations can be accessed if
the communication line is open.
D station can access the stations after the remote password unlock processing
for the module 1) of station 3-2 is completed. The stations can be accessed if
the communication line is open.

5 - 76 5 - 76
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
To prohibit access to another station from the external device using the Ethernet
module CC-Link IE controller network, MELSECNET/H, MELSECNET/10 relay
communication function, place a check mark at the following setting items in the
remote password setting for the relay station and station to be accessed.
"GX Developer communication port (UDP/IP) ( ), dedicated instructions, CC
IE Control, MNET/10(H) relay communication port"
Set this on the remote password setting screen of GX Developer.
Other stations can be accessed if a check mark is not placed in the above
setting items.

5 - 77 5 - 77
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.2 Precautions when using the remote password check function

The following are precautions when using the remote password check function for the
Ethernet module.

(1) After a remote password is set in the QCPU, reboot the QCPU (CPU No.1 for a
multiple CPU system) (reset using the RESET/L.CLR switch or power reset).
By rebooting the QCPU, the remote password becomes valid.
(2) Set the remote password check to only the connection to be used in data
communication with the external device that can perform the unlock processing
and lock processing.
(Example) The remote password check should not be set in the reception
connection for receiving data transmitted from the MELSEC
programmable controller CPU when communicating by fixed buffer.
A check mark should not be placed at the applicable connection on
the "Remote password detail settings" screen shown in Section
5.9.5.

(3) The remote password check should not be set, since the remote password check
is not performed for the connection performing communication using a non-
procedure fixed buffer.

(4) When the external device accesses the programmable controller of another
station via the Ethernet module, it may not be able to access the programmable
controller if a remote password has been set in the QCPU of the relay station or
station to be accessed. (See Section 5.9.1 (1) and (3).)

(5) Precautions when performing UDP/IP communication


1) Decide the external device that will be communicating.
Never perform data communication with a non-specified external device.
2) Use the Ethernet module existence confirmation function.
Also, always perform the remote password lock processing when
completing data communication.
If the lock processing is not performed, data communication from other
devices is allowed until a time out is generated by the Ethernet module
existence confirmation function.
For this reason, always specify the following as to the settings from GX
Developer for the applicable connection:
• When performing initial settings, set the start interval timer value and
the interval timer value for the existence confirmation function as small
as possible.
• Regarding the open settings, select "Confirm" for the "Existence
confirmation" item.
The existence confirmation is automatically performed when the
connection for data communication using the automatic open UDP port
is set as a target for the remote password check.

(6) As much as possible, use TCP/IP communication to perform communication from


GX Developer using an Ethernet connection.

5 - 78 5 - 78
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.3 Data communication procedure

This section explains the procedure when the external device performs data
communication using the connection for which a remote password check is performed.

(1) Set the target connection for the remote password check in the "Remote
password detail settings" through GX Developer and write the parameters in the
QCPU. (See Section 5.9.5.)

(2) After booting the QCPU, write the setting values to the following buffer memory in
the Ethernet module as necessary: (See Section 5.9.6 (3).)
Accumulated count designation area for remote password mismatch notification
· · · Address 20592 to 20593 (5070H to 5071H)

(3) The remote password unlock (release) processing is performed after the open
processing for the connection is completed.
All data received before the unlock processing will be processed as an error.
(See the troubleshooting section for error codes.)

(4) When the unlock processing for the remote password is performed from the
external device, the specified station can be accessed from the external device if
the remote password specified by the user matches the remote password set in
the local station QCPU.

(5) After data communication is completed, close the applicable connection after
performing the remote password lock processing from the external device.

(6) The remote password unlock processing and lock processing are performed from
the external device connected to the Ethernet module using the dedicated
instructions for MC protocol communication. (They are performed with dedicated
FTP commands when using the file transfer (FTP server) function. The remote
password is input with the dialog box when using the Web function or GX
Developer.)

REMARKS
When the "GX Developer communication port" is set as the remote password check
connection, access the programmable controller after performing the unlock
processing on the GX Developer screen shown when access begins.

(7) The remote password unlock and lock processing can only be performed for the
local station QCPU on which the Ethernet module is mounted. The remote
password unlock and lock processing cannot be performed for other station
QCPU. (See Section 5.9.1 (2).)

5 - 79 5 - 79
5 COMMUNICATION PROCEDURE
MELSEC-Q

(Data communication procedure)

See Section 4.6, "Network Parameters Setting


the Number of Ethernet/CC IE/MELSECNET cards."
Set parameters for the Ethernet ... See Section 4.7, "Operational Settings."
module through GX Developer
See Section 5.2, "Initial Processing."
See Section 5.3, "Router Relay Parameter."
See Section 5.5, "Open Settings."
Start up the programmable See Section 5.9.5, "How to set the target connection
controller CPU for the remote passowrd check."

Initial processing ... Automatically processed

D esignate the "A ccum ulated count


for rem ote password m ism atch ... See Section 5.9.6, "Buffer memory for
notification "from the Q CP U
the remote password check function."

Open processing

(Communication See Section 5.6


No.1 to 16 for user) (Communication for system)

Remote Remote Remote Remote


Remote password unlock processing password unlock password unlock password unlock password unlock
processing processing processing processing

CC-Link IE
E-mail Communication Communication Communication Communication
Communication Communication Communication controller network,
using data File transfer using Web using using
using tne MC using fixed using random sending/ MELSECNET/H,
receiving MELSECNET/10 link
protocol buffer access buffer function GX Developer MC protocol
relay communication instructions (FTP)

(: 1) ( 1)
Remote Remote Remote Remote
Remote password lock processing password lock password lock password lock password lock
processing processing processing processing

Close processing
See Section 5.6

1 When accessing the programmable controller of another station, access to the


other station may not be allowed if a remote password is set in the QCPU of the
relay station on which the Ethernet module is mounted and the station to be
accessed. (See Section 5.9.1 (1) and (3).)

POINT
(1) In TCP/IP communication, if the connection is closed without performing the
remote password lock processing, the Ethernet module automatically
performs the lock processing when the connection is closed.
(2) In UDP/IP communication, be sure to close the connection after performing
the remote password lock processing.
When the connection is closed, the Ethernet module does not perform the
remote password lock processing.

5 - 80 5 - 80
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.4 When the remote password unlock processing or lock processing is completed
abnormally

This section explains the procedures to be performed by the user when the remote
password unlock processing or lock processing is completed abnormally.

(1) Perform the unlock/lock processing again after checking the remote password set
in the QCPU.

(2) The Ethernet module performs the following when the number of occurrence
times for an unlock processing/lock processing abnormal completion is greater
than the accumulated notification count ( 1) set in the buffer memory.
(a) The COM.ERR.LED lights up.

(b) The code C200H is stored in the error code and end code storage area of
the buffer memory error log area (address 227 to 372 (E3H to 174H)).
1 This is the count set from the QCPU in the remote password mismatch
notification accumulated count designation area (address 20592
(5070H), 20593 (5071H)) when the Ethernet module starts up. (Count is
set with T0 instruction, etc.)

(3) Monitor the above buffer memory when the COM.ERR LED of the Ethernet
module lights up.
If the error code C200H is stored, monitor the storage area for abnormal
completion accumulated count in the buffer memory (address 20595 (5073H),
20597 (5075H), · · · ) and check for which connection the unlock processing or
lock processing has been completed abnormally.

(4) The user performs the following as required:

(a) Close the applicable connection.

(b) Write "0" in the storage area for abnormal completion accumulated count in
the buffer memory.
If the accumulated count is not cleared by writing "0", the process in (2)
above is performed each time an abnormal completion in excess of the
accumulated notification count occurs.

(c) If the number of times an unlock processing/lock processing abnormal


completion occurred for the applicable connection is greater than the above
accumulated notification count, this could indicate improper access from the
external device.
Disable the use of the applicable connection using the system port use
prohibited designation area of the buffer memory (address 20488 (5008H)).
(After this, the unlock processing cannot be performed with respect to
applicable connection until the "use allowed" is set.)

(d) Inform the system manager that the number of occurrence times for an
unlock processing/lock processing abnormal completion is greater than the
accumulated notification count and take appropriate actions.

5 - 81 5 - 81
5 COMMUNICATION PROCEDURE
MELSEC-Q

REMARKS
(1) The following accumulated counts stored in the buffer memory can be cleared
under the user's option. (Write "0" to the applicable area from the QCPU.)
• Storage area for unlock processing normal completion accumulated count:
Address 20594 (5072H) · · ·
• Storage area for lock processing normal completion accumulated count:
Address 20596 (5074H) · · ·

(2) See Section 11.1.2 of User's Manual (Basic) for how to turn off the COM.ERR.
LED for the Ethernet module after it has lit up.

5 - 82 5 - 82
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.5 How to set the target connection for the remote password check

Set the connection for the remote password check with the parameter settings through
GX Developer.

[Startup procedure]
"GX Developer" Remote password "Remote password settings" screen
Detail "Remote password detail settings" screen

[Setting screen]

[Setting items]
Item name Description of item setting Setting range/options
1
Password settings Enter the password to be set in the QCPU ( ). —
Select the model name for the module performing the check for the remote
Password Model name QJ71E71
password set in the QCPU.
active module
Start XY Set the head address of the module performing the remote password check. 0000H to 0FE0H
settings
Module condition (Display the "Remote password detail settings" screen.) Detail settings
User connection No.
Auto open UDP port
FTP transmission
port (TCP/IP)
GX Developer
Place a check mark at the target
System transmission port Set the connection subject to the remote password check.
connection.
connection (TCP/IP)
GX Developer
transmission port
(UCP/IP)
HTTP port

1 Refer to the following when setting a remote password:


• Avoid using a character string of simple numbers or letters only.
• Combine numbers, letters and special characters (?,!&%,etc.).
• Avoid using a character string that represents the user's name or date of birth.

5 - 83 5 - 83
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
(1) When using the Ethernet module in a multiple CPU system, set the remote
password by writing it to the control CPU of the Ethernet module.

(2) After the remote password is set in the QCPU, reboot the QCPU (the first
QCPU module for a multiple CPU system) (reset using the RESET/L.CLR
switch or power reset).
By rebooting the QCPU, the remote password becomes valid.

(3) The password supported by the QCPU of function version A is used to prohibit
reading/writing of file data in the QCPU through GX Developer.
Dual access control can be provided by using the remote password described
in this section and password for file access.

5 - 84 5 - 84
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.6 Buffer memory for the remote password check function

This section explains the buffer memory used for the remote password check function.
Application
Address Buffer memory for the remote password check function
Setting Monitor
20486 (5006H) Remote password status (user port)
20487 (5007H) Remote password status (system port)
20488 (5008H) System port use prohibited designation
20592 (5070H) Remote password mismatch notification accumulated count designation
20593 (5071H) Remote password mismatch notification accumulated count designation
20594 (5072H) Accumulated count unlock process normal completion
20595 (5073H) Accumulated count unlock process abnormal completion
Connection
20596 (5074H) Accumulated count lock process normal completion
No. 1
20597 (5075H) Accumulated count lock process abnormal completion
20598 (5076H) Accumulated count of lock process based on close
: : :
20669 (50BDH) Accumulated count unlock process normal completion
20670 (50BEH) Accumulated count unlock process abnormal completion
Connection
20671 (50BFH) Accumulated count lock process normal completion
No. 16
20672 (50C0H) Accumulated count lock process abnormal completion
20673 (50C1H) Accumulated count of lock process based on close
20674 (50C2H) Accumulated count unlock process normal completion
20675 (50C3H) Connection for Accumulated count unlock process abnormal completion
20676 (50C4H) automatic open Accumulated count lock process normal completion
20677 (50C5H) UDP port Accumulated count lock process abnormal completion
20678 (50C6H) Accumulated count of lock process based on close
20679 (50C7H) Connection for Accumulated count unlock process normal completion
20680 (50C8H) GX Developer Accumulated count unlock process abnormal completion
20681 (50C9H) communication Accumulated count lock process normal completion
20682 (50CAH) (for UDP/IP Accumulated count lock process abnormal completion
20683 (50CBH) communication) Accumulated count of lock process based on close
20684 (50CCH) Connection for Accumulated count unlock process normal completion
20685 (50CDH) GX Developer Accumulated count unlock process abnormal completion
20686 (50CEH) communication Accumulated count lock process normal completion
20687 (50CFH) (for TCP/IP Accumulated count lock process abnormal completion
20688 (50D0H) communication) Accumulated count of lock process based on close
20689 (50D1H) Accumulated count unlock process normal completion
20690 (50D2H) Connection for Accumulated count unlock process abnormal completion
20691 (50D3H) FTP Accumulated count lock process normal completion
20692 (50D4H) communication Accumulated count lock process abnormal completion
20693 (50D5H) Accumulated count of lock process based on close

5 - 85 5 - 85
5 COMMUNICATION PROCEDURE
MELSEC-Q

(1) Remote password status storage area (address 20486 to 20487


(5006H to 5007H))
(a) The current unlock/lock status of the remote password for each connection
is stored.
The unlock/lock status for connection No. 1 to No. 16 that use the user port
is stored in the address 20486.
The unlock/lock status for connections that use the system port is stored in
the address 20487.

(b) The remote password status for each connection is indicated in bits as
follows:
1 (ON): Lock status
0 (OFF): Unlock status/no remote password check setting
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Buffer memory address 20486 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0

••••••••••••••••••••••••••••••••••••••••••• Status of connection No. 1

Status of connection No. 16 Status of connection No. 2

b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0


Buffer memory address 20487 (For the system) 1/0 1/0 1/0 1/0

Status of the FTP communication port Status of the automatic


open UDP port
Status of the GX Developer communication port (For TCP/IP communication) Status of the GX Developer
communication port
(For UDP/IP communication)

(2) System port use prohibited designation area (address 20488


(5008H))
(a) The opposite device is allowed/prohibited from performing the following data
communication using the port provided by the Ethernet module system:
• Communication using the automatic open UDP port (communication
using the MC protocol)
• Communication from GX Developer using the Ethernet connection

(b) This designation is determined by the user.


1 (ON): Use prohibited
0 (OFF): Use allowed (default)
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Buffer memory address 20488 (For the system) 1/0 1/0 1/0

Automatic open UDP port

GX Developer communication port (For TCP/IP communication) GX Developer


communication port
(For UDP/IP communication)

(c) If the remote password check is performed and the remote password status
of the connection using the applicable port is in the lock status, the use of
the applicable port can be prohibited.

5 - 86 5 - 86
5 COMMUNICATION PROCEDURE
MELSEC-Q

(d) If improper access from the opposite device has been performed during the
above data communication, set the applicable port to "use prohibited." (See
Section 5.9.4 for details.)

REMARKS
To prohibit data communication from the opposite device using the Ethernet module
FTP function, set "Not used" in the FTP function setting item under the "Setting the
Ethernet FTP parameters" through GX Developer. (See Section 5.3 of User's
Manual (Application).)

(3) Remote password mismatch notification accumulated count


designation area (Address 20592 to 20593 (5070H to 5071H))
(a) Use 0 to FFFFH to designate the count that will be the notification timing to
the user when the number of occurrence of remote password mismatches
become the permit or more during the unlock/lock processing from the
user/external device after the Ethernet module starts up. (This designation
is common to all connections.)
0H: No designation
(The process (c) when a remote password mismatch occurs is not
performed.)
1 to FFFFH: Notification accumulated count

(b) Designate the notification accumulated count for each of the following
connections in this area:
Address 20592 area: Connection No. 1 to No. 16
Address 20593 area: Connection using the automatic open UDP port
Communication from GX Developer using the
Ethernet connection
Communication from the external device that uses
the FTP function

(c) When the number of times a remote password mismatch occurred during
the unlock/lock processing exceeds the notification accumulated count, the
Ethernet module performs the following a mismatch occurs. (See Section
5.9.4 for details.)
• The COM.ERR.LED lights up.
• The code C200H is stored in the error code and end code storage area of
the buffer memory error log area (address 227 to 372 (E3H to 174H)).
The Ethernet module system does not close the connection.

(d) The accumulated number of times a remote password mismatch occurred


up to the present (accumulated count value according to the Ethernet
module) can be checked using the storage area for abnormal completion
accumulated count indicated in (4) below.

5 - 87 5 - 87
5 COMMUNICATION PROCEDURE
MELSEC-Q

(4) Storage area for accumulated count unlock process normal


completion of (address 20594 (5072H) · · · )
Storage area for accumulated count unlock process abnormal
completion of (address 20595 (5073H) · · ·)
Storage area for accumulated count lock process normal
completion of (address 20596 (5074H) · · ·)
Storage area for accumulated count lock process abnormal
completion of (address 20597 (5075H) · · ·)
(a) The accumulated number of times the remote password unlock/lock
processing for the applicable connection has been completed
normally/abnormally up to present is stored.

(b) The user should clear the value stored in each of the accumulated count
storage areas. (Write "0" to the applicable area from the QCPU.)

(5) Storage area for accumulated count of lock process based on close
(Address 20598 (5076H) · · · )
(a) When the user closes the applicable connection without performing the
remote password lock processing, the Ethernet module will automatically
perform the lock processing.
The accumulated number of times the Ethernet module performed the lock
processing automatically is stored in this area.

(b) The user should clear the value stored in this accumulated count storage
area. (Write "0" to the applicable area from the QCPU.)

POINT
The maximum value that can be stored in the areas indicated in (4) and (5) above
is FFFFH. An accumulated count that exceeds FFFFH (65535) is not stored.

5 - 88 5 - 88
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.9.7 Data communication when the remote password check is set

The following describes data communication that uses a connection for which the
remote password check is set.
Data communication
Function No remote password check 1 Remarks
Remote password check setting ( )
setting
After the open processing is completed,
Communication is possible after
User open communication is allowed from the time the See Section 3.18
the open processing is
Communication port unlock command is received until the lock
completed. of the Reference
command is received.
using the MC Manual for the
After the initial processing is completed,
protocol Automatic Communication is possible after unlock and lock
communication is allowed from the time the
open UDP the initial processing is commands.
unlock command is received until the lock
port completed. command is received.
After the open processing is completed,
There is a communication is allowed from the time the
procedure unlock command is received until the lock
command is received.
Communication
Communication is allowed after the open
using the fixed
processing is completed. ( 2)
buffer Communication is possible after
Non Since the remote password check is not
the open processing is
procedure performed in non procedure communication,
completed. the remote password check is not set for the
connection used.
After the open processing is completed,
Communication using the communication is allowed from the time the
random access buffer unlock command is received until the lock
command is received.

After the initial processing is completed, transmission and reception are allowed.
Sending/receiving of e-mail The remote password check is not performed for e-mail transmission and
reception.
Communication is allowed after the remote
Communication is possible after
Communication using Web password is entered. The remote password
the initial processing is
function lock processing is automatically performed
completed.
when the web browser closes.
CC-Link IE controller network,
MELSECNET/H,
Communication is possible after
MELSECNET/10 relay Communication is possible after the initial
the initial processing is
communication processing is completed. ( 3)
completed.
Communication using data link
instructions
Within the Ethernet, After the open processing is completed,
See Chapter 5 of
File transfer (FTP server) communication is possible with communication is allowed from the time the
User's Manual
function the external device that has unlock command is received until the lock
(Application).
completed the open processing. command is received.
GX Developer TCP After the initial processing is Communication is allowed after the remote
communication ( 1) completed, communication is password is entered. See the operating
allowed by establishing a The remote password lock processing is manual for GX
GX Developer UDP
connection from the GX automatically performed when the project Developer.
communication ( 1)
Developer side. closes.

1 See Section 5.9.1 (3) for access to the programmable controllers of other stations.
2 A dedicated connection is used for the non-procedure fixed buffer communication.
Do not perform the remote password setting for the applicable connection.
3 If a remote password has been set in the QCPUs of the relay station and access
station where Ethernet modules are installed, when accessing other station's
programmable controllers, it may not be possible to access other stations. (See
items (1) and (3) in Section 5.9.1.)

5 - 89 5 - 89
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.10 Hub Connection Status Monitor Function

The current connection status of the Ethernet module and hub, the transmission
speed, and the number of times the Ethernet module detected disconnection can be
checked at the following buffer memory addresses. (QJ71E71-100 only)

10BASE-T/100BASE-TX,
Full duplex/half duplex

Hub
Ethernet module External device

(1) Hub connection status area (Address: 201 (C9H))


Stores the current connection status of the QJ71E71-100 and hub and the
transmission speed.
b15 b14 b13 to b11 b10 b9 b8 to b0
Address: 201(C9H) 3) 2) 1)

1) Communication mode
0: Half duplex
1: Full duplex
2) Hub connection status
0: Hub not connected/disconnected
1: Hub connected
3) Data transmission speed
0: Operating at 10BASE-T
1: Operating at 100BASE-TX
(Bits other than above are reserved for system use.)

(2) Disconnection detection count storage area (Address: 20995


(5203H))
(a) Stores the number of disconnection detection times after initial processing is
completed (X19 turns ON).
Disconnection is detected in any of the following cases.
• Disconnection between Ethernet module and hub
• Cable removal from hub side connector
• Hub power-off
• Cable removal from Ethernet module side connector

(b) If an error has occurred 65536 times or more, a count stops at FFFFH
(65535).
Write "0" to this area using a sequence program to clear the stored value.

5 - 90 5 - 90
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.11 Configuring a Network in Redundant System (Redundant System Support Function)

This section explains the functions and settings for use of the Ethernet module in the
redundant system. Refer to Section 2.5 for the system configuration.

POINT
If the Ethernet module is mounted on the extension base unit of the redundant
system, this section can be skipped.
The procedure of communication is the same as that of the single CPU system.

5.11.1 Issue of System Switching Request to Control System CPU

(1) "Issue of System Switching Request to Control System CPU"


This function issues a system switching request to the control system CPU when
the Ethernet module mounted on the main base unit of the control system CPU in
the redundant system detects a communication error or disconnection.
External device

Communication
error occurrence

Control system (System A) Standby system (System B)

System switching Tracking cable


request

(2) "System switching request issuing condition"


When any of the following conditions set in the redundant setting of GX
Developer is satisfied, the Ethernet module issues a system switching request to
the control system CPU. (Refer to Section 5.11.3 for the redundant setting.)
System switching request issuing condition Description
After the connection is opened (after open processing),
Existence check
Communication error the existence of the external device cannot be checked.
detection There is no ACK response from the external device
ULP timeout
within the TCP ULP timer value.
The cable connected to the Ethernet module was
Disconnection detection
disconnected. (QJ71E71-100 only)

5 - 91 5 - 91
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
When any of the system switching request issuing conditions indicated in (2) of this
section is satisfied, the system is switched between the control system and standby
system. In either of the following cases, however, the system will not be switched if
the system switching request is issued from the Ethernet module.
• The standby system is already in a faulty status (e.g. power-off, reset or stop
error) (For the reasons for system switching, refer to the QnPRHCPU User's
Manual (Redundant System).)
• The network module redundant group settings have been mode for Ethernet
modules and either one is operating normally (For the "network module
redundant group setting", refer to the QnPRHCPU User's Manual (Redundant
System).)

(3) Issue of system switching request at "communication error"


The Ethernet module mounted on the main base unit of the control system CPU
monitors communication with the external device on each connection. When
detecting a communication error is it issues a system switching request to the
control system CPU.
(a) "Communication error at which system switching request is issued"
When either of the following communication errors occurs, the system
switching request is issued.
Communication error Description
After the connection is opened (after open processing), the
Existence check
existence of the external device cannot be checked.
There is no ACK response from the external device within
ULP timeout
the TCP ULP timer value.

(b) "Target connection"


A communication error is detected on the connections set in the "system
switching settings when communication error occurs" in the redundant
setting of GX Developer. (Refer to Section 5.11.3 for the redundant
settings.)
The following connections can be the targets of monitoring.
• Connection No. 1 to 16
• Automatic open UDP port
• FTP communication port
• GX Developer communication port (TCP, UDP)
• HTTP communication port

5 - 92 5 - 92
5 COMMUNICATION PROCEDURE
MELSEC-Q

(c) System switching request operation at "communication error"


The Ethernet module checks communication with the external device for an
error using the existence check function or TCP ULP timer.
The system switching request operation performed at a communication
error is described below.
External device 1) During normal communication
System A is operating as a control system,
and system B as a standby system.
Normal communication The external device is communicating with
the Ethernet module mounted on the main
base unit of the control system CPU. ( 1)

Control system (System A) Standby system (System B)

Tracking cable

External device
2) At error detection ( 2)
When the Ethernet module mounted on
the main base unit of the control system
CPU detects the communication error that
occurred between the external device and
Ethernet module, it issues a system
switching request to the control system
Communication
CPU. ( 3)
error occurrence

Control system (System A) Standby system (System B)

System switching Tracking cable


request

External device 3) After system switching


System A operates as a standby system,
and the system B as a control system.
Normal communication The external device changes the
connection destination, and
communicates with the Ethernet module
mounted on the main base unit of the
control system CPU (System B).
Standby system (System A) Control system (System B)

Tracking cable

5 - 93 5 - 93
5 COMMUNICATION PROCEDURE
MELSEC-Q

1 By connecting the external device and the Ethernet module mounted on the main
base unit of the standby system CPU via TCP, a standby system CPU side error
can be detected.
2 System switching timing at communication error
The timing of issuing the system switching request to the control system CPU at a
communication error is shown below.
(a) System switching timing by "existence check"

Open completion signal


(Address: 5000H)

Response message cannot be received


from external device
Ethernet module
Existence Existence Existence
Last check check
check
communication message message
message
Target Target Target
existence existence existence
check starting check interval check interval
interval timer timer value timer value
Issue of system switching
value request to control system CPU

1) The Ethernet module makes an existence check on the external device


whose connection is open if communication is not made for a
predetermined period of time. (Refer to Section 5.2.2 for the existence
check function.)
2) If the Ethernet module cannot receive a response message from the
external device, it closes the corresponding connection and issues a
system switching request to the control system CPU.
(The above chart shows an existence check example of two resend
times.)

(b) System switching timing by "ULP timeout"

BUFSND instruction

BUFSND instruction
completion device+1
ACK is not returned from external device
Ethernet module
Data
First retry Second retry
command

TCP resend TCP resend TCP resend


timer value timer value timer value
Issue of system switching request
to control system CPU
TCP ULP timer value

1) If ACK is not returned from the external device within the TCP ULP
timer period at TCP opening or data transmission, a transmission error
occurs and the Ethernet issues a system switching request to the
control system CPU. (Refer to Section 5.2.2 for the TCP ULP timer.)
(The above chart shows a setting example of two retries.)

3 Set whether the system switching request will be issued or not to the control
system CPU in the redundant settings of GX Developer. (Refer to Section 5.11.3.)

5 - 94 5 - 94
5 COMMUNICATION PROCEDURE
MELSEC-Q

(4) Issue of system switching request at "disconnection detection"


The Ethernet module mounted on the main base unit of the control system CPU
monitors the connection status of the cable connected to the Ethernet module,
and on detection of disconnection, it issues a system switching request to the
control system CPU.
This function is available for the QJ71E71-100 only.
(a) "Disconnection detection at which system switching request is issued"
Disconnection is detected in any of the following cases.
• Disconnection between Ethernet module and hub
• Cable removal from hub side connector
• Hub power-off
• Cable removal from Ethernet module side connector

(b) System switching request operation at "disconnection detection"


The Ethernet module always checks the connected cable for disconnection.
The system switching request operation performed at disconnection
detection is described below.
External device 1) Disconnection monitoring
The Ethernet module always checks the
connected cable for disconnection. ( 1)
The monitoring result is stored into the
hub connection status area (address: 201
(C9H)) of the buffer memory. (Refer to
Disconnection Section 5.10.)
occurrence

Control system (System A) Standby system (System B)

Tracking cable

External device
2) At disconnection detection ( 2)
When the Ethernet module mounted on
the main base unit of the control system
CPU detects disconnection, it executes a
disconnection status time check, and
when a disconnection status continues for
the period of cable disconnection timeout
setting, the Ethernet module issues a
system switching request to the control
Control system (System A) Standby system (System B)
system CPU. ( 3)

System switching Tracking cable


request

(To next page)


5 - 95 5 - 95
5 COMMUNICATION PROCEDURE
MELSEC-Q

(From previous page)

External device 3) After system switching


System A operates as a standby system,
and system B as a control system.

Standby system (System A) Control system (System B)

Tracking cable

1 When the cable is not connected from the start, the Ethernet module does not
regard it as disconnection. (Disconnection is detected only when normal status
turns to abnormal.)
2 System switching timing at disconnection detection
The timing of issuing a system switching request to the control system CPU at
disconnection detection is shown below.
Disconnection Disconnection
occurrence Cable connection occurrence
(Link down) (Link up) (Link down)
Disconnection
detection start Disconnection Disconnection
Ethernet
after initial
module
processing
completion
Cable disconnection Cable disconnection
timeout timeout

System switching request issued


to control system CPU

1) The Ethernet module starts disconnection detection after initial


processing completion.
2) On detection of disconnection, the Ethernet module performs a
disconnection status time check, and when a disconnection status
continues for the period of cable disconnection timeout setting, the
Ethernet module issues a system switching request to the control
system CPU.
3) When the disconnection status returns to normal within the cable
disconnection timeout setting, the Ethernet module does not issue a
system switching request.
3 Set whether the system switching request will be issued or not to the control
system CPU in the redundant setting of GX Developer. (Refer to Section 5.11.3.)

5 - 96 5 - 96
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.11.2 Communication path bypass function

(1) Communication path bypass function


When any of the following redundant system-support applications is used, the
path where a communication error occurred can be automatically bypassed to
continue communication if an error occurs in communication with the Ethernet
module.
The user need not change from one communication path to the other.
• Application that operates on the OPS (except the MELSOFT products such as
GX Developer) 1
• GX Developer
• PX Developer monitor tool
For the compatible versions and available functions, refer to the manual of the
corresponding application.

1 The Ethernet module can communicate with the OPS using the user
connection for OPS connection.
Set the user connection for OPS connection in the open settings of GX
Developer. (Refer to Section 5.5.)

5 - 97 5 - 97
5 COMMUNICATION PROCEDURE
MELSEC-Q

(2) Example of redundant system-support application operation at


occurrence of communication error
The following provides an example of redundant system-support application
operation performed when an error occurs during communication with the control
system CPU.
External device 1) During normal communication
Redundant
system-support Station No. 1 is operating as a control
application system, and station No. 2 as a standby
Normal communication system.
The redundant system-support application
is communicating with the control system
CPU.

Control system (Station No. 1) Standby system (Station No. 2)

Tracking cable

External device 2) At communication error occurrence


Redundant
system-support Station No. 1 is operating as a control
application system, and station No. 2 as a standby
system.
(Without system switching) ( 1)

(1) [Operation of redundant system-support


application]
Communication
error occurrence Since a communication error occurred
between the redundant system-support
Control system (Station No. 1) Standby system (Station No. 2)
application and the Ethernet module
mounted on the main base unit of the
control system CPU, the redundant
system-support application changes the
(2) Tracking cable communication path automatically and
communicates with the control system
(1) Path is bypassed to make access to control system CPU. CPU via the standby system CPU.
(2) Communication with control system CPU is continued using
tracking cable.
[Operation of standby system CPU]
Since the received data is addressed to
the control system CPU, data is relayed to
the control system CPU via the tracking
cable.

1 Set whether the system switching request


will be issued or not to the control system
CPU in the redundant settings of GX
Developer. (Refer to Section 5.11.3.)

5 - 98 5 - 98
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.11.3 Setting for using Ethernet module in redundant system

This section describes the setting of GX Developer when using the Ethernet module in
the redundant system.

(1) Setting the number of Ethernet/CC IE/MELSECNET cards


The following describes the setting for the number of the Ethernet/CC IE/
MELSECNET modules of GX Developer.
In this section, only the parts different from the single CPU system are described.
For setting the number of Ethernet/CC IE/MELSECNET modules, refer to Section
4.6.

[Starting procedure]
[GX Developer] [Network param] Ethernet/CC IE/MELSECNET

[Setting screen]

(a) Network type


Select "Ethernet (Main base)".

(b) Station No.


Set station No. of the Ethernet module of the system A.
Set the station No. of the Ethernet module of the system B in the redundant
setting. (Refer to Section 5.11.3(2))

(c) Mode
Select mode of the Ethernet module of the system A.
Set mode of the Ethernet module of the system B in the redundant setting.
(Refer to Section 5.11.3(2))
When using the redundant system in backup mode, the same mode should
be set to the system A and the system B.

5 - 99 5 - 99
5 COMMUNICATION PROCEDURE
MELSEC-Q

(d) Operational settings


The IP address set in "Operational settings" is the IP address of the
Ethernet module of the system A.
Set the IP address of the Ethernet module of the system B in the redundant
setting. (Refer to Section 5.11.3(2))

(2) Redundant settings


This section explains the redundant settings of GX Developer.

[Starting procedure]
[Setting the number of Ethernet/CC IE/MELSECNET cards]
Redundant settings "Redundant settings screen"

[Setting screen]

[Setting items]
Item name Description
System B settings Set the station number and IP address of the Ethernet module mounted on the system B.
Issue system switch in Cable Set whether a system switching request will be issued or not to the control system CPU at
disconnection timeout disconnection detection.
Issue system switch in Set whether a system switching request will be issued or not to the control system CPU at
communication error a communication error.

(a) System B settings


Set the station number, mode and IP address of the Ethernet module
mounted on the system B.
The setting method is the same as that of the Ethernet module mounted on
system A.
Refer to Section 4.6 and Section 4.7.

5 - 100 5 - 100
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
(1) Set different station numbers and IP addresses to system A and system B.
(2) When using the redundant system in the backup mode, set the operation
mode of system A as that of system B.
If the mode of the Ethernet module differs between system A and system B,
an error will occur in the redundant CPU.
(3) For the Ethernet module settings other than the station number, mode and IP
address, use the same data for system A and system B.
(4) Set the station number, mode and IP address of the Ethernet module
mounted on System A in "Setting the number of Ethernet/CC IE/
MELSECNET cards" and "Operational settings".

(b) "Issue system switch in Cable disconnection timeout"


When this setting is made valid, the Ethernet module issues a system
switching request to the control system CPU when a disconnection status
continues for a period of disconnection monitoring time after detection of
the disconnection.
Refer to Section 5.11.1 for system switching at disconnection detection.
Item Description Setting range/choices
Issue system switch in Set whether a system switching request will • Checked (System switching request is issued)
Cable disconnection be issued or not at disconnection detection. • Not checked (System switching request is not
timeout issued)
(Default: Checked)
Cable disconnection Set the time from when disconnection is 0.0s to 30.0s
timeout setting detected until the system switching request is (Default: 2.0s)
issued to the control system CPU.

POINT
Set the cable disconnection timeout setting to several seconds to several ten
seconds.
If it is shorter than the above, a system switching request may be generated due to
noise, etc.

(c) "Issue system switch in communication error"


When this setting is made valid, the Ethernet module issues a system
switching request to the control system CPU when a communication error
is detected on the connection set in the "system switching settings when
communication error occurs".
Refer to Section 5.11.1 for system switching at communication error.
Item Description Setting range/choices
Issue system switch in Set whether a system switching request will • Checked (System switching request is issued)
communication error be issued or not at communication error. • Not checked (System switching request is not
issued)
(Default: Not checked)
System switching Set the target connection whose Check the target connection.
settings when communication error will cause a system (Default: Not checked)
communication error switching request to be issued.
occurs 1 2 3

5 - 101 5 - 101
5 COMMUNICATION PROCEDURE
MELSEC-Q

1 The settings of the automatic open UDP port and GX Developer communication UDP
port are made valid when the following conditions are satisfied.
1) The remote password setting is valid.
2) The remote password is canceled.
When the above conditions are not satisfied, a system switching request is not issued
if a communication error occurs on the target connection.
2 Do not set the following connection as the target connection. (Do not check its check
box.)
• Initial timing setting of operation setting : "Always waiting for OPEN (communication
enabled during STOP)"
• Protocol of open setting : "UDP"
• Existence check of open setting : "Check"
If the above connection is set as the target connection, system switching may occur
consecutively in the redundant system when a communication error occurs due to
cable disconnection or external device power-off.
3 It is recommended not to set the connection, which has been set to "MELSOFT
connection" in the open system of the open setting, as the target connection. (Do not
check the check box.)
If the above connection is set as the target connection, all the MELSOFT products
connected to the network will be targets, and therefore, the target external device
(MELSOFT product) cannot be identified.

5 - 102 5 - 102
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.11.4 Buffer memory for redundant system support function

The redundant setting status of GX Developer can be checked in the following buffer
memory areas.

(1) "Issue system switch in Cable disconnection timeout" (Address:


20992 (5200H))
Stores the setting status of "Issue system switch in Cable disconnection timeout".
0: Not set
1: Set

(2) Disconnection timeout setting (Address: 20993 (5201H))


Stores the setting status of the "disconnection timeout setting".
Set time = set value 500ms
(Example) When the set time is 2s, the storage value is 4H.

(3) "System switching settings when communication error occurs"


(Connection for user) (Address: 21008 (5210H))
Stores the setting status of "System switching settings when communication error
occurs" to the connection for user.
0: Not set
1: Set
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Address: 21008(5210H)

Connection No. 1
Connection No. 2

Connection No. 16

(4) "System switching settings when communication error occurs"


(Connection for system) (Address: 21009 (5211H))
Stores the setting status of "System switching settings when communication error
occurs" to the connection for system.
0: Not set
1: Set
b15 to b5 b4 b3 b2 b1 b0
Address: 21009(5211H) (For system)

Automatic open UDP port


GX Developer communication
UDP port
GX Developer communication
TCP port
FTP communication port
HTTP communication port
MELSOFT connection included

5 - 103 5 - 103
5 COMMUNICATION PROCEDURE
MELSEC-Q

5.11.5 Data communication for using Ethernet module in redundant system

This section describes data communication made when the Ethernet module is
mounted on the main base unit of a redundant system.
For other than the following, data communication can be made in the same manner as
when the Ethernet module is mounted on the main base unit of a single CPU system.
Refer to the explanation item of the corresponding function.

(1) "Initial processing"


(a) Execution of initial processing
Make settings for data communication using GX Developer, write the same
parameters to the control system CPU and standby system CPU, and then
simultaneously reset the both redundant CPUs.
Note that different station numbers and IP addresses must be set to system
A and system B. (Refer to Section 5.11.3.)

(b) When performing re-initial processing (Refer to Section 5.2.3)


Do not change the local station IP address and operation settings.
If they are changed, normal communication cannot be made.
1) When using the UINI instruction
Execute the instruction after specifying "0H" for the change target
((S1+2) of the control data.
2) When directly writing to buffer memory
Write "1" to bit 15 of the communication condition setting area
(address: 1FH) without changing the set value of the buffer memory
area.

(c) Initial processing by I/O signal


Since the output signal (Y) turns off in the standby system CPU, initial
processing by I/O signal is unavailable.
Set the network parameters of GX Developer and perform initial
processing. (Refer to Section 5.2.)

(2) "Open/close processing"


(a) When making communication via TCP/IP
Place the Ethernet module in an open waiting status (Passive open), and
perform open/close processing from the external device.
When Active open processing is performed from the Ethernet module,
close processing is performed from the Ethernet module, but if system
switching occurs before execution of close processing, close processing
cannot be executed.

5 - 104 5 - 104
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) When using user connection to communicate with standby system (For
communication using MC protocol or random access buffer)
1) Operation setting (Refer to Section 4.7)
Set the initial timing setting to "Always waiting for OPEN
(communication enabled during STOP)".
2) Open setting (Refer to Section 5.5)
When making TCP/IP communication, set the open system to
"Unpassive or Fullpassive".

(c) Open/close processing by I/O signal


Since the output signal (Y) turns off in the standby system CPU, open/close
processing by I/O signal is unavailable.
Set the initial timing setting of the operation setting to "Always waiting for
OPEN (communication enabled during STOP)", or use the dedicated
instruction (OPEN/CLOSE instruction). (Refer to Section 5.6.)

POINT
When using the user connection for communication, it is recommended to prepare
the connections for communication with system A and for communication with
system B.
If a communication error occurs in the host system or the system switching occurs,
the above enables immediate communication with the other system.
On the Ethernet module, up to 16 user connections can be set.

5 - 105 5 - 105
5 COMMUNICATION PROCEDURE
MELSEC-Q

(3) "Communication using MC protocol"


The QnA-compatible 3E frame or 4E frame can be used to access the control
system/standby system or system A/system B.
For the message format and data specification method, refer to the Reference
Manual.
(a) Operation performed for access to control system/standby system or
system A/system B
1) When system switching occurred (Example of access to control system
CPU)
External device
1) The external device connects to the
QnA-compatible 3E frame
Request destination Ethernet module mounted on the main
module I/O No. : 03D0H
Access to base unit of the control system CPU and
Network No. : 00H
control system PC No. : FFH
makes access to the control system CPU.

Control system (System A) Standby system (System B)

Tracking cable
(System switching occurrence)
External device
QnA-compatible 3E frame
2) If system switching occurs, the external
Access to control Request destination device automatically continues access to
module I/O No. : 03D0H
system is continued
via tracking cable.
Network No. : 00H the control system via the tracking cable.
PC No. : FFH
However, when the communication line
with the connection destination is faulty or
the standby system is powered off, for
example, the connection destination must
Standby system (System A) Control system (System B) be changed on the external device side.

Tracking cable

2) For access to the system that is not the connection destination


(Example of connection to control system and access to standby
system CPU)
External device QnA-compatible 3E frame 1) The external device connects to the
Request destination
module I/O No. : 03D1H Ethernet module mounted on the main
Access to Network No. : 00H
standby system
PC No. : FFH base unit of the control system CPU and
makes access to the standby system CPU
Accessible if communication
via the tracking cable.
line is faulty This enables access if the communication
line between the external device and
Control system (System A) Standby system (System B) standby system is faulty.

Tracking cable

5 - 106 5 - 106
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) Communication procedure example for access to control system CPU in


redundant system
The following shows a communication procedure example for access to the
control system CPU in the redundant system.
Place the Ethernet module in an open waiting status and perform
open/close processing from the external device.
Communication procedure example

Perform open processing with System A.

Perform open processing with System B.

ON:
System A is control
system Is SM1515 ON?
(Operation system type)

OFF: System A is standby system

TRK. CABLE ERR. occurred.


Is SM1516 ON? OFF
Refer to QnPRHCPU User's Manual
(Operation system type)
(Redundant System) for details.

ON: System A is standby system


ON:
System B is control
system Is SM1515 ON?
(Operation system type)

OFF: System B is
standby system
Is SM1516 ON? OFF
(Operation system type)

ON: System B is standby system

Send command message. Send command message.


Request destination module I/O Request destination module I/O
number: 03D0H number: 03D0H

Is response message NO NO Is response message


normally terminated? normally terminated?

YES YES
YES YES
Is it repeated? Is it repeated?

NO NO
Close system A. Close system B.

Close system A. Close system B.

End

5 - 107 5 - 107
5 COMMUNICATION PROCEDURE
MELSEC-Q

(c) Precautions for writing parameter file or program file


1) Be sure to write the same file to system A and system B.
An error will occur if different files are written or a file is written to only
one system.
2) Write a parameter file or program file when the operating status of the
CPU is "STOP".
3) Perform file write in the following procedure.
Start

Set the control system CPU to STOP by remote A continue error occurs in the
operation. standby system CPU.

Set the standby system CPU to STOP by remote


operation.

Execute file write to the control system CPU.


Execute file write to the standby system CPU.

( 1)
Set the standby system CPU to RUN by remote
operation.

Set the control system CPU to RUN by remote


operation.

Clear the error of the standby system CPU. ( 2)

Complete

1 After writing a parameter file, simultaneously reset the both redundant


CPUs.
2 When the operation status of the control system CPU is switched from
STOP to RUN, check the error status of the standby system CPU, and
if an error has occurred, set the error code (6010H) to SD50, and then
turn on SM50 to clear the error.

5 - 108 5 - 108
5 COMMUNICATION PROCEDURE
MELSEC-Q

(4) "Communication via fixed buffer"


(a) Receive processing in standby system
When data is sent to the Ethernet module mounted on the standby system,
the data received by the Ethernet module is discarded and data receive
processing is not performed.
(The fixed buffer receive completion signal (corresponding bit of address:
5005H) does not turn on.)

(b) Receive processing in interrupt program


When the control system is switched to the standby system by of system
switching before execution of an interrupt program, the interrupt factor is
held.
When the system switching occurs again and the standby system is
switched to the control system by the interrupt program is executed by the
held interrupt factor.
(The interrupt factor is not transferred to the other system.)

(c) When data is sent from external device


1) When communication procedure is "with procedure"
If a response timeout to the Ethernet module occurs, change the
connection destination to the other system and send data.
2) When communication procedure is "without procedure"
Send the same data to both the control system and standby system.

The following shows a transmission procedure example when data is


transmitted to the redundant system via the fixed buffer (with procedure).
Fixed buffer transmission procedure
(With procedure)

Send data to system A.

YES
Has timeout occurred?

NO

Receive a response from


Send data to system B.
system A.

YES
Has timeout occurred?

NO

Receive a response from


Error occurrence
system B.

5 - 109 5 - 109
5 COMMUNICATION PROCEDURE
MELSEC-Q

POINT
Note the following when executing re-transmission processing at system switching.
(1) When making communication while synchronizing transmission and reception
During communication, system switching may occur with transmission and
reception not synchronized.
When system switching has occurred, resume communication after initializing
synchronization to ensure safety.
(2) When using the dedicated instruction
Since whether the execution of the write instruction is completed or not is
difficult to judge, the same instruction must be executed again.
In this case, note that the same instruction may be executed twice.

(5) "Communication via random access buffer"


The buffer memory of the Ethernet module is not tracked. Therefore, when
writing data to the random access buffer, write the same data to the control
system and standby system.

(6) "When using e-mail function"


(a) Receive of e-mail
1) After receiving an e-mail by the Ethernet module, send a reply mail to
the mail transmission source so that the mail transmission source
confirms that it received the e-mail.
If receipt cannot be confirmed, send the e-mail again.
2) After the MRECV instruction is executed, the read e-mail is deleted
from the mail server. Therefore, when system switching occurs during
execution of the MRECV instruction, the mail may not be received by
the new control system CPU after system switching if the MRECV
instruction is re-executed. (The e-mail has been deleted from the mail
server.)

5 - 110 5 - 110
5 COMMUNICATION PROCEDURE
MELSEC-Q

(b) E-mail receive program example


In the following program, turning on X21 causes the Ethernet module
mounted in the position of I/O signal X/Y00 to X/Y1F to receive an e-mail by
execution of the MRECV instruction and then send a reply mail to the
transmission source by execution of the MSEND instruction.
For the e-mail function, refer to Chapter 2 in the User's Manual
(Application).

Specifies inquiry to server.

Specifies read of first mail.

Specifies matching to data length of


received mail.
Specifies matching to head data
length of received mail.
Reads received mail.

Normal receive of e-mail

Unsuccessful receive of e-mail

Text data (normal)

Text data (abnormal)

Specifies text.

Specifies transmission destination No.

Specifies transmission data length.

Specifies subject length.

Specifies subject.

Sends e-mail.

Normal completion

Unsuccessful completion

(c) When using reporting function


Since a reporting mail may be sent from both the control system and
standby system in either of the following conditions, perform the processing
that will discard the overlapping mail on the receive side personal
computer. 1
• When the CPU operation status is set to the reporting condition
• When the device data set to the reporting condition is tracked
1 By setting the following SM devices as reporting conditions, the system
of the redundant system can be identified by a reporting mail, and the
devices can be used as conditions for identifying which system sent
the overlapping mail.
• SM1511 (System A identification flag)
• SM1512 (System B identification flag)
• SM1515, SM1516 (Operation system type)

5 - 111 5 - 111
5 COMMUNICATION PROCEDURE
MELSEC-Q

(7) "When communication is made via CC-Link IE controller network,


MELSECNET/H or MELSECNET/10"
(a) When redundant system is on network
When making access via redundant system, note that the routing
parameter setting must be changed by the RTWRITE instruction at the
request source station or relay station at the time of system switching.
(Refer to (b) below.)
(b) When access is made via redundant system
The routing parameter setting must be set to the request source station or
relay station to access other station via Ethernet using the CC-Link IE
controller network, MELSECNET/H, MELSECNET/10 relay communication
function. (Refer to Chapter 3 in the User's Manual (Application).)
When making access via the redundant system, set the station, which
becomes a control system, as a routing station.
Request source station Network parameter setting
Ethernet Transfer destination Relay destination Relay destination
module network No. network No. station No.
QCPU Station
No. 3 1 2 1

Network No. 2

Control system Standby system


Ethernet Ethernet Ethernet Ethernet
QnPRH module module QnPRH module module
CPU Station Station CPU Station Station
No. 1 No. 1 No. 2 No. 2

Network No. 1
Request destination
station
Ethernet
QCPU module
Station
No. 3

Change the routing parameter setting with the RTWRITE instruction at the
relay source station or relay station so that access is made via the station of
the new control system after system switching when system switching
occurs. (For the RTWRITE instruction, refer to the QCPU (Q
Mode)/QnACPU Programming Manual (Common Instructions).)
Request source station Network parameter setting
Ethernet Transfer destination Relay destination Relay destination
QCPU module network No. network No. station No.
Station
No. 3 1 2 1 2

Network No. 2 Change using


RTWRITE instruction.
Standby system Control system
Ethernet Ethernet Ethernet Ethernet
QnPRH module module QnPRH module module
CPU Station Station CPU Station Station
No. 1 No. 1 No. 2 No. 2

Network No. 1
Request destination
station
Ethernet
QCPU module
Station
No. 3

5 - 112 5 - 112
5 COMMUNICATION PROCEDURE
MELSEC-Q

(8) "When QCPU accesses programmable controller of another station


using data link instruction"
(a) Redundant system-compatible data link instructions
1) By specifying the target station CPU type of the control data in any of
the following data link instructions, access can be made to the control
system/standby system or system A/system B. (Refer to Chapter 4 or
Chapter 6 of the User's Manual (Application) for the data link
instructions.)
• READ/SREAD instruction
• WRITE/SWRITE instruction
• REQ instruction
2) Operation performed for access to control system/standby system or
system A/system B (Example of executing the READ instruction)
Since the received command is addressed to the control system CPU
(target station CPU type: 3D0H) when the target station is in the
standby system, data is relayed to the control system CPU via the
tracking cable to read the data of the control system CPU.
QCPU E71
READ
Channel 3
(Local station)
Device

Control system Standby system (Target station)

Device

Tracking cable

(b) Processing at error completion


In case that the data link instruction is executed for the specified station
(control system CPU/standby system CPU) in the redundant system and
that target station causes system switching the data link instruction may
result in error completion. (Error code: 4244H, 4248H)
If the data link instruction results in error completion due to the above error,
execute the data link instruction again.

5 - 113 5 - 113
5 COMMUNICATION PROCEDURE
MELSEC-Q

(c) SEND instruction


1) Execution of SEND instruction
When the target station is in a redundant system, the communication
request source station must identify that the target station is the control
system to execute the SEND instruction.
When the target station is the standby system, the target station
storage channel cannot be used since the RECV instruction is not
executed at the target station after data is sent by the SEND
instruction. (Channel being used)
2) When performing broadcast
When a redundant system exists on the network where a broadcast is
performed, the storage channel cannot be used since the RECV
instruction is not executed for the standby system. (Channel being
used)

(d) RECV instruction, interrupt program (RECVS instruction)


When the SEND instruction is executed for the redundant system, the
processing of the RECV instruction or interrupt program (RECVS
instruction) changes depending on the following condition.
1) When system switching occurs between execution of the SEND
instruction for the control system and execution of the RECV
instruction or interrupt program
When the control system is switched to the standby system by system
switching before execution of the RECV instruction or interrupt
program, it holds the RECV instruction execution request area
(address: 205 (CDH)) of the buffer memory or the interrupt factor
(interrupt pointer) of the interrupt program.
When system switching occurs again and the standby system is
switched to the control system, the RECV instruction or interrupt
program is executed using the held RECV instruction execution
request area of the buffer memory or the interrupt factor of the interrupt
program.
2) When the SEND instruction is executed for the standby system
When the standby system receives data from the transmission station,
it holds the RECV instruction execution request area (address: 205
(CDH)) of the buffer memory and the interrupt factor (interrupt pointer)
of the interrupt program.
Therefore, when the standby system is switched to the control system
by system switching, the RECV instruction or interrupt program is
executed using the held RECV instruction execution request area of
the buffer memory and the interrupt factor of the interrupt program.

5 - 114 5 - 114
5 COMMUNICATION PROCEDURE
MELSEC-Q

(9) "When using file transfer (FTP server) function"


(a) When writing parameter file or program file
1) Be sure to write the same file to system A and system B.
An error will occur if different files are written or a file is written to only
one system.
2) Write a parameter file or program file when the operating status of the
CPU is "STOP".
3) Perform file write in the following procedure.

Start

Log in to the Ethernet module mounted on the main


base unit of the system A CPU.
Log in to the Ethernet module mounted on the main
base unit of the system B CPU.

Set the system A CPU to STOP by remote operation. A continue error occurs in the
Set the system B CPU to STOP by remote operation. standby system CPU.

Execute file write to the system A CPU.


Execute file write to the system B CPU.

( 1)

Set the system A CPU to RUN by remote operation.


Set the system B CPU to RUN by remote operation.

Log out from the Ethernet module mounted on the main


base unit of the system A CPU.
Log out from the Ethernet module mounted on the main
base unit of the system B CPU.

Clear the error of the standby system CPU. ( 2)

Complete

1 After writing a parameter file, simultaneously reset the both redundant CPUs.
2 When the operation status of the control system CPU is switched from STOP to
RUN, check the error status of the standby system CPU, and if an error has
occurred, set the error code (6010H) to SD50, and then turn on SM50 to clear the
error.

(10) "When using dedicated instruction"


If system switching occurs during execution of the dedicated instruction, the
dedicated instruction may not be completed.
In this case, execute the dedicated instruction again from the new control system
CPU after system switching.

5 - 115 5 - 115
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q

6 COMMUNICATION USING THE MC PROTOCOL

This chapter explains an overview of the MELSEC communication protocol (hereinafter


referred to as the MC protocol).
See the following manual for details on the data communication function using the MC
protocol:
MELSEC Communication Protocol Reference Manual (SH-080008)

6.1 Data Communication Function

The MC protocol is the abbreviated name of the MELSEC protocol that is a


communication system for the Q series programmable controllers. Using this protocol,
the external devices can read or write device data and programs from/to the
programmable controller CPUs via the Q series Ethernet module or Q series serial
communication module.
Any external devices on which application programs can be installed and which can
send and receive data in accordance with the MELSEC programmable controller
protocol can communicate with the programmable controller CPUs using the MC
protocol.

6.1.1 Accessing the programmable controller CPUs using the MC protocol

This section explains the main functions for accessing the programmable
controller CPUs using the MC protocol. 6
On the programmable controller side, the Ethernet module sends and receives
data based on commands from the external devices.
Thus, the programmable controller CPU side does not require sequence
programs for data communication.

(1) Data read/write


This function reads/writes data from/to the programmable controller CPU device
memory of the local station or another station on the CC-Link IE controller
network, MELSECNET/H, MELSECNET/10 as well as the intelligent function
module buffer memory.
By reading and writing data, the programmable controller CPU operation
monitoring, data analysis and production management can be performed on the
external device side.
Also, production instructions can be executed from the external device side.

(2) File read/ write


This function reads and writes files such as sequence programs and parameter
files that are stored in the programmable controller CPU.
By reading and writing these files, the file management for the QCPU and the
QnACPUs of other stations can be performed on the external station side.
Also, execution programs can be changed (replaced) from the external device
side.

6-1 6-1
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q

(3) Remote control of the programmable controller CPU


This function executes remote RUN/STOP/PAUSE/latch clear/reset operations.
Remote operations of the programmable controller CPU can be performed from
the external device side using the programmable controller CPU remote control
function.
Function
Communication using 4E frame
Communication using ASCII code
Communication using QnA compatible 3E frame
Communication using binary code
Communication using A compatible 1E frame
Batch read/write in bit/word units
Device memory monitoring
Communication using the MC Device memory read/write Multiple block batch read/write
protocol Read/write by extension designation
Other station access via a network system
Read/write of the Ethernet module buffer memory
Read/write of the intelligent function module buffer memory
Read/write of the sequence program files
Status control of the programmable controller CPU (remote RUN/STOP, etc.)

6.1.2 Message format and control procedure for data communication

The data communication functions using the MC protocol correspond to the functions
for reading/writing data in the programmable controller CPU supported by the A/QnA
series Ethernet interface modules.
Therefore, the message format and control procedure are the same as when
accessing the programmable controller using A/QnA series Ethernet interface
6 modules.
• Communication using QnA compatible 3E frame
This message format is used for the QnA series Ethernet interface modules
• Communication using A compatible 1E frame
This message format is used for the A series Ethernet interface modules
The external device side can access the Q series programmable controller with a
program used for accessing the programmable controller via A/QnA series Ethernet
interface module.
(Example)
Subheader

Subheader

Header Text (Command) Header Text (response)


Ethernet

Ethernet
device points
Number of

Complete code

IP TCP PC ACPU IP TCP Read data


/ Head device /
No. monitoring
UDP timer UDP
(14 bytes) (20 bytes) (14 bytes) (20 bytes)

L H L H
00H FFH 0AH 00H 64H 00H00H 00H 20H 40H 0CH 00H 80H 00H 10H 10H 10H 10H 10H 10H 10H

(Command message for the A compatible 1E frame) (Response message for the A compatible 1E frame)

POINT
The following manual is available for performing data communication using the MC
protocol.
Q Corresponding MELSEC Communication Protocol Reference Manual (sold
separately)

6-2 6-2
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q

6.1.3 Programmable controller CPU setting for performing data communication

Data communication via MC protocol is enabled by making the following settings using
GX Developer and writing the parameters to the programmable controller CPU.
1) Setting the number of Ethernet/CC IE/MELSECNET cards (see Section 4.6)
2) Initial settings (see Section 5.2)
3) Open settings (see Section 5.5)

POINT
(1) By using the automatic open UDP ports of the Ethernet module,
communication using the MC protocol can be performed regardless of the
RUN/STOP status of the programmable controller CPU.
When the automatic open UDP ports are not used, connect the user open port
first and perform data communication referring to Chapter 4, "Settings and
Procedures Prior to Starting the Operation" and Chapter 5, "Communication
Procedure" of this manual.

(2) When writing from an external device to the programmable controller CPU, the
enable/disable write at CPU RUN time setting can be set using the GX
Developer "Ethernet operational settings" parameters.
When writing data to the remote I/O station of the MELSECNET/H, set the
enable/disable write at CPU RUN time parameter to "Enable".

6-3 6-3
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q

6.1.4 Applicability of multiple CPU system or redundant system

When the external device accesses the QPU in a multiple CPU system or redundant
system, specifying the target QCPU with the "request destination module I/O number"
in the QnA-compatible 3E frame or 4E frame for MC protocol enables access to the
control CPU or non-control CPU of the multiple CPU system or to the control system
CPU/standby system CPU or system A CPU/system B CPU of the redundant system.
Refer to the Reference Manual for details.
Refer to Chapter 2 of this manual for the system configuration.
(Example) When multiple system CPU No. 1 is specified
Q header Request data area
Subheader

Command

Subcommand
Header

device points
Network No.

PC No.

Request

module I/O No.

Request

Number of
destination

Request destination

data
length

monitoring

Device code
CPU

Head device
timer
module station No.
H L H L H – – L H L H – – L H – – L H – – L H – – L H – – – – L H – – L
5 0 0 0 0 0 F F 0 3 E 0 0 0 0 0 1 8 0 0 1 0 0 4 0 1 0 0 0 1 M 0 0 0 1 0 0 0 0 0 8
35H 30H 30H 30H 30H 30H46H 46H 30H 33H 45H 30H 30H 30H 30H 30H 31H 38H 30H 30H 31H 30H30H 34H 30H 31H 30H 30H 30H 31H 4DH2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 38H

(Command message for QnA compatible 3E frame)

REMARKS
• When using the Ethernet module in a multiple CPU system, set the QCPU
controlling the Ethernet module (hereinafter referred to as the control CPU)
through GX Developer.
• It is possible to mount an Ethernet module of function version A on a multiple CPU
system, in which case the access is limited to the control CPU (CPU No.1).
• When the Ethernet module is mounted on the extension base unit of the
redundant system, the access target (control system CPU or standby system CPU
and system A CPU or system B CPU) that can be specified varies depending on
each command.
For details, refer to QnPRHCPU User’s Manual (Redundant System) "Appendix 7
Cautions on Communications Made via Module on Extension Base Unit".

6.1.5 Support for the QCPU remote password function

When the following parameters have been set for the Ethernet module mounted on the
QCPU, the Ethernet module performs the remote password check when the external
device accesses the programmable controller:
(QCPU parameter settings)
• When a remote password is set in the QCPU
• When the connection that is communicating data with the external device is set as a
target for the remote password check

Section 5.9 of this manual explains the remote password subject to the password
check, data communication procedure and the unlock/lock processing for the remote
password.
Refer to Section 5.9 first if the connection that is communicating data with the external
device is set as a target for the remote password check.

6-4 6-4
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q

6.2 Utilizing the MX Component

If the external device is a PC running one of the basic operation systems below, it is
possible to create a communication program for the external device without
considering the detailed MC protocol (transmission/reception procedures) using one of
the following separately sold communication support tools.
Refer to Appendix 9 for the overview of MX Component.

(Supported basic operation systems)


® ®
• Microsoft Windows 95 Operating System
® ®
• Microsoft Windows 98 Operating System
® ®
• Microsoft Windows NT Workstation Operating System Version 4.0
® ®
• Microsoft Windows Millennium Edition Operating System
® ®
• Microsoft Windows 2000 Professional Operating System
® ®
• Microsoft Windows XP Professional Operating System
® ®
• Microsoft Windows XP Home Edition Operating System
® ®
• Microsoft Windows Vista Home Basic Operating System
® ®
• Microsoft Windows Vista Home Premium Operating System
® ®
• Microsoft Windows Vista Business Operating System
® ®
• Microsoft Windows Vista Ultimate Operating System
® ®
• Microsoft Windows Vista Enterprise Operating System
Depending on the version of MX Component used, different operating systems are
supported.
See the manual of MX Component for details.

(Communication support tools)


• MX Component (SW0D5C-ACT-E or later.)

6-5 6-5
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST


CONTROL METHOD)

This chapter explains how the programmable controller CPU and external device
communicate in a 1:1 mode using the fixed buffers (with the procedure exist control
method) of the Ethernet module.

7.1 Control Method

The following explains how communication is performed using the fixed buffers and the
procedure exist control method.
In the communication processing using the fixed buffers, data transmission from the
programmable controller CPU and the external device is executed through
handshaking.

(1) The data flow in the communication processing is as follows.


BUFSND
instruction Fixed buffer
No. 1
No. 2 External device
Programmable No. 3
controller
No. 4
CPU

BUFRCV to
instruction
No. 16

(2) Data can be communicated with the following external devices.


• Device on the Ethernet to which the Ethernet module is connected.
• Devices connected with the router relay function (see Section 5.3)
As shown in the diagram below, when using each fixed buffer (No. 1 to 16), the
destination devices and usage conditions (for sending/receiving, procedure
exist/no procedure, etc.) should be set when the connection via the Ethernet
7 module is opened to fix the external device for each buffer.
(a) At TCP/IP communication
It is allowed to change external devices only when the open completion
signal of the applicable connection is off.
(b) At UDP/IP communication
External devices can be changed regardless of the status of the applicable
connection.
("Destination IP address" and "Destination Port No." in the communication
address setting area can be changed. However, the "Local station Port No."
cannot be changed.)
When changing external devices, do not use the "Pairing open" and
"Existence confirmation" functions.

Fixed buffer No. 1 For sending to external device 1


External device 1
For receiving from external
Fixed buffer No. 2
device 1
For receiving from external
Fixed buffer No. 3 External device 8
device 8

to to

For sending to external


Fixed buffer No. 16 External device 28
device 28

7-1 7-1
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

POINT
In communication where the procedure exist control method is selected, the data
can be communicated by the following methods after the open processing is
completed.
• Fixed buffer communication with the procedure exist control method (sending or
receiving)
• Communication using the random access buffers
• Communication using the MC protocol

(3) At data sending/receiving, the Ethernet module performs the following processing.

(a) At data sending


When the programmable controller CPU executes the dedicated BUFSND
instruction ( 1) in a sequence program, the Ethernet module sends data of
the applicable fixed buffer (No. n) to the external device that is specified in
the communication address setting area (addresses: 28H to 5FH and 5038H
to 506FH) corresponding to fixed buffer No. n ( 2).

(b) At data receiving


The Ethernet module processes the received data if the data is received
from an external device set in the communication setting area that
corresponds to fixed buffer No. n. ( 2)
If data is received from an external device not set in the connection
information area of the buffer memory, the Ethernet module does not
request to read the receive data to the programmable controller CPU side.

1 For details on the dedicated instructions, see Chapter 10, "Dedicated


Instructions".
2 In case of TCP/IP Unpassive open, data is communicated with an
7
external device stored in the connection information area
corresponding to fixed buffer No. n.

POINT
When the Ethernet module stores the receive data in the corresponding fixed buffer
in the receive processing for the simultaneous broadcasting, it updates the
destination IP address and destination port No. in the connection information area
(addresses: 78H to C7H and 5820H to 586FH) that corresponds to fixed buffer No. n.

7-2 7-2
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.2 Sending Control Method

This section explains the control method when data is sent from the Ethernet module
to an external device using the fixed buffer No. 1 and the area corresponding to
connection No. 1 as an example.

<<Data sending using the dedicated BUFSND instruction>>


Send data
direction • [D100]: Word count for send data
Set the send data in D100 and D101 • From [D101]: Send data

ZP.BUFSND "U0" K1 D0 D100 M0

M0 M1
Processing for normal completion
M1
Processing for abnormal completion

Initial processing Open processing Data sending Response receiving

1)
Initial normal completion signal X19

2)
Open completion signal
(Address: 5000H [b0])

BUFSND instruction 3)

6)
BUFSND instruction complete device
One scan

BUFSND instruction complete


device + 1
Data sending

Response

ACK ACK
(only TCP) (only TCP)
4) 5)

7-3 7-3
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

1) Confirm the normal completion of the initial processing.


2) Confirm the normal completion of the open processing of connection
No. 1
3) Execute the dedicated BUFSND instruction.
The Ethernet module processes the following and sends the data.
• Writes the send data length and send data to the fixed buffer (No. 1)
area.
Send data length : The head address area of the target
fixed address ( 1)
Send data : Area beginning from the head address
of the target fixed buffer + 1
1 The send data length denotes a word count.
4) The size of send data in the fixed buffer (No. 1) area designated by the
send data length is sent to the designated external device (set in the
open processing).
5) Upon receiving the data from the Ethernet module, the external device
returns a "Response" to the Ethernet module.
6) Upon receiving the "Response" from the external device, the Ethernet
module ends the data transmission.
If the "Response" is not returned within the response monitoring timer
values (see Section 5.2), a data send error occurs.
At normal completion
• BUFSND instruction complete device : ON
• BUFSND instruction complete device + 1 : OFF
• BUFSND instruction complete status area ( 2) : 0000H
• Response end code ( 3) : 00H
At abnormal completion
• BUFSND instruction complete device : ON
• BUFSND instruction complete device + 1 : ON
• BUFSND instruction complete status area ( 2) : Value other than
0000H
• Response end code ( 3) : Value other than
00H
After the data transmission is abnormally completed, execute the
dedicated BUFSND instruction again to repeat the transmission
processing.

2 The status at completion is stored in the complete status area of the


BUFSND instruction. For details on the dedicated instructions, see
Chapter 10, "Dedicated Instructions".
3 The response end code is stored in the communication storage status
area of the buffer memory.
For details on the response end code, see Section 7.4.2, "Application
Data, (5) End codes".

POINT
The destination setting (see Section 5.5) for a connection whose parameters are
set with GX Developer becomes valid when the open completion signal (address:
5000H … corresponding bit) of the Ethernet module switches from off to on.

7-4 7-4
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.3 Receiving Control Method

This section explains the control method when the Ethernet module receives data from
an external device.
Fixed buffer communication employs the following receive processing methods:
• Receive processing with the main program (dedicated instruction: BUFRCV)
: See Section 7.3.1
• Receive processing with an interrupt program (dedicated instruction: BUFRCVS)
: See Section 7.3.2

7.3.1 Receive processing with the main program (dedicated instruction: ZP.BUFRCV)

This section explains about the receive processing to be performed with the main
program, using an example in which the fixed buffer No. 1 and the area corresponding
to connection No. 1.

<<Data receiving using the dedicated BUFRCD instruction (main program)>>

direction
ZP.BUFRCV "U0" K1 D0 D100 M100 Receive data
• [D100]: Word count of receive data stored
• From [D101]: Receive data
M100 M101
Processing for normal completion
M101
Processing for abnormal completion

Initial processing Open processing Data receiving Response sending

1)
Initial normal completion signal X19

2)
Open completion signal
(Address: 5000H [b0])

BUFRCV instruction 4)

6)
BUFRCV instruction complete device
One scan

BUFRCV instruction complete device + 1

Fixed buffer receiving status signal


(address: 5005H [b0])
Data receiving

Response

ACK ACK
(only TCP) (only TCP)
3) 5)

7-5 7-5
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

1) Confirm the normal completion of the initial processing.


2) Confirm the normal completion of the open processing of connection
No. 1.
3) Upon receiving data from the designated external device (set in the
open processing), the Ethernet module processes the following.
• Stores the receive data to the fixed buffer (No. 1) area.
Receive data length : The head address area of the target fixed
address
Receive data : Area beginning from the head address of
the target fixed buffer + 1
• Fixed buffer receive status signal (address: 5005H … b0) : ON
4) Execute the dedicated BUFRCV instruction to read the receive data
length and receive data from the fixed buffer (No. 1).
At this time, the Ethernet module performs the following:
• Fixed buffer receive status signal (address: 5005H … b0) : OFF
5) When the receive data length and reception data are read, the
following processing is performed.
At normal completion
• Return "Response" to communication destination.
• BUFRCV instruction complete device : ON
• BUFRCV instruction complete device + 1 : OFF
• BUFRCV instruction complete status area ( 1) : 0000H
At abnormal completion
• Return "Response" to communication destination.
• BUFRCV instruction complete device : ON
• BUFRCV instruction complete device + 1 : ON
• BUFRCV instruction complete status area ( 1) : Value other than
0000H
6) End the receive processing.

1 The status at completion is stored in the complete status area of the


dedicated instructions. For details on the dedicated instructions, see
Chapter 10, "Dedicated Instructions".

POINT
(1) The destination setting (see Section 5.5) for a connection whose parameters
are set with GX Developer becomes valid when the open completion signal
(address: 5000H … corresponding bit) of the Ethernet module switches from
off to on.
(2) Execute the BUFRCV instruction when the corresponding connection’s bit in
the fixed buffer receive status signal storage area (address: 5005H) of the
buffer memory switches from off to on.
(3) At abnormal data receiving, the fixed buffer receive completion signal
(address: 5005H … b0) does not turn on.
In addition, data is not stored in the fixed buffer (No. 1) area.

7-6 7-6
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.3.2 Receive processing with an interrupt program (dedicated instruction: Z.BUFRCVS)

This section explains about the receive processing when an interrupt program is used.
When an interrupt program is set to handle the receive processing, the interrupt
program starts up when data is received from an external device and reading the
receive data destined for the programmable controller CPU is enabled.

In order to start up the interrupt program, set the parameters using GX Developer.

(1) Setting screen


Set the following parameters using GX Developer to start the interrupt program.
• "Network parameters" "Interrupt settings"
Set the control number (SI) on the Ethernet module side when an interrupt
request is issued from the Ethernet module to the programmable controller
CPU.
• "PLC parameter" "Interrupt pointer settings"
Associate the control number (SI) set in "Network parameters" "Interrupt
settings" with the interrupt pointer (Ixx) used in the interrupt program.
Ethernet module Programmable controller CPU

Connection No. 1 <Program>

Connection No. 2 Control Ixx


Interrupt Z.BUFRCVS
Setting number Setting
pointer
of (a) Interrupt of (b)
(Ixx)
(SI) No.

Connection No. 16 0 to 15 50 to 255

(a) "Network parameters" - "Interrupt settings"


The interrupt settings using GX Developer are explained below.
Start the "Ethernet interrupt settings" screen by selecting "Setting the
number of Ethernet/CC IE/MELSECNET cards" - "Interrupt settings".

7-7 7-7
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

Item name Description of setting Setting range/option


• Decimal
Input format Select the input format of each data.
• Hexadecimal
• Fixed buffer
Device code Select device code.
• RECV instruction
Device No.
Detection method (Edge detection)
Interrupt condition (Scan complete)
Word device setting value
Set channel number/connection number used in the • RECVS instruction 1 to 8
Board No.
interrupt program. • BUFRCVS instruction 1 to 16
Interrupt (SI) No. Set the interrupt No. 0 to 15

1) Input format
• Select the input format (decimal/hexadecimal) of each setting item.
2) Device code
• Select "Fixed buffer".
• The interrupt program starts up when the receive data is stored in
the fixed buffer of the connection that opened the port set in "3)
Board No." below.
3) Board No.
• Set the connection No. (1 to 16) of the fixed buffer that will initiate the
startup of the interrupt program.
4) Interrupt (SI) No.
• Set the interrupt control No. (0 to 15) on the Ethernet module side
when the interrupt request is issued from the Ethernet module to the
programmable controller CPU.
• Set a unique interrupt (SI) No. that does not overlap with the ones for
interrupts of other fixed buffer communication and the RECV
instruction.
The interrupt (SI) No. (0 to 15) can be arbitrarily assigned by the user
to receive data in communication using up to 16 fixed buffers as well
as to receive data using the RECV instruction by the interrupt program.
The user must manage the interrupt (SI) No. assigned to each data
reception method.
(Example)
For receiving by the fixed buffer communication, assign the same
interrupt (SI) No. as the target data communication connection.
For receiving using the RECV instruction, assign an interrupt
(SI) No. that is not assigned to the fixed buffer communication.

REMARKS
Items other than the ones mentioned above do not need to be set by the user on the
"Ethernet interrupt settings" screen.
The setting values shown in the table above are automatically displayed for items
related to the detection method and event conditions.

POINT
In order to start up the interrupt program, the "Network parameter Ethernet interrupt
setting" and "PLC parameter" – "Intelligent function module interrupt pointer setting"
are required.

7-8 7-8
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(b) "PLC parameter" - "Interrupt pointer settings"


The interrupt pointer settings using GX Developer are explained below.
Start the "Intelligent function module interrupt pointer setting" screen by
selecting "PLC parameter" - "PLC system" - "Interrupt pointer settings."

Item name Description of setting Setting range/option


Set the interrupt pointer Start No. on the programmable controller
Interrupt pointer Start No. 50 to 255
CPU side.
PLC side
Set the interrupt pointer count on the programmable controller
Interrupt pointer No. of module 1 to 16
CPU side.
Start I/O No. Set the module’s starting I/O No. 0000 to 0FE0H
Intelli. module side Set the interrupt pointer (SI) starting No. on the programmable
Start SI No. 0 to 15
controller CPU.

1) PLC side - Interrupt pointer Start No.


• Set the start No. (50 to 255) of the interrupt pointers (Ixx) used in the
sequence program.
2) PLC side - Interrupt pointer No. of module
• Set the number (1 to 16) of interrupt pointers (Ixx) used in the
sequence program.
3) Intelli. module side - Start I/O No.
• Set the start I/O No. of the Ethernet module.
4) Intelli. module side - Start SI No.
• Set the smallest number (0 to 15) among the maximum 16 interrupt
(SI) No. (the control numbers on the Ethernet module side) set in
"(a) Interrupt settings".

7-9 7-9
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

POINT
In order to start up the interrupt program, the "Network parameters Ethernet
interrupt setting" and "PLC parameter" – "Intelligent function module interrupt
pointer setting" are required.

(2) Control method


The control method when the interrupt program starts up is explained using fixed
buffer No. 2 and the area corresponding to connection No. 2 as an example.
The interrupt settings with GX Developer for reading receive data using the
interrupt program example below is illustrated in the screen display shown in
(1).
<<Data receiving using the dedicated BUFRCVS instruction (interrupt program)>>

FEND

SM400
I50 Z.BUFRCVS "U0" K2 D200 Receive data
• [D200]: Word count for receive data stored
• From [D201]: Receive data
IRET

Initial processing Open processing Data receiving Response sending

1)
Initial normal completion signal X19

2)
Open completion signal
(Address: 5000H [b1])

BUFRCVS instruction 4)

6)
I50 interrupt processing
Data receiving

Response

ACK ACK
(only TCP) (only TCP)
3) 5)

Cycle Cycle

Sequence program END END


Scan Scan Scan
processing processing

Interrupt program Data receive processing

7 - 10 7 - 10
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

1) Confirm the normal completion of the initial processing.


2) Confirm the normal completion of the open processing of connection
No. 2.
3) Upon receiving data from the designated external device (set in the
open processing), the Ethernet module processes the following.
• Stores the receive data to the fixed buffer (No. 2) area.
Receive data length : The head address area of the target fixed
address
Receive data : Area beginning from the head address of
the target fixed buffer + 1
• Fixed buffer receive status signal (address: 5005H … b1) : ON
• Request the programmable controller CPU to start up the interrupt
program.
4) The interrupt program starts up.
Execute the dedicated BUFRCVS instruction to read the receive data
length and receive data from the fixed buffer (No. 2).
5) When the receive data length and reception data are read, the
following processing is performed.
At normal completion
• Return a "Response" to the destination.
• Programmable controller CPU error flag (SM0) ( 1) : OFF
At abnormal completion
• Programmable controller CPU error flag (SM0) ( 1) : ON
• Programmable controller CPU error code (SD0) ( 1) : error code
6) The execution of the interrupt program is finished and the execution of
the main program starts again.
1 For information of the programmable controller CPU error flag
(SM0) and error code (SD0), see the manual for the programmable
controller CPU.

REMARKS
To start up an interrupt program, create an interrupt enable/disable program in the
main program.
The instructions to be used for this are EI and DI.

7 - 11 7 - 11
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.4 Data Format

When communicating data between the Ethernet module and an external device, the
data format explained below is used.
The communication data consists of a "header" and "application data" as follows:

Header Application data

Maximum of 2040 bytes

7.4.1 Header

The header for TCP/IP or UDP/IP is used. In case of the Ethernet module, the Ethernet
module adds and deletes the header. Thus, the user does not need to set it.
(Details of the size of the header section)

1) In case of TCP/IP

Ethernet IP TCP
14 bytes 20 bytes 20 bytes

2) In case of UDP/IP

Ethernet IP UDP
14 bytes 20 bytes 8 bytes

7 - 12 7 - 12
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.4.2 Application data

As shown below, the data code in the application data can be expressed in either
binary or ASCII code. Switching between binary code and ASCII code is performed
with GX Developer as follows.
[GX Developer] – [Network parameters] [Operational settings] [Communication
data code]
For more details, see Section 4.7, "Operational Settings".

(1) Format
(a) Communication using binary code
Application data section
(command message)

Maximum of
2 bytes 2 bytes 1017 words

Communication
Data length Text
request Subheader
setting (command)
source side
L H L H

Communication request
Subheader End code
destination side

1 byte 1 byte

Application data section


(response)

(b) Communication using ASCII code


Application data section
(command message)

Maximum of
4 bytes 4 bytes 1016 words

Communication
Data length Text
request Subheader
setting (command)
source side
H - - L H - - L

Communication request
Subheader End code
destination side
H L H L

2 byte 2 byte

Application data section


(response)

7 - 13 7 - 13
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(2) Subheader
The format of the subheader is as shown below.
The user does not need to set the subheader when using the Ethernet module
since the Ethernet module adds and deletes it.
b7 b6 b5 b4 b3 b2 b1 b0
1 1 0 0 0 0 0

Command/response type
(The bit status indicated in the figure shows that communication
using fixed buffers is being performed.)
Command/response flag
At command…0
At response…1

Command Response
b7 to b0 b7 to b0
0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0

Communication using binary code 60 H 00 H E0 H

Subheader Subheader

b7 to b0 b7 to b0
0 1 1 0 0 0 0 0 1 1 1 0 0 0 0 0
"6" 6H "0" 0H "E" EH "0" 0H

Communication using ASCII code 36 H 30 H 30 H 30 H 45 H 30 H

Subheader Subheader

7 - 14 7 - 14
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(3) Data length setting


This value indicates the data size of the text (command) section.

POINT
The data length can be designated in the following range:
• Communication using binary code: Maximum of 1017 words
• Communication using ASCII code: Maximum of 508 words (*1)

1 Since data is sent/received as ASCII data, the communication data size is


approximately half of the data size when using binary code.

(4) Text (command)


The format of the command/response when communicating using fixed buffers is
configured as follows.

(a) Communication using binary code


Command format
Maximum of 1017 words

60H 00H (L) (H) (L) (H) (L) (H) (L) (H) (L) (H)

Subheader
Data designation/storage device
for sending/receiving instructions

Data length
n setting

n+1 (H) (L)

n+2 (H) (L)


Send/
n+3 (H) (L)
receive data
to
n + setting data
(H) (L)
Length
1 word (2 bytes)

7 - 15 7 - 15
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(b) Communication using ASCII code


Command format
Maximum of 1016 words

36H 30H 30H 30H (H) to (L) (H) to (L) (H) to (L) (H) to (L)

Subheader

Data designation/storage device


ASCII-BIN conversion
for sending/receiving instructions

n Data length
setting
n+1 (H) (L)

n+2 (H) (L)


Send/
receive data
to
n + setting data
(H) (L)
length (Maximum of 508 words)
1 word (2 bytes)

(Example)

n+1 12 H 34 H

n+2 56 H 78 H

36 H 30 H 30 H 30 H 30 H 30 H 30 H 32 H 31 H 32 H 33 H 34 H 35 H 36 H 37 H 38 H

Subheader Data length (H) to (L) (H) to (L)

(5) End codes


For more details on the end codes added to a response when communicating
using the fixed buffers, see Section 11.3.1.
End codes are stored in the complete status area (in the control data) of the
BUFSND and BUFRCV instructions, as well as the communication status
storage area of the buffer memory.

7 - 16 7 - 16
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.5 Programming

This section explains the programming method when the Ethernet module and an
external device communicate using the fixed buffers and the procedure exist control
method.

7.5.1 Precautions when creating programs

(1) In order to communicate using the fixed buffer, the initial processing and the
connection open processing must be completed.

(2) The contents of the parameter settings have been loaded into the Ethernet
module when the Ethernet module open completion signal (address: 5000H …
corresponding bit) switches from off to on.

(3) The data length in word count is designated (stored) using the dedicated
instruction for the communication with the procedure exist control method.
If the send data length exceeds this range at data sending, a communication
error occurs and the data is not sent.

(4) Perform the fixed buffer communication using the following dedicated instructions.
• Data sending : BUFSND instruction
• Data receiving : BUFRCV instruction (for main program)
: BUFRCVS instruction (for interrupt program)
For details on the dedicated instructions, see Chapter 10, "Dedicated
Instructions".

(5) The following should be observed when using a connection opened by UDP.
• External devices can be switched by modifying the setting values in the
communication address setting area of the communication parameter setting
area before sending/receiving data. Thus, data can be sent to multiple external
devices sequentially. When performing sending/receiving, make sure to
perform switching between external devices properly so that no communication
problems occur.

(6) When reading of the data received from the same connection, reading of data
received by the main program and the reading of data received by the interrupt
program cannot be done together.
Use only one of the above-mentioned programs for reading the data received.
Reading of data received by the main program cannot be performed when
setting is being performed by GX Developer for reading of received data using
the interrupt program.

(7) For data (commnd) transmission, the next data (commnd) should be after the
completion of data commnication (such as after the reception of a response) for
the transmission of the previous data (commnd).

7 - 17 7 - 17
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

7.5.2 Fixed buffer communication program example (with the procedure exist control method)
This section explains the programming method in order to communicate data
(procedure exist control method) with an external device using the fixed buffers.

QCPU-1 side QCPU-2 side

(1) Execution environment for the program example


(a) Send program (QCPU-1st station side)
1) Connection No. 1 is used for fixed buffer sending.
2) The communication parameter settings are assumed to have been set as
described in Section 5.6.1, "Active open processing/close processing".
3) Fixed buffer No. 1 send data
: Stored in D300 to D303
4) Fixed buffer No. 1 send instruction complete device
: M300
5) Fixed buffer No. 1 send instruction abnormal complete device
: M301
6) Fixed buffer No. 1 send instruction complete status
: D3001
(b) Receive program (QCPU-2nd station side)
1) Connection No. 1 is used for processing the fixed buffer receiving in
the main program.
2) Connection No. 2 is used for processing the fixed buffer receiving in
the interrupt program.
3) The Ethernet module is mounted in slot "0" of the basic base unit.
4) The "Network parameters Setting the number of Ethernet/CC
IE/MELSECNET cards" parameter is assumed to have been set with
GX Developer as follows. (See Section 4.6)
• Network type : Ethernet
• Head I/O No. : 0000
• Network No. : 1
• Group No. : 1
• Station No. : 2
5) The "Operational settings" parameters are assumed to have been set
with GX Developer as follows.

Local station IP address : 0A.61.55.DFH (10.97.85.223)

7 - 18 7 - 18
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

6) The "Open settings" parameters are assumed to have been set with
GX Developer as follows.

Connection No. 1 Local station Port No. : 2000H


(for main program)
Connection No. 2 Local station Port No. : 3000H
(for interrupt program)

7) Fixed buffer No. 1 receive data


: Stored in D500 to D503
8) Fixed buffer No. 2 receive data
: Stored in D700 to D703
9) Fixed buffer No. 1 receive instruction complete device
: M500
10) Fixed buffer No. 1 receive instruction abnormal complete device
: M501
11) Fixed buffer No. 1 send instruction complete status
: D5001
12) Fixed buffer No. 1 receive status signal
: M40
13) The parameter settings to start up the interrupt program are assumed
to have been set with GX Developer as described in the screen
settings in Section 7.3.2 "Receive processing with an interrupt
program".
Fixed buffer No. 2 interrupt pointer
: I50 (SI No. 0)

POINT
Secure sufficient device memory according to the maximum length of data sent
from the source in order to prevent device areas used for other purposes from
being overwritten by the reception data.

7 - 19 7 - 19
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(2) Outline of the program example


(a) Send program (QCPU-1st station side)
1) After setting each parameter with GX Developer and write to
programmable controller CPU, reset the programmable controller CPU
and confirm that the initial processing is completed.
2) Perform open processing (Active open) of connection No. 1. ( 1)
3) Communicate data from the programmable controller CPU using fixed
buffer communication (procedure exist sending).
4) After the data sending is completed, perform close processing of
connection No. 1. ( 1)
1 Use the program example described in Section 5.6.1, "Active open
processing/close processing" for the sequence program that
executes the open processing/close processing.

(b) Receive program (QCPU-2nd station side)


1) After setting each parameter with GX Developer and write to
programmable controller CPU, reset the programmable controller CPU
and confirm that the initial processing is completed.
When the initial processing is normally completed, connection No. 1
and 2 wait for an Active open request from the external device.
2) Communicate data from the external device using fixed buffer
communication (procedure exist sending).
3) Data received in the corresponding fixed buffer data area in the
Ethernet module is read to the programmable controller CPU.

7 - 20 7 - 20
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(Send program)

Open processing program (See Section 5.6.1)


X19: Initial normal completion signal

M0: Connection 1 open completion signal

Fixed buffer No. 1 sending program

Change the sending command to pulse

Designate the BUFSND instruction data


Designate the send data length
Designate the send data

Execute the data sending to the external device

Normal completion processing Perform the sending normal completion processing

Perform the sending abnormal completion


Abnormal completion processing
processing

Close processing program (See Section 5.6.1)

7 - 21 7 - 21
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q

(Receive program)
X19: Initial normal completion signal

M0: Connection 1 open completion signal

M40: Connection 1 data receiving signal


\
Read the open completion signal information
\
Read the open request signal information
\
Read the fixed buffer receiving status signal
information

Enable (permit) the execution of the interrupt


program

Fixed buffer No. 1 receiving program


(Main program)
Change the receive data read command to pulse

Execute receive data reading

Normal completion processing Perform the receiving normal completion


processing
Abnormal completion processing Perform the receiving abnormal completion
processing
Fixed buffer No. 2 receiving program
(Interrupt program)
Execute receive data reading

7 - 22 7 - 22
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE


CONTROL METHOD)

This chapter explains how the programmable controller CPU and external device
communicate using the fixed buffers (with the no procedure control method) of the
Ethernet module.

POINT
The following points are difference overview from the "Procedure exist" when
communicating using the fixed buffers:
1) It is possible to send and receive data which match to the message format of
the external device.
At data sending, subheader, data length, etc. are not included in the
application data field of a message; only the data in the fixed buffer is sent. At
data receiving, all the data in the message excluding the header is stored in
the fixed buffer.
2) A response to data receiving is not sent.
3) Communication is performed using binary code regardless of the
communication data that is set with a GX Developer parameter code (see
Section 4.7, "Operational Settings".)
4) The maximum application data area is 2046 bytes per communication.
5) The applicable connection is dedicated to the no procedure fixed buffer
communication.
As with the procedure fixed buffer communication, random access buffer
communication, and communication using the MC protocol cannot be
performed at the same time as the no procedure fixed buffer communication.

8.1 Control Method

The following explains how communication is performed using the fixed buffers and the
8 no procedure control method.
In the communication processing using the fixed buffers, data transmission from the
programmable controller CPU and the external device is executed using the no
procedure control method.

(1) The data flow in the communication processing is as follows.


BUFSND
instruction Fixed buffer
No. 1
No. 2 External device
Programmable No. 3
controller
No. 4
CPU

BUFRCV to
instruction
No. 16

8-1 8-1
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

(2) Data can be communicated with the following external devices.


• Device on the Ethernet to which the Ethernet module is connected.
• Devices connected with the router relay function (see Section 5.3)
As shown in the diagram below, when using each fixed buffer (No. 1 to 16), the
destination devices and usage conditions (for sending/receiving, procedure
exist/no procedure, etc.) should be set when the connection via the Ethernet
module is opened to fix the external device for each buffer.

(a) At TCP/IP communication


It is allowed to change external devices only when the open completion
signal of the applicable connection is off.

(b) At UDP/IP communication


External devices can be changed regardless of the status of the applicable
connection.
("Destination IP address" and "Destination Port No." in the communication
address setting area can be changed. However, "Local station Port No."
cannot be changed.)
When changing external devices, do not use the "Pairing open" and
"Existence confirmation" functions.
For sending to external
Fixed buffer No. 1
device 1
External device 1
For receiving from external
Fixed buffer No. 2
device 1
For receiving from external
Fixed buffer No. 3 External device 8
device 8

to to to

For sending to external


Fixed buffer No. 16 External device 28
device 28

POINT
The connections for which no procedure is selected are dedicated to the fixed
buffer sending or receiving after the completion of open processing.
8

8-2 8-2
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

(3) At data sending/receiving, the Ethernet module performs the following processing.
1) At data sending
When the programmable controller CPU executes the dedicated
BUFSND instruction ( 1) in a sequence program, the Ethernet module
sends data in the applicable fixed buffer (No. n) to the external device
that is specified in the communication address setting area
(addresses: 28H to 5FH and 5038H to 506FH) corresponding to fixed
buffer No. n. ( 2)
2) At data receiving
The Ethernet module processes the receive data if the data is received
from an external device set in the communication setting area that
corresponds to fixed buffer No. n. ( 2)
Also, when the Ethernet module stores the receive data in the
corresponding fixed buffer in the receive processing, it updates the
destination IP address and destination port No. in the connection
information area (addresses: 78H to C7H and 5820H to 586FH) that
corresponds to fixed buffer No. n.
If data is received from an external device not set in the connection
information area of the buffer memory, the Ethernet module ignores
the receive data to.

1 For details on the dedicated instructions, see Chapter 10, "Dedicated


Instructions".
2 In case of TCP/IP Unpassive open, data is communicated with an
external device stored in the connection information area of the buffer
memory.

8-3 8-3
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.2 Sending Control Method

This section explains the control method when data is sent from the Ethernet module
to an external device using fixed buffer No. 1 and the area corresponding to connection
No. 1 as an example.

<<Data sending using the dedicated BUFSND instruction>>


Send data
direction • [D100]: Byte count for send data
Set the send data in D100 and D101 • From [D101]: Send data

ZP.BUFSND "U0" K1 D0 D100 M0

M0 M1
Processing for normal completion
M1
Processing for abnormal completion

Initial processing Open processing Data sending

1)
Initial normal completion signal X19

2)
Open completion signal
(Address: 5000H [b0])

BUFSND instruction 3)

5)
BUFSND instruction complete device
One scan

BUFSND instruction complete device + 1


Data sending

ACK
(only TCP)
4)

8-4 8-4
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

1) Confirm normal completion of the initial processing.


2) Confirm the normal completion of the open processing for connection
No. 1.
3) Execute the dedicated BUFSND instruction.
The Ethernet module processes the following and sends the data.
• Writes send data length and send data to the fixed buffer (No. 1)
area.
Send data length : The head address area of the target
fixed address ( 1)
Send data : Area beginning from the head address
of the target fixed buffer + 1
1 The send data length is expressed by a byte count.
4) Only the size of the send data in the fixed buffer (No. 1) designated by
the send data length is sent to the designated external device (set in
the open processing).
5) The Ethernet module terminates the data transmission.

At normal completion
• BUFSND instruction complete device : ON
• BUFSND instruction complete device + 1 : OFF
• BUFSND instruction complete status area ( 2) : 0000H
At abnormal completion :
• BUFSND instruction complete device : ON
• BUFSND instruction complete device + 1 : ON
• BUFSND instruction complete status area ( 2) : Value other than
0000H
After the data transmission is abnormally completed, execute the
dedicated BUFSND instruction again to repeat the transmission
processing.

2 The status at completion is stored in the complete status area of


the dedicated instructions. For details on the dedicated instructions,
see Chapter 10, "Dedicated Instructions".

POINT
The following precaution should be observed when communicating using UDP/IP:
• When the Ethernet module’s internal processing is normally completed, data
send processing ends even if the communication line between the programmable
controller CPU and an external device is disconnected because of cable
disconnection, etc. It is recommended to send/receive data using a
communication procedure defined by the user.

8-5 8-5
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.3 Receiving Control Method

This section explains the control method when the Ethernet module receives data from
an external device.
Fixed buffer communication employs the following receive processing methods:
• Receive processing with the main program (dedicated instruction: BUFRCV)
: See Section 8.3.1
• Receive processing with an interrupt program (dedicated instruction: BUFRCVS)
: See Section 8.3.2

8.3.1 Receive processing with the main program (dedicated instruction: ZP.BUFRCV)

This section explains about the receive processing to be performed with the main
program, using an example in which the fixed buffer No. 1 and the area corresponding
to connection No. 1.
<<Data receiving using the dedicated BUFRCV instruction (main program)>>

direction
ZP.BUFRCV "U0" K1 D0 D100 M100 Receive data
• [D100]: Byte count of receive data stored
• From [D101]: Receive data
M100 M101
Processing for normal completion
M101
Processing for abnormal completion

Initial processing Open processing Data sending

1)
Initial normal completion signal X19

2)
Open completion signal
(Address: 5000H [b0])

BUFRCV instruction 4)

5)
BUFRCV instruction complete device
One scan

BUFRCV instruction complete device + 1

Fixed buffer receiving status signal


(address: 5005H [b0])
Data receiving

ACK
(only TCP)
3)

8-6 8-6
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

1) Confirm the normal completion of the initial processing.


2) Confirm the normal completion of the open processing for connection
No. 1.
3) Upon receiving data from the designated external device (set in the
open processing), the Ethernet module processes the following.
• Stores the receive data to the fixed buffer (No. 1) area.
(Area beginning from the head address of the target fixed buffer + 1)
• Stores the data length to the head address area of the target fixed
address ( 1)
• Fixed buffer receive status signal (address: 5005H … b0) : ON
1 The receive data length is expressed by a byte count.
When an odd number of data bytes is received, the last received
data is stored at the lower byte of the last data storage area. (The
higher byte becomes a non-constant value.)
4) Execute the dedicated BUFRCV instruction and read the receive data
length and receive data from the fixed buffer (No. 1).
At this time, the Ethernet module performs the following:
• Fixed buffer receive status signal (address: 5005H … b0) : OFF
5) End the receive processing.

At normal completion
• BUFRCV instruction complete device : ON
• BUFRCV instruction complete device + 1 : OFF
• BUFRCV instruction complete status area ( 2) : 0000H
At abnormal completion
• BUFRCV instruction complete device : ON
• BUFRCV instruction complete device + 1 : ON
• BUFRCV instruction complete status area ( 2) : Value other than
0000H
2 The status at completion is stored in the complete status area of
the dedicated instructions. For details on the dedicated
instructions, see Chapter 10, "Dedicated Instructions".

POINT
(1) The destination setting (see Section 5.5) for a connection whose parameters
are set with GX Developer becomes valid when the open completion signal
(address: 5000H … corresponding bit) of the Ethernet module switches from
off to on.

(2) Execute the BUFRCV instruction when the corresponding connection’s bit in
the fixed buffer receive status signal storage area (address: 5005H) of the
buffer memory switches from off to on.

(3) At abnormal data receiving, the fixed buffer receive completion signal (address:
5005H … b0) does not turn on.
In addition, data is not stored in the fixed buffer (No. 1) area.

8-7 8-7
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.3.2 Receive processing with an interrupt program (dedicated instruction: Z.BUFRCVS)

This section explains about the receive processing when an interrupt program is used.
When an interrupt program is set up to handle the receive processing, the interrupt
program starts up when data is received from an external device and reading the
receive data destined for the programmable controller CPU is enabled.

In order to start up the interrupt program, set the parameters using GX Developer.

(1) Setting screen


Set the following parameters using GX Developer to start the interrupt program.
The setting screen and setting method are the same as for the fixed buffer
communication (procedure exist). See Section 7.3.2 (1).

(2) Control method


The control method when the interrupt sequence program starts up is explained
using fixed buffer No. 2 and the area corresponding to connection No. 2 as an
example.
The interrupt settings with GX Developer for reading the receive data using the
interrupt program example below is illustrated in the screen display shown in
Section 7.3.2 (1).
<<Data receiving using the dedicated BUFRCVS instruction (interrupt program)>>

FEND

SM400
I50 Z.BUFRCVS "U0" K2 D200 Receive data
• [D100]: Byte count for receive data stored
• From [D101]: Receive data
IRET

Initial processing Open processing Data receiving

1)
Initial normal completion signal X19

2)
Open completion signal
(Address: 5000H [b1])
BUFRCVS instruction 4)

5)
I50 interruput processing
Data receiving

ACK
(only TCP)
3)

Cycle Cycle

END END
Sequence program Scan Scan Scan
processing processing

Data receiving processing


Interrupt program

8-8 8-8
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

1) Confirm the normal completion of the initial processing.


2) Confirm the normal completion of the open processing for connection
No. 2.
3) Upon receiving data from the designated external device (set in the
open processing), the Ethernet module processes the following.
• Stores the receive data in the fixed buffer (No. 2) area.
(Area beginning from the head address of the target fixed buffer + 1)
• Stores the data length in the head address area of the target fixed
address ( 1)
• Request the programmable controller CPU to start up the interrupt
program.
1 The receive data length is expressed by a byte count.
When an odd number of data bytes is received, the last received
data is stored at the lower byte of the last data storage area. (The
higher byte becomes a non-constant value.)
4) The interrupt program starts up.
Execute the dedicated BUFRCVS instruction and read the receive
data length and receive data from the fixed buffer (No. 2).
At normal completion
• Programmable controller CPU error flag (SMO) ( 2) : OFF
At abnormal completion
• Programmable controller CPU error flag (SMO) ( 2) : ON
• Programmable controller CPU error code (SDO) ( 2) : error code
2 For more details on the programmable controller CPU error flag
(SMO) and error code (SDO), see the manual for the
programmable controller CPU used.
5) The execution of the interrupt program is finished and the execution of
the main program starts again.

REMARKS
(1) To start up an interrupt program, create an interrupt enable/disable program in
the main program using the EI and DI instructions.

(2) The programming for reading of receive data with an interrupt program is the
same as that for communicating (procedure exist) by fixed buffer. Refer to
program example indicated in Section 7.5.2 when programming.

8-9 8-9
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.4 Data Format

When communicating data between the Ethernet module and an external device, the
data format explained below is used.
The communication data consists of a "header" and "application data" as shown
below.

Header Application data

(1) Header
The header for TCP/IP or UDP/IP is used. In case of the Ethernet module, the
Ethernet module adds and deletes the header. Thus, the user does not need to
set it.
(Details of the size of the header section)

1) In case of TCP/IP

Ethernet IP TCP
14 bytes 20 bytes 20 bytes

2) In case of UDP/IP

Ethernet IP UDP
14 bytes 20 bytes 8 bytes

(2) Application Data


The data code in the application data is expressed in binary code.
Communication is performed using binary code, regardless of the set
communication data (see Section 4.7).

Text (command)

Maximum of 2064 bytes

REMARKS
The subheader and data length that are added for communications using the fixed
buffers in the procedure exist control method are not present for communications in
the no procedure control method. All data is treated as valid text.

8 - 10 8 - 10
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.5 Simultaneous Broadcast Using UDP/IP

When UDP/IP is used for no procedure fixed buffer communication, data can be
broadcast simultaneously to all Ethernet module installed stations on the same
Ethernet where the Ethernet module is located. This allows writing the same data to all
stations, etc.

POINT
(1) In simultaneous broadcasting, if the messages received by the simultaneous
broadcasting are not needed, external devices connected to the same
Ethernet should discard them at first given opportunity.

(2) The user needs to determine the port numbers dedicated to the transmission
and reception by simultaneous broadcasting, after which simultaneous
broadcasting can be performed by designating these port numbers.

8.5.1 Sending by simultaneous broadcasting

Sending can be performed through simultaneous broadcasting by setting the external


device IP address to FFFFFFFFH and performing the open processing.
For data sending by simultaneous broadcasting, the Ethernet sets the request
destination IP address to FFFFFFFFH and send data over the Ethernet.

(1) Setting screen


This section explains the "Open settings" for sending by simultaneous
broadcasting.
• Connection No. 15 is used.
• The Ethernet module Port No. is 0800H.

(a) Protocol
Select "UDP/IP".

(b) Open system


Setting is not required.

(c) Fixed buffer


Select "Send".

8 - 11 8 - 11
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

(d) Fixed buffer communication


Select "No procedure".

(e) Pairing open


Select "No pairs".

(f) Existence confirmation


Select "No confirm".

(g) Local station Port No.


1) Set the Ethernet module port No. in hexadecimal.
2) Designate the setting value in a range from 401H to 1387H and 138BH
to FFFEH upon consulting a network administrator. Select a port No.
not used by other ports.

(h) Destination IP address


Set "FFFFFFFFH".

(i) Destination Port No.


1) Set the port number of the external device side in hexadecimal.
2) Designate the setting value in a range from 401H to FFFEH upon
consulting a network administrator.
3) Check the communication range shown in Section 8.1 (2).

(2) Send control method


The send control method is the same as for the normal no-procedure
communication using the fixed buffers. For more details, see Section 8.2.

8 - 12 8 - 12
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.5.2 Receiving by simultaneous broadcasting

Data is received through simultaneous broadcasting, by setting FFFFFFFFH for the IP


address of an external device that is to send data to the Ethernet module, and FFFFH
for the port No., then performing the open processing.

(1) Setting screen


This section explains the "Open settings" for receiving by simultaneous
broadcasting.
• Connection No. 16 is used.
• The Ethernet module Port No. is 0801H.

(a) Protocol
Select "UDP/IP".

(b) Open system


Setting is not required.

(c) Fixed buffer


Select "Receive".

(d) Fixed buffer communication


Select "No procedure".

(e) Pairing open


Select "No pairs".

(f) Existence confirmation


Select "No confirm".

8 - 13 8 - 13
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

(g) Local station Port No.


1) Set the Ethernet module port No. in hexadecimal.
2) Designate the setting value in a range from 401H to 1387H and 138BH
to FFFEH.
3) If the receive data from specific external device is to be processed,
designate the user-defined port No. upon consulting a network
administrator.

(h) Destination IP address


Set "FFFFFFFFH".

(i) Destination Port No.


Set "FFFFH".

(2) Receive control method


The receive control method is the same as for the normal no procedure
communication using the fixed buffers. For more details, see Section 8.3.

8 - 14 8 - 14
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

REMARKS
The following flowchart illustrates an outline of the Ethernet module’s internal
processing when data is received by simultaneous broadcasting in the no procedure
control method.

Data receiving The values designated in the buffer memory addresses 0H to 1H


and 28H to 5FH are used for the IP addresses and port numbers of
the local station's Ethernet module as well as those of external devices.

IP address of the
NO
local station's Ethernet module = IP address
of receive data request source?

YES
Is the network address
(sub-net address) in the IP address of the local NO
station's Ethernet module the same as the network
address (sub-net address) of the receive data,
and are all bits of the host address
in the receive data "1" ?

YES

NO ( 1)
Destination IP address = FFFFFFFFH ?

Destination IP address = NO
YES request source IP address of the
(Simultaneous Broadcasting) receive data?

YES

NO
Destination Port No. = FFFFH ?

Destination Port No. NO


YES = request source port number of
(Simultaneous Broadcasting) the receive data?

YES

Store the application data of the receive data in the


fixed buffer.

Turn on the fixed buffer receive completion signal Ignore (discard) the receive data because it is not
(address: 5005H ... corresponding bit) addressed to the local station.

1 If the bits in the range that indicates the host address of the receive data request destination
IP address are all "1's," the processing is performed by the YES side.

8 - 15 8 - 15
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.5.3 Precautions when using the simultaneous broadcast function

The following precautions should be observed when broadcasting simultaneously in


the no procedure communication using the fixed buffers.

(1) The user needs to determine the port No. dedicated to the sending and receiving
by simultaneous broadcasting, after which simultaneous broadcasting can be
performed by designating these port No..

(2) The send message by simultaneous broadcasting is sent to all external devices
on the same Ethernet to which the Ethernet module is connected.
If the messages received by simultaneous broadcasting are not needed, the
external devices that are connected to the same Ethernet should discard them.

The external devices should discard the message received if it is not needed.
Also, do not return a response even if the external device is the station to
which the message received is addressed. The Ethernet module performs
these processes automatically.

(3) A maximum of 2046 bytes of data in the application data field can be processed
per sending/receiving.
When it is necessary to send/receive data that exceeds 2047 bytes, divide it into
smaller portions at the send source.

(4) When performing simultaneous broadcasting, set the "Existence confirmation"


setting to "No confirm" in the "Open settings" of the corresponding connection.

REMARKS
The Ethernet module temporarily stores received data in its internal buffer for the
operating system until the current receive processing is completed.
If data exceeding the capacity of the internal buffer (approx. 40k bytes) are received
by the simultaneous broadcast, the exceeded data are discarded.

In communications by the fixed buffers (with procedures), the Ethernet module


sends a command message to the external device, waits for reception of a response
message, and then sends the next command message. Therefore, the user need
not take account of the above-mentioned internal buffer for the operating system.

8 - 16 8 - 16
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.6 Programming

This section explains the programming method when the Ethernet module and an
external device communicate using the fixed buffers and the no-procedure control
method.

8.6.1 Precautions when creating programs

(1) In order to communicate using the fixed buffers, the initial processing and the
connection open processing must be completed.
(2) The contents of the parameter settings have been loaded into the Ethernet
module when the Ethernet module open completion signal (address: 5000H…
corresponding bit) switches from off to on.
(3) The data length in byte count is designated (stored) using the dedicated
instruction for the no procedure communication.
If the send data length exceeds this range at data sending, a communication
error occurs and the data is not be sent.
(4) Perform the fixed buffer communication using the following dedicated instructions.
• Data sending : BUFSND instruction
• Data receiving : BUFRCV instruction (for main program)
: BUFRCVS instruction (for interrupt program)
For details on the dedicated instructions, see Chapter 10, "Dedicated Instructions".
(5) The following should be observed when using a connection opened by UDP.
• External devices can be switched by modifying the setting values in the
communication address setting area of the communication parameter setting
area before sending/receiving data. Thus, data can be sent to multiple external
devices sequentially. When performing sending/receiving, make sure to
perform switching between external devices properly so that no communication
problems occur.
(6) The connections for which no procedure is selected are dedicated to the no
procedure fixed buffer sending/receiving. Thus, communications using fixed
buffers with the procedure exist control method, random access buffers and the
MC protocol cannot be performed at the same time with a communication using
fixed buffers with the no procedure control method.
(7) Message data length is not used for the no procedure communication.
The Ethernet module stores the size of the received message (packet) in the
receive data length storage area and turns on the fixed buffer receiving status
signal (address: 5005H … corresponding bit).
It is recommended to employ a check system, such as including the data length
and data type code in the application data of a message, so that the byte count
and data type in the application data can be identified by the receiving side.
(8) When reading of the data received from the same connection, reading of data
received by the main program and the reading of data received by the interrupt
program cannot be done together.
Use only one of the above-mentioned programs for reading the data received.
Reading of data received by the main program cannot be performed when
setting is being performed by GX Developer for reading of received data using
the interrupt program.

8 - 17 8 - 17
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

8.6.2 Fixed buffer communication program example (with the no procedure control method)
This section explains the programming method in order to communication data (through
the no procedure control method) with an external device using the fixed buffers.

QCPU-1 side QCPU-2 side

(1) Execution environment for the program example


(a) Send program (QCPU-1st station side)
1) Connection No. 1 is used for fixed buffer sending.
2) The communication parameters settings are assumed to have been set
as described in Section 5.6.1, "Active open processing/close
processing" except the "Fixed buffer communication" parameter.
The "Fixed buffer communication" setting should be changed from
"Procedure exist" to "No procedure".
3) Fixed buffer No. 1 send data
: Stored in D300 to D303
4) Fixed buffer No. 1 send instruction complete device
: M300
5) Fixed buffer No. 1 send instruction abnormal complete device
: M301
6) Fixed buffer No. 1 send instruction complete status
: D3001

(b) Receive program (QCPU-2nd station side)


1) Connection No. 1 is used for processing the fixed buffer receiving.
2) The Ethernet module is loaded in slot "0" of the basic base unit.
3) The "Network parameters Setting the number of Ethernet/CC
IE/MELSECNET cards" parameters are assumed to have been set
with GX Developer as follows. (See Section 4.6.)
• Network type : Ethernet
• Head I/O No. : 0000
• Network No. : 1
• Group No. : 1
• Station No. : 2
4) The "Operational settings" parameters are assumed to have been set
with GX Developer as follows.

Local station IP address: 0A.61.55.DFH (10.97.85.223)

8 - 18 8 - 18
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

5) The "Open settings" parameters are assumed to have been set with
GX Developer as follows.

Connection No. 1 Local station Port No.: 2000H (for main program)

6) Fixed buffer No. 1 receive data


: Stored in D500 to D503
7) Fixed buffer No. 1 receive instruction complete device
: M500
8) Fixed buffer No. 1 receive instruction abnormal complete device
: M501
9) Fixed buffer No. 1 send instruction complete status
: D5001
10) Fixed buffer No. 1 receive status signal
: M40

POINT
Secure sufficient device memory according to the maximum length of data sent
from the source in order to prevent device areas used for other purposes from
being overwritten by the reception data.

(2) Outline of the program example


(a) Send program (QCPU-1st station side)
1) After setting each parameter with GX Developer and write to
programmable controller CPU, reset the programmable controller CPU
and confirm that the initial processing is completed.
2) Perform open processing (Active open) for connection No. 1. ( 1)
3) Communicate data from the programmable controller CPU using fixed
buffer communication (no procedure sending).
4) After the data sending is completed, perform close processing for
connection No. 1. ( 1)
1 Use the program example described in Section 5.6.1, "Active open
processing/close processing" for the sequence program that
executes the open processing/close processing.
Make sure to change the "Fixed buffer communication" setting
from "Procedure exist" to "No procedure".
8 - 19 8 - 19
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

(b) Receive program (QCPU-2nd station side)


1) After setting each parameter with GX Developer and write to
programmable controller CPU, reset the programmable controller CPU
and confirm that the initial processing is completed.
When the initial processing is normally completed, connection No. 1
waits for an Active open request from the external device.
2) Communicate data from the external device using fixed buffer
communication (no procedure sending).
3) Data received in the corresponding fixed buffer data area in the
Ethernet module is read to the programmable controller CPU.

(Send program)

Open processing program (See Section 5.6.1)


X19: Initial normal completion signal

M0: Connection 1 open completion signal

Fixed buffer No. 1 sending program

Change the sending command to pulse

Designate the BUFSND instruction data


Designate the send data length
Designate the send data

Execute the data sending to the external device

Normal completion processing Perform the sending normal completion processing

Abnormal completion processing Perform the sending abnormal completion


processing

Close processing program (See Section 5.6.1)

8 - 20 8 - 20
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q

(Receive program)
X19: Initial normal completion signal

M0: Connection 1 open completion signal

M40: Connection 1 data receiving signal


\
Read the open completion signal information
\
Read the open request signal information
\
Read the fixed buffer receiving status signal
information

Fixed buffer No. 1 receiving program


(Main program)
Change the receive data read command to pulse

Execute receive data reading

Normal completion processing Perform the receiving normal completion


processing
Abnormal completion processing Perform the receiving abnormal completion
processing

8 - 21 8 - 21
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9 COMMUNICATION USING THE RANDOM ACCESS BUFFER

This chapter explains how to communicate data between the Ethernet module and
external devices using the random access buffer of the Ethernet module.

POINT
The communication function using the random access buffer and the e-mail
sending/receiving function of the programmable controller CPU cannot be used
together.
The communication function using the random access buffer and the e-mail
sending function of the programmable controller CPU monitoring function can,
however, be used together.

9.1 Control Method

This section explains the control method of random access buffer communication.
In random access buffer communication, data is written to and read from the random
access buffer according to instructions (requests) from an external device.
The external device writes and reads data in the random access buffer of the Ethernet
module asynchronously with the sequence program of the programmable controller
CPU.

(1) The random access buffer can be written to and read from freely by any external
device (excluding the Ethernet module) without giving access to a specific
external device.
Thus, it can be used as a common buffer area for all of the external devices
connected to the Ethernet.
Ethernet module
Write Write
External External
device device

Read Random Read


access
Write buffer Write

External External
device Read Read device

Write Read
9

External
device

9-1 9-1
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(2) The following shows the data flow in the communication processing using the
random access buffer.
Ethernet module

Data written
Programmable TO instruction
Random
controller Read request External
access
CPU device
buffer Data read
FROM instruction

(3) The random access buffer communication can be performed from all external
devices except from the Ethernet module itself (including conventional modules).
The random access buffer communication cannot be used for communication
between programmable controller CPUs.

(External devices that can perform communication using the random access
buffer)
• External devices on the Ethernet to which the Ethernet module is connected.
• External devices on the Ethernet that are connected with the router relay
function (see Section 5.3)

9-2 9-2
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.1.1 Control method by read requests from an external device

The following diagram illustrates the control method when data is sent from the
Ethernet module in response to a read request from the external device.

External device

Read request (command)

Response, read data


ACK ACK
2) 3)
(only TCP) (only TCP)

Ethernet module Random access buffer


Writes with the TO instruction

1)

Programmable
controller CPU

1) The programmable controller CPU writes data to the random access


buffer of the Ethernet module according to the TO instruction of the
sequence program.
Or, the external device writes data to the random access buffer of the
Ethernet module.
2) Asynchronously with the processing of 1) above, the external device
sends a read request to the Ethernet module.
(The Ethernet module side: command receiving)
3) Upon receiving the read request from the external device, the Ethernet
module sends the data written in the random access buffer to the
external device which sent the read request.
(The Ethernet module side: response sending)

POINT
(1) In random access buffer communication, data can be communicated with an
external device for which the procedure exist control method is selected in the
fixed buffer communication procedure setting (see Section 5.5) using a
connection where the Ethernet open completion signal (address: 5000H …
corresponding bit) is on.
(2) Communication using the random access buffer is performed asynchronously
with the sequence program. When it is necessary to synchronize, use the
fixed buffer communication function.

9-3 9-3
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.1.2 Control method by write requests from an external device

The following diagram illustrates the control method when an external device writes
data to the random access buffer of the Ethernet module.

External device

Write data (command)

Response
ACK ACK
1) 2)
(only TCP) (only TCP)

Ethernet module Random access buffer

Reads with the FROM instruction


3)

Programmable
controller CPU

1) The external device writes data to the random access buffer of the
Ethernet module.
(The Ethernet module side: command receiving)
2) The Ethernet processes the write request from the external device and
returns the writing result to the external device that sent the write
request.
(The Ethernet module side: response sending)
3) Asynchronously with the processing of 1) and 2) above, the data
written to the random access buffer is read with the FROM instruction
of the sequence program.

POINT
(1) In random access buffer communication, data can be communicated with an
external device for which the procedure exist control method is selected in the
fixed buffer communication procedure setting (see Section 5.5) using a
connection where the Ethernet open completion signal (address: 5000H …
corresponding bit) is on.
(2) Communication using the random access buffer is performed asynchronously
with the sequence program. When it is necessary to synchronize, use the
fixed buffer communication function.

9-4 9-4
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.2 Data Format

When communicating data between the Ethernet module and an external device, the
data format explained below is used.
The communication data consists of a "header" and "application data" as shown
below.

Header Application data

Maximum of 2044 bytes

9.2.1 Header

The header for TCP/IP or UDP/IP is used. In case of the Ethernet module, the Ethernet
module adds the header.
(Details of the size of the header section)

1) In case of TCP/IP

Ethernet IP TCP
14 bytes 20 bytes 20 bytes

2) In case of UDP/IP

Ethernet IP UDP
14 bytes 20 bytes 8 bytes

9-5 9-5
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.2.2 Application data

As shown below, the data code in the application data can be expressed in either
binary or ASCII code. Switching between the binary code and the ASCII code is
performed with GX Developer as follows.
[GX Developer] [Network parameters] [Operational settings] [Communication
data code]
For more details, see Section 4.7, "Operational Settings".

(1) Format
(a) Communication using binary code
Application data area
(command message)

Maximum of
2 bytes 2 bytes 2 bytes 1017 words

Text
Communication Data length (command)
Subheader Head address
request source side setting (none at read
00H request)
H L H L H
Text
Communication (response)
Subheader End code
request destination side (none at write
request)

1 byte 1 byte Maximum of


1017 words

Application data area


(response)

(b) Communication using ASCII code


Application data area
(command message)

Maximum of
4 bytes 4 bytes 4 bytes 1016 words

Text
Communication Data length (command)
Subheader Head address
request source side setting (none at read
request)
H L 30H 30H H - - L H - - L
Text
Communication (response)
Subheader End code
request destination side (none at write
H L H L request)

2 byte 2 byte Maximum of


1016 words

Application data area


(response)

9-6 9-6
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(2) Subheader
The format of the subheader is as shown below.
The user does not need to set the subheader when using the Ethernet module
since the Ethernet module adds and deletes it automatically to the text.
b7 b6 b5 b4 b3 b2 b1 b0
1 1 0 0 0 0 1 00 H

Only for command (no response)

Command/response type
(When communicating using the random access buffer, use the status shown in the diagram.)
When reading: 61 H
When writing: 62 H

Command/response flag
At command: 0
At response: 1

When reading
Command (External device to Ethernet module) Response (Ethernet module to external device)
b7 to b0 b7 to b0
0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1

Communication using binary code 61 H 00 H E1 H

Subheader Subheader

b7 to b0 b7 to b0
0 1 1 0 0 0 0 1 1 1 1 0 0 0 0 1
"6" 6H "1" 1H "E" EH "1" 1H

Communication using ASCII code 36 H 31 H 30 H 30 H 45 H 31 H

Subheader Subheader

9-7 9-7
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(3) Head address


Indicates the head address (ranging from 2680H to 3F7FH) of the random access
buffer whose data is read/written from/to using its logical address (ranging from
0H to 17FFH … See Section 9.3).

(a) Communication using binary code : Designate the head address by its
binary value.

L H

2 bytes

(b) Communication using ASCII code : Designate an ASCII code value that
expresses the head address in
hexadecimal.

H – – L

4 bytes

(4) Data length setting


Indicate the number of words of the read/written data in the random access
buffer range.

(a) Communication using binary code : Designate the number of words by its
binary value.

L H

2 bytes

(b) Communication using ASCII code : Designate an ASCII code value that
expresses the number of words in
hexadecimal.

H – – L

4 bytes

POINT
The data length can be designated in the following range:
• Communication using binary code: Maximum of 1017 words
• Communication using ASCII code: Maximum of 508 words ( 1)

1 Since data is sent/received as ASCII data, the communication data size is


approximately a half of the data size when using binary code.

9-8 9-8
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(5) Text
Indicate the data written to and read from the random access buffer.

(a) Communication using binary code


Data length (maximum of 1017 words)

(L) (H) (L) (H) (L) (H) (L) (H)

Random access
buffer

Designated address n (H) (L)

n+1 (H) (L)

n+2 (H) (L)

to

Setting value of (H) (L)


n+
word count read

1 word (2 bytes)

(b) Communication using ASCII code


Data length × 2 (maximum of 1016 words)

(H) to (L) (H) to (L) (H) to (L)

ASCII-BIN conversion

Random access
buffer

Designated address n (H) (L)

n+ (H) (L)

to
(Maximum of 508 words)
Setting value of
n+ (H) (L)
word count read

(Example)
(H) (L)

n 12 H 34 H

n+1 56 H 78 H

31 H 32 H 33 H 34 H 35 H 36 H 37 H 38 H

(H) to (L) (H) to (L)

9-9 9-9
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(6) End codes


The following end codes are added to a response in random access buffer
communication.
• Normal completion : 00H
• Abnormal completion : Value other than 00H (see Section 11.3.1)
End codes are stored in the communication status storage area of the buffer
memory.

9 - 10 9 - 10
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.2.3 Examples of the command/response formats

This section explains examples of the command/response formats during


communication using the random access buffer.

(1) Writing to the random access buffer by a write request from an


external device
(a) Communication using binary code
1) Command format (external device to the Ethernet module)
Head Data
Subheader address length Text (10 words)

(L) (H) (L) (H) (L) (H) (L) (H) (L) (H) (L) (H)
62 H 00 H 00 H 00 H 0A H 00 H 34 H 12 H 78 H 56 H BC H 9A H BC H 9A H

Ethernet module random access buffer


Physical address (H) (L) Logical address

2680 H ( 9856) 12 H 34 H 0 H ( 0)

2681 H ( 9857) 56 H 78 H 1 H ( 1)

2682 H ( 9858) 9A H BC H 2 H ( 2)

to to to to

2689 H ( 9865) 9A H BC H 9 H ( 9)
(10 words)
to to to

3E7F H (15999) 17FF H (6143)

2) Response format (Ethernet module to the external device)


Subheader End code

E2 H 00 H

9 - 11 9 - 11
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(b) Communication using ASCII code


1) Command format (external device to the Ethernet module)
Subheader Head address Data length
(H) – – (L) (H) .– – (L)

36 H 32 H 30 H 30 H 00 H 00 H 00 H 00 H 00 H 00 H 00 H 41 H

Text (20 words)


(H) – – (L) (H) – – (L) (H) – – (L) (H) – – (L)

31 H 32 H 33 H 34 H 35 H 36 H 37 H 38 H 39 H 41 H 42 H 43 H 39 H 41 H 42 H 43 H

ASCII-BIN conversion

Ethernet module random access buffer


Physical address (H) (L) Logical address

2680 H ( 9856) 12 H 34 H 0 H ( 0)

2681 H ( 9857) 56 H 78 H 1 H ( 1)

2682 H ( 9858) 9A H BC H 2 H ( 2)

to to to to

2689 H ( 9865) 9A H BC H 9 H ( 9)
(10 words)
to to
to
3E7F H (15999) 17FF H (6143)

2) Response format (Ethernet module to the external device)


Subheader End code

45 H 32 H 30 H 30 H

9 - 12 9 - 12
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(2) Reading from the random access buffer by a read request from an
external device
(a) Communication using binary code
1) Command format (external device to the Ethernet module)
Head
Subheader address Data length
(L) (H) (L) (H)

61 H 00 H 14 H 00 H 0A H 00 H

2) Response format (Ethernet module to the external device)


Subheader End code Text (10 words)

(L) (H) (L) (H) (L) (H) (L) (H)

E1H 00H 34H 12H 78H 56H BCH 9AH BCH 9AH

Ethernet module random access buffer

Physical address (H) (L) Logical address

2680H ( 9856) 0H ( 0)

to to to

2694H ( 9876) 12H 34H 14H ( 20)

2695H ( 9877) 56H 78H 15H ( 21)

2696H ( 9878) 9AH BCH 16H ( 22)

to to to

269DH ( 9885) 9AH BCH 1DH ( 29)

to to to (10 words)

3E7FH (15999) 17FFH (6143)

9 - 13 9 - 13
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

(a) Communication using ASCII code


1) Command format (external device to the Ethernet module)
Subheader Head address Data length
(H) – – (L) (H) – – (L)

36 H 31 H 30 H 30 H 00 H 00 H 31 H 34 H 00 H 00 H 00 H 41 H

2) Response format (Ethernet module to the external device)


Subheader End code

45H 31H 30H 30H

Text (20 words)


(H) – – (L) (H) – – (L) (H) – – (L) (H) – – (L)
31H 32H 33H 34H 35H 36H 37H 38H 39H 41H 42H 43H 39H 41H 42H 43H

ASCII-BIN conversion

Ethernet module random access buffer


Physical address (H) (L) Logical address
2680H ( 9856) 0H ( 0)

to to to

2694H ( 9876) 12H 34H 14H ( 20)

2695H ( 9877) 56H 78H 15H ( 21)

2696H ( 9878) 9AH BCH 16H ( 22)

to to to

269DH ( 9885) 9AH BCH 1DH ( 29)

to to (10 words)
to
3E7FH (15999) 17FFH (6143)

9 - 14 9 - 14
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.3 Physical and Logical Addresses of the Random Access Buffer

This section explains the head address of the Ethernet random access buffer (no
battery backup), which is designated with the commands used for the random access
buffer communication.

The designated addresses of the random access buffer are shown below.
Note that when designating the head address of the random access buffer, the
address designated by an external device is different from that designated with the
FROM/TO instructions in the sequence program.

Physical address : Address designated with the FROM/TO instructions of the


sequence program
Logical address : Address designated by the external device as the head address
item in the command

Physical address Buffer memory


680H ( 1664)

Fixed buffer

267FH ( 9855) Logical address


2680H ( 9856) 0H ( 0)

Random access
to buffer to

3E7FH (15999) 17FFH (6143)

9 - 15 9 - 15
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q

9.4 Precautions when Creating Programs

This section explains an outline of the precautions that should be observed when
creating programs for data communications between the Ethernet module and external
devices using the random access buffer.

(1) In order to communicate using the random access buffer, the initial processing
and the connection open processing must be completed.

(2) The programmable controller CPU cannot issue a send request when
communicating using the random access buffer.
Also, receive completion is not confirmed to the programmable controller CPU.
When it is necessary to synchronize data sending/receiving between the
programmable controller CPU and an external device, use the fixed buffer
communication function.

(3) The address designated for the random access buffer by an external device and
the address designated with the FROM/TO instructions of the sequence program
are different.
For more detail, see Section 9.3.

9 - 16 9 - 16
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10 DEDICATED INSTRUCTIONS

Dedicated instructions are used to simplify programming for using the functions of the
intelligent function module.
This chapter explains the dedicated instructions for the functions that are explained in
this manual, among those dedicated commands available for the Ethernet module that
can be used by the QCPU.

10.1 Dedicated Instruction List and Available Devices

(1) Dedicated instruction list


The following table lists the dedicated instructions explained in this chapter:
Application Dedicated instruction Description of function Reference section
2
OPEN Establishes a connection. Section 10.8
For opening and closing connections 2
CLOSE Disconnects a connection. Section 10.5

Reads received data.


BUFRCV 2 Section 10.2
(For main program)
For fixed buffer communication Reads received data.
BUERCVS 1 Section 10.3
(For interrupt program)
2
BURSND Sends data. Section 10.4
ERRCLR Clears error information. Section 10.6
For reading and clearing error information
ERRRD Reads error information. Section 10.7
Reinitializes the Ethernet
For reinitialization UINI Section 10.9
module.

1 If the source or target station is a safety CPU, it cannot be used.


2 For safety CPUs, connections No.1 to No.8 only can be specified. If the specified
value is out of range, an OPERATION ERROR (error code: 4101) occurs.

POINT
(1) The user should not change any data (control data, request data, etc.) that is
specified with a dedicated instruction until the execution of that dedicated
instruction is completed.
(2) All dedicated instructions must be executed online.
If any of the dedicated instructions is executed offline, no error will occur, but
the execution of the dedicated instruction will not be completed.

(2) Available devices


The following devices are available for the dedicated instructions:
Internal devices 2
1 File register Constant
Bit Word
X, Y, M, L, F, V, B T, ST, C, D, W R, ZR K, H

1 Word device bit designation can be used as bit data.


10
Word device bit designation is done by designating Word device . Bit No. .
(Designation of bit numbers is done in hexadecimal.)
For example, bit 10 of D0 is designated as D0.A .
However, there can be no bit designation for timers (T), retentive timers (ST) and
counters (C).
2 Available devices are given in each of the Constant field.

10 - 1 10 - 1
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.2 ZP.BUFRCV

This instruction reads data received from an external device through fixed buffer
communication.
This instruction is used in the main program.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1)
(S2)
(D1)
(D2)

[Instruction code] [Executing condition]

Command
ZP.BUFRCV ZP.BUFRCV "Un" (S1) (S2) (D1) (D2)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.
Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module
String/
"Un"/Un (00 to FEH: The two most significant digits of the 3-digit input/output
User Binary 16 bits
signal)
( 3)
(S1) Connection number (1 to 16) Binary 16 bits
(S2) Head number of the devices that designate control data Binary 16 bits
(D1) Head number of the device that stores receive data Binary 16 bits
Head number of the local station bit device that turns on for one scan System
(D2) upon completion of instruction. Bit
(D2) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.
Control data
1
Device Item Setting data Setting range Set by ( )
(S2) + 0 System area
• Stores the status at completion.
0000H: Normal completion
(S2) + 1 Complete status System
Other than 0000H
2
: Abnormal completion (error code) ( )

Receive data
1
Device Item Setting data Setting range Set by ( )
• Stores the data length of the data read from the
fixed buffer data area in word units.
There is a procedure (for communication
using binary code): Number of words (1 to
Receive data 1017)
(D1) + 0 System
length There is a procedure (for communication
using ASCII code): Number of words (1 to
508)
10 Non procedure (for communication using
binary code): Number of bytes (1 to 2046)
(D1) + 1
• Stores the data read from the fixed buffer data area
to Receive data System
sequentially in ascending order.
(D2) + n
1 The "Set by" column indicates the following:
• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".
3 For safety CPUs, connections No.1 to No.8 only can be specified. If the specified value is out of range, an OPERATION
ERROR (error code: 4101) occurs.

10 - 2 10 - 2
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions

(1) This instruction reads receive data (for fixed buffer communication) from the
connection specified by (S1) for the module designated by Un.
Programmable controller CPU Ethernet module

Fixed buffer data area

(D1) Receive data length No.1



Receive data •

• BUFRCV

No.n
• •
• •

Receive data No.16

(2) Whether or not the BUFRCV instruction has been completed can be checked by
the complete bit devices (D2) + 0 and (D2) + 1.

(a) Complete bit device (D2) + 0


Turns on at the END processing of the scan where the BUFRCV instruction
is completed, and turns off at the next END processing.

(b) Complete bit device (D2) + 1


Turns on and off depending on the completion status of the BUFRCV
instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion : Turns on at the END processing of the scan
where the BUFRCV instruction is completed, and
turns off at the next END processing.

[Operation when the BUFRCV instruction is being executed]


END END END
Sequence program Scan processing Scan processing Scan processing

Instruction execution
BUFRCV instruction

Complete device

Complete device + 1 Abnormal completion

Receive data

(3) The ZP.BUFRCV instruction is executed when the read instruction (indicated by a
bit for the applicable connection in the fixed buffer receive status signal storage
area (address: 5005H) of the buffer memory) switches from off to on.

(4) When reading receive data from the same connection, this cannot be used
together with BUFRCVS instructions (for interrupt programs).

10 - 3 10 - 3
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Errors

(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D2) + 1, turns on and the error code is stored in the complete status area (S2) + 1.
Refer to the following manuals regarding the error codes, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

1
Program example

A program that reads receive data from the fixed buffer for connection number 1:
When the input/output signals of the Ethernet module are X/Y00 to X/Y1F
X19: Initial normal completion signal

M0: Connection 1 open completion signal

M40: Connection 1 data receiving signal


\
Read the open completion signal information
\
Read the open request signal information
\
Read the fixed buffer receiving status signal
information

Fixed buffer No. 1 receiving program


(Main program)
Change the receive data read command to pulse

Execute receive data reading

Normal completion processing Perform the receiving normal completion


processing
Abnormal completion processing Perform the receiving abnormal completion
processing

1 For use with a safety CPU, refer to the QSCPU User’s Manual (Function Explanation,
Program Fundamentals).

10 - 4 10 - 4
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.3 Z.BUFRCVS

This instruction reads data received from an external device through fixed buffer
communication.
This instruction is used in the interrupt program.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1)
(D1)

[Instruction code] [Executing condition]

Command
Z.BUFRCVS Z.BUFRCVS "Un" (S1) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later) or Universal model QCPU, " " (double
quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module
String/
"Un"/Un (00 to FEH: The two most significant digits of the 3-digit input/output
User Binary 16 bits
signal)
(S1) Connection number (1 to 16) Binary 16 bits
(D1) Head number of the device that stores receive data System Binary 16 bits

The file registers of each of the local device and the program cannot be used as device
to be used in the setting data.

Receive data
1
Device Item Setting data Setting range Set by ( )
• Stores the data length of the data read from the
fixed buffer data area in word units.
There is a procedure (for communication
using binary code): Number of words (1 to
Receive data 1017)
(D1) + 0 System
length There is a procedure (for communication
using ASCII code): Number of words (1 to
508)
Non procedure (for communication using
binary code): Number of bytes (1 to 2046)
(D1) + 1
• Stores the data read from the fixed buffer data area
to Receive data System
sequentially in ascending order.
(D1) + n
1 The "Set by" column indicates the following:
• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.

10 - 5 10 - 5
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions

(1) This instruction reads receive data (for fixed buffer communication) from the
connection specified by (S1) for the module designated by Un.
Programmable controller CPU Ethernet module

Fixed buffer data area

(D1) Receive data length No.1



Receive data •


BUFRCVS

No.n
• •
• •

Receive data No.16

[Operation when the BUFRCVS instruction is being executed]


Scan
END
Sequence program processing

Interrupt program

BUFRCVS instruction Instruction execution

Data receiving Receive data storage

(2) The Z.BUFRCVS instruction is used by the interrupt programs and its processing
completes within one scan.

(3) In order to read receive data with an interrupt program, it is necessary to perform
both the interrupt settings and interrupt pointer settings with parameter settings of
GX Developer.

(4) When reading receive data from the same connection, this cannot be used
together with BUFRCV instructions (for main programs).

Errors

(1) When the dedicated instruction is completed abnormally, the error flag (SM0)
turns on and the error code is stored in SD0.
Refer to the following manuals regarding the error code, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

10 - 6 10 - 6
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Program example

A program that reads receive data from the fixed buffer for connection number 2:
When the input/output signals of the Ethernet module are X/Y00 to X/Y1F

Enable (permit) the execution of the interrupt program

Execute receive data reading

10 - 7 10 - 7
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.4 ZP.BUFSND

This instruction send data to an external device through fixed buffer communication.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1) — — —
(S2) — — — —
(S3) — — — —
(D1) — — — —

[Instruction code] [Executing condition]

Command
ZP.BUFSND ZP.BUFSND "Un" (S1) (S2) (S3) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module
String/
"Un"/Un (00 to FEH: The two most significant digits of the 3-digit input/output
User Binary 16 bits
signal)
( 3)
(S1) Connection number (1 to 16) Binary 16 bits
(S2) Head number of the device that stores control data System Binary 16 bits
(S3) Head number of the device that stores send data User Binary 16 bits
Head number of the local station bit device that turns on for one scan
(D1) upon completion of instruction. System Bit
(D1) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.
Control data
1
Device Item Setting data Setting range Set by ( )
(S2) + 0 System area — —
• Stores the status at completion.
0000H: Normal completion
(S2) + 1 Complete status System
Other than 0000H
2
: Abnormal completion (error code) ( )

Send data
1
Device Item Setting data Setting range Set by ( )
• Designate the send data length in word units.
There is a procedure (for communication
1 to 1017
using binary code): Number of words
(S3) + 0 Send data length There is a procedure (for communication User
1 to 508
using ASCII code): Number of words
Non procedure (for communication using
1 to 2046
binary code): Number of bytes
(S3) + 1
to Send data • Designate the send data. User
(S3) + n
1 The "Set by" column indicates the following:
• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".
3 For safety CPUs, connections No.1 to No.8 only can be specified. if the specified value is out of range, an OPERATION
ERROR (error code: 4101) occurs.

10 - 8 10 - 8
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions

(1) This instruction sends the data designated by (S3) to the external device of the
connection specified by (S1) for the module designated by Un.
Programmable controller CPU Ethernet module

Fixed buffer data area

(S3) Send data length No.1



Send data •

• BUFSND

No.n External device
• •
• •

Send data No.16

(2) Whether or not the BUFSND instruction has been completed can be checked by
the complete bit devices (D1) + 0 and (D1) + 1.

(a) Complete bit device (D1) + 0


Turns on at the END processing of the scan where the BUFSND instruction
is completed, and turns off at the next END processing.

(b) Complete bit device (D1) + 1


Turns on and off depending on the completion status of the BUFSND
instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion : Turns on at the END processing of the scan
where the BUFSND instruction is completed, and
turns off at the next END processing.

[Operation when the BUFSND instruction is being executed]


END END END
Sequence program Scan processing Scan processing Scan processing

Instruction execution
BUFSND instruction

Complete device

Complete device + 1 Abnormal completion

Send data

(3) The ZP.BUFSND instruction is executed when the send instruction switches from
off to on.

10 - 9 10 - 9
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Errors

(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D1) + 1, turns on and the error code is stored in the complete status area (S2) + 1.
Refer to the following manuals regarding the error code, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

1
Program example

A program that sends data from the fixed buffer of connection number 1:
When the input/output signals of the Ethernet module are X/Y00 to X/Y1F
X19: Initial normal completion signal

M0: Connection 1 open completion signal

Fixed buffer No. 1 sending program

Change the send data read command to


pulse
Designate the BUFSND instruction data
Designate the send data length
Designate the send data

Execute the data sending to the external


device

Perform the sending normal completion


Normal completion processing
processing

Perform the sending abnormal completion


Abnormal completion processing processing

1 For use with a safety CPU, refer to the QSCPU User’s Manual (Function Explanation,
Program Fundamentals).

10 - 10 10 - 10
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.5 ZP.CLOSE

This instruction disconnects (closes) a connection by which data was communicated


with an external device.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1)
(S2)
(D1)

[Instruction code] [Executing condition]

Command
ZP.CLOSE ZP.CLOSE "Un" (S1) (S2) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module
String/
"Un"/Un (00 to FEH: The two most significant digits of the 3-digit input/output
User Binary 16 bits
signal)
( 3)
(S1) Connection number (1 to 16) Binary 16 bits
(S2) Head number of the device that stores control data Binary 16 bits
Head number of the local station bit device that turns on for one scan
System
(D1) upon completion of instruction. Bit
(D1) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.

Control data
1
Device Item Setting data Setting range Set by ( )
(S2) + 0 System area
• Stores the status at completion.
0000H: Normal completion
(S2) + 1 Complete status System
Other than 0000H
2
: Abnormal completion (error code) ( )

1 The "Set by" column indicates the following:


• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".
3 For safety CPUs, connections No.1 to No.8 only can be specified. If the specified value is out of range, an OPERATION
ERROR (error code: 4101) occurs.

10 - 11 10 - 11
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions

(1) This instruction closes the connection specified by (S1) for the module designated
by Un (disconnecting connections).

(2) Whether or not the CLOSE instruction has been completed can be checked by
the complete bit devices (D1) + 0 and (D1) + 1.

(a) Complete bit device (D1) + 0


Turns on at the END processing of the scan where the CLOSE instruction
is completed, and turns off at the next END processing.

(b) Complete bit device (D1) + 1


Turns on and off depending on the completion status of the CLOSE
instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion : Turns on at the END processing of the scan
where the CLOSE instruction is completed, and
turns off at the next END processing.

[Operation when the CLOSE instruction is being executed]


END END END
Sequence program Scan processing Scan processing Scan processing

Instruction execution
CLOSE instruction

Complete device

Complete device + 1 Abnormal completion

Connection
closed

(3) The ZP.CLOSE is executed when the close instruction switches from off to on.

Important
Never execute the open/close processing using input/output signals and the
open/close processing using the OPEN or CLOSE dedicated instructions
simultaneously for the same connection. It will result in malfunctions.

Errors

(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D1) + 1, turns on and the error code is stored in the complete status area (S2) + 1.
Refer to the following manuals regarding the error codes, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

10 - 12 10 - 12
10 DEDICATED INSTRUCTIONS
MELSEC-Q

1
Program example

A program that closes the connection number 1:


When the input/output signals of the Ethernet module are X/Y00 to X/Y1F
M0: Connection 1 open completion signal

M150: OPEN instruction execution normal completion


flag

Set the flag by the close processing from the external


device
Change the close processing from the external
device to pulse
Change the close request from the Local station side to
pulse
Perform close processing

Set the close processing executing flag

Set the normal completion flag

Set the abnormal completion flag

Reset the close processing execution flag

1 For use with a safety CPU, refer to the QSCPU User’s Manual (Function Explanation,
Program Fundamentals).

10 - 13 10 - 13
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.6 ZP.ERRCLR

This instruction turns off the LEDs of the Ethernet module and clears data information
stored in the buffer memory.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1) — — — — —
(D1) — — — —

[Instruction code] [Executing condition]

Command
ZP.ERRCLR ZP.ERRCLR "Un" (S1) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module String/
"Un"/Un User
(00 to FEH: The two most significant digits of the 3-digit input/output signal) Binary 16 bits
(S1) Head number of the device that stores control data User, system Binary 16 bits
Head number of the local station bit device that turns on for one scan
(D1) upon completion of instruction. System Bit
(D1) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.

Control data
1
Device Item Setting data Setting range Set by ( )
(S1) + 0 System area — — —
• Stores the status at completion.
0000H: Normal completion
(S1) + 1 Complete status — System
Other than 0000H
2
: Abnormal completion (error code) ( )
• Designate the error information to be cleared.
0000H: Initial abnormal code
0001H to 0010H
: Open abnormal code for the applicable
connection
Clearing target 0100H: Error log block area (as described
(S1) + 2 User
designation 0101H: Communication status – status by each in the left)
protocol
0102H: Communication status – E-mail receive
status
0103H: Communication status – E-mail send status
FFFFH: Clears all of the above
• Designate the function to be cleared.
Clearing function 0000H
(S1) + 3 0000H: [COM.ERR] LED off, error code clear User
designation FFFFH
FFFFH: Error log clear
(S1) + 4
to System area — — —
(S1) + 7
1 The "Set by" column indicates the following:
• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".

10 - 14 10 - 14
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions

(1) This instruction turns [COM.ERR.] LEDs off and clears error information listed
below for the module designated by Un.
Target Function
Error information to be cleared
Target item designation designation
(buffer memory)
(S1) + 2 (S1) + 3
• Initial abnormal code (address: 69H)
Initial error 0000H 0000H
• [COM.ERR.] LED off
• Open abnormal code for applicable
Open error 0001H to 0010H 0000H connection (address: 7CH, 86H…)
• [COM.ERR.] LED off
Error log 0100H FFFFH • Error log (address:E3H to 174H)
Status by each • Clears communication status
0101H FFFFH
protocol (address: 178H to 1FFH)
Communication E-mail receive
0102H FFFFH • E-mail receiving (address: 5871H to 5B38H)
status status
• E-mail sending
E-mail send status 0103H FFFFH
(address: 5B39H to 5CA0H)
All FFFFH FFFFH • Clears all of the above.

(2) Whether or not the ERRCLR instruction has been completed can be checked by
the complete bit devices (D1) + 0 and (D1) + 1.

(a) Complete bit device (D1) + 0


Turns on at the END processing of the scan where the ERRCLR instruction
is completed, and turns off at the next END processing.
(b) Complete bit device (D1) + 1
Turns on and off depending on the completion status of the ERRCLR
instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion: Turns on at the END processing of the scan where
the ERRCLR instruction is completed, and turns off
at the next END processing.

[Operation when the ERRCLR instruction is being executed]


END END END
Sequence program Scan processing Scan processing Scan processing

Instruction execution
ERRCLR instruction

Complete device

Complete device + 1 Abnormal completion

Error cleared

(3) The ZP.ERRCLR function is executed when the clear instruction switches from off
to on.

10 - 15 10 - 15
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Errors

(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D1) + 1, turns on and the error code is stored in the complete status area (S1) + 1.
Refer to the following manuals regarding the error code, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

Program example

A program that clears the open abnormal code for connection 1:


When the input/output signals of the Ethernet module are X/Y00 to X/Y1F
M0: Connection 1 open completion signal

Designate the ERRCLR instruction data

Designate to clear the connection 1 open abnormal


code
Designate to turn off ERR LED and clear the error
code
Set the ERRCLR instruction execution flag

Execute error information clearing

Clear the retained error code at normal completion of


the error information clear processing
Retain the error code at abnormal completion of the
error information clear processing
Reset the ERRCLR instruction execution flag

10 - 16 10 - 16
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.7 ZP.ERRRD

This instruction reads the error information stored in the buffer memory of the Ethernet
module.
Applicable device
Setting Internal device Link direct device Intelligent
Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1) — — — —
(D1) — — — —

[Instruction code] [Executing condition]

Command
ZP.ERRRD ZP.ERRRD "Un" (S1) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module String/
"Un"/Un User
(00 to FEH: The two most significant digits of the 3-digit input/output signal) Binary 16 bits
(S1) Head number of the device that stores control data User, system Binary 16 bits
Head number of the local station bit device that turns on for one scan
(D1) upon completion of instruction. System Bit
(D1) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.
Control data
1
Device Item Setting data Setting range Set by ( )
(S1) + 0 System area — —
• Stores the status at completion.
0000H: Normal completion
(S1) + 1 Complete status — System
Other than 0000H
2
: Abnormal completion (error code) ( )
• Designates the error information to read.
Read information 0000H : Initial abnormal code 0000H
(S1) + 2 User
designation 0001H to 0010H: Open abnormal code for the 0001H to 0010H
applicable connection
Read target • Designates a target of the error information to read.
(S1) + 3 information 0000H: Information of the last error that has 0000H User
designation occurred
• Stores the error information that has been read.
(S1) + 4 Error information 0000H : No error — System
Other than 0000H: Error code ( 2)
(S1) + 5
to System area — — —
(S1) + 7

1 The "Set by" column indicates the following:


• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".

Functions
(1) This instruction reads the error code and information in the error log of the
module designated by Un.
Error information to be cleared
Target item Target designation (S1) + 2 Function designation (S1) + 3
(buffer memory)
Initial error 0000H 0H • Initial abnormal code (address: 69H)
• Open abnormal code for applicable
Open error 0001H to 0010H 0H
connection (address: 7CH, 86H…)

10 - 17 10 - 17
10 DEDICATED INSTRUCTIONS
MELSEC-Q

(2) Whether or not the ERRRD instruction has been completed can be checked by
the complete bit devices (D1) + 0 and (D1) + 1.

(a) Complete bit device (D1) + 0


Turns on at the END processing of the scan where the ERRRD instruction
is completed, and turns off at the next END processing.

(b) Complete bit device (D1) + 1


Turns on and off depending on the completion status of the ERRRD
instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion : Turns on at the END processing of the scan
where the ERRRD instruction is completed, and
turns off at the next END processing.

[Operation when the ERRRD instruction is being executed]


END END END
Sequence program Scan processing Scan processing Scan processing

Instruction execution
ERRRD instruction

Complete device

Complete device + 1 Abnormal completion

Error
information
read

(3) The ZP.ERRRD is executed when the read instruction switches from off to on.

Errors

(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D1) + 1, turns on and the error code is stored in the complete status area (S1) + 1.
Refer to the following manuals regarding the error code, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

Program example

A program to read the open abnormal code for connection 1:


When the input/output signals of the Ethernet module are X/Y00 to X/Y1F

Designate the open abnormal code of Connection No. 1

Designate the latest error information

Execute the ERRRD instruction


Processing at normal completion
(Read the error information)
Processing at abnormal completion

10 - 18 10 - 18
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.8 ZP.OPEN

This instruction establishes a connection (open processing) with an external device to


perform data communication.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1)
(S2)
(D1)

[Instruction code] [Executing condition]

Command
ZP.OPEN ZP.OPEN "Un" (S1) (S2) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module
String/
"Un"/Un (00 to FEH: The two most significant digits of the 3-digit input/output
User Binary 16 bits
signal)
( 3)
(S1) Connection number (1 to 16) Binary 16 bits
(S2) Head number of the device that stores control data User, system Binary 16 bits
Head number of the local station bit device that turns on for one scan
(D1) upon completion of instruction. System Bit
(D1) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.

10 - 19 10 - 19
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Control data
1
Device Item Setting data Setting range Set by ( )
• Designate which settings to use at open
processing of a connection, either the parameter
setting values from GX Developer or the setting
values of the control data starting from (S2) + 2.
Execution 0000H
(S2) + 0 0000H: Open processing with parameters set in User
type/complete type 8000H
[Open settings] of GX Developer
8000H: Open processing with parameters
designated with control data from (S2) + 2
to (S2) + 9.
• Stores the status at completion.
0000H: Normal completion
(S2) + 1 Complete status — System
Other than 0000H
2
: Abnormal completion (error code) ( )
• Designate how to use a connection.

b15 b14 b13 to b10 b9 b8 b7 b6 to b2 b1 b0


6) 0 5) 4) 3) 0 2) 1)

1) Usage of fixed buffer


0: Sending or fixed buffer communication is not
executed
1: For receiving
2) Destination existence confirmation
0: No confirm
1: Confirm
Application setting (as described in
(S2) + 2 3) Pairing open setting User
area the left)
0: No pairs
1: Pairs
4) Communication method (protocol)
0: TCP/IP
1: UDP/IP
5) Fixed buffer communication
0: Procedure exist
1: No procedure
6) Open system
00: Active open or UDP/IP
10: Unpassive open
11: Fullpassive open
local station 401H to 1387H
(S2) + 3 • Designate the port No. of the local station User
Port No. 138BH to FFFEH
1H to FFFFFFFFH
(S2) + 4 Destination IP (FFFFFFFFH:
• Designate the IP address of the external device. User
(S2) + 5 address simultaneous
broadcast)
401H to FFFFH
Destination (FFFFH:
(S2) + 6 • Designate the port No. of the external device. User
Port No. simultaneous
broadcast)
(S2) + 7 n
Destination • Designate the Ethernet address of the external
to 000000000000H User
Ethernet address device.(See Section 5.5 POINT)
(S2) + 9 FFFFFFFFFFFFH
1 The "Set by" column indicates the following:
• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".
3 For safety CPUs, connections No.1 to No.8 only can be specified. If the specified value is out of range, an OPERATION
ERROR (error code: 4101) occurs.

10 - 20 10 - 20
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions

(1) This instruction performs the open processing for a connection specified by (S1)
for the module designated by Un.
The selection of the setting values to be used for the open processing is
designated by (S2) + 0.

(2) Whether or not the OPEN instruction has been completed can be checked by the
complete bit devices (D1) + 0 and (D1) + 1.

(a) Complete bit device (D1) + 0


Turns on at the END processing of the scan where the OPEN instruction is
completed, and turns off at the next END processing.

(b) Complete bit device (D1) + 1


Turns on and off depending on the completion status of the OPEN
instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion : Turns on at the END processing of the scan
where the OPEN instruction is completed, and
turns off at the next END processing.

[Operation when the OPEN instruction is being executed]


END END END
Sequence program Scan processing Scan processing Scan processing

Instruction execution
OPEN instruction

Complete device

Complete device + 1 Abnormal completion

Connection
open

(3) The ZP.OPEN is executed when the open instruction switches from off to on.

POINT
Never execute the open/close processing using input/output signals and the
open/close processing using the OPEN or CLOSE dedicated instruction
simultaneously for the same connection. It will result in malfunctions.

10 - 21 10 - 21
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Errors

(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D1) + 1, turns on and the error code is stored in the complete status area (S2) + 1.
Refer to the following manuals regarding the error code, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual

1
Program example

A program that Active open the connection 1 for TCP/IP communication:


When the input/output signals of the Ethernet module are X/Y00 to X/Y1F
X19: Initial normal completion signal

M0: Connection 1 open completion signal

M20: Connection 1 open request signal

Open processing of connection No. 1


(TCP/IP Active open)

Read the open completion signal information

Read the open request signal information

Change the open command to pulse


Designate the control data for the OPEN instruction
(It is necessary to designate either one of the
1) 2 processing enclosed by a broken line.)
When using the open setting parameters of
GX Developer
Designate the execution type/complete type

2) 2
When not using the open setting parameters of
GX Developer
Designate the execution type/complete type
Designate the information of the application

Designate the local station Port No. (1000H)

Designate the external device IP address


(10.97.85.223)
Designate the external device Port No. (2000H)

Execute the open processing to the external device

Set the normal completion flag of the open


processing
Set the abnormal completion flag of the open
processing

1 For use with a safety CPU, refer to the QSCPU User’s Manual (Function
Explanation, Program Fundamentals).
2 Regarding sections 1) and 2) in the program, 1) is necessary when using the
GX Developer "Open Setting" parameter. 2) is necessary when not using the
GX Developer "Open Setting" parameter.

10 - 22 10 - 22
10 DEDICATED INSTRUCTIONS
MELSEC-Q

10.9 ZP.UINI

This instruction is used to perform the re-initial processing of the Ethernet module.
Applicable device
Internal device Link direct device Intelligent
Setting Index Constant
(System, user) File J \ function
data register Others
register module device
Bit Word Bit Word Zn K, H $
U \G
(S1)
(D1)

[Instruction code] [Executing condition]

Command
ZP.UINI ZP.UINI "Un" (S1) (D1)
1

1 If the originating station is a Basic model QCPU (function version B or later), Universal model QCPU, or safety CPU, " "
(double quotation) of the first argument can be omitted.

Setting data
1
Setting data Description Set by ( ) Data type
Start input/output signal of the Ethernet module
String/
"Un"/Un (00 to FEH: The two most significant digits of the 3-digit input/output User
Binary 16 bits
signal)
(S1) Head number of the device that stores control data User, system Binary 16 bits
Head number of the local station bit device that turns on for one scan
(D1) upon completion of instruction. System Bit
(D1) + 1 also turns on if the instruction execution ends abnormally.

The file registers for each of the local device and the program cannot be used as
devices to be used in the setting data.

10 - 23 10 - 23
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Control data
1
Device Item Setting data Setting range Set by ( )
(S1) + 0 System area — — —
• Stores the status at completion.
0000H: Normal completion
(S1) + 1 Completion status — System
Other than 0000H
2
: Abnormal completion (error code) ( )
• Specifies the parameters to be changed.
b15 to b2 b1 b0
0 2) 1)

1) Specification of whether or not to change the IP


address of the local station
Specifies whether or not to change the IP address
of the local station.
(Specifies the address using (S1) + 3 and (S1) + 4
Specification of if it is to be changed.)
(S1) + 2 0: Do not change 0H to 3H User
target of change
1: Change
2) Specification of whether or not to change the
operation settings
Specifies whether or not to change the operation
settings.
(Specifies the settings using (S1) + 5 if it is to be
changed.)
0: Do not change
1: Change
(S1) + 3 Local station 00000001H to
• Specifies the IP address of the local station. User
(S1) + 4 IP address FFFFFFFEH
• Specifies the operation settings.
b15 to b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 5) 0 4) 3) 2) 0 1) 0

1) Communication data code setting


0: Communication in binary code
1: Communication in ASCII code
2) TCP Existence confirmation setting
0: Use the Ping
1: Use the KeepAlive (See the
Operation settings 3) Send frame setting
(S1) + 5 description to User
(See Section 4.7.) 0: Ethernet frame the left.)
1: IEEE802.3 frame
4) Setting of write enable/disable at RUN time
0: Disable
1: Enable
5) Initial timing setting
0: Do not wait for OPEN
(communication impossible at STOP time)
1: Always wait for OPEN
(communication possible at STOP time)

1 The "Set by" column indicates the following:


• User : Data set by the user before executing a dedicated instruction.
• System : The programmable controller CPU stores the execution results of a dedicated instruction.
2 For details on the error codes at abnormal completion, see Section 11.3, "Error Code List".

POINT
When performing re-initial processing of the Ethernet module only, i.e., without
changing the local station IP address and operation settings, the control data
should be specified so that the value (0H) is stored in ((S1) + 2)), the specification of
target of change, before executing the UINI instruction.
The Ethernet module clears external device address information that it has been
maintaining and performs re-initial processing in order to allow data communication
to restart. (The initial normal completion signal (X19) is on.)

10 - 24 10 - 24
10 DEDICATED INSTRUCTIONS
MELSEC-Q

Functions
(1) Perform the re-initial processing of the Ethernet module specified in Un.
(2) Whether or not the UINI instruction has been completed can be checked by the
complete bit devices (D1) + 0 and (D1) + 1.
(a) Complete bit device (D1) + 0
Turns on at the END processing of the scan where the UINI instruction is
completed, and turns off at the next END processing.
(b) Complete bit device (D1) + 1
Turns on and off depending on the completion status of the UINI instruction.
• Normal completion : Stays off and does not change.
• Abnormal completion : Turns on at the END processing of the scan
where the UINI instruction is completed, and
turns off at the next END processing.
[Operation when the UINI instruction is being executed]
END END END
Sequence program Scan processing
Scan processing
Scan processing

UINI instruction instruction execution

Complete device

Complete device + 1
Abnormal completion

Reinitialization Initialization
request of module

(3) The ZP.UINI is executed when the open instruction switches from off to on.

POINT
Please keep the following points in mind when reinitializing Ethernet module. (Failure
to do so may cause errors in the data communication with the external devices.)
(1) Be sure to end all current data communication with external devices and close
all connections before performing a re-initial processing.
(2) Do not mix a re-initial processing done by writing directly into buffer memory, for
instance by using a TO instruction, with a re-initial processing via UINI instruction.
Also, do not request another re-initial processing while a re-initial processing
is already being performed.
(3) Be sure to reset external devices if the IP address of the Ethernet module has
been changed. (If an external device maintains the Ethernet address of a
device with which it communicates, the communication may not be continued
after the IP address of the Ethernet module has been changed.)
(4) In a redundant system, do not change the IP address and operation setting
with the UINI instruction. If they are changed, normal communication cannot
be made.
Use GX Developer to change the IP address and operation setting.
Errors
(1) When a dedicated instruction ends with an error, the abnormal completion signal,
(D1) + 1, turns on and the error code is stored in the complete status area (S1) + 1.
Refer to the following manuals regarding the error code, check the errors and
take corrective actions.
<Error codes>
4FFFH or less : QCPU (Q Mode) User’s Manual (Hardware Design,
Maintenance and Inspection)
C000H or higher : Section 11.3.3 of this manual
10 - 25 10 - 25
10 DEDICATED INSTRUCTIONS
MELSEC-Q

1
Program example
The following figure shows a sample program that performs a re-initial processing.
When I/O signals of the Ethernet module are X/Y00 to X/Y1F
U0\

Always ON Connection 1
open completion
signal

Re-initial Re-initial
instruction instruction

<Specify the change of operation settings >

Re-initial Connection 1
instruction open
completion
signal Connection 2
open <Read the current operation setting status>
completion
signal U0\

<Set write enable during RUN >

UINI
instruction
completion
device

Initial
completion
status

Processing upon norm al com pletion


UINI UINI
instruction instruction
completion abnormal
device completion
device

D ata com m unication enabled


Initial normal
completion signal

Processing upon abnorm al com pletion


UINI
instruction
abnormal
completion
device

Re-initial
instruction

Data com m unication enabled


Initial normal
completion signal

1 For use with a safety CPU, refer to the QSCPU User’s Manual (Function Explanation,
Program Fundamentals).

POINT
This is an example program that can be used to perform re-initial processing when
communicating with connections 1 and 2. The corresponding numbers and bits for
each connection should be specified if other connections are used.
10 - 26 10 - 26
11 TROUBLESHOOTING
MELSEC-Q

11 TROUBLESHOOTING

This section explains the contents of the errors that may occur during communications 11
between the Ethernet module and an external device as well as the troubleshooting
procedures.
The following are methods for checking whether there is an error on the Ethernet
module side and the contents of the error.
Use one of the following methods to check whether there is an error and its content,
then take corrective actions.

(1) Check using the display LED on the front of the Ethernet module
(See Section 11.1.)
The display LED on/off status can be used to check whether an error is occurring
in the Ethernet module.

(2) Check through GX Developer


GX Developer can be used to check various conditions of the Ethernet module
as well as the error code corresponding to the contents of the error occurring and
to perform tests.

(a) Ethernet diagnostics (using the dedicated screen)


1) Monitor for the status of various settings (See Section 11.2.)
2) PING test (See Section 5.4.1.)
3) Loop back test (See Section 5.4.2.)
4) COM. ERR.off (See Sections 11.1.2 and 11.2.1.)

(b) System monitor (using the dedicated screen: see Section 11.2.2.)
1) Module's detailed information · · · · Module status, error code, etc.
2) H/W information · · · · LED on/off status, switch status, etc.

(c) Buffer memory batch monitor


The error code can be checked by monitoring the buffer memory of the
Ethernet module.

(3) Check the contents of the error using the error code (See Section
11.3.)
The contents of the error can be checked using the error code confirmed on the
above dedicated screen or by monitoring the buffer memory by referring to
Section 11.3.

REMARKS
If line errors and other errors occur when connecting devices of multiple
manufacturers, the users needs to isolate the malfunctioning parts using line
analyzers, etc.

11 - 1 11 - 1
11 TROUBLESHOOTING
MELSEC-Q

11.1 How to Check Errors Using LED Displays

11 This section describes the errors that can be checked with the LED displays on the
front of the Ethernet module.

11.1.1 Checking error display

The following can be checked with the LED displays on the front of the Ethernet
module.

<Ethernet module LED>

QJ71E71-100 QJ71E71-B5 QJ71E71-B2


RUN ERR. RUN ERR. RUN ERR.
INIT. COM.ERR. INIT. COM.ERR. INIT. COM.ERR.
OPEN 100M OPEN OPEN
SD RD SD RD SD RD

LED name Status to check Cause/corrective action


1) Watchdog timer error
• When a watchdog timer (approximately 600 ms) error occurs, the watchdog timer error detection
Turns off after powering on signal (X1F) is turned on by the self diagnosis function of the Ethernet module.
1 [RUN]
the Ethernet module. ( 1) 2) Ethernet module installation fault
• Check if the power supply capacity (5 V DC) of the power supply module is insufficient.
• Turn off the power supply and reinstall the module.
1) Module parameter setting error
• Check/correct the parameter setting values for the Ethernet module using GX Developer.
2) Programmable controller CPU error
Turns on after powering on • When the programmable controller CPU’s [RUN] LED is off/flashing, or the [ERR.] LED is on,
2 [ERR.]
the Ethernet module. ( 1) check the content of the error occurring in the programmable controller CPU and correct the
problem.
• Check that the Ethernet module is installed on the Q mode programmable controller CPU.
3) Ethernet module error (H/W error)
1) Check the contents of the error using the error codes stored by the error detection of the following
processing and remove the causes.
• Initial processing
• Fixed buffer send processing
Turns on after powering on
3 [COM.ERR.] • E-mail send/receive processing
the Ethernet module.
• Open processing
• Data communication processing
• Other processing (processing for which error codes are stored in the error log area)
2) For a list of error codes, see Section 11.3.

(Continues on the following page)

11 - 2 11 - 2
11 TROUBLESHOOTING
MELSEC-Q

(Continued from the previous page)

LED name Status to check Cause/corrective action


1) [ERR.] or [COM.ERR.] LED turns on.
• Remove the factors that turn on the [ERR.] or [COM.ERR.] LED.
The [SD] LED does not flash 2) Poor cable connection
4 [SD] 2
at data sending. • Check the connection of the cable. ( )
3) Program reviewing is required
• Review the sequence program for sending.
1) [ERR.] or [COM.ERR.] LED turns on.
• Remove the factors that turn on the [ERR.] or [COM.ERR.] LED.
2) Poor cable connection
• Check the connection of the cable. ( 2)
[RD] LED stays off and data
5 [RD] 3) Local station IP address setting error
cannot be received.
• If the cable connection is all right, review each setting value of the local station IP address, router
setting, and sub-net mask settings using GX Developer.
4) Program reviewing is required
• Review the sequence program for sending.

1 Conduct a hardware test (H/W test) and check whether or not the Ethernet module operates normally.

For details on the hardware test, see Section 4.8.2, "Hardware test".

2 Conduct a confirmation of the completion for the initial processing and check whether or not there is any problem

in the cable connection and the Ethernet lines.

See Section 5.4, "Confirming the completion of the Initial Processing" for details on confirming the completion for

the initial processing. (Perform either one of the "Confirming the completion of the initial processing completion"

actions described in Section 5.4.)

POINT
The on/off status of the [INIT.], [OPEN], [ERR.] and [COM.ERR.] LEDs is stored in
the module status area (address: C8H) of the buffer memory.
For more details, see Section 3.8, "List of Applications and Assignments of the
Buffer Memory".

11 - 3 11 - 3
11 TROUBLESHOOTING
MELSEC-Q

11.1.2 How to turn off COM.ERR.LED and to read/clear error information

This section explains how to turn off [COM.ERR.] LED and to read/clear error
information using the sequence program.

(1) How to turn off [COM.ERR.] LED using input/output signals


The [COM.ERR.] LED on the front of the Ethernet module is turned on when a
communication error occurs in an external device. (Input/output signal X1C: ON)

(a) The [COM.ERR.] LED is turned off by turning on the off request signal
(Y17).

[COM.ERR.] LED off request signal (Y17)

(LED on) (LED off) (LED on)

[COM.ERR.] LED on signal (X1C)

Error Error Error


Error occurrence occurrence occurrence occurrence

(b) The off request is processed continuously while the off request signal (Y17)
is on.

(c) The error information in the error log area of the buffer memory is not
cleared (deleted) by turning the off request signal (Y17) is on.

(2) How to turn off [COM.ERR.] LED on the "Ethernet diagnostics"


screen of GX Developer (See Section 11.2.1.)
(a) Clicking on the COM.ERR off button turns the [COM.ERR.] LED off.

(b) The error information in the error log area of the buffer memory is not
cleared (deleted).

(3) How to read/clear error information using the dedicated instructions


Error information can be read/cleared at arbitrary timing by using the following
dedicated instructions.

(a) Dedicated ERRRD instruction


Using this instruction, initial abnormal code information or open abnormal
code information can be read.

(b) Dedicated ERRCLR instruction


Using this instruction, it is possible to turn off [COM.ERR.]LED and clear
initial abnormal code/open abnormal code, or error log.

For the details of the dedicated instruction, see Chapter 10, "Dedicated
Instructions".

11 - 4 11 - 4
11 TROUBLESHOOTING
MELSEC-Q

11.2 How to Check an Error Through GX Developer

The status of the various settings for the Ethernet module can be checked using the
GX Developer functions.

(1) Ethernet diagnostics (See Section 11.2.1.)


The module status of an Ethernet module, parameter settings, communication
status, error log and others can be checked using the Ethernet diagnostic
function.
The following are the functions of the Ethernet diagnostics.

Ethernet Parameter status


diagnostics • Checks the stored parameters after the Received e-mail information
initial processing for the Ethernet module.
(See Section 5.2.) • Checks the information for received e-mail.
(See Section 11.3.)
Error log
• Checks the error stored in the error log area. Send e-mail information
(See Section 11.3.)
• Checks the information for sent e-mail.
(See Section 11.3.)
Status of each connection
• Checks the status of each connection after the PING test See Section 5.4
connection to the external device is established
with the open processing. (See Section 5.6.) • Checks the completion of the initial processing
with the issuance of the PING command.
Status of each protocol
• Checks the communication status of each Loop back test See Section 5.4
protocol supported by the Ethernet module.
• Checks the completion of the initial processing
for the Ethernet module in a network to which
LED status the loop back command is issued.
• Checks the on/off status of the LED on the COM.ERR off See Section 11.1.2
front of the Ethernet module. (See Section 11.1.)
• Turns off the [COM.ERR.] LED on the front
of the Ethernet module.

(2) System monitor (See Section 11.2.2.)


The module status of an Ethernet module can be checked from the system
monitor.

(a) Module's detailed information


The function version and error code can be checked.

(b) H/W information


LED on/off status, connection status and parameter status of an Ethernet
module can be checked.

(3) Buffer memory batch monitor (See Section 11.2.4.)


The buffer memory of an Ethernet module is monitored.

POINT
See Section 11.2.3 for the buffer memory that can be checked on the "Ethernet
diagnostics" screen and "System monitor" screen.

11 - 5 11 - 5
11 TROUBLESHOOTING
MELSEC-Q

11.2.1 Ethernet diagnostics

[Purpose]
The module status of an Ethernet module, parameter settings, communication status,
error log and others can be checked using the Ethernet diagnostic function of GX
Developer.

[Operating procedure]
GX Developer [Diagnostics] Ethernet diagnostics

[Ethernet diagnostics screen]

1) 2)

3)

10)
9)

4)
5) 8)
6) 7)

[Explanation of items]
No. Item Description Setting range
Specifies the target Ethernet module for monitoring.
1 Target module setting Number of cards for CC-Link IE controller network, MELSECNET/H module is not Card 1 to Card 4
included.
2 Change IP address display Switches the IP address display between decimal and hexadecimal. Decimal/hexadecimal
Selection from the various Various types of information for the Ethernet module can be monitored.
3
information monitors (See Section 11.2.3 for the buffer memory corresponding to the display contents.)
4 PING test Performs the PING test on the external device. (See Section 5.4.1, Section 5.4.2.)

5 Loop test Performs the loop back test for the network. (See Section 5.4.3.)

6 COM. ERR off Clicking this button turns the [COM.ERR.] LED off. (See Section 11.1.2.)

Clicking this button executes the Ethernet diagnostics.
7 Start monitor
The display is updated during monitoring.
Clicking this button stops the Ethernet diagnostics.
8 Stop monitor
The display is retained while monitoring is stopped.
9 Clear history Clears the log.

10 Clear information Clears various values.

11 - 6 11 - 6
11 TROUBLESHOOTING
MELSEC-Q

POINT
When accessing a programmable controller of another station with a data link
instruction during Ethernet diagnostics, it may take some time to execute the data
instruction.
Take the following actions and then execute the Ethernet diagnostics when
executing data link instructions.
For safety CPUs, however, the following methods are not available.
• Execute the COM instruction.
• Secure the communication processing security time for 2 to 3ms.
For the Basic model QCPU, High Performance model QCPU, Process CPU or
Redundant QCPU, set it by the special register SD315.
For the Universal model QCPU, set it by the service processing setting of the
PLC parameter (PLC system) of GX Developer.

11 - 7 11 - 7
11 TROUBLESHOOTING
MELSEC-Q

11.2.2 System monitor


The module status of the Ethernet module can be checked from the system monitor.

(1) Checking the module status and error codes on the detailed
module information screen for the diagnostic functions.
[Startup procedure]
GX Developer [Diagnostics] [System monitor]
Module's Detailed Information

[Displays]
• Module
The following information is displayed:
Model name : the model name of the module installed
Starting I/O No. : the starting input/output signal number of the target
module
Mounting position : the slot position where the module is mounted
Product information : Product information
The function version of the module is shown at the end of the product
information.
(Example) A "B" at the end of the product information indicates this is a
module of function version B.
• Unit access (Module access)
Displays access permissions when the watchdog timer error signal (X1F) is
turned off.
• Status of I/O Address Verify
Displays whether or not the module for which the user has set the parameters
matches the module installed.
• Remote password setting status
Displays the remote password setting status.
• Present Error
Displays the error code of the latest error occurred.
11 - 8 11 - 8
11 TROUBLESHOOTING
MELSEC-Q

• Error Display
Displays the error codes stored in the error log area (address: E5H, EEH …,
16CH) of the buffer memory.
• Error contents Disposal
Displays the error details and corrective action for the error code selected in
Error Display.

(2) Checking the LED on/off status and operation mode number on the
H/W information screen of the diagnostic functions
[Startup procedure]
GX Developer [Diagnostics] [System monitor]
Module's Detailed Information H/W Information

[Displays]
This screen displays the Ethernet module information stored in the following
areas of the buffer memory.
No. Display content Corresponding buffer memory Address
1 H/W LED information left side ( 1) Storage area for LEDs on station C8H (200)
2 H/W LED information right side Storage area for connection status 5000H (20480)
1 Network No. Local station network number/station number storage area 76H (118)
2 Group No. Local station group number storage area 77H (119)
H/W switch
3 Station No. Local station network number/station number storage area 76H (118)
information
4 Mode No. Switch status (operation mode setting) storage area CAH (202)
2
5 Communication status ( ) Communication status storage area CBH (203)

1 b15 to b5 b4 b3 b2 b1 b0 2 b15 to b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
– 1/0 1/0 – 1/0 1/0 – 1/0 – 1/0 1/0 1/0 – 1/0 1/0 –

INIT.LED 6) 5) 4) 3) 2) 1)
OPEN LED
ERR.LED 1) Communication data code 4) Send frame
COM.ERR.LED
0: Binary 0: Ethernet
1: On 1: ASCII 1: IEEE802.3
0: Off 2) Initial/Open method 5) Write enable/disable at
0: No parameter setting RUN time
1: With parameter setting 0: Disable
3)TCP existence confirmation 1: Enable
0: Ping 6) Initial timing
1: KeepAlive 0: Do not wait for OPEN
1: Always wait for OPEN

11 - 9 11 - 9
11 TROUBLESHOOTING
MELSEC-Q

11.2.3 Buffer memory that can be monitored with the GX Developer diagnostic function

The following is a list of the buffer memory addresses that can be displayed on the
"Ethernet diagnostics" screen and "System monitor" screen of GX Developer.
The display screen and display contents are mentioned for the Ethernet diagnostics
screen. See Section 11.2.2 for how to display the System monitor screen.
Address Ethernet diagnostics
Applicable buffer memory Display contents
Dec (Hex) display screen
Destination existence confirmation
Existence confirmation
(b1)
Pairing open (b7) Pairing open
32 (20H) Connection No. 1 Connection No. 1
Communication method (protocol) Status for each
Protocol
(b8) connection
Open system (b15, b14) Open system
33 to 39 Connection No. 2 to 8
Connection No. 2 to 8
(21 H to 27H) (same as connection No. 1)
105 (69H) Initial error code Initial error code
106 to 107
Local station IP address IP address
(6A H to 6B H)
108 to 110
Local station Ethernet address Ethernet address
(6C H to 6E H) Parameter status Module information
116 (74 H) Automatic open UDP port number Automatic open UDP port number
1 Network No.
118 (76 H) Local station network number/station number
Station No.
1
119 (77 H) Local station group number Group No.
120 (78 H) Local station Port No. Local station Port No.
121 to 122
Destination IP address Destination IP address
(79 H to 7A H)
123 (7B H) Connection No. 1 Destination Port No. Connection No. 1 Destination Port No.
Status of each
124 (7C H) Open error code Open error code
connection
125 (7D H) Fixed buffer sending error code Fixed buffer transfer error code
126 (7E H) Connection end code Connection end code
130 to 199 Connection No. 2 to 8
Connection No. 2 to 8
(82 H to C7 H) (same as connection No. 1)
[INIT.]LED (b0) INIT.
1 [OPEN]LED (b1) OPEN
200 (C8 H) LED on/off status LED display status
[ERR.]LED (b3) LED status ERR.
[COM.ERR.] LED (b4) COM.ERR.
1
202 (CA H) Switch status (operational mode setting) Drive mode
203 (CB H) 1 Status of setting with GX Developer — (Check on the System monitor screen.)
227 (E3 H) Number of error occurrence Number of error occurrence
229 (E5 H) Error code/end code Error code/end code
230 (E6 H) Subheader Subheader
231 (E7 H) Command code Command code
232 (E8 H) Error log block 1 Connection No. Latest Connection No.
233 (E9 H) Local station Port No. Error log Local station Port No.
234 to 235
Destination IP address Destination IP address
(EA H to EB H)
236 (EC H) Destination Port No. Destination Port No.
238 to 372
Error log block 2 to 16 (same as error log block 1) No. 2 to No. 16
(EE H to 174 H)
376 to 377
Received IP packet count Total number of receives
(178 H to 179 H)
378 to 379 Received IP packet count Total number of Sum check error
IP IP packet
(17A H to 17B H) discarded due to sum check error annulments
380 to 381
Sent IP packet total count Total number of sends
(17C H to 17D H)
408 to 409
Received ICMP packet count Total number of receives
(198 H to 199 H)
410 to 411 Received ICMP packet count Status for each Total number of Sum check error
(19A H to 19B H) discarded due to sum check error protocol annulments
412 to 413
Sent ICMP packet total count Total number of sends
(19C H to 19D H)
ICMP ICMP packet
414 to 415 Echo request total count of Total number of echo request
(19E H to 19F H) received ICMP packets receives
416 to 417 Echo reply total count of sent
Total number of echo reply sends
(1A0 H to 1A1 H) ICMP packets
418 to 419 Echo request total count of sent Total number of echo request
(1A2 H to 1A3 H) ICMP packets sends

11 - 10 11 - 10
11 TROUBLESHOOTING
MELSEC-Q

Address Decimal Ethernet diagnostics


Applicable buffer memory Display contents
(hexadecimal) display screen
420 to 421 Echo reply total count of received Total number of echo reply
ICMP ICMP packet
(1A4 H to 1A5 H) ICMP packets receives
440 to 441
Received TCP packet count Total number of receives
(1B8 H to 1B9 H)
442 to 443 Received TCP packet count Total number of Sum check error
TCP TCP packet
(1BA H to 1BB H) discarded due to sum check error annulments
444 to 445 Status of each
Sent TCP packet total count Total number of sends
(1BC H to 1BD H) protocol
472 to 473
Received UDP packet total count Total number of receives
(1D8 H to 1D9 H)
474 to 475 Received UDP packet count Total number of Sum check error
UDP UDP packet
(1DA H to 1DB H) discarded due to sum check error annulments
476 to 477
Sent UDP packet total count Total number of sends
(1DC H to 1DD H)
20480 (5000 H)
1 Open completed signal for connections No. 1 to No. 16 — (Check on the System monitor screen.)

22560 to 22639 Connection No. 9 to 16 (same as connection No. 1 status of each


Connection No. 9 to 16
(5820 H to 586F H) (address: 120 to 126 (78 H to 7E H))) connection
Number of mail remaining on the
22640 (5870 H) Number of mail remained on the server
server
Dedicated instruction normal
22641 (5871 H) Number of normal end of dedicated instructions
completion count
Dedicated instruction abnormal
22642 (5872 H) Number of error end of dedicated instructions
completion count
22643 (5873 H) Normal receiving count Number of normal receives
22644 (5874 H) Attached file receiving count Number of attached file receives
22645 (5875 H) Server inquiry count Number of sever inquires
22646 (5876 H) Server communication error count Number of server transfer errors
Received e-mail
22647 (5877 H) Receive Error log write count Number of Error log writes
information
22649 (5879 H) Error code Error code
22650 (587A H) Command code Command code
22651 to 22658
From From
(587B H to 5882 H)
Error log block 1 Latest error log
22659 to 22662
Date Receive date
(5883 H to 5886 H)
22663 to 22692
Subject Subject
(5887 H to 58A4 H)
22693 to 23352 Error log block 2 to 16
Error log 2 to 16
(58A5 H to 5B38 H) (same as error log block 1)
Dedicated instruction normal
23353 (5B39 H) Number of normal end dedicated instructions
completion count
Dedicated instruction abnormal
23354 (5B3A H) Number of error end of dedicated instructions
completion count
23355 (5B3B H) Number of mails normally completed Number of normal end mails
23356 (5B3C H) Attached file sending count Number of attached file sends
23357 (5B3D H) Sending to the server count Number of server sends
Number of mails abnormally
23358 (5B3E H) Number of error end mails
completed
23359 (5B3F H) Error log write count Sent e-mail Number of Error log writes
Send
23361 (5B41 H) Error code information Error code
23362 (5B42 H) Command code Command code
23363 to 23370
To Send To
(5B43 H to 5B4A H)
Error log block 1 Latest error log
23371 to 23374
Date Send date
(5B4B H to 5B4E H)
23375 to 23404
Subject Subject
(5B4F H to 5B6C H)
23405 to 23712 Error log block 2 to 16
Error log 2 to 16
(5B6D H to 5CA0 H) (same as error log block 1)

1 Can be monitored on the System monitor screen of GX Developer. See Section 11.2.2.

11 - 11 11 - 11
11 TROUBLESHOOTING
MELSEC-Q

11.2.4 Checking the error information by the buffer memory batch monitoring function

It is explained here how the Ethernet module errors can be checked from GX
Developer.
Error codes stored in the buffer memory of the Ethernet module can be monitored
using the "Buffer memory batch monitoring" function of GX Developer.

[Operating procedure]

(Step 1) Select [Online] – [Monitor] – [Buffer memory batch] from the GX Developer
menu bar, and start the "Buffer memory batch monitoring" screen.
(Step 2) Enter [Module start address:].
For the module start address, enter the start I/O signal of the Ethernet module
to be monitored using four digits.
(Example)
Start I/O signal: Enter "0020" when monitoring modules of X/Y0020 to
003F
(Step 3) Enter [Buffer memory start address:].
Enter the buffer memory address to be monitored, using the selected input
format (decimal/hexadecimal).
For a list of the buffer memory addresses where error codes are stored, see
Section 11.3, "Error Code List".
(Example)
When monitoring the initial abnormal code (buffer memory storage
address: 69H):
Enter "69" + "hexadecimal"
(Step 4) Click the Start Monitor button.
The contents of the buffer memory after the specified address are displayed.
(In case of the above example, the contents of 69H and succeeding
addresses are displayed.)

REMARKS
The display format can by modified as follows:
Monitor format : Bits & words/ Multiple bit points/ Multiple word points
Display : 16-bit integer/32-bit integer/real number/ASCII character
Numerical value : Decimal/hexadecimal

For details, refer to the "Operating Manual" for GX Developer.

11 - 12 11 - 12
11 TROUBLESHOOTING
MELSEC-Q

11.3 Error Code List

This section explains the error codes (abnormal codes) for the errors that may occur in
each processing when communicating data between the Ethernet module and an
external device as well as those generated by processing requests from the local
station’s QCPU.
The details of errors and error handling procedures are described.
Type of error Description Error code storage buffer memory Explanation
• Setting value error 69H: Initial error code
1 Errors occurring in initial processing
• Initial processing error (Communication status storage area)
• Setting value error 7CH: 5824H: Open error code
2 Errors occurring in open processing
• Open processing error (Communication status storage area)
7DH: 5825H: Fixed buffer sending error code
Errors occurring in fixed buffer • Designated data error Section 11.3.3
3 7EH: 5826H: Connection end code
sending to an external device • Sending error
(Communication status storage area)
Errors occurring in fixed buffer • Designated data error
7EH: 5826H: Connection end code
4 communication with an external • Communication error
(Communication status storage area)
device (exclude 3 above)
• Errors returned in fixed buffer communication (end code)
Section 11.3.1
• Errors returned in random access buffer communication (end code)
End codes when QnA compatible 3E frame or 4E
Errors returned to an external device Section 11.3.3
frame commands are used
5 when communicating with the
• Errors returned in communication using End codes when A compatible 1E frame commands
external device Section 11.3.1
the MC protocol are used
Error codes when A compatible 1E frame commands
Section 11.3.2
are used
• Designated data errors
• Errors whose source cannot be
Errors occurring while communicating
confirmed
with an external device (including the
• Errors that occurred while
6 causes shown in the description
communicating using the random
column), and whose error codes are Section 11.3.3
access buffer E5H:
stored in the error log area.
• Errors that occurred while (Error log area)
communicating using the MC protocol
Errors (response commands)
• Designated data error
occurring in communication with an
7 • Communication error,
external device using file transfer CPU module
etc.
(FTP) function manual
Error ocurring when communicating 5101H···
8 • Communication error
with the Web function (HTTP status stroage area)
Errors occurring when receiving e- • Setting data error 5870H: Receive
9
mail • Receiving error (E-mail status storage area)
• Setting data error 5B39H: Send
10 Errors occurring when sending e-mail
• Sending error (E-mail status storage area)
Section 11.3.3
Errors occurring in communication
• Designated data error Not stored
11 using data link instructions from the
• Communication error (Stored in the complete status area of the instruction)
local station’s QCPU
Errors occurring in communication
• Designated data error Not stored
12 using dedicated instructions from the
• Communication data error (Stored in the complete status area of the instruction)
local station’s QCPU

For details on the error codes returned by MX Component when communicating data using MX Component, refer to
the MX Component Programming Manual.

11 - 13 11 - 13
11 TROUBLESHOOTING
MELSEC-Q

(1) Initial error code (address: 69H)


(a) This address stores the error codes generated when the initial processing is
executed.

(b) Error codes are stored as binary values when the initial abnormal
completion signal (X1A) is on.

(c) An error code is cleared when the initial normal completion signal (X19) is
turns on, but can also be cleared by the following operations.
1) Resetting the programmable controller CPU or turning off the
programmable controller power
2) Writing "0" to the initial error code storage area with a sequence
program

(2) Open error code


(connection numbers: 1 to 8; addresses: 7CH to C1H)
(connection numbers: 9 to 16; addresses: 5824H to 5869H)
(a) These addresses store the result of the open processing for the applicable
connections.

(b) The results of the open processing are stored in binary values.
0 : Normal completion
Other than 0 : Abnormal completion (Open abnormal detection signal
(X18): ON)

(c) An error code is cleared by the following operations.


1) Reopening the connection that caused an open error
2) Resetting the programmable controller CPU or turning off the
programmable controller power

(3) Fixed buffer sending error code


(connection numbers: 1 to 8; addresses: 7DH to C2H)
(connection numbers: 9 to 16; addresses: 5825H to 586AH)
(a) These addresses store error codes generated when an error in data
sending to an external device occurs during fixed buffer communication
using the applicable connection.

(b) A sending error code is cleared when the next data sending is normally
completed.

(4) Connection end code


(connection numbers: 1 to 8; addresses: 7EH to C3H)
(connection numbers: 9 to 16; addresses: 5826H to 586BH)
(a) These addresses store end codes returned from an external device as a
response during the fixed buffer communication using the applicable
connection.

(b) Determine how to handle the end codes in the responses by arranging with
the particular external device.

11 - 14 11 - 14
11 TROUBLESHOOTING
MELSEC-Q

(5) Error log area (address: E0H to 1FFH)


This area stores the following errors.
• Errors whose source cannot be confirmed
• Errors that occurred during communications using the random access buffer
• Errors that occurred during communications using the MC protocol
(a) Number of error occurrences (address: E3H)
1) This address stores the number of errors registered in the error log
block area.
2) When errors occur more than 65536 times, the count is stopped at
FFFFH (65535).
(b) Error log write pointer (address: E4H)
1) This address stores the error log block number where the latest error
logging is registered.
0 : No error. (No registration of error log)
1 or more : Error log block number where the latest error logging is
registered
If the pointer value is "16", it means that the latest error logging is
registered in the error log block 16 area.
2) When 17 or more errors occur, the registration of error logging starts
from error log block 1 area again.
POINT
(1) An error log block area consists of sixteen error log blocks that have the same
data order.
(2) The error information is continued to be stored into the following areas even if the
count of the error occurrences is stopped and no longer stored:
• Error log write pointer storage area
• Error log block
(c) Error log block – Error code/end code (address: Starting from E5H)
1) In the error code/end code area, the error codes that indicate error
content are stored. (See Section 11.3.)
(d) Error block – Subheader (address: starting from E6H)
1) The subheader code of a faulty message is stored in bits 0 to 7 of the
corresponding area. ("0" is stored in bits 8 to 15).
2) For errors below the TCP and UDP levels, "0" is stored.
(e) Error log block – Command code (address: starting from E7H)
1) This block stores the command code of a faulty message, or each
lower byte value of request type and sub-request type of a data link
instruction.
b15 to b0 b15 to b8 b7 to b0
or
Command code Sub-request type Request type

2) "0" is stored in the following case.


• For messages not containing a command code
• For errors below the TCP and UDP levels (because their commands
are unknown)

11 - 15 11 - 15
11 TROUBLESHOOTING
MELSEC-Q

(f) Error log block – Connection No. (address: starting from E8H)
1) The faulty connection No. is stored in bits 0 to 7 of the corresponding
area. ("0" is stored in bits 8 to 15).
2) For errors below the TCP and UDP levels, "0" is stored.

(g) Error log block – Local station Port No. (address: starting from E9H)
1) This block stores the local station’s port No. when an error occurred.
2) "0" is stored for errors below the TCP and UDP levels.

(h) Error log block – Destination IP address (address: EAH and starting from
EBH)
1) This block stores the IP address of an external device when an error
occurred.
2) "0" is stored in the following cases.
• For errors below the IP level
• When an error response was performed by relaying through the
programmable controller CPU.

(i) Error log block – Destination Port No. (address: starting from ECH)
1) This block stores the external device’s port No. when an error
occurred.
2) "0" is stored for errors below the TCP and UDP levels.

(j) Status for each protocol (addresses: 178H to 1FFH)


1) This address stores the count of the occurrence for the applicable
contents of each protocol’s condition.
(The value counted by the Ethernet module.)
2) When the count value exceeds two words, the count stops at
FFFFFFFFH (4294967295).

POINT
Values stored in the buffer memory are cleared when the station in which the
Ethernet module is installed is powered on or reset. (They are not cleared during
the initial processing.)
Normally, it is not necessary to read this area; so, read it as needed during
maintenance.

11 - 16 11 - 16
11 TROUBLESHOOTING
MELSEC-Q

(6) HTTP status storage area (address: 5101H to 5177H)


(a) Error log pointer (address: 5101H)
• This address stores the error log block number where the latest error
logging is registered.
0 : No error. (No registration of error log)
1 or more : Error log block number where the latest error logging is
registered
If the pointer value is "16", it means that the latest error logging is
registered in the error log block 16 area.
• When 17 or more receiving errors occur, the registration of error logging
starts from error log block 1 area again.

POINT
The error log block area consists of 16 error log blocks that have the same data
order.

(b) Log counter (HTTP response codes 100 to 199) (address: 5102H)
Log counter (HTTP response codes 200 to 299) (address: 5103H)
Log counter (HTTP response codes 300 to 399) (address: 5104H)
Log counter (HTTP response codes 400 to 499) (address: 5105H)
Log counter (HTTP response codes 500 to 599) (address: 5106H)
The log counters store how many times the Ethernet module has sent the
HTTP response codes to the Web browser.

(c) Error log block : HTTP response code (address: starting from 5108H)
This error log block stores the HTTP response code when an error occurs.
(See Section 11.3.)

(d) Error log block : Communication counterpart IP address (address: 5109H,


510AH and up)
This error log block stores the IP address of the server when an error
occurs.

(e) Error log block : Error occurrence time (address: starting from 510BH)
This block stores the time when the error occurs in BCD code.
b15 to b8 b7 to b0
Month (01H to 12H) Lower 2-digitals of year (00H to 99H)

b15 to b8 b7 to b0
Hour (00H to 23H) Date (01H to 31H)
b15 to b8 b7 to b0
Second (00H to 59H) Minutes (00H to 59H)
b15 to b8 b7 to b0
Higher 2-digitals of year (00H to 99H) Day of the week (0 to 6)

11 - 17 11 - 17
11 TROUBLESHOOTING
MELSEC-Q

(7) E-mail status storage area (addresses: 5870H to 5FFFH)


When the storage count exceeds FFFFH times, the count starts from 0H again.

(a) E-mail status storage area for reception (addresses: 5870H to 5B38H)
1) Number of mails remaining on the server (address: 5870H)
• This area stores the number of mails remaining when the Ethernet
module inquires to the receiving mail server.
0 : No received mail in the server
1 to 15 : The number of mails remaining in the server
16 The number of mails in the server is 16 or more
2) Dedicated instruction normal completion count (address: 5871H)
• This area stores a cumulative count of how many times the
dedicated instruction (MRECV) completed normally.
0 : The MRECV instruction is not executed or no
executions have resulted in normal completion.
1 or more : Cumulative count of normal completions of the MRECV
instruction
3) Dedicated instruction abnormal completion count (address: 5872H)
• This area stores a cumulative count of how may times the dedicated
instruction (MRECV) completed abnormally.
0 : The MRECV instruction is not executed or no
executions have resulted in abnormal completion.
1 or more : Cumulative count of abnormal completions of the
MRECV instruction
4) Normal receiving count (address: 5873H)
• This address stores a cumulative count when the Ethernet module
transferred received mails to the mail buffer data area.
0 : No mail is transferred.
1 or more : The number of normal mail transfer completions
5) Attached file receiving count (address: 5874H)
• This address stores a cumulative count of how many times the
Ethernet module received mails with files attached.
0 : No receiving of mail with files attached
1 or more : The number of normal completions of mail receiving
with files attached
6) Server inquiry count (address: 5875H)
• This address stores a cumulative count of inquiries made to the
receiving mail server according to the parameter settings. (See
Chapter 2 of the User’s Manual (Application).)
0 : No inquiry is made to the server.
1 or more : Cumulative count of inquiries to the server
7) Server communication error count (address: 5876H)
• This address stores a cumulative count of communication error
occurrences that are returned when making inquiries to the receiving
mail server.
0 : No communication error between servers, or no inquiry
has been made
1 or more : Cumulative count of communication error occurrences

11 - 18 11 - 18
11 TROUBLESHOOTING
MELSEC-Q

8) Error log write count (address: 5877H)


• This address stores a cumulative count of registrations made to the
receiving error log block area.
0 : No error, or no inquiry has been made to the server.
1 or more : Cumulative count of registrations made to the error log
block area
9) Receiving error log write pointer (address: 5878H)
• This address stores the error log block number where the latest error
logging is registered.
0 : No error. (No registration of error log)
1 or more : Error log block number where the latest error logging is
registered
If the pointer value is "16", it means that the latest error logging is
registered in the error log block 16 area.
• When 17 or more receiving errors occur, the registration of error
logging starts from error log block 1 area again.

POINT
The error log block area consists of 16 error log blocks that have the same data
order.

10) Error log block – Error code (address: starting from 5879H)
• This block stores the error codes that indicate the contents of errors.
(See Section 11.3.)
11) Error log block – Command code (address: starting from 587AH)
• This block stores the system command codes for the error causing
messages.
12) Error log block – From (address: starting from 587BH)
• This block stores eight words from the beginning of the sending
source mail address of an error causing e-mail during
communication with the mail server, in ASCII code characters.
(Example)
If the sending source mail address was
"[email protected]",
"[email protected]" is stored as ASCII code characters.
13) Error log block – Date (address: starting from 5883H)
• This block stores the time and date on which the e-mail is received in
BCD code.
b15 to b8 b7 to b0

Month (01H to 12H) Lower 2-digits of year (00H to 99H)

b15 to b8 b7 to b0

Hour (00H to 23H) Date (01H to 31H)

b15 to b8 b7 to b0

Second (00H to 59H) Minute (00H to 59H)

b15 to b8 b7 to b0

Higher 2-digits of year (00 to 99) Day of the week (0 to 6)

14) Error log block – Subject (address: starting from 5887H)


• This block stores 30 words from the beginning of the Subject of the
e-mail.
• A Subject is not stored successfully if it contains characters other
than alphanumeric and ASCII code.

11 - 19 11 - 19
11 TROUBLESHOOTING
MELSEC-Q

(b) E-mail status storage area for sending (addresses: 5B39H to 5CA0H)
1) Dedicated instruction normal completion count (address: 5B39H)
• This area stores a cumulative count of how many times the
dedicated instruction (MSEND) completed normally.
0 : The MSEND instruction is not executed or no
executions have resulted in normal completion.
1 or more : Cumulative count of normal completions of the MSEND
instruction
2) Dedicated instruction abnormal completion count (address: 5B3AH)
• This area stores a cumulative count of how many times the
dedicated instruction (MSEND) completed abnormally.
0 : The MSEND instruction is not executed or no
executions have resulted in abnormal completion.
1 or more : Cumulative count of abnormal completions of the
MSEND instruction
3) Number of mails normally completed (address: 5B3BH)
• This address stores a cumulative count of how many times the
Ethernet module transferred send mails to the Send mail server.
0 : No mail is sent.
1 or more : The number of normal completions of mail sending
4) Attached file sending count (address: 5B3CH)
• This address stores a cumulative count of how many times the
Ethernet module sent mails with files attached.
0 : No sending of mail with files attached.
1 or more : The number of normal completions of mail sending with
files attached
5) Sending to the server count (address: 5B3DH)
• This address stores a cumulative count of sending to the send mail
server.
0 : No mail is sent to the server.
1 or more : Cumulative count of sending to the server
6) Number of mails abnormally completed (address: 5B3EH)
• This address stores a cumulative count of communication error
occurrences that are returned when requesting sending to the
transmitting mail server.
0 : No communication error between servers, or no
transmission has been made
1 or more : Cumulative count of communication error occurrences
7) Error log write count (address: 5B3FH)
• This address stores a cumulative count of registrations made to the
sending error log block area.
0 : No error, or no inquiry has been made to the server.
1 or more : Cumulative count of registrations made to the error log
block area

11 - 20 11 - 20
11 TROUBLESHOOTING
MELSEC-Q

8) Sending error log write pointer (address: 5B40H)


• This address stores the error log block area number where the latest
sending error logging is registered.
0 : No error. (No registration of sending error log)
1 or more : Error log block number where the latest sending error
logging is registered
If the pointer value is "8", it means that the latest error logging is
registered in the sending error log block 8 area.
• When 9 or more sending errors occur, the registration of sending
error logging starts from sending error log block 1 area again.

POINT
The sending error log block area consists of eight error log blocks that have the
same order of data items.

9) Error log block – Error code (address: starting from 5B41H)


• This block stores the error codes that indicate the contents of errors.
(See Section 11.3.)
10) Error log block – Command code (address: starting from 5B42H)
• This block stores the system command codes for the error causing
messages.
11) Error log block – To (address: starting from 5B43H)
• This block stores eight words from the beginning of the sending
source mail address of an error causing e-mail during
communication with the mail server, in ASCII code characters.
(Example)
If the sending source mail address was
"[email protected]",
"[email protected]" is stored as ASCII code characters.
12) Error log block – Date (address: starting from 5B4BH)
• This block stores the time and date on which the e-mail is sent in
BCD code.
• The order of date and time to be stored is the same as for the date
and time of e-mail reception shown in (a) 13).
13) Error log block – Subject (address: starting from 5B4FH)
• This block stores 15 words from the beginning of the Subject of the
e-mail.

11 - 21 11 - 21
11 TROUBLESHOOTING
MELSEC-Q

11.3.1 End codes (Complete codes) returned to an external device during data
communication

This section explains the end codes (complete codes) that are added to responses
when communicating using the fixed buffer, the random access buffer or the MC
protocol.
For more details on the error codes that are added to responses during communication
using A compatible 1E frames through the MC protocol, see Section 11.3.2.
For more details on the end codes (error codes) that are stored in the buffer memory of
the Ethernet module, see Section 11.3.3.
Communication function
End code Description Processing
Fixed Random MC
00H • Normal completion
• Designation of device range of devices to be read/written from/to is • Check and correct the designated head
02H
incorrect. device and number of points.
• Codes for command/response type of subheader are not within the
specifications.
Command/ • Check and correct command/response
Communication processing
response type type set by an external device.
Communication using fixed buffer 60H (The Ethernet module automatically
50H Communication using random access buffer 61H, 62H adds command/response type; the
Communication using the MC protocol 00H to 3CH user does not need to set these.)
Refer to REMARKS in Section 11.3.3.
• In communication using the fixed buffer, if the data length setting is
• Check and correct the data length.
less than the actual data count, the remaining data is determined
as the second data and processed. In this case, a subheader
undefined command type error may occur.
• In communication using the random access buffer, the head
• Check and correct the designated head
51H address designated by an external device is set outside the range
address.
from 0 to 6143.
• In communication using the random access buffer, head address +
data word count (depending on the setting when reading)
designated by an external device exceeds the range from 0 to • Check and correct the head address
6143. and data word count
52H
• Data for the designated word count (text) cannot be sent in one • Correct the number of points
frame. read/written.
(The value of the data length and amount of text communicated are
not in the allowable range.)
• When “ASCII code communication” is selected in [Operational
settings] – [Communication data code] with GX Developer, ASCII • Check and correct the send data of the
54H
code data that cannot be converted to binary code was received external device.
from an external device.
• When [Operational setting] – [Enable Write at RUN time] is set to • Write data by setting [Enable Write at
disable (no check mark) with GX Developer, an external device RUN time] to enable (with check
requests to write data while the programmable controller CPU is in mark). However, writing a parameter,
the RUN status. sequence program, or microcomputer
55H • An external device requests writing a parameter, sequence program is not allowed while the CPU
program or microcomputer program while the programmable is in the RUN status.
controller CPU is in the RUN status. • Write such data by placing the
(Not related to the settings in [Operational settings] – [Enable Write programmable controller CPU in the
at RUN time with GX Developer]) STOP status.

Fixed : Fixed buffer communication Random : Random access buffer communication MC : Communication using the MC protocol

11 - 22 11 - 22
11 TROUBLESHOOTING
MELSEC-Q

Communication function
End code Description Processing
Fixed Random MC
56H • Device designation from an external side is incorrect. • Correct the device designated.
• The number of points for a command designated by an external
device exceeds the maximum number of processing points
(number of processing that can be executed per communication) • Correct the designated points or the
for each processing. head address (device number and
• Addresses from the head address (head device number and head step number).
step number) to the designated points exceed the maximum
addresses (device number and step number).
• Byte length of a command does not conform to the specifications.
• Check the data length of the command
• When writing data, the set number of data points written is different
57H and redo the data setting.
from the value of the designated number.
• Monitoring was requested even though monitor data is not
• Register the monitor data.
registered.
• Addresses after the last address
• When reading/writing in a microcomputer program, an address after
cannot be read/written from/to.
the end of parameter setting range is designated.
Correct the address designated.
• In the block number designation of the extension file register, a
block number exceeding the range of corresponding memory • Correct the block number.
cassette size is designated.
• A head address (head device number and head step number) of a
command designated by an external device is set outside the
• Designate the appropriate values
range that can be designated.
within the range that are allowed for
• When reading from/writing to a microcomputer program or file
each processing.
register (R), values exceeding the programmable controller CPU’s
parameter setting range was designated.
58H • A block number designated for an extension file register does not
• Correct the block number.
exist.
• Cannot designate a file register (R). • Check the device.
• A word device is designated for a command for bit devices.
• Correct the command or the
• The head number of bit devices is designated by a value other than
designated device.
a multiple of 16 in a command for word devices.
59H • Cannot designate an extension file register. • Check the device.
• The programmable controller CPU and the Ethernet module cannot
• Fix the faulty parts by referring to the
communicate.
5BH abnormal codes appended to the end
• The programmable controller CPU cannot process requests from
codes (see Section 11.3.2).
an external device.
• Communication time between the Ethernet module and the
• Increase the CPU monitoring timer
60H programmable controller CPU exceeded CPU monitoring timer
value.
value.
• Perform fixed buffer communication
after unlocking the remote password
• In fixed buffer communication, the remote password status of the using the MC protocol.
63H
port for the destination Ethernet module is in the lock status. • Do not set the port for fixed buffer
communication as a target for the
remote password check.
A0H
• The content of the error and the error handling for each end code are the same as for the error codes from A0H to FFFFH that are stored in the
to
buffer memory. Take a necessary action by referring to the description of the applicable error code shown in Section 11.3.3.
FFFFH

11 - 23 11 - 23
11 TROUBLESHOOTING
MELSEC-Q

REMARKS
If an error code related to communication using the random access buffer or MC
protocol is detected during communication using the fixed buffer, it may be caused
by the following.

Cause Action
The "Data length" value specified in the Specify the actual text data size for "Data
application data section of the message sent length" in the application data section.For
to the Ethernet module does not match the details, refer to REMARK in "11.3.3 Error
actual text data size. codes stored in the buffer memory".
For the "Subheader" to be specified in the
The "Subheader" of the message sent to the
application data section, refer to "7.4.2
Ethernet module is incorrect.
Application data".

11 - 24 11 - 24
11 TROUBLESHOOTING
MELSEC-Q

11.3.2 Abnormal codes returned during communication using A compatible 1E frames

This section explains the abnormal codes (error codes) that are added to responses
when communicating using the MC protocol and A compatible 1E frames. (An
abnormal code is added only when an end code is "5B".)
For more details on the end codes (error codes) that re added to responses, see
Section 11.3.1.
For more details on the end codes (error codes) that are stored in the buffer memory of
the Ethernet module, see Section 11.3.3.
Response format Subheader End code Abnormal code 00H

When an abnormal code is stored, the end code is "5BH".

Error code
Error Description of error Corrective action
(hexadecimal)
PC number error A station with the specified PC number does not exist.
(1) Change the PC number to "FF" of the local
(programmable (1) The PC number designated with a command is neither "FF" of the
10H station or a station number set in the link
controller number local station nor any of the station numbers designated with the
parameter, and communicate again.
error) MELSECNET link parameters.
Poor communication between the Ethernet module and the
programmable controller CPU
(1) Communicate again. If an error occurs again,
(1) After the Ethernet module receives a request successfully from an
11H Mode error check noise, etc. and replace the Ethernet
external device, the Ethernet module and the programmable
module, then communicate again.
controller CPU could not communicate for some reason (noise,
etc.).
Intelligent function module error
(1) The intelligent function module with the buffer memory that can be (1) Change the data content designated in the
Intelligent function
communicated with, does not exist at the location designated by control procedure or change the installation
12H module designation
the intelligent function module number. (For example, the location of the intelligent function module, and
error
corresponding place is for an input/output module or an empty communicate again.
slot.)
(1) Check whether or not other module has
Remote RUN/STOP not accessible.
executed remote STOP/PAUSE. If one of
18H Remote error Another module (other Ethernet module, etc.) has already executed
these commands has been executed, cancel it
remote STOP/PAUSE.
and communicate again.
(1) Review the specified device.
1FH Device error Invalid device specification
(2) Does not access any non-existent device.
Check whether or not the programmable controller
The CPU module of the request destination is disconnected from the CPU with the station number set as PC number is
20H Link error
data link. disconnected. Remove the cause of disconnection
and connect again.
One of the following hardware is faulty: the
Cannot access the memory of the intelligent function module.
Intelligent function programmable controller CPU, base unit,
21H (1) The control bus to the intelligent function module is faulty.
module bus error intelligent function module, or Ethernet module.
(2) The intelligent function module is faulty.
Please consult your nearest dealer.

11 - 25 11 - 25
11 TROUBLESHOOTING
MELSEC-Q

REMARKS
If an error code related to communication using the random access buffer or MC
protocol is detected during communication using the fixed buffer, it may be caused
by the following.

Cause Action
The "Data length" value specified in the Specify the actual text data size for "Data
application data section of the message sent length" in the application data section.For
to the Ethernet module does not match the details, refer to REMARK in "11.3.3 Error
actual text data size. codes stored in the buffer memory".
For the "Subheader" to be specified in the
The "Subheader" of the message sent to the
application data section, refer to "7.4.2
Ethernet module is incorrect.
Application data".

11 - 26 11 - 26
11 TROUBLESHOOTING
MELSEC-Q

11.3.3 Error codes stored in the buffer memory

When an error occurs at each data communication processing between the Ethernet
module and an external device, the error code (abnormal code) is stored in the buffer
memory of the Ethernet module. This section explains the contents of this type of
errors and error handling procedures.
The "Storage destination" column in the error code list indicates the buffer memory
where the applicable error code is stored.
The names used for the explanation indicated in the "Storage destination" column
correspond to the buffer memory error code storage areas shown in the table below.
(Error codes whose storage destination is not written are returned to the external
device.)
Note that the buffer memory may store error codes of the messages returned from the
external device. For error codes not shown in this manual, refer to the manual of the
external device and check the returned messages.
Name used for explanation Buffer memory Buffer memory address
Initial Initial abnormal code area 69H (105)
Open Open abnormal code area 7CH (124)…
Fixed sending Fixed buffer sending abnormal code area 7DH (125)…
Connection Connection end code/error log area 7EH (126)…
Error code Error code/end code area E5H (229)…
Data link ((S1) + 1 for data link instructions) —
HTTP log HTTP response code area 5108 H (20744)
E-mail log E-mail error log area 5879H (22649)…
Dedicated instruction (Complete status area for dedicated instructions) —

Storage destination
Open

sending

Error code
Connection

HTTP log

E-mail log

instruction
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


02H
0050H
0051H
0052H The content of these errors and the error handling for each error code is the
0054H same as the end codes (02H to 0063H) returned to the external device.
0055H Check the explanation of the applicable code shown in Section 11.3.1, and
0056H take actions accordingly.
0057H
0058H
0059H
Read and handle the error code
005BH
and end code area.
0060H
0063H
Requests that cannot be • Review the content of request.
00A0H designated for applicable • Correct the open settings.
connection. (See Section 5.5)
Contents of request cannot be • Review and correct the length of the text
analyzed because the length of area or the request data length of the Qn
00A1H
text area or request data length is header, and send to the Ethernet module
too short. again.
Requests that cannot be • Correct the content of request and
00A2H
processed. command.
• Handle by referring to the troubleshooting
3E8H
(Errors detected by the section of the CPU User’s Manual
to
programmable controller CPU) (Hardware Design, Maintenance and
4FFFH
Inspection).

11 - 27 11 - 27
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

E--mail log
Connection

HTTP log

instruction
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


7000H • Take corrective action, referring to the
(Errors detected by serial
to Serial Communication Module User's
communication module, etc.)
7FFFH Manual, etc.
B000H • Take corrective action, referring to the
(Errors detected by CC-Link
to CC-Link System Master/Local Module
module)
BFFFH User's Manual.
• At initial processing, the IP
address setting value of the
• Correct the IP address.
Ethernet module is incorrect.
C001H Set the class to A/B/C.
• When using the router relay
• Correct the sub-net mask.
function, the setting value of the
sub-net mask field is incorrect.
At initial setting, some of the
• Review and correct the necessary timer
C002H various timer setting values are
values at initial processing.
outside the allowable range.
At initial setting, the setting value
of the automatic open UDP port • Correct the automatic open UDP port
C003H
number is outside the allowable number.
range.
The setting value of the sub-net • Correct the sub-net mask and execute the
C004H
mask field is incorrect. initial processing again.
• The setting value of the default
router IP address for the router
relay function is incorrect. • Correct the default router IP address and
• Network address (network execute the initial processing again.
C005H address after sub-net mask) of • Set the network address to the same
the default router IP address is network address as the local station’s
different from the network Ethernet module IP address.
address of the local station’s
Ethernet module IP address.
The setting value of the sub-net
• Correct the sub-net address and execute
C006H address for the router relay
the initial processing again.
function is incorrect.
• The setting value of the router
IP address for the router relay
function is incorrect. • Correct the router IP address and execute
• Network address (network the initial processing again.
C007H address after sub-net mask) of • Set the network address to the same
router IP address is different network ID as the local station’s Ethernet
from the network address of the module IP address.
local station’s Ethernet module
IP address.
At open processing, the setting
C010H value of the Ethernet module port • Correct the port number.
number is incorrect.
At open processing, the setting
C011H value of an external device’s port • Correct the port number.
number is incorrect.
The port number set is used in a
• Review and correct the port numbers of
C012H connection already opened by
the Ethernet module and external device.
TCP/IP.
The port number used in a
• Review and correct the port number of
C013H connection already opened is set
the Ethernet module.
in UDP/IP open processing.
Initial processing and open
• Execute the initial processing and open
C014H processing of the Ethernet
processing.
module is not completed.

11 - 28 11 - 28
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code
Connection

HTTP log

E-mail log

instruction
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


At open processing, the setting
• Correct the IP address.
C015H value of an external device’s IP
Set the class to A/B/C.
address is incorrect.
The pairing open processing of
• Check that the open processing of both of
the connection (or the next
the target connections for pairing open is
C016H connection) designated for pairing
not executed.
open has already been
• Review the combination for pairing open.
completed.
• Check the operation of the external
device.
• Check the open processing of the
external device.
• Correct the open settings of the
A connection could not be communication parameters.
C017H established during the open • Review the Ethernet module’s port
processing of a TCP connection. number and the IP address/port number
and open system of the external device.
• Check that the connection cable is not
dislocated.
• Check that connections to the transceiver
and terminator are not faulty.
The setting value of an external
device’s IP address is incorrect.
When TCP is used,
C018H • Correct the IP address.
FFFFFFFFH
cannot be set as an IP
address.
• Correct the data length.
Data length exceeds the
C020H • If the data transmitted is larger than the
allowable range.
allowable size, divide and then send it.
An abnormal end response was • Read the end code of the response from
C021H received after a transmission the connection end code/error log area,
using fixed buffers. and handle as needed.
• A response could not be • Check the operation of the external
received within the response device.
monitoring timer value. • Review and correct the response
C022H
• The applicable connection was monitoring timer value.
closed during waiting for a • Check the open status of the applicable
response. connection.
• The open processing for the
applicable connection is not
• Execute the open processing of the
C023H completed.
applicable connection.
• The applicable connection is
closed.
• Check the operation of the transceiver
and external device.
Use a transceiver that allows the SQE
C030H A sending error occurred. test.
• Send after an arbitrarily selected time has
elapsed because packets may be
congested on the line.
• Check that the connection cable is not
dislocated.
• Check that connections to the transceiver
C031H A sending error occurred. and terminator are not faulty.
• Conduct a self-diagnosis test to see
whether or not the Ethernet module is
faulty.

11 - 29 11 - 29
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Check the operation of the external
device.
• Correct the TCP ULP timeout value and
execute the initial processing again.
A TCP ULP timeout error occurred
• Send after an arbitrarily selected time has
in the TCP/IP communication.
C032H elapsed because packets may be
(An external device does not return
congested on the line.
ACK.)
• Check that the connection cable is not
dislocated.
• Check that connections to the transceiver
and terminator are not faulty.
• Review and correct the external device’s
IP address and the Ethernet address.
• If the external device has the ARP
function, set the default value. If not, set
the Ethernet address of the external
device.
• Check the operation of the external
An external device side with the set
C033H device.
IP address does not exist.
• Send after an arbitrarily selected time has
elapsed because packets may be
congested on the line.
• Check that the connection cable is not
dislocated.
• Check that connections to the transceiver
and terminator are not faulty.
• Check the operation of the external
device.
The existence of an external • Review and correct each setting value for
device could not be confirmed the existence confirmation.
C035H
within the response monitoring • Check that the connection cable is not
timer value. dislocated.
• Check that connections to the transceiver
and terminator are not faulty.
• Check that the connection cable is not
dislocated.
• Check that connections to the transceiver
Send processing cannot be
and terminator are not faulty.
C036H executed because a cable is not
• Conduct a loopback test to see that the
yet connected or disconnected.
line is not faulty.
• Conduct a self-diagnosis test to see that
the Ethernet module is not faulty.
• Not all the data could be
received within the response • Review and correct the data length of the
monitoring timer value. communication data.
• Sufficient data for the data length • Review and correct each setting value at
C040H could not be received. the initial processing because the
• The remaining part of a message packets may be congested on the line.
divided at the TCP/IP level could • Send the same data from the external
not be received within the device again.
response monitoring timer value.
When TCP is used, the checksum
C041H • Review the checksum on the external
of the receive data is incorrect.
device side and send the correct value.
When UDP is used, the checksum
C042H • Investigate the conditions of the line
of the receive data is incorrect.
(noise, distance between the line and
The checksum in header of IP
C043H power line, contact of each device, etc.)
packet received is incorrect.

11 - 30 11 - 30
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

instruction
Open

sending

Error code
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H 5108H 5879H


• Check the operation of the external
device.
C044H
An error packet of ICMP was • Check that the connection cable is not
to
received. dislocated.
C048H
• Check that connections to the transceiver
and terminator are not faulty.
• Check the operation of the external device.
• Send after an arbitrarily selected time has
An error packet of ICMP was
C049H elapsed because packets may be
received.
congested on the line.
• Check that the connection cable is not
dislocated.
An error packet of ICMP was
• Check that connections to the transceiver
received.
C04AH and terminator are not faulty.
(An IP assembly timeout error
• Correct the IP assembly timer value of the
occurred in an external device.)
external device existence timer timeout.
• Check the operation of the external
device.
• Send after an arbitrarily selected time has
An IP assembly timeout error elapsed because packets may be
occurred. congested on the line.
C04BH (The remaining part of divided data • Check that the connection cable is not
could not be received and a dislocated.
timeout occurred.) • Check that connections to the transceiver
and terminator are not faulty.
• Correct the IP assembly timer value and
execute the initial processing again.
Cannot send because there is no
• Send the same data again and check that
C04CH space in the internal buffer, e.g.
the response is received.
the IP header buffer.
• In a message the Ethernet
module received through
automatic open UDP port
communication or non • Review the data length.
procedure fixed buffer • Review the text size length so that the text
C04DH
communication, the data length data becomes less than the receive
designated in the application buffer memory size.
data field is incorrect.
• Not all the receive data can be
stored.
ASCII code data that cannot be
• Select binary code communication in the
converted to binary code is
operational settings, and restart the
received when ASCII code
C050H Ethernet module.
communication is set in the
• Correct the data sent from the external
operational settings of the Ethernet
side and send again.
module.
C051H
The number of read/write points is • Correct the number of read/write points
to
outside the allowable range. and send to the Ethernet module again.
C054H
The number of file data read/write • Correct the number of read/write points
C055H points is outside the allowable (or byte points) and send to the Ethernet
range. module again.
• Correct the head address or the number
• Read/write request exceeds the of read/write points and send to the
C056H maximum address. Ethernet module again.
• Address is 0. (The maximum address must not be
exceeded.)

11 - 31 11 - 31
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Review and correct the content of the text
Request data length does not
area or the request data length of Qn
C057H match with data count in character
header, and send to the Ethernet module
area (part of text).
again.
Request data length after ASCII- • Review and correct the content of the text
binary conversion does not match area or the request data length of Qn
C058H
with data count in character area header, and send to the Ethernet module
(part of text). again.
Incorrect designation of command
C059H • Review the content of the request.
and subcommand.
C05AH The Ethernet module cannot read
from/write to the designated • Examine the device to be read/written.
C05BH
device.
The content of a request is
• Correct the content of the request and
incorrect.
C05CH send to the Ethernet module again.
(Requesting read/write in bit units
(Correction of subcommand, etc.)
to word devices.)
Monitor registration is not • Monitor after performing monitor
C05DH
performed. registration.
• Increase the CPU monitoring timer value.
• Check whether or not the programmable
controller CPU operates normally.
• Correct the network number and PC
Communication time between the
number.
Ethernet module and
• Review the setting value of the routing
C05EH programmable controller CPU
parameter when the communication
exceeded the CPU monitoring
destination is a station of the other
timer.
network No.
• Check that network No. is not duplicated
when the communication destination is a
station of the other network No.
• Correct the network number and PC
The request could not be executed
number.
C05FH on the target programmable
• Correct the content of the read/write
controller.
request.
The content of a request is
• Correct the content of the request and
incorrect.
C060H send to the Ethernet module again.
(Incorrect data was designated for
(Correction of data, etc.)
bit devices, etc.)
• Review and correct the content of the text
Request data length does not
area or the request data length of the Qn
C061H match with the number of data in
header, and send it to the Ethernet
character area (part of text).
module again.
When online correction was • When performing write operation to the
inhibited, write operation via MC remote I/O station via the MC protocol
C062H protocol (QnA-compatible 3E frame (QnA-compatible 3E frame or 4E frame),
or 4E frame) was performed for the "enable" the online correction setting of
remote I/O station. the operation setting.
• Read/write without designating extension.
Device memory extension can be
Extension of device memory designated only for stations with
C070H cannot be designated for the target Ethernet modules installed and
station. Q/QnACPUs that connect via the CC-
Link IE controller network,
MELSECNET/H, MELSECNET/10.
Too many devices points to • Correct the number of device points to
C071H read/write for other than the read/write and send it to the Ethernet
Q/QnACPU. module again.

11 - 32 11 - 32
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Check whether the content can be
requested to the target programmable
The content of a request is incorrect.
controller CPU.
C072H (Requested read/write in bit units to
• Correct the content of the request and
word devices.)
send it to the Ethernet module again.
(Correction of subcommand, etc.)
Request was not supported by the
Ethernet module of the target
programmable controller CPU.
C073H • Review the content of the request.
(Double word address points was
designated for other than
Q/QnACPU, etc.)
• Correct the network number and PC
Request could not be executed on number.
C074H
the target programmable controller. • Correct the content of the read/write
request.
The IP address of an external device • Set the Station No. <-> IP information for
could not be obtained during CC- the Ethernet module.
Link IE controller network, • Change the parameter conversion
C080H
MELSECNET/H, MELSECNET/10 method for the CC-Link IE controller
relay communication or data link network, MELSECNET/H,
instruction communication. MELSECNET/10.
The end processing for the Ethernet
• Execute the end processing of the
module has been completed and
C081H Ethernet module after all communication
data link instruction communication
is over.
cannot be checked.
Communication processing was
abnormally completed in following • Check that the relay station/external
communication. station operates normally.
• Communication with GX (If communication is continuing, it is not
C082H
Developer (UDP/IP) necessary to take actions for the error.)
• CC-Link IE controller network, • Check whether or not the cable
MELSECNET/H, connection between the local station and
MELSECNET/10 relay. external station is faulty.
Communication processing was • If some load is applied to the line, reduce
C083H abnormally completed in data link the load.
instruction communication.
• Check that the local station/relay station
and external station operate normally.
Communication processing was
• Check whether or not the cable
C084H abnormally completed in data link
connection between the local station and
instruction communication
external station is faulty.
• Increase TCP resend timer value.
The local station’s channel
designated by another station in • Execute the request from the other
C085H
data link instruction communication station again.
is currently in use.
A message exceeding the receive • Correct the send message size from the
C086H
message size was received. requesting source.
There is an error in the IP address
• In the Station No. <-> IP information
for the Station No. <-> IP information
setting, set the IP address of the target
setting for CC-Link IE controller
C087H device for CC-Link IE controller network,
network, MELSECNET/H,
MELSECNET/H, MELSECNET/10 relay
MELSECNET/10 relay
communication.
communication.

11 - 33 11 - 33
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Provide sufficient time between request
Insufficient free space in receive
intervals
buffer of the relay station for
• Reduce the number of request nodes.
MELSOFT connection or data link
C0B2H • Wait for a response to the request and
instruction, or the communication
issue the next request after receiving the
requested station. (Receive buffer
response.
full error)
• Review the time-out value.
A request that could not be • Review the content of the request.
C0B3H processed from the programmable • Correct the network number and PC
controller CPU was made. number.
Data that could not be processed by
the programmable controller • Review the content of the request.
C0B5H
CPU/Ethernet module was • Cancel the current request.
designated.
A channel number is outside the • Designate the channel number in the
C0B6H
allowable range. range from 1 to 8.
• Change the channel number.
A channel number currently in use
C0B7H • Execute after the current communication
was designated.
is completed.
Network number and PC number • Correct the network number and PC
are outside the allowable range. number.
C0B8H
A response from the programmable • Check the operation of the programmable
controller CPU is faulty. controller CPU.
• Execute the open processing.
• Check the operation of the external
The open processing of the TCP
device.
C0B9H connection is has not been
• After a close request (FIN) is sent to the
completed.
Ethernet module, allow 500ms or more
before redoing open processing.
Cannot acknowledge sending
request since the close processing • Execute the open processing and make a
C0BAH
is being executed via the CLOSE sending request.
instruction.
System error
C0BBH ( 1)
• The OS detected any error.
Designated communication line is • Open the communication line.
C0BCH
closed. • Review the target connection number.
• Check whether or not requests are made
Cannot send by acknowledging
C0BDH continuously without waiting for
continuous requests.
responses.
C0BEH System error
( 1)
C0BFH • The OS detected any error.
The open processing of the • Execute the open processing.
C0C0H UDP connection has not been • Check the operation of the external
completed. device.
• Check whether or not sending requests
The transmission interval of UDP is
C0C1H are repeated.
too short.
• Make the sending interval longer.
C0C2H System error
( 1)
C0C3H • The OS detected any error.
The UINI instruction has been • Close all connections before executing
C0C4H
executed during communication. the UINI instruction.

11 - 34 11 - 34
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Execute the initial processing by setting
that the router relay function should be
• A sending request was made to
used.
an external device whose
• Set the correct data for the router relay
class/network address are
parameter.
different from those of the local
C0C5 H • Correct the IP address of the external
station when the router relay
device and execute the open processing.
function is not used.
• Check that the network address is
• The setting of the router relay
correct.
parameter is incorrect.
When it is changed, execute the initial
processing again.
System error
C0C6H ( 1)
• The OS detected any error.
• Execute the initial processing again.
An Ethernet module system error
C0C7H • Execute the processing by referring
occurred.
Section 11.4 POINT (3).
C0C8H
System error
to ( 1)
• The OS detected any error.
C0CAH
Another sending request was made
• Make the next sending request after the
C0CBH when the sending processing has
previous sending is completed.
not been completed.
C0CCH System error
( 1)
C0CFH • The OS detected any error.
Incorrect data length was • Review the designated value of the data
C0D0H
designated. length.
Incorrect resent count was • Review the designation of the resent
C0D1H
designated. count.
Incorrect watchdog time was • Review the designated value of the
C0D2H
designated. watchdog timer.
• Check the designated value of the
C0D3H The number of relay stations in CC-
destination.
Link IE controller network,
• Review the Station No. <-> IP information
MELSECNET/H, MELSECNET/10
C0D4H between the local station and destination.
exceeded the allowable count.
• Review the system specifications.
Incorrect retry count was
C0D5H • Review the retry count.
designated.
• Review the content of the destination
The designations of network number designation.
C0D6H
or station number were incorrect. • Review the designated values of the
destination.
• Set the parameters on GX Developer,
and write them to the CPU module
before communication with the external
Data were sent without the initial
C0D7H device.
processing completed.
• Start communication with the external
device after completing the initial
processing.
The number of blocks exceeded the • Correct the designation value for the
C0D8H
range. number of blocks.
Incorrect subcommand value was • Correct the designated value for the
C0D9H
designated. subcommand.
• Review the IP address/host name of the
Ethernet module for the PING test.
A response to the PING test could
• Change the status of the Ethernet module
C0DAH not be received within the time of the
for the PING to allow communication (to
communication time check.
the status after the initial processing is
completed).

11 - 35 11 - 35
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


There is an error in the IP
• Review the IP address/host name of the
C0DBH address/host name of the Ethernet
Ethernet module for the PING test.
module for the PING test.
C0DCH System error
( 1)
C0DDH • The OS detected any error.
• Review the designated value of the
watchdog timer.
Data could not be received within • Review the designated value of the
C0DEH
the designated watchdog time. channel number.
• Check the status of the sending source
station and relay station.
System error
C0DFH ( 1)
• The OS detected any error.
• Check if the programmable controller
CPU and intelligent function modules are
correctly mounted to the base or not.
• Check that the programmable controller
CPU does not remain in the reset status.
C0E0H • Check that no error has occurred in the
An error was detected in the
to programmable controller CPU. If an error
programmable controller CPU.
C0EFH is found, take corrective actions
according to error description of the
programmable controller CPU.
• Replace the power supply module,
programmable controller CPU and/or
intelligent function module.
• Conduct a hardware test again. If an
An Ethernet module RAM abnormality is detected again, the
C0F0H abnormality was detected in the Ethernet module hardware may be faulty.
hardware test. Consult your nearest branch office or
dealer with the details of the errors.
• Conduct a hardware test again. If an
An Ethernet module ROM abnormality is detected again, the
C0F1H abnormality was detected in the Ethernet module hardware may be faulty.
hardware test. Consult your nearest branch office or
dealer with the details of the errors.
A module system error (serious • Correct the causes of error in the local
C0F3H
abnormality) was detected in the CPU. station CPU.
C0F4H
System error
to ( 1)
• The OS detected any error.
C0F6H
• Send after an arbitrarily selected time has
elapsed because packets may be
congested on the line.
• Check that the connection cable is not
dislocated.
An error occurs in the self refrain
C0F7 H • Check that connections to the transceiver
test
and terminator are not faulty.
• When other than above, the Ethernet
module hardware may be faulty.
Consult your nearest dealer with the
details of the errors.
System error
C100H ( 1)
• The OS detected any error.

11 - 36 11 - 36
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

instruction
Open

sending

Error code
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Check the address of the DNS server.
• Check whether or not it is possible to
communicate with the DNS server using
A response could not be received the Ping command.
C101H
from the DNS client. • Check that the IP addresses of the local
station and DNS server are in the same
class. (If the class is different, check the
router setting.)
• Check that the SMTP server name is
registered in DNS.
• Delete the SMTP server name, change to
A response from the SMTP layer the IP address setting, and check the
C102H
could not be received. operation.
• Check whether or not it is possible to
communicate with the SMTP server
using the Ping command.
• Check the DNS mail address.
C103H DNS settings incorrect.
• Check the content of the DNS setting.
C104H
to System error
( 1)
C106H • The OS detected any error.
C110H
• Check cable, hub, etc.
A response could not be received • Check whether or not it is possible to
C111H
from the DNS client. communicate with the DNS server using
the Ping command.
• Check that the POP3 server name is
registered in DNS.
• Delete the POP3 server name, change to
A response from the POP3 layer the IP address setting, and check the
C112H
could not be received. operation.
• Check whether or not it is possible to
communicate with the POP3 server using
the Ping command.
• Designate an attached file on the sending
side.
• Check the program on the sending side.
• When the sending source is the mail
server, sending with the previous
An e-mail was received that did not MSEND instruction failed.
have an attached file. Check the destination of the MSEND
C113H
(It will generate when the attached instruction, etc.
file is not read normally.) • Check that the sending side has the
same e-mail specifications as the
Ethernet module. (encode/decode, file
format, etc.)
• A server with unknown destination was
received from the SMTP server.
• Check on the sending side whether the
extension of the attached file is “bin” or
"asc".
• Check whether or not the mail is
An e-mail was received whose
C114H compressed or encrypted.
attached file name was invalid.
• Check the destination of the MSEND
instruction, etc.
• A server with unknown destination was
received from the SMTP server.
C115H
System error
to ( 1)
• The OS detected any error.
C118H

11 - 37 11 - 37
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code
Connection

HTTP log

E-mail log

instruction
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Check that the sending side has the same
e-mail specifications as the Ethernet
module. (encode/decode, file format, etc.)
C119H There is no received mail. • Check the mail information storage area
of the buffer memory (address: 2682H),
then read any received mail that is in the
server.
• Check whether or not the mail is
compressed or encrypted.
• Check that the sending side has the
Failed to convert an e-mail to be same e-mail specifications as the
C11AH
received. Ethernet module. (encode/decode, file
format, etc.)
• Check whether or not the file was divided
on the sending side.
• A server with unknown destination was
received from the SMTP server.
(Received mail is stored in the mail
An e-mail was sent and an error mail buffer.)
C11BH was received from the mail server of • Check that the part before "@" is correct
the destination. in the mail address setting of the
parameter settings.
• Check that the part before "@" is
registered to the destination mail server.
• Check whether the mail setting of the
parameter setting is correct or not.
• When the mail server and Ethernet
module are connected via the router,
check whether the router setting is
C11CH Mail address not found. correct or not.
• Test-send a mail to the address where it
will be received without fail. When the
test is normally completed, recheck
whether the domain name after "@" is
correct or not.
• Check that the attached file is less than
The size of the attached file 6 k word.
C11DH
exceeded the allowable size. • Check that the sending side did not divide
the file.
• Check that the port number of the SMTP
server = 25.
C120H Could not open the SMTP server. • Check whether or not it is possible to
communicate with the SMTP server
using the Ping command.
Cannot communicate with the SMTP
C121H server. • Check if the SMTP server is busy.
(Error response)
Cannot communicate with the SMTP
C122H server. • Check if the SMTP server is busy.
(Abort)
Cannot communicate with the SMTP
C123H server. • Check if the SMTP server is busy.
(Reset response)
• Check whether or not the SMTP server is
A response from the SMTP server faulty.
C124H
timed out. • Check whether or not there is too much
load on the network.
Forcefully disconnected from the • Check whether or not the SMTP server is
C125H
SMTP server. faulty.
• Check whether or not the SMTP server is
faulty.
C126H Could not close the SMTP server.
• Check whether or not there is too much
load on the network.

11 - 38 11 - 38
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


Closing the SMTP server gave an • Check whether or not the SMTP server is
C127H
error response. faulty.
Communication channel is closed
C130H • Check the status of the SMTP server.
because the service is not available.
• Check if a user name not registered in
The SMTP server was performing
the server was designated.
C131H processing and an error response
• Send again after arbitrary set time has
was received.
passed.
The SMTP server was performing
processing and an error response
C132H • Check the status of the SMTP server.
was received.
(Local error)
The SMTP server was performing
processing and an error response
C133H • Check the status of the SMTP server.
was received.
(Insufficient memory area)
C134H
System error
to ( 1)
• The OS detected any error.
C137H
The SMTP server was performing
processing and an error response • Check that the Ethernet module’s mail
C138H
was received. address is set correctly.
(Mailbox not found)
System error
C139H ( 1)
• The OS detected any error.
The SMTP server was performing
processing and an error response
C13AH • Check the status of the SMTP server.
was received. (Exceeded the
allocation of memory area)
The SMTP server was performing
processing and an error response • Check that the Ethernet module’s mail
C13BH
was received. address is set correctly.
(Illegal mail box name)
System error
C13CH ( 1)
• The OS detected any error.
• Check that the port number of the POP3
server = 110. (For the Ethernet module,
this is fixed to 110.)
C140H Could not open the POP3 server.
• Check whether or not it is possible to
communicate with the POP3 server
using the Ping command.
Cannot communicate with the POP3
C141H server. • Check if the POP3 server is busy.
(Error response)
Cannot communicate with the POP3
C142H server. • Check if the POP3 server is busy.
(Abort)
Cannot communicate with the POP3
C143H server. • Check if the POP3 server is busy.
(Reset response)
• Check whether or not the POP3 server is
Could not receive a response from faulty.
C144H
the POP3 server. • Check whether or not there is too much
load on the network.

Forcefully disconnected from the • Check whether or not the POP3 server is
C145H
POP3 server. faulty.

11 - 39 11 - 39
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• Check whether or not the POP3 server is
faulty.
C146H Could not close the POP3 server.
• Check whether or not there is too much
load on the network.
Closing the POP3 server gave an • Check whether or not the POP3 server is
C147H
error response. faulty.
C150H POP3 server verification error. • Check the status of the POP3 server.
The Ethernet module’s mail address • Check the account name in the mailbox
(e-mail address setting parameter) is on the server side and correct the
C151H
different from the account name in mailbox account set for the Ethernet
the mailbox on the server side. module.
The Ethernet module’s password (e-
• Check the password on the server side
mail setting parameter) is different
C152H and correct the password set for the
from the password on the server
Ethernet module.
side.
An error occurred when getting the
• Reset the server inquiry time to the
received mail list.
C153H default value and reset the local station’s
(Failed to obtain the list of mail
programmable controller CPU.
arrived at the POP3 server.)
• Check whether or not the mail is
An error occurred when receiving a compressed or encrypted.
mail. • Check that the sending side has the
C154H
(Cannot read e-mail from the POP3 same e-mail specifications as the
server.) Ethernet module. (encode/decode, file
format, etc.)
Received a response from the DNS
C160H • Check whether or not there is too much
server after timeout.
load on the network.
Could not receive a response from
C161H • Check the status of the DNS server.
the DNS server.
• Check if the DNS server’s IP address
C162H setting is correct or not.
• Check if the mail server name setting
(SMTP server name, POP server name)
C163H An error is returned from DNS server. is correct or not.
• Check with the network administrator or
C171H similar person that the DNS function of
to the server set in the DNS setting" is
C17FH being performed.
• Execute again.
If the same error occurs, the Ethernet
C1A0H An illegal request was made. module’s hardware may be faulty.
Consult your nearest dealer with the
details of the error.
A response to a request could not be • Review and correct the response wait
C1A2H
received. time.
A request or subrequest was
C1A4H • Correct the request or subrequest.
incorrect.
The designation of the target station • Correct the designated value of the target
C1A5H
or clear target were incorrect. station or clear target.
Incorrect connection number was • Designate the connection number within
C1A6H
designated. the range of 1 to 16.
Incorrect network number was • Correct the designated value of the
C1A7H
designated. network number.
Incorrect station number was • Correct the designated value of the
C1A8H
designated. station number.
Incorrect device number was • Correct the designated device value of
C1A9H
designated. the device number.
Incorrect device name was • Correct the designated value of the
C1AAH
designated. device number.

11 - 40 11 - 40
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


Incorrect resent count was • Correct the designated value of the
C1ACH
designated. resent count.
Incorrect data length was • Correct the designated value of the data
C1ADH
designated. length.
• Correct the designated values of
Incorrect mail sending/receiving data sending/receiving data length and header
C1AEH length and header length were length.
designated. • Sending/receiving data length should be
equal or longer than the header length.
Incorrect port number was • Correct the designated value of the port
C1AFH
designated. number.
The open processing of the
• Execute the open processing after
C1B0H designated connection is already
executing the close processing.
completed.
The open processing of the
C1B1H designated connection has not been • Execute the open processing.
completed.
The OPEN/CLOSE instruction is
• Execute after the OPEN/CLOSE
C1B2H being executed in the designated
instruction is completed.
connection.
Another sending/receiving • Change the channel number.
C1B3H instruction is being executed on the • Execute after the sending/receiving
designated channel. instruction is completed.
Incorrect arrival time was • Set the watchdog timer within the proper
C1B4H
designated. range.
Data could not be received within • Review the designated value of the
C1B5H
the designated watchdog time. watchdog timer.
• Review the designated value of the mail
Incorrect mail destination number designation number.
C1B6H
was designated. • Review the sending mail address setting
parameter.
A reading operation was executed • Execute the MRECV instruction when the
C1B7H while no receiving e-mail was stored mail receiving flag of the mail information
in the mail buffer data area. is "yes".
The RECV instruction was executed • Review the execution condition of the
C1B8H for the channel that had not received RECV instruction.
data. • Review the channel number.
The OPEN instruction cannot be
C1B9H executed for the specified • Review the connection number.
connection.
A dedicated instruction was • Do not execute any dedicated
C1BA H executed while in the initialization instructions until after the initial
uncompleted status processing is completed.
The target station CPU type is • Review the value specified for the target
C1BBH
wrong. station CPU type.
• Review the remote password, then
There is an error in the remote
C200H perform the remote password unlock/lock
password.
processing again.
The remote password status of the
• Unlock the remote password, then
C201H port used for communication is in
perform communication.
the lock status.
• When accessing another station, do not
When another station was set a remote password in the relay
C202H accessed, the remote password station or station to be accessed, or set
could not be unlocked. so they are not subject to the remote
password check.
System error
C203H ( 1)
• The OS detected any error.
• Request the remote password lock
The device is different from the one
processing from the opposite device that
C204H requesting the remote password
has requested the remote password
unlock.
unlock processing.

11 - 41 11 - 41
11 TROUBLESHOOTING
MELSEC-Q

Storage destination

Open

sending

Error code

instruction
Connection

HTTP log

E-mail log
Initial

Data link
Fixed

Dedicated
Error code
(abnormal Description of error Error handling
code)

69H 7CH 7DH 7EH E5H — 5108H 5879H —


• When accessing another station, do not
When another station was set a remote password in the relay
C205H accessed, the remote password station or station to be accessed, or set
could not be unlocked. so they are not subject to the remote
password check.
System error
C206H ( 1)
• The OS detected any error.
• Reduce the file name characters to within
C207H Too many file name characters.
255 characters.
• Check the operation of the external
A response could not be received
device.
C300 H within the response monitoring timer
• Review and correct the response
value.
monitoring timer value.
E000H • Refer to the CC-Link IE Controller Network
(Errors detected by the CC-Link IE
to Reference Manual for details on error
controller network)
EFFFH handling.
F000H (Errors detected by the • Refer to the MELSECNET/H,
to MELSECNET/H, MELSECNET/10 MELSECNET/10 Network Reference Manual
FFFFH network system) for details on error handling.

1 Take corrective action in the following procedure.


1) Check whether the Ethernet module, power supply module and CPU module are
mounted correctly on the base unit.
2) Check whether the operating environment of the Ethernet module is within the general
specifications range of the CPU module.
3) Check whether the power supply capacity is sufficient or not.
4) Check whether the hardware of the Ethernet module, power supply module and CPU
module are normal according to the manuals of the corresponding modules.
If any module is faulty, please request your local Mitsubishi service center or
representative to repair.
5) If the problem cannot be solved through the above steps, please consult your local
Mitsubishi service center or representative, explaining the operation/communication
conditions at error occurrence and the information stored in the error log area within
the buffer memory of the Ethernet module.

11 - 42 11 - 42
11 TROUBLESHOOTING
MELSEC-Q

REMARKS
Depending on the restrictions of the buffers of the local station and external device,
data may be divided for communication.
Data received separately is restored (reassembled) by the Ethernet module to be
communicated using the fixed buffer, random access buffer, etc. The received data
is restored (reassembled) based on the data length in the communication data.
The Ethernet module performs the following processing if data among the
communication data is incorrect.

(1) When communication is performed using fixed buffer (with procedure) and
random buffer
(a) If the data length specified immediately after the subheader is smaller than
the amount of text data received
1) The data immediately following the part of the text data equivalent to
the data length specified immediately after the subheader will be
regarded as the next message.
2) Since the header of each message will be a subheader, the Ethernet
module performs processing according to the code in the subheader.
3) If the subheader contains a code that is not recognized by the
Ethernet module, the Ethernet module will send a response notifying
about abnormal completion to the external device.
Data sent by an external device Data determined by the Ethernet module

(First data) (Second data)

Sub Sub
header header

This section is processed as a subheader.

At this point, the Ethernet module returns a response containing a code


obtained by changing the most significant bit of the code processed as
subheader to 1.
For example, if the subheader field of a command is 65h, the subheader of
the response will become E5h.

11 - 43 11 - 43
11 TROUBLESHOOTING
MELSEC-Q

(b) If the data length specified immediately after the subheader is larger than
the amount of text data received
1) The Ethernet module waits for the reception of the remaining missing
data.
2) If the remaining data could be received within the time allotted by the
response monitoring timer, the Ethernet module performs processing
according to the code in the subheader.
3) If the remaining data could not be received within the time allotted by
the response monitoring timer, the Ethernet module performs the
following processing.
• Sends the ABORT (RST) instruction to the external device and
closes the line.
• Notifies about occurrence of an open error to the programmable
controller CPU side via the open error detection signal (X18 = ON).
• Stores the error code in the open error code storage area. (The
error code is not stored in the error log storage area.)

POINT
Designate the actual data size of the text field for "data length" specified in the
application data field of a message sent from the external device to the Ethernet
module.
The Ethernet module never sends a text whose size is different from the specified
data length to the external device.

(2) When communication is performed using fixed buffer (non-procedure)


Since no message data length is specified in non-procedure communication,
the data received is stored in the receive buffer area as is.
It is recommended to set up some method of checking that the data is received
correctly. This can for instance be achieved by including the data length and
data type code in the application data of the message, so that the number of
bytes and data type of application data can be identified on the receiving side.

11 - 44 11 - 44
11 TROUBLESHOOTING
MELSEC-Q

11.4 Troubleshooting Flowchart

This section explains some simple troubleshooting procedures when the Ethernet
module and an external device have communication problems in a flowchart format. ( 1)

POINT
If trouble occurs when using the Ethernet module, check the module status, error
status and others for the Ethernet module using the Ethernet diagnostic function of
GX Developer described in Section 11.2.

Data cannot be communicated.

Check whether or not an error occurred


in the programmable controller CPU
to which the Ethernet module is installed.

Did an error Refer to the troubleshooting section in


that makes the programmable YES
the applicable programmable controller
controller CPU stop processing
CPU user's manual and fix the problems.
occur?

NO

Check the status of the applicable


Ethernet module.

Rest the programmable controller


CPU. If the [RUN] LED does not turn
on even after resetting, the Ethernet
Is the Ethernet module's NO
module's hardware may be faulty.
[RUN] LED on? Replace the Ethernet module and
restart all the external devices that
YES communicate with the local station.

Is the connection cable NO


Lock the cable securely.
securely connected?

YES
Set [Network parameters Setting the
number of Ethernet/CC IE/
NO
Is the mode setting "Online"? MELSECNETcards]
- [Mode] to [Online] using GX
Developer. (See Section 4.6.)
YES
Data cannot be sent/received
because the data code is different in
Is the data code sending node and receiving node
(binary/ASCII) setting of the NO
and the command can therefore not
communication data be successfully decoded.
correct? Change the setting in
[Communicational data code]
YES of [Operational settings] using GX
1) Developer. (See Section 4.7.) ( 2)

11 - 45 11 - 45
11 TROUBLESHOOTING
MELSEC-Q

1)

Perform initial processing.


(See Section 5.1.1.)
Is initial processing NO(X19 = OFF) If the initial processing parameters set
normally completed with GX Developer and the sequence
(X19 = ON)? program for initial processing overlap,
delete the sequence program for initial
processing.
YES

NO
Connected using 10BASE2?

YES
Check the contact status of the power
supply module of the station in which
the Ethernet module is installed.
(LG and FG terminal grounding)

Ground the LG and FG terminals,


Are the LG and FG NO start up the Ethernet module, and try
terminal grounded? communicating with an external
device. ( 3)
YES

Did it occur after replacing YES Refer to POINT in this section and
the Ethernet module? correct the error-causing part.

NO

Check and fix the faulty part for each


communication processing.

Sending error in fixed buffer communication: See Section 11.4.1.


Receiving error in fixed buffer communication: See Section 11.4.2.
Error in random access buffer communication: See Section 11.4.3.
Error in the MC protocol communication: See Section 11.4.4.
Send error during communication by e-mail: See Section 11.4.5.
Receive error during communication by e-mail: See Section 11.4.6.
Error in redundant system: See Section 11.4.7.

1 See Section 11.1 when the I/O signal X1C (COM.ERR.LED ON confirmation signal) is turned on or when the display LED COM.ERR.
(communication error detection display) lights up.
(Check the dedicated instruction control table for a processing during which an error occurred or the error code stored in the buffer
memory, then check the contents of the error and take corrective actions by referring to Section 11.3.)
2 Error codes not found in the error code list may be returned to the external device side if the communication data settings on the
Ethernet module side (see Section 4.7) and the data code settings on the external device side are different.
The Ethernet module cannot decode commands correctly if data with different data codes is received. The Ethernet module returns
error responses according to the communication data code settings.
[Example] When communication is performed using a fixed buffer

Subheader Subheader The external device side


receives this portion
as an end code.
External device side Data length Text

(Set to binary code)


60 H00 H

Ethernet module side 45 H 30 H 35 H 34 H


(Set to ASCII code)
Subheader End code

11 - 46 11 - 46
11 TROUBLESHOOTING
MELSEC-Q

3 If the LG and FG terminals of the power supply module of the station in which the Ethernet module is installed are not grounded, the
communication line is closed (disconnected) due to the effects of noise, and as a result communication with an external device may not
be performed.
Turn off the power to the station in which the Ethernet module is installed and ground the LG and FG terminals of the power supply
module after referring to the section in the programmable controller CPU User's Manual that explains the wiring procedure.

POINT
(1) When the Ethernet module is replaced due to an error, reboot the following
external devices and restart data communication:
• All external devices that communicated with the station whose Ethernet
module was replaced.
• All external devices that communicated with programmable controller CPUs
of other stations via a station whose Ethernet module was replaced.
(2) When connecting a device to the Ethernet module, see the following sections
for the required devices and connection method:
Section 2.2: Devices Required for Network Configuration
Section 4.4: Connection Method Check
(3) If the Ethernet module could not receive messages sent from external devices
frequently, check the values stored in the following buffer memory.
(a) Simultaneous transmission error detection count storage area (address:
18EH to 18FH) and Error/End code storage area for each error log block
(address: E5H…)
When the error detection count number is high or when the error code
C0C7H has been stored, high load may be applied to the Ethernet
connection line to transfer data among connected devices.
To reduce the load to the Ethernet line, it is necessary to take corrective
measures such as dividing the network or reducing the data transmission
frequency.
Consult your network administrator and take appropriate measures.
(b) TCP packet reception count storage area (address: 1B8H, 1B9H)
When data cannot be received even though TCP packet reception count
has been renewed, set 8000H (Disable TCP Maximum Segment Size
Option transmission) to the TCP Maximum Segment Transmission setting
area (address: 1EH) and execute re-initialization.
(For re-initialization, refer to Section 5.2.3.)
(4) All dedicated instructions must be executed online.
If any of the dedicated instructions is executed offline, no error will occur, but
the execution of the dedicated instruction will not be completed.

11 - 47 11 - 47
11 TROUBLESHOOTING
MELSEC-Q

11.4.1 Sending errors during fixed buffer communication


(common to procedure exist and no procedure)

POINT
Check the abnormal code marked with " " by referring to the complete status
stored as the control data of the dedicated instruction.

Sending error

Check the open status of the connection


with an external device.

Execute the open processing of the


applicable connection. (For details, see
Is the applicable Section 5.6.)
connection open? NO Make sure that the open/close
(Buffer memory address: processing using input/output signals
applicable bit of 5000H) and the OPEN or CLOSE dedicated
instruction are not executed
simultaneously in the same connection.
If so, modify the program.
YES

Read the open abnormal code (buffer


memory address 124, 134...) of the
communication status storage area
and check that no errors have occurred.

Have parameter NO Fix the error according to the error


errors occurred? code (see Section 11.3).

YES

Read the content of the communication


abnormal code storage area
(buffer memory address 125, 135...)
corresponding to the fixed buffer of the
buffer memory and check whether or not
a communication error has occurred.

Has a communication NO Fix the error according to the error


error occurred? code (see Section 11.3).

YES

Is the parameter, NO Correct the IP address of the external


IP address of the external device,
device.
correct?

YES

Does the Match the protocol with the


communication protocol NO communication protocol (TCP/UDP) of
(TCP/UDP) match that of the external device. (For details, see
the external device? Section 5.5.)

YES

1)

11 - 48 11 - 48
11 TROUBLESHOOTING
MELSEC-Q

1)
Correct the execution condition of the
BUFSND instruction.
Check that the send/receive
Was the dedicated NO processing using input/output signals
BUFSND instruction and the dedicated BUFSND or
executed? BUFRCV instruction are not executed
simultaneously in the same connection.
YES If so, modify the program.

Fix the error according to the


Did the BUFSND NO abnormal code (see Section 11.3)
instruction complete in the BUFSND instruction complete
normally? status area.

YES

Is the send data NO


length set in the Write the data length.
control data?

YES

Check the communication status of


the external device.

Does the external Fix the faulty part of the external


NO
device operate device. (If the receiving side is also an
normally? Ethernet module, see Section 11.3.)

YES

Are there any


open errors or initial errors NO
Check and fix the faulty part.
in the error log area?

YES

The Ethernet module hardware on the


sending side may be faulty.
Consult your nearest dealer with the
details of the errors.

11 - 49 11 - 49
11 TROUBLESHOOTING
MELSEC-Q

11.4.2 Receiving errors during fixed buffer communication


(common to procedure exist and no procedure)

POINT
Perform error code reading while the connection is open.

Receiving error

If the amount of actually received data is


smaller than the length of data expected to
be received, the subsequent processing
must allow reception of the remaining data.
Do the expected length If the amount of actually received data is
of data to be received and NO
larger than the length of data expected to
the amount of data actually be received, the subsequent data should
received match? be treated as the next request message or
as unnecessary data.
(See Remark in 11.3.3 section for further
details.)
YES

Check the open status of the


connection with an external device.

Execute the open processing of the


applicable connection.
Is the applicable (For details, see Section 5.6.)
connection open? NO Make sure that the open/close processing
(Buffer memory address: using input/output signals and the
applicable bit of 5000H) dedicated OPEN or CLOSE instruction are
not executed simultaneously in the same
connection. If so, modify the program.

YES

Read the open abnormal code (buffer


memory address 124, 134...) of the
communication status storage area
and check that no errors have occurred.

NO Fix the error according to the parameter


Have parameter errors
occurred? error code (see Section 11.3).

YES

Read the content of the communication


abnormal code storage area (buffer
memory address 126, 136...)
corresponding to the fixed buffer of the
buffer memory and check whether or not
a communication error has occurred.

Has a NO Fix the error according to the


communication error occurred in the communication error code in the error log
error log area? area (see Section 11.3).

YES

1)

11 - 50 11 - 50
11 TROUBLESHOOTING
MELSEC-Q

1)

Is the parameter, NO
IP address of the external Correct the IP address of the external
device.
device, correct?

YES

Does the communication NO Match the protocol with the communication


protocol (TCP/UDP) match that protocol (TCP/UDP) of the external device.
of the external device? (For details, see Section 5.5.)

YES

Is the receive Data may not have been set from the
completion signal (buffer NO external device.
memory address: corresponding Check the sending side. (If the sending
bit of 5005H) of the applicable side is also an Ethernet module, see
fixed buffer on? Section 11.3.)

YES
Did the error NO
occur in the device on the
sending side?
Fix the faulty part of the device on sending
YES side.

The Ethernet module on receiving side


may be faulty. Consult your nearest
dealer with the details of errors.

Perform receive NO
processing using the interrupt
program?

YES
NO
Was the dedicated BUFRCV
instruction executed?
NO
Was the dedicated BUFRCVS
instruction executed? Correct the execution condition of the
YES
BUFRCV instruction.
Make sure that the send/receive processing
YES using input/output signals and the
Correct the interrupt setting from dedicated BUFSND or BUFRCV instruction
GX Developer. (See Section 7.3.2.) are not executed simultaneously executed
Make sure that the send/receive in the same connection.
processing using input/output signals and If so, modify the program.
the dedicated BUFSND or BUFRCV
instruction are not executed in the same
connection. If so, modify the program.

Did the BUFSND instruction NO


complete normally?
Is the control data of the NO
BUFRCVS instruction correct?
YES Fix the error according to the abnormal
code (see Section 11.3) in the BUFSND
YES Correct the control data. instruction complete status area.
(For details, see Chapter 10.)

2)

11 - 51 11 - 51
11 TROUBLESHOOTING
MELSEC-Q

2)

Check the communication status of the


device on the sending side.

Does the device NO


on the sending side operate
normally?

YES Check the sending side. (If the sending


side is also an Ethernet module, see
Section 11.3.)

The Ethernet module hardware on the


receiving side may be faulty. Consult
your nearest dealer with the details of
the errors.

11 - 52 11 - 52
11 TROUBLESHOOTING
MELSEC-Q

11.4.3 Errors during random access buffer communication

Communication error

Check the open status of the connection


with the external device.

Execute the open processing of the


applicable connection. (For details, see
Section 5.6.)
Is the applicable
NO Make sure that the open/close processing
connection open? (buffer memory
using input/output signals and the
address: corresponding bit
dedicated OPEN or CLOSE instruction are
of 5000H)
not executed simultaneously in the same
connection.
If so, modify the program.

YES

Was a command NO
sent form the external Send the command to the Ethernet module.
device?

YES

Was a response NO
returned to the device that
sent the command?

YES Is the IP address NO Correct the IP address and send the


designation of the command
command again.
correct?

YES

Does the
communication protocol NO Match the communication protocol
(TCP/UDP) match with that of (TCP/UDP) with the external device.
the external device? (For details, see Section 5.5.)

YES

The command may not be sent to the


Ethernet module from the external
device on the command sending side.
Check the sending side.

Is the end code NO Fix the faulty part according to the


of the response "0"? description of the end code (see Section
11.3).

YES

1)

11 - 53 11 - 53
11 TROUBLESHOOTING
MELSEC-Q

1)

Is the IP address NO Correct the IP address and send the


of the command command again.
correct?

YES

Is the buffer
memory address designation Correct the buffer memory address
NO
of the Ethernet module set for of the Ethernet module and send the
the command command again.
correct?

YES

Is the command NO (Data read)


a data write from the external
device?

YES
Is the data set
in the designated address NO
of the Ethernet module's
random access
buffer?

YES

Is the data to
NO
be written set on the Set the data. Write data.
external side?

YES

Are there
any open errors or initial NO
Check and fix the faulty part.
errors in the error
log area?

YES

The Ethernet module hardware may


be faulty. Consult your nearest
dealer with the details of the errors.

11 - 54 11 - 54
11 TROUBLESHOOTING
MELSEC-Q

11.4.4 Errors in communication using the MC protocol

Communication error

Check the open status of the connection


with the external device. 1

Execute the open processing of the


applicable connection. (For details, see
Is the applicable Section 5.6.)
connection open? (buffer NO Make sure that the open/close processing
memory address: corresponding using input/output signals and the
bit of 5000H) dedicated OPEN or CLOSE instruction are
not executed simultaneously in the same
connection. If so, modify the program.

YES

Was a command sent NO


Send the command to the Ethernet module.
form the external device?

YES

Was a response NO
returned to the device that sent
the command?

YES Is the IP address NO Correct the IP address and send the


designation of the command
command again.
correct?

YES

Does the
communication protocol NO Match the communication protocol
(TCP/UDP) match with that of the (TCP/UDP) with the external device.
external device? (For details, see Section 5.5.)

YES

The command may not be sent to the


Ethernet module from the external device
on the command sending side. Check the
sending side.

NO Fix the faulty part according to the


Is the end code of
description of the end and abnormal
the response "0"?
codes (see Section 11.3).

YES

1)

1 If connection of the external device only is closed due to cable disconnection or restart of the personal computer, re-
open the connection using the same port used before the failure.
The Q series E71 does not close a connection if it receives an Active open request again from the external device with a
different IP address or port No.

11 - 55 11 - 55
11 TROUBLESHOOTING
MELSEC-Q

1)

Is the IP address of the NO Correct the IP address and send the


command correct? command again.

YES

Are the
command formats,
such as command type, device NO Correct the command format by referring
designation, and address to the MELSEC Communication Protocol
designation, designated Reference Manual.
correctly?

YES

Are there any open NO


errors or initial errors in the error Check and fix the faulty part.
log area?

YES

The Ethernet module hardware may


be faulty. Consult your nearest dealer
with the details of the errors.

11 - 56 11 - 56
11 TROUBLESHOOTING
MELSEC-Q

11.4.5 Sending errors during e-mail communication

<Sending with the sequence program>

Sending error

Was the dedicated MSEND NO


instruction executed?
Correct the execution condition of the
MSEND instruction.
YES

Was the MSEND instruction NO


normally completed?

Fix the error according to the abnormal code


YES in the MSEND instruction's complete status
area and the e-mail sending error log
(see Section 11.3).
For details on the MSEND instruction, refer to
Section 2.6 of the User's Manual (Application).

Can the error response


YES
be received from the mail
server using the MRECV
instruction? Confirm with the system administrator that
the following settings are made correctly:
NO • DNS setting
• E-mail setting

Check the following items.


• E-mail parameter settings for the
Ethernet module.
• Whether or not the mail server's system
is down.
• Whether or not there is an error in the
communication path.

11 - 57 11 - 57
11 TROUBLESHOOTING
MELSEC-Q

<Sending with the CPU monitoring function>

Sending error

Are the monitoring NO


conditions satisfied?

Correct the notification setting from


GX Developer.
YES
For more details, refer to Section 2.7 of the
User's Manual (Application).

Can the first sending YES


with the CPU monitoring
function be performed?

Are there devices outside NO


NO the range of the device setting
among the condition
devices?

YES
Modify the condition devices.

Handle errors according to the e-mail


transmission error log (Section 11.3).

Can the second


sending with the CPU YES
monitoring function be
performed? 1) Correct the following so that the
monitoring condition disable time satisfies
"Disable time > CPU inquiry interval."
NO
• CPU inquiry interval
• Device value of the notification condition.
2) Perform the following so that the
sending time between the SMTP
server and the Ethernet module satisfies
"sending time < CPU inquiry interval."
• Decrease the load on the SMTP server.
• If the SMTP server and the Ethernet
module are connected via routers, etc.,
connect the Ethernet module to the
same main line as the SMTP server.

Check the following items.


• E-mail parameter setting for the Ethernet
module.
• Whether or not the mail server system
is down.
• Whether or not there is an error in the
communication path.

POINT
Check the following items before using the e-mail function:
(1) System configuration and environment:
Section 2.2 of the User’s Manual (Application)
(2) Precautions for using the E-mail function:
Section 2.3 of the User’s Manual (Application)
(3) The e-mail settings from GX Developer:
Section 2.5 of the User’s Manual (Application)

11 - 58 11 - 58
11 TROUBLESHOOTING
MELSEC-Q

11.4.6 Receiving errors during e-mail communication

Receiving error

Was the e-mail NO


successfully
stored?

YES Is the e-mail NO Fix the content according to the e-mail


receiving error log receiving error log (see Section 11.3).
normal?

YES

Was the
NO
dedicated MRECV
instruction
executed?

YES NO
No inquiry? Execute the dedicated MRECV instruction.

YES

Correct the executing condition of the


dedicated MRECV instruction.

Was the
dedicated MRECV NO Correct the error according to the error code in the MRECV instruction complete status area.
instruction normally For details on the MRECV instruction, refer to Section 2.6.4 of the User's Manual (Application).
completed?

YES

Check the following items.


Can the receive NO Receiving NO • Whether or not the mail server's system is down.
data be stored in the stops in the middle of • Whether or not there is an error in the communication
device? process? path.

YES YES

No attached file. The interval for inquiring the server is too long. No mail in the mail server

• Set the inquiry interval shorter.


Check the number of mails remaining in the
• Check if there is any error in the
mail server.
communication path.

1)

11 - 59 11 - 59
11 TROUBLESHOOTING
MELSEC-Q

1)

Is the receive
NO
data value incorrect?
(Characters got
garbled)

YES

Sending side sent in ASCII code.


Sending side converted the ASCII code to ASCII code once more.

Test the following items.


• The sending side sends an attached file in binary code.
• Whether or not the send data (attached file) is in ASCII code.
• If the sending side is a PC, try sending using another mail program.
If there is any difference due to the mail program, check the mail settings again.
• Check that the mail server's encode and decode are the same as the Ethernet.

Check the following items:


NO • Whether or not the e-mail parameter settings for the
Did the characters
of the subject get Ethernet module are correct.
garbled? • Whether or not the mail server's system is down.
• Whether or not there is an error in the communication path.

YES

Codes other than "0 to 9" and "A to F" are used.

Correct the codes to "0" to "9" and "A" to "F."


Is the NO
sending side the Ethernet
module?

YES

• Because decode processing is not performed,


it cannot be received normally.

EUC or SHIFT-JIS is used. Check the PC setting.


• Send from the PC to the local-station.
• Check the header information of the receive data sent from the Local station.
In case of Outlook Express, check "Property" "Details" "Content of header
information -Type: text-plain:charset=iso-2022.jp."
Correct the setting if it is charset="EUC.jp" or "SHIFT-JIS."

11 - 60 11 - 60
11 TROUBLESHOOTING
MELSEC-Q

11.4.7 Error in redundant system


(1) System switching error
The following shows a troubleshooting flowchart for the case where system
switching does not occur at communication error or disconnection detection.
System is not switched.
POINT
Check the starting I/O number of the
target Ethernet module with the When the Ethernet module is mounted on the
network parameter. extension base unit, generally the system switching
does not occur at the time of communication error
Check SD1590 of the control system
CPU.
or wire break detection.

Is the system YES


switching request issued 4)
to the CPU?

NO
Check the error log area (buffer
memory address: E3H to 174H) of the
Ethernet module mounted on the main
base unit of the control system CPU.

What error code is


generated?

1)
C032H Error other than No error code
(TCP ULP timeout error)
C032H or C035H
or
C035H
(Existence check error)

Check the Ethernet parameters. Repair the error area according to


the error code.

Is "Issue
Check "Issue system switching
system switching request at NO
request at communication error".
communication error" checked
(Refer to Section 5.11.3.)
in the redundant
setting?

YES

Is "Systemswitching
NO Check "System switching settings
settings when communication
when communication error occurs".
error occurs" checked in the
(Refer to Section 5.11.3.)
redundant setting?

YES
Check the "System switching settings
when communication error occurs"
status storage area. (Buffer memory
address: 5210H, 5211H)

Are the settings Write the Ethernet parameters again,


of GX Developer consistent the NO
and simultaneously reset the
contents of the buffer redundant CPUs.
memory?

YES
4)

11 - 61 11 - 61
11 TROUBLESHOOTING
MELSEC-Q

1)

Check the hub connection status


area (buffer memory address: C9H).

NO
Is disconnection detected? 2)

YES

Check the Ethernet parameters.

Is "Issue
system switching request Check the "cable disconnection
NO
at disconnection detection" timeout setting". (Refer to Section
checked in the redundant 5.11.3.)
setting?

YES

Check the "Issue system switching


request at disconnection detection"
status storage area. (Buffer memory
address: 5200H)

Are the
settings of Write the Ethernet parameters again,
NO
GX Developer consistent with the and simultaneously reset the
contents of the buffer redundant CPUs.
memory?

YES

Check the "cable disconnection


timeout setting". (Buffer memory
address: 5201H)

Is the setting Review the "cable disconnection


of the cable disconnection NO
timeout setting". (Refer to Section
timeout setting 5.11.3.)
correct?

YES

4)

11 - 62 11 - 62
11 TROUBLESHOOTING
MELSEC-Q

2)

Is the communication NO
3)
target in the error status?

YES
Check the Ethernet parameters.

Is the "TCP ULP


NO Review the "TCP ULP timer".
timer" setting value of the initial
setting correct? (Refer to Section 5.2.2.)

YES

Is the "existence NO
check" of the open setting set Select "Check". (Refer to Section 5.5.)
to "Check"?

YES

Is the "existence
check starting interval timer" NO Review the existence check starting
setting value of the initial interval timer. (Refer to Section 5.2.2.)
setting correct?

YES

Is the "existence
check interval timer" setting value NO Review the existence check interval
of the initial setting timer. (Refer to Section 5.2.2.)
correct?

YES

Is the Set the IP address of the


"communication target IP YES communication target station to the
address" of the open setting set communication target IP address.
to broadcast? (Refer to Section 5.5.)

NO
Check the initial processing
parameter setting area (buffer
memory address: 0 to 14H) and
communication parameter setting
area (buffer memory area: 20 to 5FH).

Are the settings


NO Write the Ethernet parameters again
of GX Developer consistent with
and reset the programmable
the contents of the buffer
controller CPU.
memory?

YES
Check the connection status.

NO
Is the connection open? Open the connection.

YES
4)

11 - 63 11 - 63
11 TROUBLESHOOTING
MELSEC-Q

3)

Check the cable between the Ethernet


module and hub.

Please consult your local Mitsubishi


YES service center or representative,
Is the cable disconnected? explaining a detailed description of
the problem.
NO

4)

11 - 64 11 - 64
11 TROUBLESHOOTING
MELSEC-Q

4)

Check the PLC parameters.

Have the group settings YES When the other module is normal,
been made? system switching is not executed.

NO
Check the mounted CPU.

Is the standby NO
system powered ON? Power ON the standby system.

YES

Set the RESET/L.CLR switch of the


Is the RESET/L.CLR
switch of the standby system NO standby system CPU from the
CPU in the neutral position RESET position to the neutral position
(unreset)? (unreset).

YES

Is the tracking cable NO


Install the tracking cable normally.
connected normally?

YES
When the standby system CPU is in
Is the standby system NO
the error status, system switching is
CPU normal? not executed.

YES
When the mounted CPU is the
Is the mounted CPU a NO
standby system CPU, system
control system? switching is not executed.

YES

Has any
reason for system Remove the reason for system
switching failure (e.g. stop switching failure not. Refer to the
error of standby system CPU), NO
QnPRHCPU User's Manual
if a system switching request
(Redundant System) for the factor
is issued from the Ethernet
that does not switch the system.
module, occurred?

YES

Is the CPU in the NO Change the CPU from the separate


backup mode? mode to the backup mode.

YES
Please consult your local Mitsubishi
service center or representative,
explaining a detailed description of
the problem.

11 - 65 11 - 65
11 TROUBLESHOOTING
MELSEC-Q

(2) OPS connection communication error


The following shows a troubleshooting flowchart for the case where a
communication error occurred during connection with the OPS.

Error in communication with OPS

Has "OPS
Set the open system of the open
connection" been set in the NO
setting to "OPS connection".
open system of the
(Refer to Section 5.5.)
open setting?

YES

Is the local Set the local station port number


station port number of the NO
of the Ethernet module correctly.
Ethernet module (Refer to Section 5.5.)
correct?

YES

Is the IP address of the NO Set the IP address of the OPS


OPS correct? correctly.

YES

YES The MC protocol cannot be used for


Is the MC protocol used?
the connection set to OPS connection.

NO

YES MELSOFT connection cannot be


Is the MELSOFT
made for the connection set to OPS
product used?
connection.

NO

Is EZSocket used on NO The port set to OPS connection can


the OPS side? be connected to only EZSocket.

YES

The possible cause is other than


above or external device fault.
Execute the troubleshooting for the
case where data communication
cannot be made.
(Refer to Section 11.4.)

11 - 66 11 - 66
APPENDIX
MELSEC-Q

APPENDIX
Appendix 1 Function Upgrade for the Ethernet Module

The Ethernet module of function version B or later contains several functions not
included in the earlier product (function version A).
This section gives a comparison of functions of the Ethernet module based on the App
function change or addition and explains program utilization and incorporation into an
existing system.

Appendix 1.1 A comparison of functions of the Ethernet module


(1) A comparison of functions of the Ethernet module
The following shows the comparison of functions of the Ethernet module.
Function QJ71E71-100 QJ71E71-B5 QJ71E71-B2
100 Mbps
Data transmission rate
10 Mbps
Sequence program
Initial processing
GX Developer network parameter setting
Sequence program
Re-initial processing
Dedicated instruction
Sequence program
Open processing
GX Developer network parameter setting
4E frame
QnA compatible 3E frame
Communication using the A compatible 1E frame
MC protocol Access to link direct device LW10000 or higher
Access to extended data register D65536 or higher or
extended link register W10000 or higher
Communication using the fixed Procedure exist
buffer No procedure
Communication using the random access buffer
• Sending/receiving by programmable controller CPU
• Sending by the programmable controller monitoring
function (automatic notification function)
Sending files in CSV format as attachment
Sending/receiving e-mail Sending main text
Support for encoding/decoding
Sending character strings in the e-mail’s main
text by the programmable controller CPU
monitoring function

Target station CPU type specification


Communication using data link Increased data length (From 480 to 960 words)
instructions Specification of station No.65 to 120
(For accessing to the CC-Link IE controller
network)
File transfer (FTP server function)
Communication using the Web function
CC-Link IE controller network, MELSECNET/H, MELSECNET/10 relay communication
Router relay communication (router relay function)
Existence check of remote Checking by PING
devices (existence check
function) Checking by KeepAlive
Communication via pairing open
Communication via automatic open UDP port
Simultaneous broadcast

App - 1 App - 1
APPENDIX
MELSEC-Q

Function QJ71E71-100 QJ71E71-B5 QJ71E71-B2


Remote password check
Communication using the
MC protocol
Support for the QCPU remote GX Developer
Unlock processing/
password function File transfer (FTP server)
lock processing
function
App Communication using the
Web function
Mounting to multiple CPU system stations
Communication using the
Support for multiple CPU MC protocol
Access to non-control
systems GX Developer
CPU
File transfer (FTP server)
function
Mounting an Ethernet module to redundant system
Mounting an Ethernet module to the MELSECNET/H remote I/O station
Setting parameters to use Ethernet module functions
Accessing the QCPU via the Ethernet module (TCP/IP or UDP/IP)
Monitoring various Ethernet module statuses
PING test
Ethernet diagnostic function Via the Ethernet board
Self-loop back test
Via the CPU PING test
Support for the IEEE802.3 frame
Connection of MELSOFT products (such as GX Developer)
Simultaneous connection with multiple units via
TCP/IP communication
Simplifying access to other stations
Access with the same station number
Hub connection status monitor function

: Can be used.
: Can be used. (However, there are restrictions on the product serial No.
(manufactured date)) ( 1)
: Cannot be used.
1 : There is a time limit on the manufacturing date of Ethernet modules that
can support this function. For how to check the function version, see
Section 2.7.

POINT
For the description of the following items, see Section 2.7.
• How to check the function version of the Ethernet module
• Correspondence with related products (CPU modules, GX Developer) that can
use added functions.

App - 2 App - 2
APPENDIX
MELSEC-Q

Appendix 1.2 Precautions when updating the module from function version A to function
version B or later

This section explains the utilization of programs created for the Ethernet module of
function version A and incorporation into an existing system.

(1) Program utilization


A program created for use with the Ethernet module of function version A can be
used as is with the Ethernet module of function version B or later.

(2) Incorporation into an existing system


Wiring used for function version A can be used as is in the Ethernet module of
function version B or later.

App - 3 App - 3
APPENDIX
MELSEC-Q

Appendix 2 The QnA/A Series Module


This section gives a comparison of functions of the Ethernet module and QnA/A series
module and explains program utilization and incorporation into an existing system.
The QnA/A series module refers to the following product:
Model name Product name
AJ71E71 AJ71E71, A1SJ71E71-B2, A1SJ71E71-B5
AJ71E71-S3 AJ71E71-S3, A1SJ71E71-B2-S3, A1SJ71E71-B5-S3
AJ71E71N3-T, AJ71E71N-B5, AJ71E71N-B2, AJ71E71N-T, AJ71E71N-B5T, A1SJ71E71N3-T,
AJ71E71N
A1SJ71E71N-B5, A1SJ71E71N-B2, A1SJ71E71N-T, A1SJ71E71N-B5T
QE71 AJ71QE71, AJ71QE71-B5, A1SJ71QE71-B2, A1SJ71QE71-B5
AJ71QE71N3-T, AJ71QE71N-B5, AJ71QE71N-B2, AJ71QE71N-T, AJ71QE71N-B5T,
QE71N
A1SJ71QE71N3-T, A1SJ71QE71N-B5, A1SJ71QE71N-B2, A1SJ71QE71N-T, A1SJ71QE71N-B5T

Appendix 2.1 Functional comparisons between the Ethernet modules and QnA/A series
modules
The following tables list the functional comparisons of the Ethernet modules and
QnA/A series modules.
The symbol in the model name columns indicates that the corresponding functions
are compatible between the applicable models. (See each module’s manual for details.)
indicates functions that have been added to or modified from the QnA/A
series modules.
AJ71E71- QE71, QE71N QJ71E71-100,
Function AJ71E71 S3, Products earlier Products QJ71E71-B5, Remarks
AJ71E71N than 9706 after 9706B QJ71E71-B2
3
Sequence program ( ) 8
1 Initial processing ( )
3
GX Developer parameter setting ( )
3
Sequence program ( ) 9)
2 Open processing (
3
GX Developer parameter setting ( )
4
Communication using Procedure exist ( ) —
3 4
the fixed buffer No procedure ( ) —
5
4 Communication using the random access buffer ( ) —
Read/write of data in the programmable controller CPU 10)
5 (Communication using the MC protocol) (

For communication
2 between the
6 Communication using data link instructions ( )
programmable controller
CPUs
Interrupt processing Fixed buffer communication BUFRCVS instruction
7
(at data receiving) Data link instruction RECVS instruction
Sending/receiving with the 11)
(
Sending/receiving of sequence program
8
e-mail Sending with the automatic
notification function —
9 File transfer FTP server function
10 Sending by the Web function —
Simultaneous broadcast
11 Simultaneous broadcast function
Communication while the programmable controller CPU 6
12 ( ) —
is in the STOP status
13 Selection of communication data code (ASCII/binary) —
CC-Link IE controller network, MELSECNET/H, 2
14 ( ) —
MELSECNET/10 relay communication
15 Router relay function Router relay function
Ping —
16 Existence check of remote devices
KeepAlive —
For communication
17 Paring open communication using the fixed buffer
1
Unit of each timer setting value for 500 ms ( ) (Fixed) (Fixed) (Fixed) —
18
data communication 2s (Fixed) —
TCP/IP For 1:1 communication
19 Connection with GX Developer Depends on the GX
UDP/IP Developer function
: The function is available : The function is unavailable

App - 4 App - 4
APPENDIX
MELSEC-Q

AJ71E71- QE71, QE71N QJ71E71-100,


Function AJ71E71 S3, Products earlier Products QJ71E71-B5, Remarks
AJ71E71N than 9706 after 9706B QJ71E71-B2
7 Communication
20 Installation of EEPROM ( )
parameter registration
13 13 12
21 TCP Maximum Segment Size Option transmission ( ) ( ) ( ) —

: The function is available : The function is unavailable

1 Applicable when the module’s software version is earlier than "Q version".

2 The availability of the function depends on the date of manufacture/software version of the programmable controller CPU and SWnIVD/NX-GPPQ model
GPP function software package.

3 A sequence program using input/output signals cannot be used together with the parameter settings from GX Developer.

4 Compatible with the input/output signals and the buffer memory of the QE71, QE71N.

5 The function is compatible, but cannot be used together with the e-mail sending/receiving function for sequence program.

6 When "Always wait for OPEN" is set in the network parameters of GX Developer, the conventional sequence programs are not required.

When using this function in the conventional sequence programs, the following conditions are not applicable. (It will not operate correctly because the
same area is used.)

• "Always wait for OPEN" is set in the operational setting of the network parameters.

• "MELSOFT connection" is set in the open setting of the network parameters.

• Re-initial processing (with UINI instruction, buffer memory) is used in the sequence programs.

7 EEPROM is not installed. Items that were previously stored in the EEPROM in the QE71, QE71N are now stored by parameter setting from GX Developer.

8 By performing parameter setting from GX Developer, the initial processing is executed when the Ethernet module starts up. A conventional sequence

program is not required.

9 The number of connections which can be opened from the programmable controller CPU has been increased to 16 for the Ethernet module. Also, when

executing the Passive open processing for TCP/IP communication and the open processing for UDP/IP, the open processing is executed when the

Ethernet module starts up by setting the "Always wait for OPEN" parameter from GX Developer. A conventional sequence program is not required.

10 When the Ethernet module is used, a maximum of 960 words can read/written (a maximum of 480 words for the QE71, QE71N).

11 This cannot be used together with the communication function using the random access buffer.
12 TCP Maximum Segment Size Option transmission is available for the product with the serial number which first 5 digits are 05051 or later.

• In the QJ71E71-100, QJ71E71-B5, QJ71E71-B2 with the first 5 digits of serial No. 05051 to 05081, the default value is preset to "Enable TCP Maximum

Segment Size Option transmission". If normal communication cannot occur due to incorrect combination with the other node, change the setting to
"Disable TCP Maximum Segment Size Option transmission".

• To change the TCP Maximum Segment Size Option transmission setting, change the TCP Maximum Segment Transmission setting area and execute

re-initialization. (For re-initialization, refer to Section 5.2.3.)

13 TCP Maximum Segment Size Option transmission is applicable when the software version of the QE71N or AJ71E71N is "E" or later.

Note that the default is set to disable TCP Maximum Segment Size Option transmission. (Enabled when retransmitting TCP data)

POINT
The Ethernet module’s response speed to an external device is faster than that of
the Ethernet modules for the A/QnA series.
Keeping compatibility with the Ethernet modules for the A/QnA series strictly is not
possible when using this Ethernet module. If this becomes a problem when
considering the performance of an external device, try to make the timing similar to
that of the conventional system using the QCPU constant scan setting or other
applicable settings.

App - 5 App - 5
APPENDIX
MELSEC-Q

Appendix 2.2 Using the programs designed for QnA/A series modules

The data communication that was previously performed between the programmable
controller CPU and an external device on the Ethernet using a QnA/A series Ethernet
interface module (such as the AJ71E71) can also be performed using an Ethernet
module.
The following explains how to use the programs designed for conventional modules to
perform data communication using the Ethernet module.

(1) Using the programs designed for the AJ71E71(-S3) and AJ71E71N
(a) Using the programs designed of the external device side
The following parts of the communication function programs of the external
device that are used for the AJ71E71(-S3) and AJ71E71N (hereinafter
called the E71) can be utilized for communication with the Ethernet module.
However, since the Ethernet module and the E71 have different response
speeds, these programs may not be used as is. Make sure to test the
operation first.
E71 Ethernet
Destination External device Ethernet module
Ethernet module
Program designed for E71 Ethernet module External device
module E71
Communication using the fixed
buffer (procedure exist)
Communication using the
Communication
random access buffer
function
Read/write data from/to the
programmable controller CPU
(*1)

: Communication can be performed by utilizing the programs for the E71 of the external device.
1 Only A compatible 1E frame commands can be used for data communication.
For details on the E71 commands, see the MELSEC Communication Protocol Reference Manual.
To perform data communication using other commands than A compatible 1E frame commands, create
a new program.

(b) Using the sequence programs designed for the local station’s E71.
The Ethernet module and the E71 have different buffer memory
assignments, thus the sequence programs designed for the E71 cannot be
utilized for the Ethernet module.
Create a new program referring to the chapters that explain each of the
applicable functions.

(2) Using the programs designed for the AJ71QE71(N)


(a) Using the programs designed for the external device
The sequence programs of the external device that are designed for the
AJ71QE71(N) (hereafter abbreviated as QE71) can be utilized for
communication with the Ethernet module, except for the programs listed
below:
• Programs for commands relating to file manipulation
(Refer to the MELSEC Communication Protocol Reference Manual)
• Programs for accessing a data link system
(QCPU (Q mode) modules cannot be connected to MELSECNET (II) and
MELSECNET/B.)
However, since the Ethernet module and the QE71 have different response
speeds, the programs may not be used as is. Make sure to test the
operation first.
App - 6 App - 6
APPENDIX
MELSEC-Q

(b) Using the programs designed for the local station’s QCPU

1) Do not write the parameters of the Ethernet module set by GX


Developer (network parameters) to the QCPU if sequence programs
are used for initial processing or end processing.
If the parameter settings for the Ethernet module of GX Developer are
not used, the following precautions should be observed when
performing the communication:
• All the setting values of the communication condition setting
switches for the QE71 will operate in OFF status. Set the
communication conditions by the re-initial processing described in
Section 5.2.3.
• MELSOFT products (e.g., GX Developer) cannot access the QCPU
via the direct connection between MELSOFT products (e.g., GX
Developer) and the Ethernet module.
2) If the parameter setting for the Ethernet module is performed using GX
Developer, delete the sequence programs for initial processing and
end processing.
3) The sequence programs designed for the local station’s QE71 can be
utilized for communication with the Ethernet module, except for the
programs listed below:
• Sequence programs for accessing data link system.
(Refer to the QCPU User's Manual.)
• Sequence programs relating to EEPROM.
• Paring open settings for connection No. 8.
(See Section 5.7.1 "Paring Open".)
• Parameter setting program using the EPRSET instruction.

However, since the Ethernet module and the QE71 have different response
speeds, the programs may not be used as is. Make sure to test the
operation first.

REMARKS
Keep the following points in mind when utilizing the programs.
• Do not use the sequence program for initial processing together with initial
processing by parameter setting from GX Developer.
• Do not execute the following operations to the same connection simultaneously:
open/close processing using input/output signals and open/close processing using
the OPEN/CLOSE dedicated instructions, as well as the fixed buffer
sending/receiving and sending/receiving processing using the
BUFSND/BUFRCV/BUFRCVS instruction.

Furthermore, when setting parameters for the Ethernet module and communicating
with the QCPU, make sure to use GX Developer.

App - 7 App - 7
APPENDIX
MELSEC-Q

POINT
(1) The operating mode and communication conditions can be set via the following
parameter setting screen of GX Developer when using Q Series Ethernet
modules:
• "Network Parameters Setting the number of Ethernet/CC IE/MELSECNET
cards" screen
• "Ethernet operational setting" screen
(2) On Q Series Ethernet modules, there are no setting switches for making the
operating mode settings and communication condition settings like there were
on QnA/A Series Ethernet interface modules.
(3) The Q Series Ethernet module cannot cancel an open request before
completing the open processing once the passive open processing is executed.
Perform the close processing after the open processing is complete.

App - 8 App - 8
APPENDIX
MELSEC-Q

Appendix 3 Installing the Ethernet Module on Existing Systems

The Ethernet module and the QnA/A series Ethernet interface module can coexist on
the same Ethernet. The Ethernet module can be installed on the existing system’s
Ethernet using the existing wiring for the QnA/A series Ethernet interface module.

Appendix 4 Processing Time

Calculate the minimum processing time for each function using the expressions below.
Note that the processing time may become longer depending on the load factor on the
network (how congested the line is), the window size of each connected device, the
number of connections used concurrently, and how the system is configured. Use the
values obtained from the expressions below as a guideline for the processing time
when communication is performed using only one connection.

(1) Minimum processing time of communication using the fixed buffer


(communication between the Ethernet modules)
(a) Communication using the fixed buffer (Procedure exist)
Tfs = St + Ke + (Kdf × Df) + Sr
Tfs : Time from the start of sending to the completion of sending
(unit: ms)
St : Sending station scan time
Ke, Kdf : Constant (see the table below)
Df : Word count of send data
Sr : Receiving station scan time
QJ71E71-100 QJ71E71-B5, QJ71E71-B2
Communication using Communication using Communication using Communication using
TCP/IP UDP/IP TCP/IP UDP/IP
Ke Kdf Ke Kdf Ke Kdf Ke Kdf
Data communication using binary code 12 0.0065 10 0.0069 25 0.020 20 0.019
Data communication using ASCII code 12 0.030 10 0.029 26 0.068 21 0.068

(b) Communication using the fixed buffer (No procedure)


Tfs = St + Ke + (Kdf × Df)
Tfs : Time from the start of sending to the completion of sending
(unit: ms)
St : Sending station scan time
Ke, Kdf : Constant (see the table below)
Df : Byte count of send data
QJ71E71-100 QJ71E71-B5, QJ71E71-B2
Communication using Communication using Communication using Communication using
TCP/IP UDP/IP TCP/IP UDP/IP
Ke Kdf Ke Kdf Ke Kdf Ke Kdf
Data communication using binary code 7 0.0018 4 0.0014 16 0.0057 9 0.0025

[Calculation example]
Calculate the time from the start of sending to the completion of
sending (unit: ms) when the QJ71E71-B5 communicate using TCP/IP
and send 1017 words of binary code data using fixed buffer
communication (procedure exist).
• Assume that the scan time on the receiving side is 10 ms and the
scan time on the transmission side is 8 ms:
63.34 (ms) 10 + 25 + (0.020 × 1017) + 8
App - 9 App - 9
APPENDIX
MELSEC-Q

(2) Minimum processing time of communication using the random


access buffer
Trs = Kr + (Kdr × Df) + ACK processing time of an external device
(Added only for TCP/IP communication)

Trs : The time the Ethernet module takes to complete the


processing of a data request from a PC after receiving it
(unit: ms)
Kr, Kdr : Constants (see the table below)
Df : Word count of requested data
ACK processing time of the external device :
Time required until the external device returns an ACK after
reading or writing of the random access buffer is
completed.
QJ71E71-100 QJ71E71-B5, QJ71E71-B2
Communication using Communication using Communication using Communication using
TCP/IP UDP/IP TCP/IP UDP/IP
Kr Kdr Kr Kdr Kr Kdr Kr Kdr
Data communication using
3.1 0.004 2.1 0.005 9.4 0.008 6.6 0.008
binary code
Read
Data communication using
3.1 0.016 2.2 0.016 9.1 0.030 6.5 0.030
ASCII code
Data communication using
3.1 0.006 2.1 0.005 9.5 0.014 6.6 0.012
binary code
Write
Data communication using
3.1 0.017 2.2 0.015 9.6 0.042 6.7 0.036
ASCII code

[Calculation example 1]
Calculate the time the QJ71E71-B5 takes to complete the processing
of a data request from a PC after receiving it, when the QJ71E71-B5
and the PC communicate using TCP/IP and read 508 words of binary
code data from the random access buffer (unit: ms).
13.46 + ACK processing time of the external device (ms)
9.4 (0.008 × 508) + ACK processing time of the external device

[Calculation example 2]
Calculate the time the QJ71E71-B5 takes to complete the processing
of a data request from a PC after receiving it, when the QJ71E71-B5
and the PC communicate using TCP/IP and write 508 words of binary
code data to the random access buffer (unit: ms).
16.61 + ACK processing time of the external device (ms)
9.5 + (0.014 × 508) + ACK processing time of the external device

App - 10 App - 10
APPENDIX
MELSEC-Q

(3) Minimum processing time of communication using the MC protocol


(batch read and batch write)
Tfs = Ke + (Kdt × Df) + Scr × number of scans required for processing +
ACK processing time of external device

Tfs : Time from when Ethernet module receives request data


from personal computer until it completes processing (unit:
ms) 1
Ke, Kdt : Constant (refer to the table below)
Df : Number of request data words + number of response data
words (Application data part)
Scr : Programmable controller CPU processing time
(a) When the target station is the QCPU
• Local station access:
Ethernet module-mounted station scan time
• Other station access via MELSECNET/10
Transmission delay time + Ethernet module-
mounted station scan time
(b) When the target station is in the redundant system and
data is relayed via the tracking cable
• Local station access:
Control system CPU scan time + tracking time 2
• Other station access via MELSECNET/10
Transmission delay time + control system CPU scan
time + tracking time 2

1 The timing of the time from when the Ethernet module receives the
request data from the personal computer until it completes processing
is shown below.
External device
(personal computer)
Command ACK Response ACK
message (TCP only) message (TCP only)
Ethernet module

Step 0 END Step 0 END


Programmable
controller CPU Tfs
scan time

2 When data is relayed via the tracking cable of the redundant system,
add the tracking time. For the data transfer time in the tracking cable,
refer to the QnPRHCPU User's Manual (Redundant System).
QJ71E71-100 QJ71E71-B5, QJ71E71-B2
Communication using Communication using Communication using Communication using
TCP/IP UDP/IP TCP/IP UDP/IP
Ke Kdt Ke Kdt Ke Kdt Ke Kdt
Data communication using
14 0.009 13 0.008 21 0.012 19 0.011
Batch binary code
read Data communication using
18 0.015 13 0.017 23 0.020 18 0.020
ASCII code
Data communication using
14 0.009 13 0.008 21 0.020 19 0.013
Batch binary code
write Data communication using
16 0.027 14 0.027 22 0.037 20 0.033
ASCII code

App - 11 App - 11
APPENDIX
MELSEC-Q

[Calculation example 1]
Calculate the time the QJ71E71-B5 takes to complete the processing
of a data request from a PC after receiving it, when the QJ71E71-B5
and the PC perform TCP/IP communication and read 100 points of
ASCII code data from the data register (D) of the local station (unit:
ms) using the MC protocol communication.
• Assume that the scan time of the station in which QJ71E71-B5 is
installed is 10 ms:
37.64 + ACK processing time of the external device (ms)
23 + (0.020 × (21 + 211)) + 10 × 1 + ACK processing time of the
external device
Command data length = 21 words
Response data length = 211 words

[Calculation example 2]
Calculate the time the QJ71E71-B5 takes to complete the processing
of a data request from a PC after receiving it, when the QJ71E71-B5
and the PC performs TCP/IP communication and write 100 points of
ASCII code data to the data register (D) of the local station (unit: ms)
using the MC protocol communication.
• When "Enable Write at RUN time" is set
• Assume that the scan time of the station in which QJ71E71-B5 is
installed is 10 ms:
40.58 (ms) 22 + (0.037 × (221 + 11)) + 10 × 1
Command data length = 221 words
Response data length = 21 words

App - 12 App - 12
APPENDIX
MELSEC-Q

(4) Processing Time of the Dedicated Instructions


The following table shows approximate operation processing time of each
dedicated instruction. The operation processing time differs slightly depending on
the system configuration and the scan time on the sending/receiving station.

(a) QJ71E71-100
1) For Basic model QCPU, High Performance model QCPU, Process
CPU or Redundant CPU
Processing time (unit: ms)
High Performance
No. of access points model QCPU (other than Instruction execution
Instruction name Q02CPU Basic model QCPU
Q02CPU), Process condition
CPU, Redundant CPU
1) 2) For 1) For 2) For 1) For 2) For 1) For 2)
BUFRCV 1.3 1.8 0.9 1.4 2.2 5.8 TCP/IP communication,
BUFRCVS 1 word 1017 words 0.5 0.9 0.3 0.7 0.8 2.9 binary code communication,
fixed buffer communication
BUFSND 12.8 19.2 11.5 18.1 14.0 23.5
(procedure exist)
Closes the UDP/IP
CLOSE 1 port 3.3 3.2 4.2
communication port
ERRCLR Clear all the error information 2.2 2.0 3.4 —
ERRRD Read initial abnormal code 1.2 0.8 2.4 —
Opens the UDP/IP
OPEN 1 port 3.8 3.0 4.2
communication port
960 words 0.9 0.7 1.5
RECVS 0.6 0.3 0.8
480 words 0.8 0.5 1.2
960 words 28.8 28.2 1 24.3
READ,SREAD 17.2 17.1 1 14.7
480 words 22.7 21.7 1 20.9
960 words 4.3 3.8 6.8
RECV 2.1 2.0 1.8 Communication between
480 words 3.2 2.9 4.3
1 word stations in which Ethernet
960 words 15.7 15.4 16.4 modules are installed
SEND 7.9 7.5 11.5
480 words 11.2 10.8 16.8
960 words 28.8 28.4 1 24.4
WRITE,SWRITE 17.3 17.0 1 14.5
480 words 23.0 22.2 1 19.8
ZNRD 14.4 17.1 13.8 16.6 12.1 14.1
230 words
ZNWR 14.2 17.5 13.9 16.4 12.0 14.8
Time from receiving the UINI
instruction to the completion
UINI — 26.7 26.7 26.9
of re-initial processing (X19 is
turned on)

1 When data is relayed via the tracking cable of the redundant system,
add the tracking time. For the data transfer time in the tracking cable,
refer to the QnPRHCPU User's Manual (Redundant System).

App - 13 App - 13
APPENDIX
MELSEC-Q

2) For Universal model QCPU


Processing time (unit: ms)
No. of access points
Instruction name Universal model QCPU Instruction execution condition
1) 2) For 1) For 2)
BUFRCV 0.7 1.1
TCP/IP communication, binary code communication,
BUFRCVS 1 word 1017 words 0.2 0.6
fixed buffer communication (procedure exist)
BUFSND 8.2 15.7
CLOSE 1 port 3.2 Closes the UDP/IP communication port
ERRCLR Clear all the error information 1.7 —
ERRRD Read initial abnormal code 0.7 —
OPEN 1 port 2.9 Opens the UDP/IP communication port
960 words 0.6
RECVS 0.2
480 words 0.4
READ, 960 words 19.2
9.9
SREAD 480 words 13.9
960 words 3.8
RECV 2.0
480 words 2.9 Communication between stations in which Ethernet
1 word
960 words 15.4 modules are installed
SEND 7.5
480 words 10.8
WRITE, 960 words 18.9
9.7
SWRITE 480 words 13.7
ZNRD 9.8 11.8
230 words
ZNWR 9.8 12.0
Time from receiving the UINI instruction to the
UINI — 26.7
completion of re-initial processing (X19 is turned on)

App - 14 App - 14
APPENDIX
MELSEC-Q

(b) QJ71E71-B5, QJ71E71-B2


1) For Basic model QCPU, High Performance model QCPU, Process
CPU or Redundant CPU
Processing time (unit: ms)
High Performance
No. of access points model QCPU (other than Instruction execution
Instruction name Q02CPU Basic model QCPU
Q02CPU), Process condition
CPU, Redundant CPU
1) 2) For 1) For 2) For 1) For 2) For 1) For 2)
BUFRCV 1.9 2.4 1.2 1.6 2.3 5.8 TCP/IP communication,
BUFRCVS 1 word 1017 words 0.5 0.9 0.3 0.7 0.8 2.9 binary code communication,
fixed buffer communication
BUFSND 27.6 45.3 24.5 45.0 28.2 50.0
(procedure exist)
Closes the UDP/IP
CLOSE 1 port 4.5 4.5 6.0
communication port
ERRCLR Clear all the error information 2.7 2.2 3.4 —
ERRRD Read initial abnormal code 1.7 1.1 2.5 —
Opens the UDP/IP
OPEN 1 port 4.3 3.3 5.2
communication port
960 words 1.0 0.7 1.6
RECVS 0.6 0.3 0.8
480 words 0.8 0.5 1.2
960 words 52.1 52.3 1 50.1
READ,SREAD 30.1 27.7 1 27.7
480 words 41.1 40.0 1 38.9
960 words 7.9 7.4 11.1
RECV 5.3 5.2 5.3 Communication between
480 words 6.6 6.3 8.2
1 word stations in which Ethernet
960 words 39.4 37.9 38.8 modules are installed
SEND 21.4 20.3 22.8
480 words 30.4 29.1 30.8
960 words 53.6 52.4 1 47.6
WRITE,SWRITE 30.0 29.4 1 28.2
480 words 41.8 40.9 1 37.9
ZNRD 29.0 34.3 29.0 34.7 27.8 33.2
230 words
ZNWR 29.7 36.4 29.4 35.2 27.6 33.4
Time from receiving the UINI
instruction to the completion
UINI — 26.7 26.7 26.8
of re-initial processing (X19 is
turned on)

1 When data is relayed via the tracking cable of the redundant system,
add the tracking time. For the data transfer time in the tracking cable,
refer to the QnPRHCPU User's Manual (Redundant System).

App - 15 App - 15
APPENDIX
MELSEC-Q

2) For Universal model QCPU


Processing time (unit: ms)
No. of access points
Instruction name Universal model QCPU Instruction execution condition
1) 2) For 1) For 2)
BUFRCV 0.7 1.1
TCP/IP communication, binary code communication,
BUFRCVS 1 word 1017 word 0.2 0.6
fixed buffer communication (procedure exist)
BUFSND 12.9 23.7
CLOSE 1 port 2.9 Closes the UDP/IP communication port
ERRCLR Clear all the error information 1.8 —
ERRRD Read initial abnormal code 0.7 —
OPEN 1 port 3.0 Opens the UDP/IP communication port
960 0.6
RECVS 0.2
480 0.4
READ, 960 25.9
12.5
SREAD 480 18.3
960 4.4
RECV 2.4
480 3.3 Communication between stations in which Ethernet
1 word
960 22.3 modules are installed
SEND 11.0
480 16.1
WRITE, 960 25.4
12.9
SWRITE 480 18.2
ZNRD 12.6 15.3
230
ZNWR 12.9 15.6
Time from receiving the UINI instruction to the completion
UINI — 26.7
of re-initial processing (X19 is turned on)

App - 16 App - 16
APPENDIX
MELSEC-Q

(5) System switching time of redundant system


The following indicates the system switching time required when the Ethernet
module mounted on the main base unit of the control system CPU in the
redundant system issues a system switching request to the control system CPU
at communication error or disconnection detection.
The system switching time is the time from when a communication error or
disconnection is detected until the control system CPU is switched to the standby
system CPU.
(a) When communication error is detected
1) When ULP timeout occurs
Tnc = Ttu + St + Tcc
Tnc : System switching time
Ttu : TCP ULP timer value
St : 1 scan time
Tsw : CPU system switching time (Refer to the QnPRHCPU User's
Manual (Redundant System).)

The following shows the system switching operation timing when a


ULP timeout occurs.
External device

Communication
error occurrence

Control system (System A) Standby system (System B)


QJ71E71-100 QJ71E71-100
Station No. 1 Station No. 2

System switching Tracking cable


request
No response from external device

QJ71E71-100 Control system Standby system


(Station No. 1) operation operation
Ttu
System switching
request is issued
System A CPU scan time

System A Control system Standby system


Tsw
System B Standby system Control system
System B CPU scan time

QJ71E71-100 Standby system operation Control system operation


(Station No. 2) Tnc

App - 17 App - 17
APPENDIX
MELSEC-Q

2) When existence check error occurs


Tnc = Tsi + Ti × Tr + St + Tcc

Tnc : System switching time


Tsi : Existence check starting interval timer value
Ti : Existence check timer value
Tr : Existence check resend count
St : 1 scan time
Tsw : CPU system switching time (Refer to the QnPRHCPU User's
Manual (Redundant System).)

The following shows the system switching operation timing when an


existence check error occurs.

External device

Communication
error occurrence

Control system (System A) Standby system (System B)


QJ71E71-100 QJ71E71-100
Station No. 1 Station No. 2

Tracking cable
System switching
request

No communication with external device for predetermined period


(Tr=3)
QJ71E71-100 Control system operation Standby system operation
(Station No. 1) Tsi Ti Ti Ti
System switching
request is issued
System A CPU scan time

System A Control system Standby system


Tsw
System B Standby system Control system
System B CPU scan time

QJ71E71-100 Standby system operation Control system operation


(Station No. 2) Tnc

App - 18 App - 18
APPENDIX
MELSEC-Q

(b) When disconnection is detected


Tnc = Td + St + Tcc

Tnc : System switching time


Td : Cable disconnection timeout
St : 1 scan time
Tsw : System switching time (Refer to the QnPRHCPU User's
Manual (Redundant System).)

The following shows the system switching operation timing when


disconnection is detected.

External device

Disconnection
occurrence

Control system (System A) Standby system (System B)


QJ71E71-100 QJ71E71-100
(Station No. 1) (Station No. 2)

Tracking cable

Disconnection occurrence

QJ71E71-100 Control system Standby system


(Station No. 1) operation operation

Td
System switching
request is issued
System A CPU scan time

System A Control system Standby system


Tsw
System B Standby system Control system
System B CPU scan time

QJ71E71-100 Standby system operation Control system operation


(Station No. 2) Tnc

App - 19 App - 19
APPENDIX
MELSEC-Q

Appendix 5 ASCII Code List

MSD 0 1 2 3 4 5 6 7
LSD 000 001 010 011 100 101 110 111
0 0000 NUL DLE (SP) 0 @ P ` p
1 0001 SOH DC1 ! 1 A Q a q
2 0010 STX DC2 “ 2 B R b r
3 0011 ETX DC3 # 3 C S c s
4 0100 EOT DC4 $ 4 D T d t
5 0101 ENQ NAK % 5 E U e u
6 0110 ACK SYN & 6 F V f v
7 0111 BEL ETB ‘ 7 G W g w
8 1000 BS CAN ( 8 H X h x
9 1001 HT EM ) 9 I Y i y
A 1010 LF SUB : J Z j z
B 1011 VT ESC + ; K [ k {
C 1100 FF FS , < L \ l |
D 1101 CR GS = M ] m }
E 1110 SO RS . > N ^ n ~
F 1111 SI US / ? O – o DEL

Appendix 6 References

For details on TCP/IP, refer to the DDN Protocol Handbook (3 volumes).

Publisher
DDN Network Information Center
SRI International
333 Ravenswood Avenue, EJ291
Menlo Park, California 94025

RFC Number
TCP RFC793
UDP RFC768
IP RFC791
ICMP RFC792
ARP RFC826

App - 20 App - 20
APPENDIX
MELSEC-Q

Appendix 7 External Dimensions

(1) QJ71E71-100
98 (3.86)

R1
( 1)
4 (0.16)

23 (0.91)

90 (3.54) 27.4 (1.08)

(Unit: mm (in.))
1 When connecting a twisted pair cable, set the bending radius near the
connector (reference value: R1) as four times the cable’s outside diameter or
larger.

(2) QJ71E71-B5
98 (3.86)

R2
( 1)

DC power supply
for transceiver
4 (0.16)

23 (0.91)
27.4 (1.08)
90 (3.54) 8.5 (0.33)

(Unit: mm (in.))
1 When connecting an AUI cable, set the bending radius near the connector
(reference value: R2) as four times the cable’s outside diameter or larger.
App - 21 App - 21
APPENDIX
MELSEC-Q

(3) QJ71E71-B2

29.2 (1.15)
98 (3.86)

23.65 (0.93)

4 (0.16) 23 (0.91)
90 (3.54) 11.5 27.4 (1.08)
(0.45)

(Unit: mm (in.))

App - 22 App - 22
APPENDIX
MELSEC-Q

Appendix 8 Program Examples

The program examples presented in this section test the connection between the
Ethernet module and an external device (IBM PC/AT) that is connected to the same
Ethernet.
For each program, only the minimum programming that is required to perform the
communication test is done. Modify the IP address, port number and other values
according to your system configuration. In addition, abnormal handling may be added.

(1) Receive processing of target device


A receive processing example on the target device side is shown below.
Communication processing
on the external device side

Request message/transmission processing

Response message/reception processing

The TCP connection is closed


Is the TCP connection open?

Receive remaining
response messages

Was the reception data Timeout of monitoring timer


received within the time allotted
by the monitoring timer?

Insufficient size
of data received
Check the size of the received data

If a response message to
the next request was received
Response message processing

Have all the received


messages been processed?

End Error handling

Background
For Ethernet communications, the TCP socket functions are used inside the
personal computer. However, these functions do not have any limits. Therefore,
when the "send" function is executed once to transmit data, the receiving end (node)
needs to execute the "recv" function once or more in order to read the data ("send"
and "recv" is not proportional to 1:1 execution). For this reason, the receiving
procedure explained above, is required.

App - 23 App - 23
APPENDIX
MELSEC-Q

(2) When the transmission target does not support the receive
processing flow chart shown in section (1)
If the transmission target does not support the receive processing shown in
Section (1), the following results will occur when communicating with the "TCP
Maximum Segment Size Option transmission" is set to enable.
y Incorrect data read, when batch read is executed from the transmission
target using MC protocol.
y Incorrect data read, after replacing the Ethernet module (which does not
support the TCP Maximum Segment Size Option transmission function) with
the alternative module supporting the function.
y Data is not received, even though the value of "Number of packet reception"
area (Address: 1B8H, 1B9H) in the buffer memory was changed.
If this occurs, change the "TCP Maximum Segment Size Option transmission"
setting to disable.

App - 24 App - 24
APPENDIX
MELSEC-Q

Appendix 8.1 Program examples using Visual Basic®.NET and Visual C++®.NET

Appendix 8.1.1 Program example for communication using the MC protocol –1

The following explains a program, its execution environment and the contents of data
communication .

(1) Execution environment of the program example


(a) Programmable controller CPU side
1) QCPU model name of the Ethernet installed station : Q25HCPU
2) Ethernet module I/O signal : X/Y000 to X/Y01F
3) Ethernet module IP address : C0.00.01.FDH (192.00.01.253)
4) Ethernet module port number : 2000H
5) GX Developer setting
• Operational settings : See "(3) GX Developer setting (a)" on
the next page
• Open settings : See "(3) GX Developer setting (b)" on
the next page
(b) External device side
® ®
1) Operation environment : Microsoft Windows XP
Professional Operating
System Ver.2002 Service
pack2
2) Ethernet interface board model name : WINSOCK compatible board
3) Library : WSOCK32.LIB
®
4) Software development environment : Microsoft Corporation Visual
++®
C .NET 2003 is used
5) Ethernet address : Setting not required because
the ARP function is available
6) IP address : Receive at Active open
7) Port number : Receive at Active open
(c) Communication protocol : TCP/IP

(2) Outline of the program example


(a) Sequence program on the programmable controller CPU side
Parameters are set from GX Developer.
(Sequence program is not required)
(b) Program on the external device side
Executes the following read/write data communication with the
programmable controller CPU using the library mentioned above.
• Write in word units (for 5 points from D0 to D4)
• Read in word units (for 5 points from D0 to D4)

App - 25 App - 25
APPENDIX
MELSEC-Q

(3) GX Developer setting


Set the programmable controller CPU parameters as follows.

(a) Operational settings

Local station IP address: C0.00.01.FDH (192.00.01.253)

(b) Open settings

Local station Port No.: 2000H

(4) Program on the external device side


The program example of the external device shown below accesses the
Q25HCPU of the station in which the Ethernet module is installed.
When this program is executed, the contents of the following communication
messages are displayed in order:
1) Batch write command message in word units
2) Batch write response message in word units
3) Batch read command message in word units
4) Batch read response message in word units

App - 26 App - 26
APPENDIX
MELSEC-Q

REMARKS
(1) The following explains an outline of the compiling procedure for a program
created using Microsoft Corporation Visual C++ .NET.
® ®

++®
1) Start Visual C .NET.
2) Create a project.
From [File] [New] [Project], select ".NET" in "Project Types" and
"Empty Project" in "Templates”, and set the project name (e.g. AJSAMP)
and location.
3) Create a source file.
Display Solution Explorer, right-click Source Files and select [Add] [Add
New Item]. Set the file name (e.g. AJSAMP.cpp) and location, and create
a program according to the program example (See the next page).
4) From the project setting screen, get WSOCK32.LIB linked.
Display Solution Explorer, right-click the project name (AJSAMP) and
select [Properties] [Configuration Properties] [Linker] [Command
Line]. Type WSOCK32.LIB in Additional Options and press the OK
button.
5) On the Build menu, click Build Solution to create an execution file
(AJSAMP.EXE).
6) End Visual C++ .NET.
®

7) Execute AJSAMP.EXE.

(2) Outline of the procedure for calling the socket routine


Start

(Create socket) socket()

bind()

(Bind) Passive open Active open UDP

(Open) listen() connect()

accept()

(Communicate) sendto()/recvfrom()
send()/recv()

(Disable sending/receiving) shutdown()

(Close) closesocket

Complete

App - 27 App - 27
APPENDIX
MELSEC-Q

/ /
/ /
/ Sample program (program name: AJSAMP.CPP) /
/ /
/ This program is a sample program to conduct a /
/ connection test between the Ethernet module /
/ and target device. /
/ This program accesses the data register (D) of /
/ the PLC CPU installed together with the Ethernet /
/ module. /
/ /
/ Copyright(C) 2005 Mitsubishi Electric /
/ Corporation /
/ All Rights Reserved /
/ /
/ /

#include <stdio.h>
#include <winsock.h>

#define FLAG_OFF 0 // Completion flag OFF


#define FLAG_ON 1 // Completion flag ON
#define SOCK_OK 0 // Normal completion
#define SOCK_NG -1 // Abnormal completion
#define BUF_SIZE 4096 // Receive buffer size

#define ERROR_INITIAL 0 // Initial error


#define ERROR_SOCKET 1 // Socket creation error
#define ERROR_BIND 2 // Bind error
#define ERROR_CONNECT 3 // Connection error
#define ERROR_SEND 4 // Send error
#define ERROR_RECEIVE 5 // Receive error
#define ERROR_SHUTDOWN 6 // Shutdown error
#define ERROR_CLOSE 7 // Line close error

//Definitions for checking the receiving sizes


//#define RECV_ANS_1 4 // Receiving size of response message in reply to device write (1E frame)
#define RECV_ANS_1 22 // Receiving size of response message in reply to device write (3E frame)
//#define RECV_ANS_2 24 // Receiving size of response message in reply to device read (1E frame)
#define RECV_ANS_2 42 // Receiving size of response message in reply to device read (3E frame)

typedef struct sck_inf{


struct in_addr my_addr;
unsigned short my_port;
struct in_addr aj_addr;
unsigned short aj_port;
}sck_inf;

App - 28 App - 28
APPENDIX
MELSEC-Q

int nErrorStatus; // Error information storage variable


int Dmykeyin; // Dummy key input
int Closeflag; // Connection completion flag
int socketno;

int main()
{
WORD wVersionRequested=MAKEWORD(1,1); // Winsock Ver 1.1 request
WSADATA wsaData;
int length; // Communication data length
unsigned char s_buf[BUF_SIZE]; // Send buffer
unsigned char r_buf[BUF_SIZE]; // Receive buffer
int rbuf_idx; // Receive data storage head index
int recv_size; // Number of receive data
struct sck_inf sc;
struct sockaddr_in hostdata; // External device side data
struct sockaddr_in aj71e71; // Ethernet module side data
void Sockerror(int); // Error handling function

unsigned long ulCmdArg ; // Non-blocking mode setting flag

sc.my_addr.s_addr=htonl(INADDR_ANY); // External device side IP address


sc.my_port=htons(0); // External device side port number
sc.aj_addr.s_addr=inet_addr("192.0.1.253"); // Ethernet module side IP address
// (C00001FDH)
sc.aj_port=htons(0x2000); // Ethernet module side port number

Closeflag=FLAG_OFF; // Connection completion flag off

nErrorStatus=WSAStartup(wVersionRequested,&wsaData); // Winsock Initial processing

if(nErrorStatus!=SOCK_OK) {
Sockerror(ERROR_INITIAL); // Error handling
return(SOCK_NG);
}

printf("Winsock Version is %ld.%ld\n",HIBYTE(wsaData.wVersion),LOBYTE(wsaData.wVersion));


printf("AJ_test Start\n");

socketno=socket(AF_INET,SOCK_STREAM,0); // Create socket for TCP/IP

if(socketno==INVALID_SOCKET){
Sockerror(ERROR_SOCKET); // Error handling
return(SOCK_NG);
}

hostdata.sin_family=AF_INET;
hostdata.sin_port=sc.my_port;
hostdata.sin_addr.s_addr=sc.my_addr.s_addr;

App - 29 App - 29
APPENDIX
MELSEC-Q

if(bind(socketno,(LPSOCKADDR)&hostdata,sizeof(hostdata))!=SOCK_OK){
// Bind
Sockerror(ERROR_BIND); // Error handling
return(SOCK_NG);
}

aj71e71.sin_family=AF_INET;
aj71e71.sin_port=sc.aj_port;
aj71e71.sin_addr.s_addr=sc.aj_addr.s_addr;

if(connect(socketno,(LPSOCKADDR)&aj71e71,sizeof(aj71e71))!=SOCK_OK){
// Connection (Active open)
Sockerror(ERROR_CONNECT); // Error handling
return(SOCK_NG);
}

Closeflag=FLAG_ON; // Connection completion flag ON

// Set to non-blocking mode


ulCmdArg = 1;
ioctlsocket(socketno, FIONBIO, &ulCmdArg); // Set to non-blocking mode

// strcpy((char *)(s_buf), "03FF000A4420000000000500112233445566778899AA");


// D0 to D4 batch write request (1E frame)
strcpy((char *)(s_buf), "500000FF03FF00002C000A14010000D*0000000005112233445566778899AA");
// D0 to D4 batch write request (3E frame)

length = strlen((char *)(s_buf));

if(send(socketno, (char *)(s_buf), length, 0) == SOCKET_ERROR) {


// Data sending
Sockerror(ERROR_SEND); // Error handling
return (SOCK_NG);
}
printf("\n send data\n%s\n",s_buf);

// Perform receiving size check and receiving processing simultaneously


rbuf_idx = 0; // Receive data storage head index initialization
recv_size = 0; // Initialize the number of receive data
while(1) {
length = recv(socketno, (char*) (&r_buf[rbuf_idx]), (BUF_SIZE - rbuf_idx), 0);
// Response data receiving
if(length == 0) { // Is connection cut off?
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
}

App - 30 App - 30
APPENDIX
MELSEC-Q

if(length == SOCKET_ERROR) {
nErrorStatus = WSAGetLastError();
if(nErrorStatus != WSAEWOULDBLOCK) {
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
} else {
continue; // Repeat until messages are received
}
} else {
rbuf_idx += length; // Update the receive data storage
// position
recv_size += length; // Update the number of receive data
if(recv_size >= RECV_ANS_1) // Have all response messages been
// received?
break; // Stop repeating as messages have
// been received
}
}
r_buf[rbuf_idx] = '\0' ; // Set NULL at the end of receive data

printf("\n receive data\n%s\n",r_buf);

// strcpy((char *)(s_buf), "01FF000A4420000000000500"); // D0 to D4 batch read request


// (1E frame)
strcpy((char *)(s_buf), "500000FF03FF000018000A04010000D*0000000005");
// D0 to D4 batch read request
// (3E frame)

length = strlen((char *)(s_buf));

if(send(socketno, (char *)(s_buf), length, 0) == SOCKET_ERROR) {


// Data sending
Sockerror(ERROR_SEND); // Error handling
return (SOCK_NG);
}
printf("\n send data\n%s\n",s_buf);

// Perform receiving size check and receiving processing simultaneously


rbuf_idx = 0; // Receive data storage head index
// initialization
recv_size = 0; // Initialize the number of receive data
while(1) {
length = recv(socketno, (char*)(&r_buf[rbuf_idx]), (BUF_SIZE - rbuf_idx), 0);
// Response data receiving
if(length == 0) { // Is connection cut off?
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
}

App - 31 App - 31
APPENDIX
MELSEC-Q

if(length == SOCKET_ERROR) {
nErrorStatus = WSAGetLastError();
if(nErrorStatus != WSAEWOULDBLOCK) {
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
} else {
continue; // Repeat until messages are received
}
} else {
rbuf_idx += length; // Update the receive data storage
// position
recv_size += length; // Update the number of receive data
if(recv_size >= RECV_ANS_2) // Have all response messages been
// received?
break; // Stop repeating as messages have
// been received
}
}
r_buf[rbuf_idx] = '\0' ; // Set NULL at the end of receive data

printf("\receive data\n%s\n", r_buf);

if(shutdown(socketno,2)!=SOCK_OK){ // Processing to disable


// sending/receiving
Sockerror(ERROR_SHUTDOWN); // Error handling
return(SOCK_NG);
}

if(closesocket(socketno)!=SOCK_OK){ // Close processing


Sockerror(ERROR_CLOSE); // Error handling
return(SOCK_NG);
}

Closeflag=FLAG_OFF; // Connection completion flag off


WSACleanup(); // Release Winsock.DLL

printf("\nAJ_test End.\n\n Normally completed. \n");


printf("Press any key to exit the program.\n");
Dmykeyin=getchar(); // Wait for key input

return(SOCK_OK);
}

void Sockerror(int error_kind) // Error handling function


{
if(error_kind==ERROR_INITIAL){
printf("Initial processing is abnormal.");
}

App - 32 App - 32
APPENDIX
MELSEC-Q

else{
nErrorStatus=WSAGetLastError();
switch(error_kind){
case ERROR_SOCKET:
printf("Failed to create socket.");
break;
case ERROR_BIND:
printf("Failed to bind.");
break;
case ERROR_CONNECT:
printf("Failed to establish connection.");
break;
case ERROR_SEND:
printf("Sending failed.");
break;
case ERROR_RECIEVE:
printf("Receiving failed.");
break;
case ERROR_SHUTDOWN:
printf("Failed to shutdown.");
break;
case ERROR_CLOSE:
printf("Failed to close normally.");
break;
}
}

printf("Error code is %d.\n", nErrorStatus);

if(Closeflag==FLAG_ON){
nErrorStatus=shutdown(socketno,2); // Shutdown processing
nErrorStatus=closesocket(socketno); // Close processing
Closeflag=FLAG_OFF; // Connection completion flag off
}

printf("Press any key to exit the program.\n");


Dmykeyin=getchar(); // Wait for a key input
WSACleanup(); // Release Winsock.DLL
return;
}

App - 33 App - 33
APPENDIX
MELSEC-Q

Appendix 8.1.2 Program example of communication using the MC protocol –2

This section provides the program example, execution environment and data
communication contents.

(1) Execution environment of program example


(a) Programmable controller CPU side
1) Ethernet module-mounted station QCPU model name : Q25PRHCPU
2) I/O signals of Ethernet module : X/Y000 to X/Y01F
3) Ethernet module IP address (System A) : C0.00.01.FCH
(192.00.01.252)
Ethernet module IP address (System B) : C0.00.01.FDH
(192.00.01.253)
4) Ethernet module port number : 2000H
5) GX Developer settings
• Operation setting : Refer to "(3) GX Developer settings (a)" on the
next page.
• Open setting : Refer to "(3) GX Developer settings (b)" on the
next page.
• Redundant settings : Refer to "(3) GX Developer settings (c)" on the
next page.

(b) External device side


1) Operating environment :
® ®
Microsoft Windows XP Professional Operating System Ver.2002
Service Pack 2
2) Ethernet interface board model name : WINSOCK compatible board
3) Library : WSOCK32.LIB
4) Software development environment :
® ®
Microsoft Corporation make Visual C++ .NET 2003 is used.
5) Ethernet address : Need not be set as the ARP function is available.
6) IP address : Received at Active open
7) Port number : Received at Active open

(c) Communication system : TCP/IP

(2) Overview of program example


(a) Programmable controller CPU side sequence program
Parameter settings must be made using GX Developer.
(No sequence program required)

(b) External device side program


Writes data to the data registers D0 to D4 (5 points) of the redundant CPU
(control system) in word unit using the above library.
If write of data from the system A side is unsuccessful due to a
communication error or similar reason at this time, data are written from the
system B side to the data registers of the redundant CPU (control system).

App - 34 App - 34
APPENDIX
MELSEC-Q

(3) GX Developer settings


Set the parameters of the programmable controller CPU as described below.
(a) Operation setting

Ethernet module IP address (System A) : C0.00.01.FCH (192.00.01.252)

(b) Open setting

Local port number : 2000H

(c) Redundant setting

Ethernet module IP address (System B) : C0.00.01.FDH (192.00.01.253)

App - 35 App - 35
APPENDIX
MELSEC-Q

(4) External device side program


The following shows a program example of the external device that accesses the
Ethernet module-mounted station Q25PRHCPU.
When this program is executed, the following contents are displayed in due
order.
1) Version of used Winsock
2) Test starting message
3) Write of batch command messages in word unit
4) Write of batch response messages in word unit
5) Test end message

REMARKS
The following describes the general compile procedure for the program created
® ®
using Microsoft Visual C++ .NET.
®
1) Start Visual C++ .NET.
2) Create a project.
From [File] [New] [Project], select ".NET" in "Project Types" and "Empty
Project" in "Templates", and set the project name (e.g. QJSAMP) and location.
3) Create a source file.
Display Solution Explorer, right-click Source Files and select [Add] [Add New
Item]. Set the file name (e.g. QJSAMP.cpp) and location, and create a program
according to the program example (See the next page).
4) From the project setting screen, get WSOCK32.LIB linked.
Display Solution Explorer, right-click the project name (QJSAMP) and select
[Properties] [Configuration Properties] [Linker] [Command Line]. Type
WSOCK32.LIB in Additional Options and press the OK button.
5) On the Build menu, click Build Solution to create an execution file
(QJSAMP.EXE).
®
6) Exit from Visual C++ .NET.
7) Execute QJSAMP.EXE.

App - 36 App - 36
APPENDIX
MELSEC-Q

/ /
/ /
/ Sample program (program name: QJSAMP.CPP) /
/ /
/ This program is a sample program for testing the /
/ connection of the Ethernet module and external /
/ device. /
/ This program accesses the data registers (D) of /
/ the redundant CPU (control system) mounted /
/ with the Ethernet module. /
/ /
/ Copyright(C) 2005 Mitsubishi Electric Corporation /
/ All Rights Reserved /
/ /
/ /

#include <stdio.h>
#include <winsock.h>

#define FLAG_OFF 0 // End flag OFF


#define FLAG_ON 1 // End flag ON
#define SOCK_OK 0 // Normal termination
#define SOCK_NG -1 // Unsuccessful termination
#define BUF_SIZE 4096 // Receive buffer size

#define ERROR_NO_ERROR 0 // No error


#define ERROR_INITIAL 1 // Initial error
#define ERROR_SOCKET 2 // Socket creation error
#define ERROR_BIND 3 // Bind error
#define ERROR_CONNECT 4 // Connect error
#define ERROR_SEND 5 // Send error
#define ERROR_SHUTDOWN 6 // Shutdown error
#define ERROR_CLOSE 7 // Line close error

// Definition for checking receive size


#define RECV_ANS_1 22 // Response message receive size in reply to device write (3E frame)

typedef struct sck_inf{


struct in_addr my_addr;
unsigned short my_port;
struct in_addr qj_addr;
unsigned short qj_port;
} sck_inf;

int nErrorStatus; // Error information storage variable


int Dmykeyin; // Dummy key input
int ShutdownflagA; // Shutdown flag (for System A connection)
int ShutdownflagB; // Shutdown flag (for System B connection)

App - 37 App - 37
APPENDIX
MELSEC-Q

int CloseflagA; // Connection end flag (for System A connection)


int CloseflagB; // Connection end flag (for System B connection)
int socketnoA;
int socketnoB;
int ConnectLastErrorA; // Connect processing error information (for System A connection)
int ConnectLastErrorB; // Connect processing error information (for System B connection)
int SendFlag; // Send completion flag

int main()
{
WORD wVersionRequested = MAKEWORD(1, 1); // Winsock Ver 1.1 request
WSADATA wsaData;
int length; // Communication data length
unsigned char s_buf[BUF_SIZE]; // Send buffer
unsigned char r_bufA[BUF_SIZE],r_bufB[BUF_SIZE]; // Receive buffer
struct sck_inf scA,scB;
struct sockaddr_in hostdataA,hostdataB; // External device side data
struct sockaddr_in qj71e71A,qj71e71B; // Ethernet module side data
BOOL DataRecv(int, unsigned char *, int); // Receive processing function
void Sockerror(int, int); // Error handling function

unsigned long ulCmdArgA,ulCmdArgB; // Non-blocking mode setting flag

scA.my_addr.s_addr = scB.my_addr.s_addr = htonl(INADDR_ANY); // External device side IP address


scA.my_port = scB.my_port = htons(0); // External device side port number
scA.qj_addr.s_addr = inet_addr("192.0.1.252");
// Ethernet module side IP address (System A: C00001FCh)
scB.qj_addr.s_addr = inet_addr("192.0.1.253");
// Ethernet module side IP address (System B: C00001FDh)
scA.qj_port = scB.qj_port = htons(0x2000); // Ethernet module side port number

ShutdownflagA = ShutdownflagB = FLAG_OFF; // Shutdown flag OFF


CloseflagA = CloseflagB = FLAG_OFF; // Connection end flag OFF

nErrorStatus = WSAStartup(wVersionRequested, &wsaData); // Winsock initial processing

ConnectLastErrorA = ERROR_NO_ERROR;
// Connect processing error information initialization (for System A)
ConnectLastErrorB = ERROR_NO_ERROR;
// Connect processing error information initialization (for System B)

if(nErrorStatus != SOCK_OK) {
Sockerror(ERROR_INITIAL, ERROR_INITIAL); // Error handling
return (SOCK_NG);
}

printf("Winsock Version is %1d.%1d\n", HIBYTE(wsaData.wVersion), LOBYTE(wsaData.wVersion));


printf("QJ_test Start\n");

App - 38 App - 38
APPENDIX
MELSEC-Q

// System A connect processing


socketnoA = socket(AF_INET, SOCK_STREAM, 0); // TCP/IP socket (for System A connection) creation
if(socketnoA != INVALID_SOCKET) {
hostdataA.sin_family = AF_INET;
hostdataA.sin_port = scA.my_port;
hostdataA.sin_addr.s_addr = scA.my_addr.s_addr;

if(bind(socketnoA, (LPSOCKADDR)&hostdataA, sizeof(hostdataA)) == SOCK_OK) {


// Bind (System A)
qj71e71A.sin_family = AF_INET;
qj71e71A.sin_port = scA.qj_port;
qj71e71A.sin_addr.s_addr = scA.qj_addr.s_addr;

if(connect(socketnoA, (LPSOCKADDR)&qj71e71A, sizeof(qj71e71A)) == SOCK_OK) {


// Connect (Active open: System A)
ShutdownflagA = FLAG_ON; // Shutdown flag ON
CloseflagA = FLAG_ON; // Connection end flag ON
// Set to non-blocking mode
ulCmdArgA = 1;
ioctlsocket(socketnoA, FIONBIO, &ulCmdArgA);
// Set to non-blocking mode (for System A connection)
} else {
ConnectLastErrorA = ERROR_CONNECT; // Connection establishment failure
}
} else {
ConnectLastErrorA = ERROR_BIND; // Bind failure
}
} else {
ConnectLastErrorA = ERROR_SOCKET; // Socket creation failure
}

// System B connect processing


socketnoB = socket(AF_INET, SOCK_STREAM, 0); // TCP/IP socket (for System B connection) creation
if(socketnoB != INVALID_SOCKET) {
hostdataB.sin_family = AF_INET;
hostdataB.sin_port = scB.my_port;
hostdataB.sin_addr.s_addr = scB.my_addr.s_addr;

if(bind(socketnoB, (LPSOCKADDR)&hostdataB, sizeof(hostdataB)) == SOCK_OK) {


// Bind (System A)
qj71e71B.sin_family = AF_INET;
qj71e71B.sin_port = scB.qj_port;
qj71e71B.sin_addr.s_addr = scB.qj_addr.s_addr;

App - 39 App - 39
APPENDIX
MELSEC-Q

if(connect(socketnoB, (LPSOCKADDR)&qj71e71B, sizeof(qj71e71B)) == SOCK_OK) {


// Connect (Active open: System B)
ShutdownflagB = FLAG_ON; // Shutdown flag ON
CloseflagB = FLAG_ON; // Connection end flag ON
// Set to non-blocking mode
ulCmdArgB = 1;
ioctlsocket(socketnoB, FIONBIO, &ulCmdArgB);
// Set to non-blocking mode (for System B connection)
} else {
ConnectLastErrorB = ERROR_CONNECT; // Connection establishment failure
}
} else {
ConnectLastErrorB = ERROR_BIND; // Bind failure
}
} else {
ConnectLastErrorB = ERROR_SOCKET; // Socket creation failure
}

// Connect completion processing


if( (CloseflagA == FLAG_OFF) && (CloseflagB == FLAG_OFF) ){ // When both systems are abnormal
Sockerror(ConnectLastErrorA, ConnectLastErrorB); // Error handling
return (SOCK_NG);
}

strcpy((char*)(s_buf), "500000FF03D000002C000A14010000D*0000000005112233445566778899AA");
// D0-D4 batch write request (3E frame, addressed to control system)
length = strlen((char*)(s_buf));

printf("Send starts. Press any key. \n");


Dmykeyin = getchar(); // Waiting for key input

SendFlag = FLAG_OFF; // Send completion flag OFF


// System A send processing
if( CloseflagA == FLAG_ON && (SendFlag == FLAG_OFF) ){
if(send(socketnoA, (char*)(s_buf), length, 0) != SOCKET_ERROR) {
// Data send (System A)
printf("\n Send data (System A) \n%s\n", s_buf); // Send data display (System A)
SendFlag = FLAG_ON; // Send completion flag ON
// Receive processing
if(DataRecv(socketnoA, r_bufA, RECV_ANS_1) == TRUE) { // Data receive
printf("\n Receive data (System A) \n%s\n", r_bufA); // Receive data display
} else {
printf("Receive failure (System A) \n");
}
} else {
printf("Send failure (System A) \n");
}
}

App - 40 App - 40
APPENDIX
MELSEC-Q

// System B send processing


if( (CloseflagB == FLAG_ON) && (SendFlag == FLAG_OFF) ){
if(send(socketnoB, (char*)(s_buf), length, 0) != SOCKET_ERROR) { // Data send (System B)
printf("\n Send data (System B) \n%s\n", s_buf); // Send data display (System B)
SendFlag = FLAG_ON; // Send completion flag ON
// Receive processing
if(DataRecv(socketnoB, r_bufB, RECV_ANS_1) == TRUE) { // Data receive
printf("\n Receive data (System B) \n%s\n", r_bufB); // Receive data display
} else {
printf("Receive failure (System B) \n");
}
}else{
printf("Send failure (System B) \n");
}
}

// Send completion processing


if( SendFlag == FLAG_OFF ){
Sockerror(ERROR_SEND, ERROR_SEND); // Error handling
return (SOCK_NG);
}

if(CloseflagA == FLAG_ON) {
ShutdownflagA = FLAG_OFF; // Shutdown flag OFF
if(shutdown(socketnoA, 2) != SOCK_OK) { // Send/receive inhibit processing (System A)
Sockerror(ERROR_SHUTDOWN, ERROR_NO_ERROR); // Error handling
return (SOCK_NG);
}
}

if(CloseflagB == FLAG_ON) {
ShutdownflagB = FLAG_OFF; // Shutdown flag OFF
if(shutdown(socketnoB, 2) != SOCK_OK) { // Send/receive inhibit processing (System B)
Sockerror(ERROR_NO_ERROR, ERROR_SHUTDOWN); // Error handling
return (SOCK_NG);
}
}

CloseflagA = FLAG_OFF; // Connection end flag OFF


if(closesocket(socketnoA) != SOCK_OK) { // Close processing (System A)
Sockerror(ERROR_CLOSE, ERROR_NO_ERROR); // Error handling
return (SOCK_NG);
}

App - 41 App - 41
APPENDIX
MELSEC-Q

CloseflagB = FLAG_OFF; // Connection end flag OFF


if(closesocket(socketnoB) != SOCK_OK) { // Close processing (System B)
Sockerror(ERROR_NO_ERROR, ERROR_CLOSE); // Error handling
return (SOCK_NG);
}

WSACleanup(); // Winsock.DLL release

printf("\nQJ_test End. \n\nNormally completed. \n");


printf("Program is closed. Press any key. \n");
Dmykeyin = getchar(); // Waiting for key input

return (SOCK_OK);
}

BOOL DataRecv(int socketno, unsigned char *pR_buf, int size_max) // Receive processing function
{
int length; // Communication data length
int rbuf_idx; // Receive data storage starting index
int recv_size; // Number of received data

// Performs receive processing while simultaneously making size check


rbuf_idx = 0; // Receive data storage starting index initialization
recv_size = 0; // Initializes the number of received data
while(1) {
length = recv(socketno, ((char*)(pR_buf + rbuf_idx)), (BUF_SIZE - rbuf_idx), 0);
// Response data receive
if(length == 0) { // Has connection been cut?
return (FALSE); // Error handling
}
if(length == SOCKET_ERROR) {
nErrorStatus = WSAGetLastError();
if(nErrorStatus != WSAEWOULDBLOCK) {
return (FALSE); // Error handling
} else {
continue; // Repeated until data are received
}
} else {
rbuf_idx += length; // Updates receive data storage position
recv_size += length; // Updates the number of received data
if(recv_size >= size_max) // Have all response messages received?
break; // Stops repeating as data are received
}
}
*(pR_buf + rbuf_idx) = '\0' ; // At the end of received data
// set NULL

App - 42 App - 42
APPENDIX
MELSEC-Q

return (TRUE); // Normal termination


}

void Sockerror(int error_kind_A, int error_kind_B) // Error handling function


{
if (error_kind_A == ERROR_INITIAL){
printf("Initial processing is abnormal. \n");
}
else{
nErrorStatus = WSAGetLastError();
switch(error_kind_A){
case ERROR_SOCKET:
printf("Socket could not be created. (System A)\n");
break;
case ERROR_BIND:
printf("Bind could not be executed. (System A)\n");
break;
case ERROR_CONNECT:
printf("Connection could not be established. (System A)\n");
break;
case ERROR_SEND:
printf("Send could not be executed. \n");
break;
case ERROR_SHUTDOWN:
printf("Shutdown could not be executed. (System A)\n");
break;
case ERROR_CLOSE:
printf("Normal close could not be executed. (System A)\n");
break;
}
switch(error_kind_B){
case ERROR_SOCKET:
printf("Socket could not be created. (System B)\n");
break;
case ERROR_BIND:
printf("Bind could not be executed. (System B)\n");
break;
case ERROR_CONNECT:
printf("Connection could not be established. (System B)\n");
break;
case ERROR_SHUTDOWN:
printf("Shutdown could not be executed. (System B)\n");
break;
case ERROR_CLOSE:
printf("Normal close could not be executed. (System B)\n");
break;

App - 43 App - 43
APPENDIX
MELSEC-Q

}
}
printf("Error code is %d. \n", nErrorStatus);

if (ShutdownflagA == FLAG_ON){
nErrorStatus = shutdown(socketnoA, 2); // Shutdown processing (System A)
ShutdownflagA = FLAG_OFF; // Shutdown flag OFF (System A)
}
if (ShutdownflagB == FLAG_ON){
nErrorStatus = shutdown(socketnoB, 2); // Shutdown processing (System B)
ShutdownflagB = FLAG_OFF; // Shutdown flag OFF (System B)
}

if (CloseflagA == FLAG_ON){
nErrorStatus = closesocket(socketnoA); // Close processing (System A)
CloseflagA = FLAG_OFF; // Connection end flag OFF (System A)
}
if (CloseflagB == FLAG_ON){
nErrorStatus = closesocket(socketnoB); // Close processing (System B)
CloseflagB = FLAG_OFF; // Connection end flag OFF (System B)
}

printf("Program is closed. Press any key. \n");


Dmykeyin = getchar(); // Waiting for key input
WSACleanup(); // Winsock.DLL release
return;
}

App - 44 App - 44
APPENDIX
MELSEC-Q

Appendix 8.1.3 Program example of communication using the MC protocol –3

This section explains an example of an external device program that reads data from
the programmable controller CPU.
A sample program, its execution environment and contents of data communication are
shown below.

(1) Execution environment of the program example


(a) Programmable controller CPU side
1) Ethernet module-mounted station QCPU model name : Q25HCPU
2) I/O signals of Ethernet module : X/Y000 to X/Y01F
3) Ethernet module IP address : C0.00.01.FDH
(192.00.01.253)
4) Ethernet module port number : 2000H
5) GX Developer settings
• Operation setting : Refer to "(3) GX Developer settings (a)" on the
next page.
• Open setting : Refer to "(3) GX Developer settings (b)" on the
next page.

(b) External device side


1) Operating environment :
® ®
Microsoft Windows XP Professional Operating System Ver. 2002
Service Pack 2
2) Ethernet interface board model name : WINSOCK compatible board
3) Software development environment :
® ®
Microsoft Corporation make Visual Basic .NET 2003 is used.
4) Ethernet address : Need not be set as the ARP function is available.
5) IP address : Any given number is assigned.
6) Port number : Any given number is assigned.

(c) Communication system : TCP/IP

(2) Outline of the program example


(a) Programmable controller CPU side sequence program
Parameter settings must be made using GX Developer.
(No sequence program required)
(b) External device side program
Data (D0 to D4) in the programmable controller CPU are read out.

App - 45 App - 45
APPENDIX
MELSEC-Q

(3) GX Developer setting


Set the programmable controller CPU parameters as follows.

(a) Operational settings

Local station IP address: C0.00.01.FDH (192.00.01.253)

(b) Open settings

Local station Port No.: 2000H

(4) Program on the external device side


The program example provided here shows that the external device accesses
the Q25HCPU on the station where the Ethernet module is installed.
In this program, data of D0 to D4 (5 points) in the QCPU on the Ethernet module
installed station are read with an A-compatible 1E frame command (01: Batch
read in word units).

The following are basic operation procedures:


• Sending a command when the line is disconnected
Connect the line, and after completing the connection, send the E71 command.
• Reconnecting the line when it is connected
Disconnect the line, and after completing the disconnection, reconnect it.

App - 46 App - 46
APPENDIX
MELSEC-Q

REMARKS
® ®
• The program created using Microsoft Corporation’s Visual Basic .NET is compiled
as follows:
®
1) Start Visual Basic . NET.
2) Create a project.
From [File] [New] [Project], select "Visual Basic Project" in "Project Types"
and "Windows Application" in "Templates", and set the project name (e.g.
AJSAMP) and location.
3) Create a form and a program.
Using "Button" in the toolbox, create the screen example (Form1.vb) shown in
(5) and make a program according to the program example given in (6).
4) On the Build menu, click Build Solution to create an execution file
(AJSAMP.EXE).
®
5) Exit the Visual Basic .NET.
6) Execute the AJSAMP.EXE.

App - 47 App - 47
APPENDIX
MELSEC-Q

(5) Window example (Form 1.vb)

(Object name)
Button 1 ’ Connect to the Ethernet interface module.
’ Send the A-compatible 1E frame
Button 2
(batch read in word units).
Button 3 ’ Disconnect the line.

Button 5 Button 4 ’ End the program.


’ Check the connection state.

(6) Sample program (Form 1.vb)

Option Strict Off


Option Explicit ON

Imports System
Imports System.Text
Imports System.Net

Friend Class Form1


Inherits System. Windows. Forms. Form
#Region “Windows Form Designer generated code”
Public Sub New()
MyBase.New()
If m_vb6FormDefInstance Is Nothing Then
If m_InitializingDefInstance Then
m_vb6FormDefInstance = Me
Else
Try
‘For the start-up form, the first instance created is the default instance.
If System. Reflection. Assembly. GetExecutingAssembly. EntryPoint
.DeclaringType Is Me.GetType Then
m_vb6FormDefInstance = Me
EndIf
Catch
End Try
End If
End If
‘ This call is required by the Windows form designer.
InitializeComponent()
End Sub

App - 48 App - 48
APPENDIX
MELSEC-Q

‘Form overrides dispose to clean up the component list.


Protected Overloads Overrides Sub Dispose(ByVal Disposing As Boolean)
If Disposing Then
If Not components Is Nothing Then
components.Dispose()
End If
End If
MyBase.Dispose(Disposing)
End Sub
‘Required by the Windows Form Designer.
Private components As System.ComponentModel.IContainer
Public WithEvents Command5 As System.Windows.Forms.Button
Public WithEvents Command4 As System.Windows.Forms.Button
Public WithEvents Command3 As System.Windows.Forms.Button
Public WithEvents Command2 As System.Windows.Forms.Button
Public WithEvents Command1 As System.Windows.Forms.Button
Dim Ajsock As Sockets.Socket
Private State As Boolean = False

‘NOTE: The following procedure is required by the Windows Form Designer.


‘It can be modified using the Windows Form Designer.
‘Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
Me.Command5 = New System.Windows.Forms.Button
Me.Command4 = New System.Windows.Forms.Button
Me.Command3 = New System.Windows.Forms.Button
Me.Command2 = New System.Windows.Forms.Button
Me.Command1 = New System.Windows.Forms.Button
Me.SuspendLayout()
'
'Command5
'
Me.Command5.BackColor = System.Drawing.SystemColors.Control
Me.Command5.Cursor = System.Windows.Forms.Cursors.Default
Me.Command5.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command5.Location = New System.Drawing.Point(64, 152)
Me.Command5.Name = "Command5"
Me.Command5.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command5.Size = New System.Drawing.Size(72, 32)
Me.Command5.TabIndex = 4
Me.Command5.Text = "Connection status"
'
'Command4
'

App - 49 App - 49
APPENDIX
MELSEC-Q

Me.Command4.BackColor = System.Drawing.SystemColors.Control
Me.Command4.Cursor = System.Windows.Forms.Cursors.Default
Me.Command4.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command4.Location = New System.Drawing.Point(144, 152)
Me.Command4.Name = "Command4"
Me.Command4.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command4.Size = New System.Drawing.Size(73, 32)
Me.Command4.TabIndex = 3
Me.Command4.Text = "Close"
'
'Command3
'

Me.Command3.BackColor = System.Drawing.SystemColors.Control
Me.Command3.Cursor = System.Windows.Forms.Cursors.Default

Me.Command3.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command3.Location = New System.Drawing.Point(64, 96)
Me.Command3.Name = "Command3"
Me.Command3.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command3.Size = New System.Drawing.Size(152, 33)
Me.Command3.TabIndex = 2
Me.Command3.Text = "disconnect"
'
'Command2
'
Me.Command2.BackColor = System.Drawing.SystemColors.Control
Me.Command2.Cursor = System.Windows.Forms.Cursors.Default
Me.Command2.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command2.Location = New System.Drawing.Point(64, 56)
Me.Command2.Name = "Command2"
Me.Command2.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command2.Size = New System.Drawing.Size(152, 31)
Me.Command2.TabIndex = 1
Me.Command2.Text = "Sending a E71 command"
'
'Command1
'
Me.Command1.BackColor = System.Drawing.SystemColors.Control
Me.Command1.Cursor = System.Windows.Forms.Cursors.Default
Me.Command1.ForeColor = System.Drawing.SystemColors.ControlText
Me.Command1.Location = New System.Drawing.Point(64, 16)
Me.Command1.Name = "Command1"
Me.Command1.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.Command1.Size = New System.Drawing.Size(152, 31)
Me.Command1.TabIndex = 0
Me.Command1.Text = "connect"

App - 50 App - 50
APPENDIX
MELSEC-Q

'
'Form1
'
Me.AutoScaleBaseSize = New System.Drawing.Size(5, 12)
Me.BackColor = System.Drawing.SystemColors.Control
Me.ClientSize = New System.Drawing.Size(280, 214)
Me.Controls.Add(Me.Command5)
Me.Controls.Add(Me.Command4)
Me.Controls.Add(Me.Command3)
Me.Controls.Add(Me.Command2)
Me.Controls.Add(Me.Command1)
Me.Cursor = System.Windows.Forms.Cursors.Default
Me.Location = New System.Drawing.Point(329, 189)
Me.Name = "Form1"
Me.RightToLeft = System.Windows.Forms.RightToLeft.No
Me.StartPosition = System.Windows.Forms.FormStartPosition.Manual
Me.Text = "Form1"
Me.ResumeLayout(False)

End Sub
#End Region

#Region "Upgrade Wizard support code"


Private Shared m_vb6FormDefInstance As Form1
Private Shared m_InitializingDefInstance As Boolean
Public Shared Property DefInstance() As Form1
Get
If m_vb6FormDefInstance Is Nothing OrElse m_vb6FormDefInstance.IsDisposed Then
m_InitializingDefInstance = True
m_vb6FormDefInstance = New Form1()
m_InitializingDefInstance = False
End If
DefInstance = m_vb6FormDefInstance
End Get
Set
m_vb6FormDefInstance = Value
End Set
End Property
#End Region

App - 51 App - 51
APPENDIX
MELSEC-Q

Private Sub Command1_Click(ByVal eventSender As System.Object, ByVal eventArgs


As System.EventArgs) Handles Command1.Click
'Connect to the Ethernet interfece module.
Dim sock As New Sockets.Socket(Sockets.AddressFamily.InterNetwork, _
Sockets.SocketType.Stream, Sockets.ProtocolType.Tcp)
Ajsock = sock
Dim ip As IPAddress = Dns.Resolve("192.0.1.253").AddressList(0)
Dim ipend As IPEndPoint = New IPEndPoint(ip, "8192")

Me.Ajsock.Connect(ipend)
MsgBox("Connection Completed")
State = Me.Ajsock.Connected()

End Sub

Private Sub Command2_Click(ByVal eventSender As System.Object, ByVal eventArgs


As System.EventArgs) Handles Command2.Click
Dim SData As Byte()
Dim RData(256) As Byte

'Rend D0 to D4 (5 points) with the A-compatible 1E frame command.


SData = Encoding.ASCII.GetBytes("01FF000A4420000000000500")
'Read D0 to D4 (5 points) with the QnA-compatible 3E frame command.
'SData = Encoding.ASCII.GetBytes("500000FF03FF000018000A04010000D*0000000005")
'Send the data.
Me.Ajsock.Send(SData)
MsgBox("Send completion", MsgBoxStyle.Information)

'Read the response from the PLC CPU.


Me.Ajsock.Receive(RData)
MsgBox(Encoding.ASCII.GetString(RData), MsgBoxStyle.Information)

End Sub

Private Sub Command3_Click(ByVal eventSender As System.Object, ByVal eventArgs


As System.EventArgs) Handles Command3.Click
'Close the TCP (UDP) connection socket (disconnect the line).
Me.Ajsock.Shutdown(Net.Sockets.SocketShutdown.Both)
Me.Ajsock.Close()
MsgBox("The disconnection was successful", MsgBoxStyle.Information)
State = Me.Ajsock.Connected()

End Sub

App - 52 App - 52
APPENDIX
MELSEC-Q

Private Sub Command4_Click(ByVal eventSender As System.Object, ByVal eventArgs


As System.EventArgs) Handles Command4.Click
'End the prorgram.
End

End Sub

Private Sub Command5_Click(ByVal eventSender As System.Object, ByVal eventArgs


As System.EventArgs) Handles Command5.Click
'Check the connection state.
If State Then
MsgBox("Connected")
Else
MsgBox("Closed")
End If

End Sub

End Class

App - 53 App - 53
APPENDIX
MELSEC-Q

Appendix 8.2 Program examples using Visual Basic® 6.0/ Visual C++® 6.0 or earlier

Appendix 8.2.1 Program example for communication using the MC protocol –1


The following explains a program, its execution environment and the contents of data
communication .

(1) Execution environment of the program example


(a) Programmable controller CPU side
1) QCPU model name of the Ethernet installed station : Q25HCPU
2) Ethernet module I/O signal : X/Y000 to X/Y01F
3) Ethernet module IP address : C0.00.01.FDH (192.00.01.253)
4) Ethernet module port number : 2000H
5) GX Developer setting
• Operational settings : See "(3) GX Developer setting (a)" on
the next page
• Open settings : See "(3) GX Developer setting (b)" on
the next page
(b) External device side
® ®
1) Operation environment : Microsoft Windows 95
operating System
2) Ethernet interface board model name : WINSOCK compatible board
3) Library : WSOCK32.LIB
®
4) Software development environment : Microsoft Corporation Visual
++®
C (Version 4.0)
5) Ethernet address : Setting not required because
the ARP function is available
6) IP address : Receive at Active open
7) Port number : Receive at Active open
(c) Communication protocol : TCP/IP

(2) Outline of the program example


(a) Sequence program on the programmable controller CPU side
Parameters are set from GX Developer.
(Sequence program is not required)
(b) Program on the external device side
Executes the following read/write data communication with the
programmable controller CPU using the library mentioned above.
• Write in word units (for 5 points from D0 to D4)
• Read in word units (for 5 points from D0 to D4)

App - 54 App - 54
APPENDIX
MELSEC-Q

(3) GX Developer setting


Set the programmable controller CPU parameters as follows.

(a) Operational settings

Local station IP address: C0.00.01.FDH (192.00.01.253)

(b) Open settings

Local station Port No.: 2000H

App - 55 App - 55
APPENDIX
MELSEC-Q

(4) Program on the external device side


The program example of the external device shown below accesses the
Q25HCPU of the station in which the Ethernet module is installed.
When this program is executed, the contents of the following communication
messages are displayed in order:
1) Batch write command message in word units
2) Batch write response message in word units
3) Batch read command message in word units
4) Batch read response message in word units

REMARKS
(1) The following explains an outline of the compiling procedure for a program
created using Microsoft Corporation Visual C++ (Ver. 4.0)
® ®

++®
1) Start Visual C .
2) Prepare for program creation.
Select File New, and start the console application from the project
workspace screen.
3) Open the file named AJSAMP.C and create a program.
(See the program example on the next page.)
4) Compile the created file from the compile screen of the build menu.
5) Link WSOCK32.LIB from the setting screen of the build menu.
6) Create an executable file (AJSAMP.EXE) on the build screen of the build
menu.
7) End Visual C++ .
®

8) Execute AJSAMP.EXE.

(2) Outline of the procedure for calling the socket routine


Start

(Create socket) socket()

bind()

(Bind) Passive open Active open UDP

(Open) listen() connect()

accept()

(Communicate) sendto()/recvfrom()
send()/recv()

(Disable sending/receiving) shutdown()

(Close) closesocket

Complete

App - 56 App - 56
APPENDIX
MELSEC-Q

/ /
/ /
/ Sample program /
/ /
/ This program is a sample program to conduct a /
/ connection test between the Ethernet module /
/ and target device. /
/ This program accesses the data register (D) of /
/ the PLC CPU installed together with the Ethernet /
/ module. /
/ /
/ Copyright(C) 1996 Mitsubishi Electric /
/ Corporation /
/ All Rights Reserved /
/ /
/ /

#include <stdio.h>
#include <winsock.h>

#define FLAG_OFF 0 // Completion flag OFF


#define FLAG_ON 1 // Completion flag ON
#define SOCK_OK 0 // Normal completion
#define SOCK_NG -1 // Abnormal completion
#define BUF_SIZE 4096 // Receive buffer size

#define ERROR_INITIAL 0 // Initial error


#define ERROR_SOCKET 1 // Socket creation error
#define ERROR_BIND 2 // Bind error
#define ERROR_CONNECT 3 // Connection error
#define ERROR_SEND 4 // Send error
#define ERROR_RECEIVE 5 // Receive error
#define ERROR_SHUTDOWN 6 // Shutdown error
#define ERROR_CLOSE 7 // Line close error

//Definitions for checking the receiving sizes


//#define RECV_ANS_1 4 // Receiving size of response message in reply to device write (1E frame)
#define RECV_ANS_1 22 // Receiving size of response message in reply to device write (3E frame)
//#define RECV_ANS_2 24 // Receiving size of response message in reply to device read (1E frame)
#define RECV_ANS_2 42 // Receiving size of response message in reply to device read (3E frame)

typedef struct sck_inf{


struct in_addr my_addr;
unsigned short my_port;
struct in_addr aj_addr;
unsigned short aj_port;
};

App - 57 App - 57
APPENDIX
MELSEC-Q

int nErrorStatus; // Error information storage variable


int Dmykeyin; // Dummy key input
int Closeflag; // Connection completion flag
int socketno;

int main()
{
WORD wVersionRequested=MAKEWORD(1,1); // Winsock Ver 1.1 request
WSADATA wsaData;
int length; // Communication data length
unsigned char s_buf[BUF_SIZE]; // Send buffer
unsigned char r_buf[BUF_SIZE]; // Receive buffer
int rbuf_idx; // Receive data storage head index
int recv_size; // Number of receive data
struct sck_inf sc;
struct sockaddr_in hostdata; // External device side data
struct sockaddr_in aj71e71; // Ethernet module side data
void Sockerror(int); // Error handling function

unsigned long ulCmdArg ; // Non-blocking mode setting flag

sc.my_addr.s_addr=htonl(INADDR_ANY); // External device side IP address


sc.my_port=htons(0); // External device side port number
sc.aj_addr.s_addr=inet_addr("192.0.1.253"); // Ethernet module side IP address
// (C00001FDH)
sc.aj_port=htons(0x2000); // Ethernet module side port number

Closeflag=FLAG_OFF; // Connection completion flag off

nErrorStatus=WSAStartup(wVersionRequested,&wsaData); // Winsock Initial processing

if(nErrorStatus!=SOCK_OK) {
Sockerror(ERROR_INITIAL); // Error handling
return(SOCK_NG);
}

printf("Winsock Version is %ld.%ld\n",HIBYTE(wsaData.wVersion),LOBYTE(wsaData.wVersion));


printf("AJ_test Start\n");

socketno=socket(AF_INET,SOCK_STREAM,0); // Create socket for TCP/IP

if(socketno==INVALID_SOCKET){
Sockerror(ERROR_SOCKET); // Error handling
return(SOCK_NG);
}

hostdata.sin_family=AF_INET;
hostdata.sin_port=sc.my_port;
hostdata.sin_addr.s_addr=sc.my_addr.s_addr;

App - 58 App - 58
APPENDIX
MELSEC-Q

if(bind(socketno,(LPSOCKADDR)&hostdata,sizeof(hostdata))!=SOCK_OK){
// Bind
Sockerror(ERROR_BIND); // Error handling
return(SOCK_NG);
}

aj71e71.sin_family=AF_INET;
aj71e71.sin_port=sc.aj_port;
aj71e71.sin_addr.s_addr=sc.aj_addr.s_addr;

if(connect(socketno,(LPSOCKADDR)&aj71e71,sizeof(aj71e71))!=SOCK_OK){
// Connection (Active open)
Sockerror(ERROR_CONNECT); // Error handling
return(SOCK_NG);
}

Closeflag=FLAG_ON; // Connection completion flag ON

// Set to non-blocking mode


ulCmdArg = 1;
ioctlsocket(socketno, FIONBIO, &ulCmdArg); // Set to non-blocking mode

// strcpy(s_buf, "03FF000A4420000000000500112233445566778899AA");
// D0 to D4 batch write request (1E frame)
strcpy(s_buf, "500000FF03FF00002C000A14010000D*0000000005112233445566778899AA");
// D0 to D4 batch write request (3E frame)

length=strlen(s_buf);

if(send(socketno,s_buf,length,0)==SOCKET_ERROR){ // Data sending


Sockerror(ERROR_SEND); // Error handling
return (SOCK_NG);
}
printf("\n send data\n%s\n",s_buf);

// Perform receiving size check and receiving processing simultaneously


rbuf_idx = 0; // Receive data storage head index initialization
recv_size = 0; // Initialize the number of receive data
while(1) {
length = recv(socketno, &r_buf[rbuf_idx], (BUF_SIZE - rbuf_idx), 0);
// Response data receiving
if(length == 0) { // Is connection cut off?
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
}

App - 59 App - 59
APPENDIX
MELSEC-Q

if(length == SOCKET_ERROR) {
nErrorStatus = WSAGetLastError();
if(nErrorStatus != WSAEWOULDBLOCK) {
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
} else {
continue; // Repeat until messages are received
}
} else {
rbuf_idx += length; // Update the receive data storage
// position
recv_size += length; // Update the number of receive data
if(recv_size >= RECV_ANS_1) // Have all response messages been
// received?
break; // Stop repeating as messages have
// been received
}
}
r_buf[rbuf_idx] = '\0' ; // Set NULL at the end of receive data

printf("\n receive data\n%s\n",r_buf);

// strcpy(s_buf, "01FF000A4420000000000500"); // D0 to D4 batch read request


// (1E frame)
strcpy(s_buf, "500000FF03FF000018000A04010000D*0000000005");
// D0 to D4 batch read request
// (3E frame)

length=strlen(s_buf);

if(send(socketno,s_buf,length,0)==SOCKET_ERROR){ // Data sending


Sockerror(ERROR_SEND); // Error handling
return (SOCK_NG);
}
printf("\n send data\n%s\n",s_buf);

// Perform receiving size check and receiving processing simultaneously


rbuf_idx = 0; // Receive data storage head index
// initialization
recv_size = 0; // Initialize the number of receive data
while(1) {
length = recv(socketno, &r_buf[rbuf_idx], (BUF_SIZE - rbuf_idx), 0);
// Response data receiving
if(length == 0) { // Is connection cut off?
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
}

App - 60 App - 60
APPENDIX
MELSEC-Q

if(length == SOCKET_ERROR) {
nErrorStatus = WSAGetLastError();
if(nErrorStatus != WSAEWOULDBLOCK) {
Sockerror(ERROR_RECIEVE); // Error handling
return (SOCK_NG);
} else {
continue; // Repeat until messages are received
}
} else {
rbuf_idx += length; // Update the receive data storage
// position
recv_size += length; // Update the number of receive data
if(recv_size >= RECV_ANS_2) // Have all response messages been
// received?
break; // Stop repeating as messages have
// been received
}
}
r_buf[rbuf_idx] = '\0' ; // Set NULL at the end of receive data

printf("\receive data\n%s\n", r_buf);

if(shutdown(socketno,2)!=SOCK_OK){ // Processing to disable


// sending/receiving
Sockerror(ERROR_SHUTDOWN); // Error handling
return(SOCK_NG);
}

if(closesocket(socketno)!=SOCK_OK){ // Close processing


Sockerror(ERROR_CLOSE); // Error handling
return(SOCK_NG);
}

Closeflag=FLAG_OFF; // Connection completion flag off


WSACleanup(); // Release Winsock.DLL

printf("\nAJ_test End.\n\n Normally completed. \n");


printf("Press any key to exit the program.\n");
Dmykeyin=getchar(); // Wait for key input

return(SOCK_OK);
}

void Sockerror(int error_kind) // Error handling function


{
if(error_kind==ERROR_INITIAL){
printf("Initial processing is abnormal.");
}

App - 61 App - 61
APPENDIX
MELSEC-Q

else{
nErrorStatus=WSAGetLastError();
switch(error_kind){
case ERROR_SOCKET:
printf("Failed to create socket.");
break;
case ERROR_BIND:
printf("Failed to bind.");
break;
case ERROR_CONNECT:
printf("Failed to establish connection.");
break;
case ERROR_SEND:
printf("Sending failed.");
break;
case ERROR_RECIEVE:
printf("Receiving failed.");
break;
case ERROR_SHUTDOWN:
printf("Failed to shutdown.");
break;
case ERROR_CLOSE:
printf("Failed to close normally.");
break;
}
}

printf("Error code is %d.\n", nErrorStatus);

if(Closeflag==FLAG_ON){
nErrorStatus=shutdown(socketno,2); // Shutdown processing
nErrorStatus=closesocket(socketno); // Close processing
Closeflag=FLAG_OFF; // Connection completion flag off
}

printf("Press any key to exit the program.\n");


Dmykeyin=getchar(); // Wait for a key input
WSACleanup(); // Release Winsock.DLL
return;
}

App - 62 App - 62
APPENDIX
MELSEC-Q

Appendix 8.2.2 Program example of communication using the MC protocol –2

This section provides the program example, execution environment and data
communication contents.

(1) Execution environment of program example


(a) Programmable controller CPU side
1) Ethernet module-mounted station QCPU model name : Q25PRHCPU
2) I/O signals of Ethernet module : X/Y000 to X/Y01F
3) Ethernet module IP address (System A) : C0.00.01.FCH
(192.00.01.252)
Ethernet module IP address (System B) : C0.00.01.FDH
(192.00.01.253)
4) Ethernet module port number : 2000H
5) GX Developer settings
• Operation setting : Refer to "(3) GX Developer settings (a)" on the
next page.
• Open setting : Refer to "(3) GX Developer settings (b)" on the
next page.
• Redundant settings : Refer to "(3) GX Developer settings (c)" on the
next page.

(b) External device side


1) Operating environment :
® ®
Microsoft Windows XP Professional Operating System
® ®
Microsoft Windows XP Home Edition Operating System
2) Ethernet interface board model name : WINSOCK compatible board
3) Library : WSOCK32.LIB
4) Software development environment :
® ®
Microsoft Corporation make Visual C++ (Ver. 6.0) is used.
5) Ethernet address : Need not be set as the ARP function is available.
6) IP address : Received at Active open
7) Port number : Received at Active open

(c) Communication system : TCP/IP

(2) Overview of program example


(a) Programmable controller CPU side sequence program
Parameter settings must be made using GX Developer.
(No sequence program required)

(b) External device side program


Writes data to the data registers D0 to D4 (5 points) of the redundant CPU
(control system) in word unit using the above library.
If write of data from the system A side is unsuccessful due to a
communication error or similar reason at this time, data are written from the
system B side to the data registers of the redundant CPU (control system).

App - 63 App - 63
APPENDIX
MELSEC-Q

(3) GX Developer settings


Set the parameters of the programmable controller CPU as described below.
(a) Operation setting

Ethernet module IP address (System A) : C0.00.01.FCH (192.00.01.252)

(b) Open setting

Local port number : 2000H

(c) Redundant setting

Ethernet module IP address (System B) : C0.00.01.FDH (192.00.01.253)

App - 64 App - 64
APPENDIX
MELSEC-Q

(4) External device side program


The following shows a program example of the external device that accesses the
Ethernet module-mounted station Q25PRHCPU.
When this program is executed, the following contents are displayed in due
order.
1) Version of used Winsock
2) Test starting message
3) Write of batch command messages in word unit
4) Write of batch response messages in word unit
5) Test end message

REMARKS
The following describes the general compile procedure for the program created
® ®
using Microsoft Visual C++ (Ver. 6.0).
1) Create a "QJSAMP.C" file using a text editor.
(Refer to the next page for the program example.)
®
2) Start Visual C++ .
3) Open the "QJSAMP.C" file.
Choose File Open, specify "QJSAMP.C" created in Step 1), and open it.
4) Execute the compile of the created program on the Compile sceen of the Build
menu.
Choose Build Compile.
Following the displayed messages, create a default project workspace.
5) Link WSOCK32.LIB from the Project setting screen.
Choose Project Setting to display the "Project setting" dialog box.
Select the Link tab and add WSOCK32.LIB to the "Object/library module".
6) Create an execution file (QJSAMP.EXE) on the Build screen of the Build menu.
Choose Build Build.
®
7) Exit from Visual C++ .
8) Execute QJSAMP.EXE.

App - 65 App - 65
APPENDIX
MELSEC-Q

/ /
/ /
/ Sample program /
/ /
/ This program is a sample program for testing the /
/ connection of the Ethernet module and external /
/ device. /
/ This program accesses the data registers (D) of /
/ the redundant CPU (control system) mounted /
/ with the Ethernet module. /
/ /
/ Copyright(C) 2004 Mitsubishi Electric Corporation /
/ All Rights Reserved /
/ /
/ /

#include <stdio.h>
#include <winsock.h>

#define FLAG_OFF 0 // End flag OFF


#define FLAG_ON 1 // End flag ON
#define SOCK_OK 0 // Normal termination
#define SOCK_NG -1 // Unsuccessful termination
#define BUF_SIZE 4096 // Receive buffer size

#define ERROR_NO_ERROR 0 // No error


#define ERROR_INITIAL 1 // Initial error
#define ERROR_SOCKET 2 // Socket creation error
#define ERROR_BIND 3 // Bind error
#define ERROR_CONNECT 4 // Connect error
#define ERROR_SEND 5 // Send error
#define ERROR_SHUTDOWN 6 // Shutdown error
#define ERROR_CLOSE 7 // Line close error

// Definition for checking receive size


#define RECV_ANS_1 22 // Response message receive size in reply to device write (3E frame)

typedef struct sck_inf{


struct in_addr my_addr;
unsigned short my_port;
struct in_addr qj_addr;
unsigned short qj_port;
};

int nErrorStatus; // Error information storage variable


int Dmykeyin; // Dummy key input
int ShutdownflagA; // Shutdown flag (for System A connection)
int ShutdownflagB; // Shutdown flag (for System B connection)

App - 66 App - 66
APPENDIX
MELSEC-Q

int CloseflagA; // Connection end flag (for System A connection)


int CloseflagB; // Connection end flag (for System B connection)
int socketnoA;
int socketnoB;
int ConnectLastErrorA; // Connect processing error information (for System A connection)
int ConnectLastErrorB; // Connect processing error information (for System B connection)
int SendFlag; // Send completion flag

int main()
{
WORD wVersionRequested = MAKEWORD(1, 1); // Winsock Ver 1.1 request
WSADATA wsaData;
int length; // Communication data length
unsigned char s_buf[BUF_SIZE]; // Send buffer
unsigned char r_bufA[BUF_SIZE],r_bufB[BUF_SIZE]; // Receive buffer
struct sck_inf scA,scB;
struct sockaddr_in hostdataA,hostdataB; // External device side data
struct sockaddr_in qj71e71A,qj71e71B; // Ethernet module side data
BOOL DataRecv(int, unsigned char *, int); // Receive processing function
void Sockerror(int, int); // Error handling function

unsigned long ulCmdArgA,ulCmdArgB; // Non-blocking mode setting flag

scA.my_addr.s_addr = scB.my_addr.s_addr = htonl(INADDR_ANY); // External device side IP address


scA.my_port = scB.my_port = htons(0); // External device side port number
scA.qj_addr.s_addr = inet_addr("192.0.1.252");
// Ethernet module side IP address (System A: C00001FCh)
scB.qj_addr.s_addr = inet_addr("192.0.1.253");
// Ethernet module side IP address (System B: C00001FDh)
scA.qj_port = scB.qj_port = htons(0x2000); // Ethernet module side port number

ShutdownflagA = ShutdownflagB = FLAG_OFF; // Shutdown flag OFF


CloseflagA = CloseflagB = FLAG_OFF; // Connection end flag OFF

nErrorStatus = WSAStartup(wVersionRequested, &wsaData); // Winsock initial processing

ConnectLastErrorA = ERROR_NO_ERROR;
// Connect processing error information initialization (for System A)
ConnectLastErrorB = ERROR_NO_ERROR;
// Connect processing error information initialization (for System B)

if(nErrorStatus != SOCK_OK) {
Sockerror(ERROR_INITIAL, ERROR_INITIAL); // Error handling
return (SOCK_NG);
}

printf("Winsock Version is %1d.%1d\n", HIBYTE(wsaData.wVersion), LOBYTE(wsaData.wVersion));


printf("QJ_test Start\n");

App - 67 App - 67
APPENDIX
MELSEC-Q

// System A connect processing


socketnoA = socket(AF_INET, SOCK_STREAM, 0); // TCP/IP socket (for System A connection) creation
if(socketnoA != INVALID_SOCKET) {
hostdataA.sin_family = AF_INET;
hostdataA.sin_port = scA.my_port;
hostdataA.sin_addr.s_addr = scA.my_addr.s_addr;

if(bind(socketnoA, (LPSOCKADDR)&hostdataA, sizeof(hostdataA)) == SOCK_OK) {


// Bind (System A)
qj71e71A.sin_family = AF_INET;
qj71e71A.sin_port = scA.qj_port;
qj71e71A.sin_addr.s_addr = scA.qj_addr.s_addr;

if(connect(socketnoA, (LPSOCKADDR)&qj71e71A, sizeof(qj71e71A)) == SOCK_OK) {


// Connect (Active open: System A)
ShutdownflagA = FLAG_ON; // Shutdown flag ON
CloseflagA = FLAG_ON; // Connection end flag ON
// Set to non-blocking mode
ulCmdArgA = 1;
ioctlsocket(socketnoA, FIONBIO, &ulCmdArgA);
// Set to non-blocking mode (for System A connection)
} else {
ConnectLastErrorA = ERROR_CONNECT; // Connection establishment failure
}
} else {
ConnectLastErrorA = ERROR_BIND; // Bind failure
}
} else {
ConnectLastErrorA = ERROR_SOCKET; // Socket creation failure
}

// System B connect processing


socketnoB = socket(AF_INET, SOCK_STREAM, 0); // TCP/IP socket (for System B connection) creation
if(socketnoB != INVALID_SOCKET) {
hostdataB.sin_family = AF_INET;
hostdataB.sin_port = scB.my_port;
hostdataB.sin_addr.s_addr = scB.my_addr.s_addr;

if(bind(socketnoB, (LPSOCKADDR)&hostdataB, sizeof(hostdataB)) == SOCK_OK) {


// Bind (System A)
qj71e71B.sin_family = AF_INET;
qj71e71B.sin_port = scB.qj_port;
qj71e71B.sin_addr.s_addr = scB.qj_addr.s_addr;

App - 68 App - 68
APPENDIX
MELSEC-Q

if(connect(socketnoB, (LPSOCKADDR)&qj71e71B, sizeof(qj71e71B)) == SOCK_OK) {


// Connect (Active open: System B)
ShutdownflagB = FLAG_ON; // Shutdown flag ON
CloseflagB = FLAG_ON; // Connection end flag ON
// Set to non-blocking mode
ulCmdArgB = 1;
ioctlsocket(socketnoB, FIONBIO, &ulCmdArgB);
// Set to non-blocking mode (for System B connection)
} else {
ConnectLastErrorB = ERROR_CONNECT; // Connection establishment failure
}
} else {
ConnectLastErrorB = ERROR_BIND; // Bind failure
}
} else {
ConnectLastErrorB = ERROR_SOCKET; // Socket creation failure
}

// Connect completion processing


if( (CloseflagA == FLAG_OFF) && (CloseflagB == FLAG_OFF) ){ // When both systems are abnormal
Sockerror(ConnectLastErrorA, ConnectLastErrorB); // Error handling
return (SOCK_NG);
}

strcpy(s_buf, "500000FF03D000002C000A14010000D*0000000005112233445566778899AA");
// D0-D4 batch write request (3E frame, addressed to control system)
length = strlen(s_buf);

printf("Send starts. Press any key. \n");


Dmykeyin = getchar(); // Waiting for key input

SendFlag = FLAG_OFF; // Send completion flag OFF


// System A send processing
if( CloseflagA == FLAG_ON && (SendFlag == FLAG_OFF) ){
if(send(socketnoA, s_buf, length, 0) != SOCKET_ERROR) { // Data send (System A)
printf("\n Send data (System A) \n%s\n", s_buf); // Send data display (System A)
SendFlag = FLAG_ON; // Send completion flag ON
// Receive processing
if(DataRecv(socketnoA, r_bufA, RECV_ANS_1) == TRUE) { // Data receive
printf("\n Receive data (System A) \n%s\n", r_bufA); // Receive data display
} else {
printf("Receive failure (System A) \n");
}
} else {
printf("Send failure (System A) \n");
}
}

App - 69 App - 69
APPENDIX
MELSEC-Q

// System B send processing


if( (CloseflagB == FLAG_ON) && (SendFlag == FLAG_OFF) ){
if(send(socketnoB, s_buf, length, 0) != SOCKET_ERROR) { // Data send (System B)
printf("\n Send data (System B) \n%s\n", s_buf); // Send data display (System B)
SendFlag = FLAG_ON; // Send completion flag ON
// Receive processing
if(DataRecv(socketnoB, r_bufB, RECV_ANS_1) == TRUE) { // Data receive
printf("\n Receive data (System B) \n%s\n", r_bufB); // Receive data display
} else {
printf("Receive failure (System B) \n");
}
}else{
printf("Send failure (System B) \n");
}
}

// Send completion processing


if( SendFlag == FLAG_OFF ){
Sockerror(ERROR_SEND, ERROR_SEND); // Error handling
return (SOCK_NG);
}

if(CloseflagA == FLAG_ON) {
ShutdownflagA = FLAG_OFF; // Shutdown flag OFF
if(shutdown(socketnoA, 2) != SOCK_OK) { // Send/receive inhibit processing (System A)
Sockerror(ERROR_SHUTDOWN, ERROR_NO_ERROR); // Error handling
return (SOCK_NG);
}
}

if(CloseflagB == FLAG_ON) {
ShutdownflagB = FLAG_OFF; // Shutdown flag OFF
if(shutdown(socketnoB, 2) != SOCK_OK) { // Send/receive inhibit processing (System B)
Sockerror(ERROR_NO_ERROR, ERROR_SHUTDOWN); // Error handling
return (SOCK_NG);
}
}

CloseflagA = FLAG_OFF; // Connection end flag OFF


if(closesocket(socketnoA) != SOCK_OK) { // Close processing (System A)
Sockerror(ERROR_CLOSE, ERROR_NO_ERROR); // Error handling
return (SOCK_NG);
}

App - 70 App - 70
APPENDIX
MELSEC-Q

CloseflagB = FLAG_OFF; // Connection end flag OFF


if(closesocket(socketnoB) != SOCK_OK) { // Close processing (System B)
Sockerror(ERROR_NO_ERROR, ERROR_CLOSE); // Error handling
return (SOCK_NG);
}

WSACleanup(); // Winsock.DLL release

printf("\nQJ_test End. \n\nNormally completed. \n");


printf("Program is closed. Press any key. \n");
Dmykeyin = getchar(); // Waiting for key input

return (SOCK_OK);
}

BOOL DataRecv(int socketno, unsigned char *pR_buf, int size_max) // Receive processing function
{
int length; // Communication data length
int rbuf_idx; // Receive data storage starting index
int recv_size; // Number of received data

// Performs receive processing while simultaneously making size check


rbuf_idx = 0; // Receive data storage starting index initialization
recv_size = 0; // Initializes the number of received data
while(1) {
length = recv(socketno, (pR_buf + rbuf_idx), (BUF_SIZE - rbuf_idx), 0);
// Response data receive
if(length == 0) { // Has connection been cut?
return (FALSE); // Error handling
}
if(length == SOCKET_ERROR) {
nErrorStatus = WSAGetLastError();
if(nErrorStatus != WSAEWOULDBLOCK) {
return (FALSE); // Error handling
} else {
continue; // Repeated until data are received
}
} else {
rbuf_idx += length; // Updates receive data storage position
recv_size += length; // Updates the number of received data
if(recv_size >= size_max) // Have all response messages received?
break; // Stops repeating as data are received
}
}
*(pR_buf + rbuf_idx) = '\0' ; // At the end of received data
// set NULL

App - 71 App - 71
APPENDIX
MELSEC-Q

return (TRUE); // Normal termination


}

void Sockerror(int error_kind_A, int error_kind_B) // Error handling function


{
if (error_kind_A == ERROR_INITIAL){
printf("Initial processing is abnormal. \n");
}
else{
nErrorStatus = WSAGetLastError();
switch(error_kind_A){
case ERROR_SOCKET:
printf("Socket could not be created. (System A)\n");
break;
case ERROR_BIND:
printf("Bind could not be executed. (System A)\n");
break;
case ERROR_CONNECT:
printf("Connection could not be established. (System A)\n");
break;
case ERROR_SEND:
printf("Send could not be executed. \n");
break;
case ERROR_SHUTDOWN:
printf("Shutdown could not be executed. (System A)\n");
break;
case ERROR_CLOSE:
printf("Normal close could not be executed. (System A)\n");
break;
}
switch(error_kind_B){
case ERROR_SOCKET:
printf("Socket could not be created. (System B)\n");
break;
case ERROR_BIND:
printf("Bind could not be executed. (System B)\n");
break;
case ERROR_CONNECT:
printf("Connection could not be established. (System B)\n");
break;
case ERROR_SHUTDOWN:
printf("Shutdown could not be executed. (System B)\n");
break;
case ERROR_CLOSE:
printf("Normal close could not be executed. (System B)\n");
break;

App - 72 App - 72
APPENDIX
MELSEC-Q

}
}
printf("Error code is %d. \n", nErrorStatus);

if (ShutdownflagA == FLAG_ON){
nErrorStatus = shutdown(socketnoA, 2); // Shutdown processing (System A)
ShutdownflagA = FLAG_OFF; // Shutdown flag OFF (System A)
}
if (ShutdownflagB == FLAG_ON){
nErrorStatus = shutdown(socketnoB, 2); // Shutdown processing (System B)
ShutdownflagB = FLAG_OFF; // Shutdown flag OFF (System B)
}

if (CloseflagA == FLAG_ON){
nErrorStatus = closesocket(socketnoA); // Close processing (System A)
CloseflagA = FLAG_OFF; // Connection end flag OFF (System A)
}
if (CloseflagB == FLAG_ON){
nErrorStatus = closesocket(socketnoB); // Close processing (System B)
CloseflagB = FLAG_OFF; // Connection end flag OFF (System B)
}

printf("Program is closed. Press any key. \n");


Dmykeyin = getchar(); // Waiting for key input
WSACleanup(); // Winsock.DLL release
return;
}

App - 73 App - 73
APPENDIX
MELSEC-Q

Appendix 8.2.3 Program example of communication using the MC protocol –3

This section explains an example of an external device program that reads/writs data
from/to the programmable controller CPU.
A sample program, its execution environment and contents of data communication are
shown below.

(1) Execution environment of the program example


1) The settings of the programmable controller CPU side are the same as
those of the execution environment described in Section 8.2.1 (1) (a) and
(3) of Appendix.
2) The settings of the external device side are the same as those of the
execution environment described in Section 8.2.1 (1) (b) of Appendix,
except for the following including the software development:
®
• Software development environment: Microsoft Corporation Visual
®
Basic (Ver. 6.0)
• Arbitrary numbers are assigned for the IP address and port number.
3) The communication protocol is TCP/IP

(2) Outline of the program example


With the A-compatible 1E frame command (01: batch read in word units), this
program reads data from D0 to D4 (five points) of the QCPU of the station on
which the Ethernet module is mounted.

(3) Outline of the sample program


(a) Create a new project and form.
(b) Create the (example) window shown in (4) below using "Command Button"
in the toolbox.
(c) Add "Microsoft Winsock Control 6.0" using the component's control.
Add a "Winsock" object from the toolbox to the form and set the Property
Pages screen as follows:

(d) Create the program shown in (5).


App - 74 App - 74
APPENDIX
MELSEC-Q

(4) Window example (Form 1)

(Object name)
Winsock Command 1 ’ Connect to the Ethernet interface module.
’ Set the properties.
’ Send the A-compatible 1E frame
Command 2
(batch read in word units).
Command 3 ’ Disconnect the line.

Command 5 Command 4 ’ End the program.


’ Check the connection state.

(5) Sample program (Form 1)

Option Explicit

Private Sub Command1_Click()


'Connect to the Ethernet interface module
Me.Winsock1.Connect

End Sub

Private Sub Form_Load()


'When calling an Active open method from a PC to the Ethernet interface module,
'The property screen should be used or the settings performed as follows.
'Specify the protocol to be used.
'Winsock1.Protocol = sckTCPProtocol / sckUDPProtocol
'Specify the IP address of the Ethernet interface module.
'Winsock1.RemoteHost = "192.0.1.253"
'Specify the port No. used by the Ethernet interface module.
'Winsock1.RemotePort =8192 :H2000
'If the open method of the Ethernet interface module is Fullpassive open,
'specify the set port No.
'If the open method of the Ethernet interface module is Unpassive open,
'"0" - use any port No.
'Winsock1.LocalPort = 0 :Unpassive open

End Sub

Private Sub winsock1_connect()


'Use the Connect event to perform confirmation processing at the time when the connection processing
is normally completed.
'The Connect event occurs when the connection processing is completed.
MsgBox "Connection Completed"

End Sub

App - 75 App - 75
APPENDIX
MELSEC-Q

Private Sub Command2_Click()


Dim SData As String
'Read D0 to D4 (5 points) with the A-compatible 1E frame command.
SData = "01ff000a4420000000000500"
'Send the data.
Me.Winsock1.SendData SData

End Sub

Private Sub Command3_Click()


'Close the TCP connection socket (disconnect the line).
Me.Winsock1.Close

End Sub

Private Sub Command4_Click()


'End the program.
End

End Sub

Private Sub Command5_Click()


'Check the state of Winsock.
'See the Help of Visual Basic for details.
MsgBox Winsock1.State

End Sub

Private Sub Winsock1_DataArrival(ByVal bytesTotal As Long)


'The DataArrival event occurs when new data arrives.

Dim RData As String


'Obtain the current data block and save it as a variant type variable.
'Read the response from the PLC CPU.
Me.Winsock1.GetData RData
MsgBox RData

End Sub

App - 76 App - 76
APPENDIX
MELSEC-Q

Appendix 9 Communication Support Tool (MX Component)

MX Component is an ActiveX control library that supports any types of communication


paths between IBM PC/AT compatible personal computers and programmable
controllers. It allows the users to establish communication using simple processing
only, without having to know about the different communication protocols used in the
individual communication.
It also supports various programming languages, allowing for a wide range of
application development.

This section provides the overview of the functions provided by MX Component and
explains the procedure up to creation of applications.
Refer to Operating Manual and Programming Manual of MX Component for the
details.

Appendix 9.1 Overview of MX Component

This section provides the overview of MX Component.


Different communication paths, operating systems, programming languages, and
functions are supported depending on the version of MX Component used.

(1) Support for a wide range of communication paths to programmable


controllers
MX Component supports a wide range of communication paths to programmable
controllers. It is possible to construct systems according to the needs of the
users.

<Example of communication using MX Component>

MELSECNET/H communication
Ethernet communication

GOT

Gateway function communication


Modem communication

(2) Dramatic improvement of application development efficiency


MX Component provides wizard-style communication setting utilities.
The user only needs to select settings from menus displayed on the screen in an
interactive manner to achieve the communication settings required to access the
target programmable controller CPU.
Moreover, once the communication setting has been performed, it is possible to
access the programmable controller CPU simply by specifying the logical station
number that is stored via the communication setting utilities.
App - 77 App - 77
APPENDIX
MELSEC-Q

(3) Support for wide choice of basic operating systems


MX Component can run on IBM PC/AT compatible personal computers running
the following basic operating systems:
® ®
• Microsoft Windows 95 Operating System
® ®
• Microsoft Windows 98 Operating System
® ®
• Microsoft Windows NT Workstation Operating System Version 4.0
® ®
• Microsoft Windows Millennium Edition Operating System
® ®
• Microsoft Windows 2000 Professional Operating System
® ®
• Microsoft Windows XP Professional Operating System
® ®
• Microsoft Windows XP Home Edition Operating System
® ®
• Microsoft Windows Vista Home Basic Operating System
® ®
• Microsoft Windows Vista Home Premium Operating System
® ®
• Microsoft Windows Vista Business Operating System
® ®
• Microsoft Windows Vista Ultimate Operating System
® ®
• Microsoft Windows Vista Enterprise Operating System

(4) Support for a wide variety of programming languages


MX Component supports the following programming languages.
It allows the user to develop a wide range of customized applications.
Programming language Development software
® ® ® ®
® Microsoft Visual Basic 6.0, Microsoft Visual Basic .NET 2003.,
Visual Basic ® ®
Microsoft Visual Studio 2005 Visual Basic
® ® ® ®
® Microsoft Visual C++ 6.0, Microsoft Visual C++ .NET 2003.,
Visual C++ ® ®
Microsoft Visual Studio 2005 Visual C++
VBScript Text editors and commercially available HTML tools
® ®
Microsoft Excel 2000, Microsoft Excel 2002,
® ®
Microsoft Excel 2003, Microsoft Excel 2007,
VBA ® ®
Microsoft Access 2000, Microsoft Access 2002,
® ®
Microsoft Access 2003, Microsoft Access 2007
The shown above is information as of September 2008.
For the latest development software, refer to the MX Component Operating
Manual.

App - 78 App - 78
APPENDIX
MELSEC-Q

(5) Support for functions dedicated for data communication with


programmable controllers
MX Component provides the functions necessary for data communication with
programmable controllers, including functions for opening/closing communication
lines and reading/writing devices.
Multi-function communication programs can thus easily be developed with MX
Component.

® ® ® ®
(a) When Microsoft Visual Basic .NET 2003 or Microsoft Visual C++ .NET
2003 is used.
Function name Function
Connect Connects a telephone line.
Open Opens a communication line.
Close Closes a communication line.
Disconnect Disconnects a telephone line.
GetErrorMessage Displays error definition and corrective action.
ReadDeviceBlock Batch-reads data from devices. (INT type)
WriteDeviceBlock Batch-writes data to devices. (INT type)
ReadDeviceBlock2 Batch-reads data from devices. (SHORT type)
WriteDeviceBlock2 Batch-writes data to devices. (SHORT type)
ReadDeviceRandom Randomly reads data from devices. (INT type)
WriteDeviceRandom Randomly writes data to devices. (INT type)
ReadDeviceRandom2 Randomly reads data from devices. (SHORT type)
WriteDeviceRandom2 Randomly writes data to devices. (SHORT type)
SetDevice Sets one device. (INT type)
GetDevice Acquires the data of one device. (INT type)
SetDevice2 Sets one device. (SHORT type)
GetDevice2 Acquires data of one device. (SHORT type)
ReadBuffer Reads from buffer memory.
WriteBuffer Writes to buffer memory.
GetClockData Reads clock data from programmable controller CPU.
SetClockData Writes clock data to programmable controller CPU.
GetCpuType Reads a programmable controller CPU type.
SetCpuStatus Remote RUN/STOP/PAUSE of programmable controller CPU
EntryDeviceStatus Registers device status monitor.
FreeDeviceStatus Deregisters device status monitor.
OnDeviceStatus Announces event.

App - 79 App - 79
APPENDIX
MELSEC-Q

® ® ® ®
(b) When Microsoft Visual Basic 6.0 or Microsoft Visual C++ 6.0 is used.
Function name Function
Connect Connects a telephone line.
Open Opens a communication line.
Close Closes a communication line.
Disconnect Disconnects a telephone line.
GetErrorMessage Displays error definition and corrective action.
ReadDeviceBlock Batch-reads data from devices. (LONG type)
WriteDeviceBlock Batch-writes data to devices. (LONG type)
ReadDeviceBlock2 Batch-reads data from devices. (SHORT type/INT type)
WriteDeviceBlock2 Batch-writes data to devices. (SHORT type/INT type)
ReadDeviceRandom Randomly reads data from devices. (LONG type)
WriteDeviceRandom Randomly writes data to devices. (LONG type)
ReadDeviceRandom2 Randomly reads data from devices. (SHORT type/INT type)
WriteDeviceRandom2 Randomly writes data to devices. (SHORT type/INT type)
SetDevice Sets one device. (LONG type)
GetDevice Acquires the data of one device. (LONG type)
SetDevice2 Sets one device. (SHORT type/INT type)
GetDevice2 Acquires data of one device. (SHORT type/INT type)
ReadBuffer Reads from buffer memory.
WriteBuffer Writes to buffer memory.
GetClockData Reads clock data from programmable controller CPU.
SetClockData Writes clock data to programmable controller CPU.
GetCpuType Reads a programmable controller CPU type.
SetCpuStatus Remote RUN/STOP/PAUSE of programmable controller CPU
EntryDeviceStatus Registers device status monitor.
FreeDeviceStatus Deregisters device status monitor.
OnDeviceStatus Announces event.

(6) Collecting data on Excel without programming


Using MX component and MX Sheet (SWnD5C-SHEET-E) allows users to
collect programmable controller device data on Excel with only simple setting and
without any programming.

App - 80 App - 80
APPENDIX
MELSEC-Q

Appendix 9.2 Usage procedure of MX Component

This section explains the procedure for creating programs and sample programs using
MX Component.

(1) Procedure for creating programs


The procedure for creating programs is outlined below.
®
The usage procedure below uses Visual Basic . NET 2003 as an example.

1) Perform the communication settings from a IBM


PC/AT compatible personal computer to the
programmable controller by following the wizard.
(Some types of controls are set only by programs
without using the wizard.)
The wizard allows the user to perform the settings
required for the communication such as logical
station number, connected module type, and
programmable controller to be connected.


2) Paste the ACT control icon onto the form and assign
the logical station number set in step 1 to the
property of the pasted control.


3) Use the functions provided by the software to write a
program that reads the device data.

Completed

App - 81 App - 81
APPENDIX
MELSEC-Q

(2) Sample program


The following sample program reads D0 to D4 (five points) of the target
programmable controller using the logical station number.
(a) Screen example (Form1)
Text1
' Enter the logical station number.

Button1 or Command1
' Connect to the communication line.
Button2 or Command2
' Read the device data.
Button3 or Command3
' Cut the communication line.

ACT control (ActEasy IF)


' ACT control for utility setting type

(b) Program example


The following shows each program example for development software.
®
1) Visual Basic .NET 2003
®
2) Visual C++ .NET 2003
®
3) Visual Basic 6.0
®
4) Visual C++ 6.0

®
1) When Visual Basic .NET 2003 is used

Private Sub Command1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command1.Click


'
'Connection
'
Dim rtn As Integer

'Get LogicalstationNumber
AxActEasyIF1.ActLogicalStationNumber = Val(Text1.Text)

'Connection
rtn = AxActEasyIF1.Open()
If rtn = 0 Then
MsgBox("The Connection was successful")
Else
MsgBox("Connection Error:" & Hex(rtn))
End If

End Sub

App - 82 App - 82
APPENDIX
MELSEC-Q

Private Sub Command2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command2.Click


'
'Read
'
Dim rtn As Integer
Dim idata(5) As Short

'D0-D4 are read


rtn = AxActEasyIF1.ReadDeviceBlock2("D0", 5, idata(0))
If rtn = 0 Then
MsgBox("D0-D4 = " & idata(0) & "," & idata(1) & "," & idata(2) & "," & idata(3) & "," & idata(4))
Else
MsgBox(Read Error:" & Hex(rtn))
End If

End Sub

Private Sub Command3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command3.Click


'
'Disconnection
'
Dim rtn As Integer

'Disconnection
rtn = AxActEasyIF1.Close()
If rtn = 0 Then
MsgBox("The disconnection was successful")
Else
MsgBox("Disconnection Error:"& Hex(rtn))
End If
End Sub

App - 83 App - 83
APPENDIX
MELSEC-Q

®
2) When Visual C++ .NET 2003 is used
//
//Connection
//
private: System::Void button1_Click(System::Object * sender, System::EventArgs * e)
{
int iRet

//Get LogicalStationNumber
axActEasyIF1->ActLogicalStationNumber=Convert::ToInt32(textBox1->Text);

//Connection
iRet = axActEasyIF1->Open();
if( iRet == 0 ){
MessageBox::Show("The connection was successful" );
} else {
MessageBox::Show( String::Format( "Connection Error:0x{0:x8} [HEX]", __box(iRet) ) );
}
}

//
//Read
//
private: System::Void button2_Click(System::Object * sender, System::EventArgs * e)
{
int iRet;
short sData[5];
String* szMessage= "";
String* lpszarrData[];
int iNumber;
String* szReadData

//D0-D4 are read


iRet = axActEasyIF1->ReadDeviceBlock2( "D0", 5, sData );
if( iRet == 0 ){
lpszarrData = new String * [ 5 ];
lpszarrData[0] = "D0-D4 = ";

// Result display data is stored.


for( iNumber = 0 ; iNumber < 5 ; iNumber++ )
{
lpszarrData[ iNumber ] = sData[ iNumber ].ToString();
}
szReadData = String::Join(",",lpszarrData);
MessageBox::Show(String::Format("D0-D4 = {0}",szReadData));
} else {
MessageBox::Show( String::Format( "Read Error:0x{0:x8} [HEX]", __box(iRet) ) );
}
}

App - 84 App - 84
APPENDIX
MELSEC-Q

//
//Disconnection
//
private: System::Void button3_Click(System::Object * sender, System::EventArgs * e)
{

int iRet;

//Disconnection
iRet = axActEasyIF1->Close();
if( iRet == 0 ){
MessageBox::Show( "The disconnection was successful" );
} else {
MessageBox::Show( String::Format( "Disconnection Error:0x{0:x8} [HEX]", __box(iRet) ) );
}
}

App - 85 App - 85
APPENDIX
MELSEC-Q

®
3) When Visual Basic 6.0 is used
Private Sub Command1_Click()
'
' Connection
'
Dim rtn As Long
' Get LogicalstationNumber
ActEasyIF1. ActLogicalStationNumber = Val(Text1.Text)
' Connection
rtn = ActEasyIF1. Open()
If rtn = 0 Then
MsgBox "The connection was successful"
Else
MsgBox "Connection Error:" & Hex(rtn)
End If
End Sub

Private Sub Command2_Click()


'
' Read
'
Dim rtn As Long
Dim idata(5) As Integer
' D0-D4 are read
rtn = ActEasyIF1. ReadDeviceBlock2 ("D0", 5, idata(0))
If rtn = 0 Then
MsgBox "D0-D5 = " & idata(0) & ", " & idata(1) & ", " & idata(2) & ", " & idata(3) & "," & idata(4)
Else
MsgBox "Read Error:" & Hex(rtn)
End If
End Sub

Private Sub Command3_Click()


'
' Disconnection
'
Dim rtn As Long
' Disconnection
rtn = ActEasyIF1. Close()
If rtn = 0 Then
MsgBox "The disconnection was successful"
Else
MsgBox "Disconnection Error:" & Hex(rtn)
End If
End Sub

App - 86 App - 86
APPENDIX
MELSEC-Q

®
4) When Visual C++ 6.0 is used

//
// Connection
//
void CVCDlg::OnOpen()
{
long lRet;
CString szMessage;

UpdateData();
// Get LogicalStationNumber
m_actEasyIF. SetActLogicalStationNumber ( m_lLogicalStationNumber ):
// Connection
lRet = m_actEasyIF. Open();
if ( lRet == 0) {
MessageBox ( "The connection was successful" )
} else {
szMessage. Format ( "Connection Error: %x", lRet );
MessageBox ( szMessage )
}
}

//
// Read
//
void CVCDlg::OnRead()
{
long lRet;
short sData[5];
CString szMessage;
// D0-D4 are read
lRet = m_actEasyIf. ReadDeviceBlock2 ( "D0", 5, sData );
if ( lRet == 0) {
szMessage. Format ( "D0-D5 = %d, %d, %d, %d, %d",
sData[0], sData[1], sData[2], sData[3], sData[4] );
MessageBox ( szMessage );
} else {
szMessage. Format ( "Read Error: %x", lRet );
MessageBox ( szMessage )
}
}

App - 87 App - 87
APPENDIX
MELSEC-Q

//
// Disconnection
//
void CVCDlg::OnOpen()
{
long lRet;
CString szMessage;
// Disconnection
lRet = m_actEasyIF. Close();
if ( lRet == 0) {
MessageBox ( "The disconnection was successful" )
} else {
szMessage. Format ( "Disconnection Error: %x", lRet );
MessageBox ( szMessage )
}
}

App - 88 App - 88
APPENDIX
MELSEC-Q

Appendix 10 Differences between the Ethernet and the IEEE802.3

The following shows the Ethernet header in the data link layer supported by the
Ethernet module.
Ethernet data link layer header Ethernet module
Ethernet frame (V 2.0) specification
IEEE802.3 (ISO/IEC8802.3) frame specification

(1) Ethernet

Destination address Source address Type Data (46 to 1500 byte) FCS

(2) IEEE802.3

Destination address Source address Length Data (46 to 1500 byte) FCS

Appendix 11 ICMP Protocol Supported by the Ethernet Module

The following table outlines the types of ICMP supported by the Ethernet module and
the processing performed by the Ethernet module.
ICMP Type ICMP name/description Processing by the Ethernet module
Echo Reply Upon receiving an Echo Request, the Ethernet module
0
Result of IP packet loopback sends this message.
When the Ethernet module receives data for which protocol
Destination Unreachable
3 other than TCP/UDP/ICMP is specified in the IP packet, it
Failed in IP packet processing.
sends this message.
If destination existence confirmation is set in the buffer
Echo Request
8 memory, the Ethernet module sends this message when
Requests loopback of IP packet
attempting to confirm the existence of the target. ( 1)
Others Ignored by the Ethernet module. (Not supported)

1 The Ethernet module can simultaneously receive two ICMP ECHO requests (type 8, Ping message), which are used for
existence confirmation, etc., and handles them accordingly.
When three or more ICMP ECHO requests are received at the same time, the third and succeeding requests will be
ignored.
If a response is not returned to the external device when an ICMP ECHO request is sent to the Ethernet module, send an
ICMP ECHO request to the Ethernet module again.
The Ethernet module is able to receive a maximum of 1460-byte ICMP message at one time.
Do not send an ICMP message request exceeding 1460 bytes to the Ethernet module.

App - 89 App - 89
APPENDIX
MELSEC-Q

Appendix 12 Setting Value Recording Sheets

This section provides setting value recording sheets for parameters set with GX
Developer. Make copies as needed.
Setting value recording sheet No. GX Developer setting screen
Network parameters Setting the number of Ethernet/CC IE/MELSECNET cards
Recording sheet 1
Ethernet operations
Recording sheet 2 Network parameters Ethernet initial settings
Recording sheet 3 Network parameters Ethernet open settings
Recording sheet 4 Network parameters Setting the Ethernet router relay parameter
Recording sheet 5 Network parameters Setting the Ethernet Station No. <-> IP information
Recording sheet 6 Network parameters Ethernet FTP parameter setting
Network parameters Ethernet E-mail settings
Recording sheet 7
Ethernet mail address settings
Recording sheet 8 Ethernet News settings
Recording sheet 9 Network parameters Ethernet Interrupt settings
Recording sheet 10 Intelligent function module interrupt pointer setting
Recording sheet 11 Network parameters Setting the Ethernet/CC IE/MELSECNET routing information
Recording sheet 12 Remote password settings
Recording sheet 13 Network parameters Ethernet redundant settings

App - 90 App - 90
APPENDIX
MELSEC-Q

Recording sheet 1

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks

Starting I/O No.

Network No.

Network parameters
Group No.
Setting the number of
Ethernet/CC IE/
Station No.
MELSECNET cards
Online
Off line
Mode
Self refrain test
Hardware (H/W) test
Binary code communication
Communication data code setting
ASCII code communication
Do not wait for OPEN (Communications impossible at
STOP time)
Initial Timing
Always wait for OPEN (Communication possible at STOP
time)
Decimal IP address
Input format
IP address Hexadecimal Input format
Ethernet Operations
setting
IP address Adjust to input format
. . .
Ethernet (V2.0)
Send frame setting
IEEE802.3

Enable Write at RUN time Enable Write at RUN time Enable: Check mark

TCP Existence Use the KeepAlive


Confirmation setting Use the Ping

App - 91 App - 91
APPENDIX
MELSEC-Q

Recording sheet 2

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks

TCP ULP Timer Default: 60 (500 ms)

TCP zero
Default: 20 (500 ms)
window Timer

TCP resend timer Default: 20 (500 ms)

TCP end timer Default: 40 (500 ms)

IP assembly timer Default: 10 (500 ms)

Timer setting Response monitoring


Default: 60 (500 ms)
timer
Destination existence
confirmation Default: 1200 (500 ms)
starting interval
Network parameter
Destination existence
Ethernet Initial settings
confirmation Default: 20 (500 ms)
Interval timer
Destination existence
confirmation resend Default: 3 (times)
timer
Decimal DNS server IP address
Input format
Hexadecimal Input format
DNS server 1
IP address . . .
DNS server 2
DNS setting
IP address . . .
Adjust to input format
DNS server 3
IP address . . .
DNS server 4
IP address . . .

App - 92 App - 92
APPENDIX
MELSEC-Q

Recording Sheet 3

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
TCP
Protocol
UDP
Active
Setting not required if UDP is
Open system Unpassive
selected.
Fullpassive
Send
Fixed buffer
Receive
Fixed buffer Procedure exist
communication No procedure
No pairs
Connection Paring open
No. Pairs
No confirm
Existence confirmation
Confirm

Local station Port No. Input format: Hexadecimal

Decimal Destination IP address input


Destination Hexadecimal format
IP address
Adjust to input format
. . .

Destination Port No. Input format: Hexadecimal


Network parameter
Ethernet open settings TCP
Protocol
UDP
Active
Open system Unpassive
Fullpassive
Send
Fixed buffer
Receive
Fixed buffer Procedure exist
communication No procedure
No pairs
Connection Paring open
No. Pairs
No confirm
Existence confirmation
Confirm

Local station Port No. Input format: Hexadecimal

Decimal Destination IP address input


Destination Hexadecimal format
IP address
Adjust to input format
. . .

Destination Port No. Input format: Hexadecimal

App - 93 App - 93
APPENDIX
MELSEC-Q

Recording sheet 4

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
Do not use
Router relay function
Use

Sub-net mask pattern Adjust to input format


. . .

Default router IP address Adjust to input format


. . .
Decimal Router information Input
Input format
Hexadecimal format

Sub-net address
. . .
No.1
Router IP address
. . .

Sub-net address
. . .
No.2
Router IP address
. . .

Sub-net address
. . .
No.3
Network parameters Router IP address
. . .
Setting the Ethernet
router relay parameter Sub-net address
. . .
No.4
Router IP address
. . .
Adjust to input format
Sub-net address
. . .
No.5
Router IP address
. . .

Sub-net address
. . .
No.6
Router IP address
. . .

Sub-net address
. . .
No7
Router IP address
. . .

Sub-net address
. . .
No.8
Router IP address
. . .

App - 94 App - 94
APPENDIX
MELSEC-Q

Recording sheet 5

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
Automatic response system
IP address computation system
Station No. <-> IP information
Table exchange system
Use-together system

Net mask pattern Adjust to input format


. . .
Decimal Conversion setting
Input format
Hexadecimal input format

Network No.
Input format: Decimal
No. Station No.

IP address Adjust to input format


. . .
Network parameters
Setting the Ethernet Network No.
Station No. <-> IP Input format: Decimal
information No. Station No.

IP address Adjust to input format


. . .

Network No.
Input format: Decimal
No. Station No.

IP address Adjust to input format


. . .

Network No.
Input format: Decimal
No. Station No.

IP address Adjust to input format


. . .

App - 95 App - 95
APPENDIX
MELSEC-Q

Recording sheet 6

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
Do not use
FTP function settings
Use

Login name Default: "QJ71E71"

Network parameters Current


Ethernet FTP parameter Password
settings New

Command input monitoring timer


Unit: Setting value × 500ms
PLC CPU monitoring timer

App - 96 App - 96
APPENDIX
MELSEC-Q

Recording sheet 7

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks

Password

Mail address

General Check of received mail Check received mails Check: Check mark
settings
Set interval value to check
received mail.
Interval of inquiry s
Select unit for interval to
min
check received mail.
h
Network parameters
SMTP
Ethernet e-mail settings
Server name
Decimal
Send setting IP address input format
Hexadecimal
IP address
Mail Adjust to input format
. . .
Server
POP
name
Server name
Decimal
IP address input format
Hexadecimal
IP address
Adjust to input format
. . .

Send mail address


No.
No execute
News setting
Execute news

Send mail address


No.
No execute
News setting
Execute news

Send mail address


No.
No execute
News setting
Ethernet send mail Execute news
address settings
Send mail address
No.
No execute
News setting
Execute news

Send mail address


No.
No execute
News setting
Execute news

Send mail address


No.
No execute
News setting
Execute news

App - 97 App - 97
APPENDIX
MELSEC-Q

Recording sheet 8

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
No settings
Normal STOP
Module error/ module system error
(Medium/Major level disorder)
Condition for PLC inspection
Warning STOP (Minor disorder STOP)
Normal RUN
Warning RUN (Minor disorder RUN)
PAUSE
Send attached file
Send method
Send text mail
Binary
Attached file format ASCII Adjust to input format
CSV

Attached file name

Interval of CPU inquiry


numeric value setting
PLC inquiry Interval s
Interval of CPU inquiry unit
min
selection
h
Decimal
Monitoring value input format Monitoring value input format
Hexadecimal

Condition device

Condition for inspection


Ethernet news settings

No. Monitoring value Adjust to input format

News data storage device

News data

Condition device

Condition for inspection

No. Monitoring value Adjust to input format

News data storage device

News data

Condition device

Condition for inspection

No. Monitoring value Adjust to input format

News data storage device

News data

App - 98 App - 98
APPENDIX
MELSEC-Q

Recording sheet 9

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
Decimal Word device setting value
Input format
Hexadecimal input format
RECV instruction
Device code
Fixed buffer
Device No. — Setting not required
Detection method Edge detection Automatic setting
Interrupt condition Scan completed Automatic setting
No.
Word device setting value — Setting not required

Board No. Input format: Decimal

Interrupt (SI) No. Input format: Decimal

RECV instruction
Device code
Fixed buffer
Device No. — Setting not required
Detection method Edge detect Automatic setting
Interrupt condition Scan completed Automatic setting
No.
Word device setting value — Setting not required

Board No. Input format: Decimal


Network parameters
Ethernet interrupt Interrupt (SI) No. Input format: Decimal
settings
RECV instruction
Device code
Fixed buffer
Device No. Setting not required
Detection method Edge detect Automatic setting
Interrupt condition Scan completed Automatic setting
No.
Word device setting value — Setting not required

Board No. Input format: Decimal

Interrupt (SI) No. Input format: Decimal

RECV instruction
Device code
Fixed buffer
Device No. — Setting not required
Detection method Edge detect Automatic setting
Interrupt condition Scan completed Automatic setting
No.
Word device setting value — Setting not required

Board No. Input format: Decimal

Interrupt (SI) No. Input format: Decimal

App - 99 App - 99
APPENDIX
MELSEC-Q

Recording sheet 10

GX Developer setting Setting data


Data item
screen Setting value Remarks
Interrupt pointer
PLC CPU start No.
Input format: Decimal
side Interrupt pointer
No. of module
No.
Intelligent Start I/O No. Input format: Hexadecimal
module
side Start SI No.

Interrupt pointer
Input format: Decimal
PLC CPU start No.
side Interrupt pointer
No. of module
No.
Intelligent Start I/O No. Input format: Hexadecimal
module
Intelligent function side Start SI No.
module interrupt pointer
Interrupt pointer
setting Input format: Decimal
PLC CPU start No.
side Interrupt pointer
No. of module
No.
Intelligent Start I/O No. Input format: Hexadecimal
module
side Start SI No.

Interrupt pointer
Input format: Decimal
PLC CPU start No.
side Interrupt pointer
No. of module
No.
Intelligent Start I/O No. Input format: Hexadecimal
module
side Start SI No. Input format: Decimal

App - 100 App - 100


APPENDIX
MELSEC-Q

Recording sheet 11

GX Developer setting Setting data


Data item
screen Setting value Remarks

Transfer to network No.

No. Intermediate network No.

Intermediate station No.

Transfer to network No.

No. Intermediate network No.

Intermediate station No.

Transfer to network No.

No. Intermediate network No.

Intermediate station No.

Transfer to network No.


Network parameters
Ethernet/CC IE/
No. Intermediate network No. Input format: Decimal
MELSECNET routing
information settings
Intermediate station No.

Transfer to network No.

No. Intermediate network No.

Intermediate station No.

Transfer to network No.

No. Intermediate network No.

Intermediate station No.

Transfer to network No.

No. Intermediate network No.

Intermediate station No.

App - 101 App - 101


APPENDIX
MELSEC-Q

Recording sheet 12

GX Developer setting Setting data


Data item
screen Setting value Remarks

Password settings
Remote password
settings Password active Model name QJ71E71
module settings Start X/Y

Connection 1

Connection 2

Connection 3

Connection 4

Connection 5

Connection 6

Connection 7

Connection 8
User connection No.
Connection 9

Connection 10

Remote password
Connection 11 Select the object connection
detail settings

Connection 12

Connection 13

Connection 14

Connection 15

Connection 16

Auto open UDP port

FTP transmission port (TCP/IP)

System connection GX Developer transmission port (TCP/IP)

GX Developer transmisstion port (UDP/IP)

HTTP port

App - 102 App - 102


APPENDIX
MELSEC-Q

Recording sheet 13

[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
Station number
Station number and Online
mode setting Offline
Mode
(System B) Self-loopback test
H/W test
Decimal
Input format IP address input format
IP address settings Hexadecimal
System B . . . Adjust to input format
Issue system switch in cable
Issue system switch in cable disconnection timeout Issue: Check mark
disconnection timeout
Cable disconnection timeout setting Default: 2.0s
Issue system switch in communication
Issue system switch in communication error Issue: Check mark
error

Connection 1

Connection 2

Connection 3

Connection 4

Connection 5

Connection 6

Connection 7
Redundant settings
Connection 8

Connection 9

Connection 10

System switching settings when


Connection 11 Select the object connection
communication error occurs

Connection 12

Connection 13

Connection 14

Connection 15

Connection 16

Enable auto open UDP port

Enable GX Developer UDP communication port

Enable GX Developer TCP communication port

Enable FTP communication port

Enable HTTP communication port

App - 103 App - 103


INDEX

Ind CLOSE instruction ......................... 5 - 46, 10 - 11


[1 to 10] Close processing .........................................5 - 46
10BASE2 ............................................2 - 8, 4 - 11 Communication by e-mails ............................1 - 4
10BASE5 .............................................. 2 - 6, 4 - 9 Communication data code...........................4 - 20
10BASE-T............................................ 2 – 5, 4 - 8 Communication method setting
100BASE-TX ........................................ 2 - 4, 4 - 8 (TCP/UDP) ...................................................5 - 39
Communication parameter ............. 3 – 15, 5 - 38
[A] Communication procedure ............................5 - 1
A compatible 1E frame................................. 6 - 2 Communication status storage area ...........3 - 16
(end codes)............................................ 11 - 25 Communication using
(abnormal codes)................................... 11 - 25 the MC protocol.....................................Chapter 6
Abnormal code .......................................... 11 - 25 Communication using the random
Accessible range access buffer.........................................Chapter 9
Fixed buffer communication Communication while the programmable controller
(procedure exist)........................................ 7 - 1 CPU is in the STOP status ..........................4 - 21
Fixed buffer communication Connection of connector for the coaxial
(no procedure) ........................................... 8 - 1 cable .............................................................4 - 12
Communication using the random
access buffer ............................................. 9 - 1 [D]
Active open........................... 5 - 39, 5 - 44, 5 - 47 Data communication using the MELSEC
AJ71E71 ........................................... Appendix - 4 communication protocol.................................1 - 2
AJ71E71-S3 ..................................... Appendix - 4 Data format
Applicable systems ....................................... 2 - 1 Fixed buffer communication
Application data (procedure exist) ......................................7 - 12
Fixed buffer communication Fixed buffer communication
(procedure exist)...................................... 7 - 13 (no procedure)..........................................8 - 10
Fixed buffer communication Communication using the random
(no procedure) ......................................... 8 - 10 access buffer ..............................................9 - 5
Communication using the random Data length
access buffer ............................................. 9 - 6 Fixed buffer communication
ARP...................................................1 - 17, 5 - 44 (procedure exist) ......................................7 - 15
AUI cable (transceiver cable).............. 2 – 6, 4 - 9 Communication using the random
Automatic open UDP port ........................... 5 - 68 access buffer ..............................................9 - 8
Dedicated instruction list................................3 - 8
[B] Default router IP address.............................5 - 19
Buffer memory list ....................................... 3 - 14 Destination IP address..................... 5 - 42, 5 - 44
Buffer memory............................................. 3 - 13 Destination Port No......................................5 - 43
BUFRCV instruction ................. 7 - 5, 8 - 6, 10 - 2 DNS setting ....................................................5 - 7
BUFRCVS instruction............... 7 - 7, 8 - 8, 10 - 5 DNS ..............................................................1 - 17
BUFSND instruction ................. 7 - 3, 8 - 4, 10 - 8
[E]
[C] Enable write at RUN time ............................4 - 22
CC-Link IE controller network, MELSECNET/H, End code
MELSECNET/10 relay communication Fixed buffer communication
....................................................................... 3 - 6 (procedure exist) ......................................7 - 16

Index - 1 Index - 1
Communication using the random Initial timing settings.....................................4 - 21
access buffer ........................................... 9 - 10 Interrupt function
End codes list ........................................ 11 - 22 Fixed buffer communication Ind
ERRCLR instruction .......................10 - 14, 11 - 4 (procedure exist) ........................................7 - 7
Error code.................................................. 11 - 27 Fixed buffer communication
Error log area............................................. 11 - 15 (no procedure)............................................8 - 8
ERRRD instruction .........................10 - 17, 11 - 4 Interrupt settings ........................................7 - 7
Ethernet module ................................ A - 21, 1 - 1 Interrupt pointer settings ............................7 - 9
Ethernet ......................................................... 1 - 1 IP address setting
Ethernet address .........................................A - 21 Destination IP address.............................5 - 42
Existence confirmation ................................ 5 - 41 Local station IP address...........................4 - 21
IP ..................................................................1 - 17
[F]
Fixed buffer (setting) ................................... 5 - 40 [L]
Fixed buffer communication LED display ...................................... 4 - 6, 11 - 10
(no procedure) .......................................Chapter 8 List of input/output signals ...........................3 - 11
Fixed buffer communication Local station Port No. (setting) ....................5 - 41
(procedure exist) ...................................Chapter 7 Local station (Ethernet module)
Fixed buffer communication (setting) ......... 5 - 40 IP address ....................................................4 - 21
FTP parameters .......................................... 4 - 15 Logical address............................................9 - 15
FTP .............................................................. 1 - 17
Full passive open .............................5 - 39, 5 - 54 [M]
Functional comparisons between the MAC address (Ethernet Address) .............. A - 21
QnA/A series modules ..................... Appendix - 4 Mode ............................................................4 - 19
Monitoring function.........................................1 - 6
[G] Multiple CPU system .................. 1 - 8, 2 - 9, 6 - 4
Generic terms and abbreviations................A - 21 MX Component .....................6 - 5, Appendix - 77
GX Developer..............................................A - 21
Setting item list .......................................... 3 - 9 [N]
Setting value recording sheets...Appendix - 90 Network No. .................................................4 - 19
Group No. .................................................... 4 - 19 Network parameter
Number of Ethernet/CC IE/MELSECNET cards
[H] ..................................................................4 - 17
Head address .....................................9 - 8, 9 - 15 Network type ................................................4 - 18
Header
Fixed buffer communication [O]
(procedure exist)...................................... 7 - 12 OPEN instruction ............................. 5 - 45, 10-19
Fixed buffer communication Open processing
(no procedure) ......................................... 8 - 10 Active open processing............................5 - 47
Communication using the random Passive open processing.........................5 - 54
access buffer ............................................. 9 - 5 Pairing open processing ..........................5 - 65
Open settings ...............................................5 - 38
[I] Pairing open settings ...............................5 - 66
ICMP................................... 1 - 17, Appendix - 89 Sending by simultaneous
Improper access.......................................... 5 - 70 broadcasting.............................................8 - 11
Initial processing............................................ 5 - 3
Initial settings................................................. 5 - 4

Index - 2 Index - 2
Receiving by simultaneous Simultaneous broadcasting .........................8 - 11
broadcasting ............................................ 8 - 13 SMTP ...........................................................1 - 17
Open system ............................................... 5 - 39 Specification..........................................Chapter 3
Operational settings .................................... 4 - 20 Starting I/O No. ............................................4 - 18
Station No. ...................................................4 - 19
[P] Subheader
Pairing open ................................................ 5 - 64 Fixed buffer communication
Parameter setting (procedure exist) ......................................7 - 14
Setting item list .......................................... 3 - 9 Communication using the random
Setting screen list .................................... 4 - 14 access buffer ..............................................9 - 7
Setting value recording sheets...Appendix - 90 Sub-net address...........................................5 - 19
Passive open ........................ 5 - 39, 5 - 44, 5 - 54 Sub-net mask pattern ..................................5 - 18
Physical address ......................................... 9 - 15 System configuration ............................Chapter 2
POP3 ........................................................... 1 - 17
Port No..............................................5 - 42, 5 - 43 [T]
Program example TCP .................................................. 1 - 16, 5 - 39
Open/close processing (Active) .............. 5 - 51 Test
Open/close processing (Unpassive) ....... 5 - 59 Self refrain test .........................................4 - 23
Fixed buffer communication Hardware test (H/W test) .........................4 - 24
(procedure exist)...................................... 7 - 18 Loop back test ..........................................5 - 31
Fixed buffer communication PING command test.................................5 - 36
(no procedure) ......................................... 8 - 18 Text (command)
Protocol........................................................ 5 - 38 Fixed buffer communication
(procedure exist) ......................................7 - 15
[Q] Communication using the random
QE71................................................. Appendix - 4 access buffer ..............................................9 - 9
QnA compatible 3E frame or 4E frame ........ 6 - 4 Timer setting ..................................................5 - 4

[R] [U]
Re-initial processing.................................... 5 - 10 UDP ................................................. 1 - 17, 5 – 39
Redundant System...........................1 - 11, 5 - 91 UINI instruction............................... 5 - 10, 10 - 23
Related manuals .........................................A - 13 Unpassive ........................................ 5 - 39, 5 - 54
Remote password check............................. 5 - 73 Usage setting ................................... 3 - 15, 5 - 38
Remote password mismatch notification
accumulated count ...................................... 5 - 87 [V]
Response format Valid module during other station access ...4 - 18
Fixed buffer communication
(procedure exist)...................................... 7 - 13
Communication using the random
access buffer ............................................. 9 - 6
Router IP address ....................................... 5 - 21
Router relay function ................................... 5 - 18
Router relay parameter ............................... 5 - 17

[S]
Setting the number of cards.............4 - 14, 4 - 17
Settings and procedures prior to
starting the operation .................................... 4 - 3

Index - 3 Index - 3
WARRANTY
Please confirm the following product warranty details before using this product.

1. Gratis Warranty Term and Gratis Warranty Range


If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product
within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service
Company.
However, if repairs are required onsite at domestic or overseas location, expenses to send an engineer will be solely at
the customer’s discretion. Mitsubishi shall not be held responsible for any re-commissioning, maintenance, or testing on-
site that involves replacement of the failed module.
[Gratis Warranty Term]
The gratis warranty term of the product shall be for one year after the date of purchase or delivery to a designated
place.
Note that after manufacture and shipment from Mitsubishi, the maximum distribution period shall be six (6) months, and
the longest gratis warranty term after manufacturing shall be eighteen (18) months. The gratis warranty term of repair
parts shall not exceed the gratis warranty term before repairs.
[Gratis Warranty Range]
(1) The range shall be limited to normal use within the usage state, usage methods and usage environment, etc.,
which follow the conditions and precautions, etc., given in the instruction manual, user's manual and caution labels
on the product.
(2) Even within the gratis warranty term, repairs shall be charged for in the following cases.
1. Failure occurring from inappropriate storage or handling, carelessness or negligence by the user. Failure caused
by the user's hardware or software design.
2. Failure caused by unapproved modifications, etc., to the product by the user.
3. When the Mitsubishi product is assembled into a user's device, Failure that could have been avoided if functions
or structures, judged as necessary in the legal safety measures the user's device is subject to or as necessary
by industry standards, had been provided.
4. Failure that could have been avoided if consumable parts (battery, backlight, fuse, etc.) designated in the
instruction manual had been correctly serviced or replaced.
5. Failure caused by external irresistible forces such as fires or abnormal voltages, and Failure caused by force
majeure such as earthquakes, lightning, wind and water damage.
6. Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi.
7. Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user.

2. Onerous repair term after discontinuation of production


(1) Mitsubishi shall accept onerous product repairs for seven (7) years after production of the product is discontinued.
Discontinuation of production shall be notified with Mitsubishi Technical Bulletins, etc.
(2) Product supply (including repair parts) is not available after production is discontinued.

3. Overseas service
Overseas, repairs shall be accepted by Mitsubishi's local overseas FA Center. Note that the repair conditions at each FA
Center may differ.

4. Exclusion of loss in opportunity and secondary loss from warranty liability


Regardless of the gratis warranty term, Mitsubishi shall not be liable for compensation of damages caused by any cause
found not to be the responsibility of Mitsubishi, loss in opportunity, lost profits incurred to the user by Failures of Mitsubishi
products, special damages and secondary damages whether foreseeable or not , compensation for accidents, and
compensation for damages to products other than Mitsubishi products, replacement by the user, maintenance of on-site
equipment, start-up test run and other tasks.

5. Changes in product specifications


The specifications given in the catalogs, manuals or technical documents are subject to change without prior notice.

6. Product application
(1) In using the Mitsubishi MELSEC programmable controller, the usage conditions shall be that the application will not
lead to a major accident even if any problem or fault should occur in the programmable controller device, and that
backup and fail-safe functions are systematically provided outside of the device for any problem or fault.
(2) The Mitsubishi programmable controller has been designed and manufactured for applications in general industries,
etc. Thus, applications in which the public could be affected such as in nuclear power plants and other power plants
operated by respective power companies, and applications in which a special quality assurance system is required,
such as for Railway companies or Public service purposes shall be excluded from the programmable controller
applications.
In addition, applications in which human life or property that could be greatly affected, such as in aircraft, medical
applications, incineration and fuel devices, manned transportation, equipment for recreation and amusement, and
safety devices, shall also be excluded from the programmable controller range of applications.
However, in certain cases, some applications may be possible, providing the user consults their local Mitsubishi
representative outlining the special requirements of the project, and providing that all parties concerned agree to the
special circumstances, solely at the users discretion.
Microsoft, Windows, Windows NT, and Windows Vista are registered trademarks of Microsoft Corporation in
the United States and other countries.
Pentium is a trademark of Intel Corporation in the United States and other countries.
Ethernet is a trademark of Xerox Corporation.
All other company names and product names used in this manual are trademarks or registered trademarks of
their respective companies.

SH (NA)-080009-M
MITSUBISHI ELECTRIC

HEADQUARTERS EUROPEAN REPRESENTATIVES EUROPEAN REPRESENTATIVES EURASIAN REPRESENTATIVES


MITSUBISHI ELECTRIC EUROPE B.V. EUROPE GEVA AUSTRIA INTEHSIS srl MOLDOVA Kazpromautomatics Ltd. KAZAKHSTAN
German Branch Wiener Straße 89 bld. Traian 23/1 Mustafina Str. 7/2
Gothaer Straße 8 AT-2500 Baden MD-2060 Kishinev KAZ-470046 Karaganda
D-40880 Ratingen Phone: +43 (0)2252 / 85 55 20 Phone: +373 (0)22 / 66 4242 Phone: +7 7212 / 50 11 50
Phone: +49 (0)2102 / 486-0 Fax: +43 (0)2252 / 488 60 Fax: +373 (0)22 / 66 4280 Fax: +7 7212 / 50 11 50
Fax: +49 (0)2102 / 486-1120 TEHNIKON BELARUS Koning & Hartman b.v. NETHERLANDS CONSYS RUSSIA
MITSUBISHI ELECTRIC EUROPE B.V. CZECH REPUBLIC Oktyabrskaya 16/5, Off. 703-711 Haarlerbergweg 21-23 Promyshlennaya st. 42
Czech Branch BY-220030 Minsk NL-1101 CH Amsterdam RU-198099 St. Petersburg
Radlická 714/113a Phone: +375 (0)17 / 210 46 26 Phone: +31 (0)20 / 587 76 00 Phone: +7 812 / 325 36 53
CZ-158 00 Praha 5 Fax: +375 (0)17 / 210 46 26 Fax: +31 (0)20 / 587 76 05 Fax: +7 812 / 325 36 53
Phone: +420 (0)251 551 470 Koning & Hartman b.v. BELGIUM Beijer Electronics AS NORWAY ELECTROTECHNICAL SYSTEMS RUSSIA
Fax: +420 (0)251-551-471 Woluwelaan 31 Postboks 487 Derbenevskaya st. 11A, Office 69
MITSUBISHI ELECTRIC EUROPE B.V. FRANCE BE-1800 Vilvoorde NO-3002 Drammen RU-115114 Moscow
French Branch Phone: +32 (0)2 / 257 02 40 Phone: +47 (0)32 / 24 30 00 Phone: +7 495 / 744 55 54
25, Boulevard des Bouvets Fax: +32 (0)2 / 257 02 49 Fax: +47 (0)32 / 84 85 77 Fax: +7 495 / 744 55 54
F-92741 Nanterre Cedex INEA BH d.o.o. BOSNIA AND HERZEGOVINA MPL Technology Sp. z o.o. POLAND ELEKTROSTILY RUSSIA
Phone: +33 (0)1 / 55 68 55 68 Aleja Lipa 56 Ul. Krakowska 50 Rubzowskaja nab. 4-3, No. 8
Fax: +33 (0)1 / 55 68 57 57 BA-71000 Sarajevo PL-32-083 Balice RU-105082 Moscow
MITSUBISHI ELECTRIC EUROPE B.V. IRELAND Phone: +387 (0)33 / 921 164 Phone: +48 (0)12 / 630 47 00 Phone: +7 495 / 545 3419
Irish Branch Fax: +387 (0)33/ 524 539 Fax: +48 (0)12 / 630 47 01 Fax: +7 495 / 545 3419
Westgate Business Park, Ballymount AKHNATON BULGARIA Sirius Trading & Services srl ROMANIA NPP "URALELEKTRA" RUSSIA
IRL-Dublin 24 4 Andrej Ljapchev Blvd. Pb 21 Aleea Lacul Morii Nr. 3 Sverdlova 11A
Phone: +353 (0)1 4198800 BG-1756 Sofia RO-060841 Bucuresti, Sector 6 RU-620027 Ekaterinburg
Fax: +353 (0)1 4198890 Phone: +359 (0)2 / 817 6004 Phone: +40 (0)21 / 430 40 06 Phone: +7 343 / 353 2745
MITSUBISHI ELECTRIC EUROPE B.V. ITALY Fax: +359 (0)2 / 97 44 06 1 Fax: +40 (0)21 / 430 40 02 Fax: +7 343 / 353 2461
Italian Branch INEA CR d.o.o. CROATIA Craft Con. & Engineering d.o.o. SERBIA
Viale Colleoni 7 Losinjska 4 a Bulevar Svetog Cara Konstantina 80-86
I-20041 Agrate Brianza (MI) HR-10000 Zagreb SER-18106 Nis
Phone: +39 039 / 60 53 1 Phone: +385 (0)1 / 36 940 - 01/ -02/ -03 Phone:+381 (0)18 / 292-24-4/5 MIDDLE EAST REPRESENTATIVES
Fax: +39 039 / 60 53 312 Fax: +385 (0)1 / 36 940 - 03 Fax: +381 (0)18 / 292-24-4/5
MITSUBISHI ELECTRIC EUROPE B.V. SPAIN ILAN & GAVISH Ltd. ISRAEL
AutoCont C.S. s.r.o. CZECH REPUBLIC INEA SR d.o.o. SERBIA 24 Shenkar St., Kiryat Arie
Spanish Branch Technologická 374/6 Izletnicka 10
Carretera de Rubí 76-80 IL-49001 Petah-Tiqva
CZ-708 00 Ostrava-Pustkovec SER-113000 Smederevo Phone: +972 (0)3 / 922 18 24
E-08190 Sant Cugat del Vallés (Barcelona) Phone: +420 595 691 150 Phone: +381 (0)26 / 617 163
Phone: 902 131121 // +34 935653131 Fax: +972 (0)3 / 924 0761
Fax: +420 595 691 199 Fax: +381 (0)26 / 617 163
Fax: +34 935891579 TEXEL ELECTRONICS Ltd. ISRAEL
B:TECH A.S. CZECH REPUBLIC AutoCont Control s.r.o. SLOVAKIA 2 Ha´umanut, P.O.B. 6272
MITSUBISHI ELECTRIC EUROPE B.V. UK U Borové 69 Radlinského 47
UK Branch IL-42160 Netanya
CZ-58001 Havlíčkův Brod SK-02601 Dolny Kubin Phone: +972 (0)9 / 863 39 80
Travellers Lane Phone: +420 (0)569 777 777 Phone: +421 (0)43 / 5868210
UK-Hatfield, Herts. AL10 8XB Fax: +972 (0)9 / 885 24 30
Fax: +420 (0)569-777 778 Fax: +421 (0)43 / 5868210
Phone: +44 (0)1707 / 27 61 00
Fax: +44 (0)1707 / 27 86 95 Beijer Electronics A/S DENMARK CS MTrade Slovensko, s.r.o. SLOVAKIA
Lykkegårdsvej 17, 1. Vajanskeho 58
MITSUBISHI ELECTRIC CORPORATION JAPAN DK-4000 Roskilde SK-92101 Piestany
Office Tower “Z” 14 F AFRICAN REPRESENTATIVE
Phone: +45 (0)46/ 75 76 66 Phone: +421 (0)33 / 7742 760
8-12,1 chome, Harumi Chuo-Ku Fax: +45 (0)46 / 75 56 26 Fax: +421 (0)33 / 7735 144 CBI Ltd. SOUTH AFRICA
Tokyo 104-6212 Private Bag 2016
Phone: +81 3 622 160 60 Beijer Electronics Eesti OÜ ESTONIA INEA d.o.o. SLOVENIA
Pärnu mnt.160i Stegne 11 ZA-1600 Isando
Fax: +81 3 622 160 75 Phone: + 27 (0)11 / 928 2000
EE-11317 Tallinn SI-1000 Ljubljana
MITSUBISHI ELECTRIC AUTOMATION, Inc. USA Phone: +372 (0)6 / 51 81 40 Phone: +386 (0)1 / 513 8100 Fax: + 27 (0)11 / 392 2354
500 Corporate Woods Parkway Fax: +372 (0)6 / 51 81 49 Fax: +386 (0)1 / 513 8170
Vernon Hills, IL 60061
Phone: +1 847 478 21 00 Beijer Electronics OY FINLAND Beijer Electronics AB SWEDEN
Fax: +1 847 478 22 53 Jaakonkatu 2 Box 426
FIN-01620 Vantaa SE-20124 Malmö
Phone: +358 (0)207 / 463 500 Phone: +46 (0)40 / 35 86 00
Fax: +358 (0)207 / 463 501 Fax: +46 (0)40 / 35 86 02
UTECO A.B.E.E. GREECE Econotec AG SWITZERLAND
5, Mavrogenous Str. Hinterdorfstr. 12
GR-18542 Piraeus CH-8309 Nürensdorf
Phone: +30 211 / 1206 900 Phone: +41 (0)44 / 838 48 11
Fax: +30 211 / 1206 999 Fax: +41 (0)44 / 838 48 12
MELTRADE Ltd. HUNGARY GTS TURKEY
Fertő utca 14. Darülaceze Cad. No. 43 KAT. 2
HU-1107 Budapest TR-34384 Okmeydanı-Istanbul
Phone: +36 (0)1 / 431-9726 Phone: +90 (0)212 / 320 1640
Fax: +36 (0)1 / 431-9727 Fax: +90 (0)212 / 320 1649
Beijer Electronics SIA LATVIA CSC Automation Ltd. UKRAINE
Vestienas iela 2 4-B, M. Raskovoyi St.
LV-1035 Riga UA-02660 Kiev
Phone: +371 (0)784 / 2280 Phone: +380 (0)44 / 494 33 55
Fax: +371 (0)784 / 2281 Fax: +380 (0)44 / 494-33-66
Beijer Electronics UAB LITHUANIA
Savanoriu Pr. 187
LT-02300 Vilnius
Phone: +370 (0)5 / 232 3101
Fax: +370 (0)5 / 232 2980

MITSUBISHI
ELECTRIC Mitsubishi Electric Europe B.V. /// FA - European Business Group /// Gothaer Straße 8 /// D-40880 Ratingen /// Germany
FACTORY AUTOMATION Tel.: +49(0)2102-4860 /// Fax: +49(0)2102-4861120 /// [email protected] /// www.mitsubishi-automation.com

You might also like