QJ71E71 Manual
QJ71E71 Manual
QJ71E71 Manual
MELSEC System Q
QJ71E71-100/-B5/-B2
Ethernet Interface Module
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".
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.
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
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
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
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
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
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
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
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
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
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
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)
A - 16 A - 16
The Manual's Usage and Structure
(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).
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.
A - 19 A - 19
(2) Setting screen of GX Developer
This manual explains the parameter settings with GX Developer in the following
format:
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.
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.
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.
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.
Router Router
Power supply
Power supply
Ethernet
Ethernet
module
module
CPU
CPU
GX Developer
1-1 1-1
1 OVERVIEW
MELSEC-Q
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
Receive/ Receive/
send send
Power supply
Power supply
Ethernet
Ethernet
module
module
CPU
CPU
External device
Read/write Read/write
Power supply
Ethernet
module
CPU
Local station
1-4 1-4
1 OVERVIEW
MELSEC-Q
Internet
(Public dial-up line)
E-mail
sending/
receiving
Router Router
Power supply
Ethernet
module
CPU
Local station
External device
1-5 1-5
1 OVERVIEW
MELSEC-Q
HTTP MC protocol
HTTP
Power supply
MC protocol HTTP
(Response message) header
Local station
Web browser
HTML
Display of
Execution of requests/results
ASP the ASP file
Communication
library
1-6 1-6
1 OVERVIEW
MELSEC-Q
Power supply
Ethernet
Ethernet
module
module
CPU
CPU
External device
Parameter setting
GX Developer
Program/monitor Monitor/test
Power supply
Ethernet
module
CPU
1-7 1-7
1 OVERVIEW
MELSEC-Q
(External device) (Protocol used) (Connection used on the Ethernet module side)
One unit
Power supply
1-8 1-8
1 OVERVIEW
MELSEC-Q
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
1-9 1-9
1 OVERVIEW
MELSEC-Q
Local station
External device
1 - 10 1 - 10
1 OVERVIEW
MELSEC-Q
1 - 11 1 - 11
1 OVERVIEW
MELSEC-Q
Ethernet
Remote Remote
password password
check (Local station)
Ethernet
QCPU
module
1 - 12 1 - 12
1 OVERVIEW
MELSEC-Q
Tracking cable
CC-Link
(I/O control, communication with outside)
1 - 13 1 - 13
1 OVERVIEW
MELSEC-Q
1 - 14 1 - 14
1 OVERVIEW
MELSEC-Q
• 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 - 15 1 - 15
1 OVERVIEW
MELSEC-Q
CPU
Dedicated instruction
IP ICMP IP ICMP
3 Network layer
ARP ARP
1 - 16 1 - 16
1 OVERVIEW
MELSEC-Q
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 2-1
2 SYSTEM CONFIGURATIONS
MELSEC-Q
REMARKS
The Basic model QCPU module or C Controller module cannot create the
MELSECNET/H remote I/O network.
2-2 2-2
2 SYSTEM CONFIGURATIONS
MELSEC-Q
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. (
2-3 2-3
2 SYSTEM CONFIGURATIONS
MELSEC-Q
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
2-4 2-4
2 SYSTEM CONFIGURATIONS
MELSEC-Q
Hub
Twisted pair cable Up to 4 levels are allowed
for cascade connection
External device
E
7
1
2-5 2-5
2 SYSTEM CONFIGURATIONS
MELSEC-Q
AUI cable
External device
E
7
1
DC
Power
supply
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
Transceiver
2-7 2-7
2 SYSTEM CONFIGURATIONS
MELSEC-Q
External device
E
7
1
POINT
Consult a network specialist for required devices.
2-8 2-8
2 SYSTEM CONFIGURATIONS
MELSEC-Q
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
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 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
This section describes the use of the Ethernet module with the Basic Model QCPU or
Safety CPU.
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
This section describes the use of the Ethernet module with Redundant CPUs.
Ethernet
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
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
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
Tracking cable
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 - 16 2 - 16
2 SYSTEM CONFIGURATIONS
MELSEC-Q
2 - 17 2 - 17
2 SYSTEM CONFIGURATIONS
MELSEC-Q
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.
QJ72
LP25
-25
(Remote I/O station)
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 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
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
2 - 21 2 - 21
2 SYSTEM CONFIGURATIONS
MELSEC-Q
2 - 22 2 - 22
2 SYSTEM CONFIGURATIONS
MELSEC-Q
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.
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
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
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.
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
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 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
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.
3-6 3-6
3 SPECIFICATIONS
MELSEC-Q
3-7 3-7
3 SPECIFICATIONS
MELSEC-Q
The following table lists the dedicated instructions that can be used by the Ethernet
module.
3-8 3-8
3 SPECIFICATIONS
MELSEC-Q
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 - 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
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
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)
3 - 14 3 - 14
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 15 3 - 15
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 16 3 - 16
3 SPECIFICATIONS
MELSEC-Q
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
3 - 17 3 - 17
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 18 3 - 18
3 SPECIFICATIONS
MELSEC-Q
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
3 - 19 3 - 19
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 20 3 - 20
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 21 3 - 21
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 22 3 - 22
3 SPECIFICATIONS
MELSEC-Q
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
3 - 23 3 - 23
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 24 3 - 24
3 SPECIFICATIONS
MELSEC-Q
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)
3 - 25 3 - 25
3 SPECIFICATIONS
MELSEC-Q
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
3 - 26 3 - 26
3 SPECIFICATIONS
MELSEC-Q
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
3 - 27 3 - 27
3 SPECIFICATIONS
MELSEC-Q
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
This chapter explains the settings and procedures required prior to starting the
operation of the Ethernet module in a system.
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.
(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.
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
The following shows a flow of the procedure that is required prior to starting the
operation:
Procedures prior
to operation
Connect the Ethernet module to the Ethernet network ……… See Section 4.4, "Connecting to the Network."
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."
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
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.
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
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
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
This section explains how to connect the Ethernet module to the 10BASE5 network.
(Object module for the explanation: QJ71E71-B5)
Retainer
A
B
AUI cable
<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
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.
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
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
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.
[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
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.
(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 - 15 4 - 15
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q
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
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.
4 - 17 4 - 17
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q
4 - 18 4 - 18
4 SETTINGS AND PROCEDURES PRIOR TO OPERATION
MELSEC-Q
(b) When the operation mode is changed, reset the programmable controller
CPU.
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
(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 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.
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
(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.
*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
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.
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.
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
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
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
This section explains the maintenance and inspection as well as the mounting and
dismounting of the Ethernet module.
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
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.
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".
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
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
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
5-2 5-2
5 COMMUNICATION PROCEDURE
MELSEC-Q
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.)
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-4 5-4
5 COMMUNICATION PROCEDURE
MELSEC-Q
5-5 5-5
5 COMMUNICATION PROCEDURE
MELSEC-Q
5-6 5-6
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
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)
(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)
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
(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
(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)
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
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.
X19
Data communication enabled
5 - 10 5 - 10
5 COMMUNICATION PROCEDURE
MELSEC-Q
UINI instruction 3)
Module initialization
(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
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
Always ON Connection 1
open completion
signal
Re-initial Re-initial
instruction instruction
Re-initial
Connection 1
instruction
open
completion
signal Connection 2
open <Read the current operation setting status>
completion U0\
signal
UINI
instruction
completion
device
Initial
completion
status
Re-initial
instruction
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
5 - 14 5 - 14
5 COMMUNICATION PROCEDURE
MELSEC-Q
U0\
Always ON Connection 1
open completion
signal
Re-initial Re-initial
instruction instruction
Re-initial Connection 1
instruction open
completion
signal
Connection 2
open <Set to ASCII code communication >
completion
signal U0\
Initial
completion
status
\ U0\
Processing upon norm al com pletion
Initial error
code
storage area
U0\
Processing upon abnorm al com pletion
Initial error
code
storage area
Re-initial
instruction
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 - 17 5 - 17
5 COMMUNICATION PROCEDURE
MELSEC-Q
(Example) Class B
Network address
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
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.
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.
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
(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
(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
5 - 20 5 - 20
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
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.)
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.
(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.
Station No.: 3
[10.97.85.223]
5 - 23 5 - 23
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
Ethernet module
5 - 24 5 - 24
5 COMMUNICATION PROCEDURE
MELSEC-Q
[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
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.
(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
Network No. 1
QCPU Ethernet Station number: 1
1) module [10.97.85.221]
(PING test target station)
5 - 28 5 - 28
5 COMMUNICATION PROCEDURE
MELSEC-Q
Ethernet module
5 - 29 5 - 29
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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
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.
(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
Station No.: 3
[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.
5 - 32 5 - 32
5 COMMUNICATION PROCEDURE
MELSEC-Q
2) Perform the settings indicated below, then click the Execute button.
The execution results of the loop back test are displayed.
[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
(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.
5 - 34 5 - 34
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
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:\>_
C:\>_
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.
(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.
Ethernet
5 - 37 5 - 37
5 COMMUNICATION PROCEDURE
MELSEC-Q
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.
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
5 - 39 5 - 39
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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.
1 For details on the simultaneous broadcasting, see Section 8.3, "Simultaneous Broadcasting When
UDP/IP is Used".
5 - 40 5 - 40
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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.
(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
(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.
5 - 42 5 - 42
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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.
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
5 - 44 5 - 44
5 COMMUNICATION PROCEDURE
MELSEC-Q
This section explains the open processing/close processing using sequence programs.
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
(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
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
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
5 - 47 5 - 47
5 COMMUNICATION PROCEDURE
MELSEC-Q
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.
2)
Ethernet
At normal completion
6)
FIN 4) FIN RST
ACK
5 - 49 5 - 49
5 COMMUNICATION PROCEDURE
MELSEC-Q
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.
5 - 51 5 - 51
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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".
(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
\
Read the open request signal information
5 - 53 5 - 53
5 COMMUNICATION PROCEDURE
MELSEC-Q
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)
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.
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
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
SYN FIN
5 - 56 5 - 56
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
REMARKS
(1) If the settings of the connection need modifying, the modifications should be
done before executing the dedicated OPEN instruction.
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.
(d) The [Open settings] are assumed to have been set using GX Developer as
follows.
5 - 59 5 - 59
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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".
(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
\
Read the open completion signal information
\
Read the open request signal information
5 - 61 5 - 61
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
M100 M101
Processing for normal completion
M101
Processing for abnormal completion
Parameter
communication
Power-on completed
1)
Open status
Closed status
5 - 63 5 - 63
5 COMMUNICATION PROCEDURE
MELSEC-Q
5 - 64 5 - 64
5 COMMUNICATION PROCEDURE
MELSEC-Q
The following explains communication using the paring open method via the Ethernet
module.
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
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.
5 - 66 5 - 66
5 COMMUNICATION PROCEDURE
MELSEC-Q
5 - 67 5 - 67
5 COMMUNICATION PROCEDURE
MELSEC-Q
Ethernet
module
Ethernet
Request Response Request Response
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.)
5 - 69 5 - 69
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
Ethernet
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)
5 - 71 5 - 71
5 COMMUNICATION PROCEDURE
MELSEC-Q
2) Access processing
• Normal completion of the remote password unlock processing allows to
access the specified station.
• Perform any access.
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.)
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
(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
C station D station
Network system -1
: 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
Network system -1
: 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
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 - 78 5 - 78
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
Open 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
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.
(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.
(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
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
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
(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
(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).)
(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.
5 - 87 5 - 87
5 COMMUNICATION PROCEDURE
MELSEC-Q
(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
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
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) 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.)
(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
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.
Communication
error occurrence
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).)
5 - 92 5 - 92
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
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"
BUFSND instruction
BUFSND instruction
completion device+1
ACK is not returned from external device
Ethernet module
Data
First retry Second retry
command
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
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)
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
5 - 96 5 - 96
5 COMMUNICATION PROCEDURE
MELSEC-Q
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
Tracking cable
5 - 98 5 - 98
5 COMMUNICATION PROCEDURE
MELSEC-Q
This section describes the setting of GX Developer when using the Ethernet module in
the redundant system.
[Starting procedure]
[GX Developer] [Network param] Ethernet/CC IE/MELSECNET
[Setting screen]
(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
[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.
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".
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.
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
The redundant setting status of GX Developer can be checked in the following buffer
memory areas.
Connection No. 1
Connection No. 2
Connection No. 16
5 - 103 5 - 103
5 COMMUNICATION PROCEDURE
MELSEC-Q
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.
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".
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
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
Tracking cable
5 - 106 5 - 106
5 COMMUNICATION PROCEDURE
MELSEC-Q
ON:
System A is control
system Is SM1515 ON?
(Operation system type)
OFF: System B is
standby system
Is SM1516 ON? OFF
(Operation system type)
YES YES
YES YES
Is it repeated? Is it repeated?
NO NO
Close system A. Close system B.
End
5 - 107 5 - 107
5 COMMUNICATION PROCEDURE
MELSEC-Q
Set the control system CPU to STOP by remote A continue error occurs in the
operation. standby system CPU.
( 1)
Set the standby system CPU to RUN by remote
operation.
Complete
5 - 108 5 - 108
5 COMMUNICATION PROCEDURE
MELSEC-Q
YES
Has timeout occurred?
NO
YES
Has timeout occurred?
NO
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 - 110 5 - 110
5 COMMUNICATION PROCEDURE
MELSEC-Q
Specifies text.
Specifies subject.
Sends e-mail.
Normal completion
Unsuccessful completion
5 - 111 5 - 111
5 COMMUNICATION PROCEDURE
MELSEC-Q
Network 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. 1
Request destination
station
Ethernet
QCPU module
Station
No. 3
5 - 112 5 - 112
5 COMMUNICATION PROCEDURE
MELSEC-Q
Device
Tracking cable
5 - 113 5 - 113
5 COMMUNICATION PROCEDURE
MELSEC-Q
5 - 114 5 - 114
5 COMMUNICATION PROCEDURE
MELSEC-Q
Start
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.
( 1)
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 - 115 5 - 115
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q
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.
6-1 6-1
6 COMMUNICATION USING THE MC PROTOCOL
MELSEC-Q
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
Ethernet
device points
Number of
Complete code
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
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
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
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
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".
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
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.
6-5 6-5
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
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.
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.
BUFRCV to
instruction
No. 16
to to
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.
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
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.
M0 M1
Processing for normal completion
M1
Processing for abnormal completion
1)
Initial normal completion signal X19
2)
Open completion signal
(Address: 5000H [b0])
BUFSND instruction 3)
6)
BUFSND instruction complete device
One scan
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
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
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.
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
1)
Initial normal completion signal X19
2)
Open completion signal
(Address: 5000H [b0])
BUFRCV instruction 4)
6)
BUFRCV instruction complete device
One scan
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
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
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.
7-7 7-7
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
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
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.
FEND
SM400
I50 Z.BUFRCVS "U0" K2 D200 Receive data
• [D200]: Word count for receive data stored
• From [D201]: Receive data
IRET
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
7 - 10 7 - 10
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
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
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:
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
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
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
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
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
Subheader Subheader
7 - 14 7 - 14
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
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)
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
7 - 15 7 - 15
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
36H 30H 30H 30H (H) to (L) (H) to (L) (H) to (L) (H) to (L)
Subheader
n Data length
setting
n+1 (H) (L)
(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
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.
(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.
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.
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
7 - 20 7 - 20
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
(Send program)
7 - 21 7 - 21
7 FIXED BUFFER COMMUNICATION (WITH THE PROCEDURE EXIST
CONTROL METHOD)
MELSEC-Q
(Receive program)
X19: Initial normal completion signal
7 - 22 7 - 22
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
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.
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.
BUFRCV to
instruction
No. 16
8-1 8-1
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
to to to
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.
8-3 8-3
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
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.
M0 M1
Processing for normal completion
M1
Processing for abnormal completion
1)
Initial normal completion signal X19
2)
Open completion signal
(Address: 5000H [b0])
BUFSND instruction 3)
5)
BUFSND instruction complete device
One scan
ACK
(only TCP)
4)
8-4 8-4
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
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.
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
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
1)
Initial normal completion signal X19
2)
Open completion signal
(Address: 5000H [b0])
BUFRCV instruction 4)
5)
BUFRCV instruction complete device
One scan
ACK
(only TCP)
3)
8-6 8-6
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
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
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.
FEND
SM400
I50 Z.BUFRCVS "U0" K2 D200 Receive data
• [D100]: Byte count for receive data stored
• From [D101]: Receive data
IRET
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
8-8 8-8
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
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
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.
(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
Text (command)
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
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.
(a) Protocol
Select "UDP/IP".
8 - 11 8 - 11
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
8 - 12 8 - 12
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
(a) Protocol
Select "UDP/IP".
8 - 13 8 - 13
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
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.
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 ?
YES
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
(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.
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.
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.
(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.
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)
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.
(Send program)
8 - 20 8 - 20
8 FIXED BUFFER COMMUNICATION (WITH THE NO PROCEDURE
CONTROL METHOD)
MELSEC-Q
(Receive program)
X19: Initial normal completion signal
8 - 21 8 - 21
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
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.
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
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
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
1)
Programmable
controller CPU
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
The following diagram illustrates the control method when an external device writes
data to the random access buffer of the Ethernet module.
External device
Response
ACK ACK
1) 2)
(only TCP) (only TCP)
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
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.
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
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)
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)
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
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
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
Subheader Subheader
9-7 9-7
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
(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
(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)
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.
Random access
buffer
to
1 word (2 bytes)
ASCII-BIN conversion
Random access
buffer
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
9-9 9-9
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
9 - 10 9 - 10
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
(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
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
E2 H 00 H
9 - 11 9 - 11
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
36 H 32 H 30 H 30 H 00 H 00 H 00 H 00 H 00 H 00 H 00 H 41 H
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
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)
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
E1H 00H 34H 12H 78H 56H BCH 9AH BCH 9AH
2680H ( 9856) 0H ( 0)
to to to
to to to
to to to (10 words)
9 - 13 9 - 13
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
36 H 31 H 30 H 30 H 00 H 00 H 31 H 34 H 00 H 00 H 00 H 41 H
ASCII-BIN conversion
to to to
to to to
to to (10 words)
to
3E7FH (15999) 17FFH (6143)
9 - 14 9 - 14
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
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.
Fixed buffer
Random access
to buffer to
9 - 15 9 - 15
9 COMMUNICATION USING THE RANDOM ACCESS BUFFER
MELSEC-Q
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.
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.
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)
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
• BUFRCV
•
No.n
• •
• •
(2) Whether or not the BUFRCV instruction has been completed can be checked by
the complete bit devices (D2) + 0 and (D2) + 1.
Instruction execution
BUFRCV instruction
Complete device
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
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)
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
•
BUFRCVS
•
No.n
• •
• •
Interrupt program
(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
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) — — — —
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
• BUFSND
•
No.n External device
• •
• •
(2) Whether or not the BUFSND instruction has been completed can be checked by
the complete bit devices (D1) + 0 and (D1) + 1.
Instruction execution
BUFSND instruction
Complete device
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
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
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) ( )
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.
Instruction execution
CLOSE instruction
Complete device
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
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) — — — —
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.
Instruction execution
ERRCLR instruction
Complete device
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
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) — — — —
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
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.
Instruction execution
ERRRD instruction
Complete device
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
10 - 18 10 - 18
10 DEDICATED INSTRUCTIONS
MELSEC-Q
10.8 ZP.OPEN
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.
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.
Instruction execution
OPEN instruction
Complete device
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
2) 2
When not using the open setting parameters of
GX Developer
Designate the execution type/complete type
Designate the information of the application
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)
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)
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
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
Re-initial Connection 1
instruction open
completion
signal Connection 2
open <Read the current operation setting status>
completion
signal U0\
UINI
instruction
completion
device
Initial
completion
status
Re-initial
instruction
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.
(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.
(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 This section describes the errors that can be checked with the LED displays on the
front of the Ethernet module.
The following can be checked with the LED displays on the front of the Ethernet
module.
11 - 2 11 - 2
11 TROUBLESHOOTING
MELSEC-Q
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
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"
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
This section explains how to turn off [COM.ERR.] LED and to read/clear error
information using the sequence program.
(a) The [COM.ERR.] LED is turned off by turning on the off request signal
(Y17).
(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.
(b) The error information in the error log area of the buffer memory is not
cleared (deleted).
For the details of the dedicated instruction, see Chapter 10, "Dedicated
Instructions".
11 - 4 11 - 4
11 TROUBLESHOOTING
MELSEC-Q
The status of the various settings for the Ethernet module can be checked using the
GX Developer functions.
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
[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
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.
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
(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
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
11 - 12 11 - 12
11 TROUBLESHOOTING
MELSEC-Q
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
(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
(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)
(b) A sending error code is cleared when the next data sending is normally
completed.
(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
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.
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
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.)
(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
(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
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
b15 to b8 b7 to b0
b15 to b8 b7 to b0
b15 to b8 b7 to b0
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
POINT
The sending error log block area consists of eight error log blocks that have the
same order of data items.
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
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
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
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
Sub Sub
header header
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.
11 - 44 11 - 44
11 TROUBLESHOOTING
MELSEC-Q
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.
NO
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)
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)
Did it occur after replacing YES Refer to POINT in this section and
the Ethernet module? correct the error-causing part.
NO
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
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
POINT
Check the abnormal code marked with " " by referring to the complete status
stored as the control data of the dedicated instruction.
Sending error
YES
YES
YES
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.
YES
YES
YES
YES
11 - 49 11 - 49
11 TROUBLESHOOTING
MELSEC-Q
POINT
Perform error code reading while the connection is open.
Receiving error
YES
YES
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
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.
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.
2)
11 - 51 11 - 51
11 TROUBLESHOOTING
MELSEC-Q
2)
11 - 52 11 - 52
11 TROUBLESHOOTING
MELSEC-Q
Communication error
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
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
YES
1)
11 - 53 11 - 53
11 TROUBLESHOOTING
MELSEC-Q
1)
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
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
11 - 54 11 - 54
11 TROUBLESHOOTING
MELSEC-Q
Communication error
YES
YES
Was a response NO
returned to the device that sent
the command?
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
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)
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
YES
11 - 56 11 - 56
11 TROUBLESHOOTING
MELSEC-Q
Sending error
11 - 57 11 - 57
11 TROUBLESHOOTING
MELSEC-Q
Sending error
YES
Modify the condition devices.
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
Receiving error
YES
Was the
NO
dedicated MRECV
instruction
executed?
YES NO
No inquiry? Execute the dedicated MRECV instruction.
YES
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
YES YES
No attached file. The interval for inquiring the server is too long. No mail in the mail server
1)
11 - 59 11 - 59
11 TROUBLESHOOTING
MELSEC-Q
1)
Is the receive
NO
data value incorrect?
(Characters got
garbled)
YES
YES
Codes other than "0 to 9" and "A to F" are used.
YES
11 - 60 11 - 60
11 TROUBLESHOOTING
MELSEC-Q
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.
1)
C032H Error other than No error code
(TCP ULP timeout error)
C032H or C035H
or
C035H
(Existence check error)
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)
YES
4)
11 - 61 11 - 61
11 TROUBLESHOOTING
MELSEC-Q
1)
NO
Is disconnection detected? 2)
YES
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
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
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.
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
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).
YES
Check the connection status.
NO
Is the connection open? Open the connection.
YES
4)
11 - 63 11 - 63
11 TROUBLESHOOTING
MELSEC-Q
3)
4)
11 - 64 11 - 64
11 TROUBLESHOOTING
MELSEC-Q
4)
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
YES
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
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
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
YES
YES
NO
NO
YES
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.
App - 1 App - 1
APPENDIX
MELSEC-Q
: 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.
App - 3 App - 3
APPENDIX
MELSEC-Q
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
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.
• 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
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
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.
(b) Using the programs designed for the local station’s QCPU
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
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.
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.
[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
[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
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
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
(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
App - 14 App - 14
APPENDIX
MELSEC-Q
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
App - 16 App - 16
APPENDIX
MELSEC-Q
Communication
error occurrence
App - 17 App - 17
APPENDIX
MELSEC-Q
External device
Communication
error occurrence
Tracking cable
System switching
request
App - 18 App - 18
APPENDIX
MELSEC-Q
External device
Disconnection
occurrence
Tracking cable
Disconnection occurrence
Td
System switching
request is issued
System A CPU scan time
App - 19 App - 19
APPENDIX
MELSEC-Q
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
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
(1) QJ71E71-100
98 (3.86)
R1
( 1)
4 (0.16)
23 (0.91)
(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
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.
Receive remaining
response messages
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
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
The following explains a program, its execution environment and the contents of data
communication .
App - 25 App - 25
APPENDIX
MELSEC-Q
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.
bind()
accept()
(Communicate) sendto()/recvfrom()
send()/recv()
(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>
App - 28 App - 28
APPENDIX
MELSEC-Q
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
if(nErrorStatus!=SOCK_OK) {
Sockerror(ERROR_INITIAL); // Error handling
return(SOCK_NG);
}
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);
}
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
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
return(SOCK_OK);
}
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;
}
}
if(Closeflag==FLAG_ON){
nErrorStatus=shutdown(socketno,2); // Shutdown processing
nErrorStatus=closesocket(socketno); // Close processing
Closeflag=FLAG_OFF; // Connection completion flag off
}
App - 33 App - 33
APPENDIX
MELSEC-Q
This section provides the program example, execution environment and data
communication contents.
App - 34 App - 34
APPENDIX
MELSEC-Q
App - 35 App - 35
APPENDIX
MELSEC-Q
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>
App - 37 App - 37
APPENDIX
MELSEC-Q
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
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);
}
App - 38 App - 38
APPENDIX
MELSEC-Q
App - 39 App - 39
APPENDIX
MELSEC-Q
strcpy((char*)(s_buf), "500000FF03D000002C000A14010000D*0000000005112233445566778899AA");
// D0-D4 batch write request (3E frame, addressed to control system)
length = strlen((char*)(s_buf));
App - 40 App - 40
APPENDIX
MELSEC-Q
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);
}
}
App - 41 App - 41
APPENDIX
MELSEC-Q
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
App - 42 App - 42
APPENDIX
MELSEC-Q
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)
}
App - 44 App - 44
APPENDIX
MELSEC-Q
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.
App - 45 App - 45
APPENDIX
MELSEC-Q
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
(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.
Imports System
Imports System.Text
Imports System.Net
App - 48 App - 48
APPENDIX
MELSEC-Q
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
App - 51 App - 51
APPENDIX
MELSEC-Q
Me.Ajsock.Connect(ipend)
MsgBox("Connection Completed")
State = Me.Ajsock.Connected()
End Sub
End Sub
End Sub
App - 52 App - 52
APPENDIX
MELSEC-Q
End Sub
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
App - 54 App - 54
APPENDIX
MELSEC-Q
App - 55 App - 55
APPENDIX
MELSEC-Q
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.
bind()
accept()
(Communicate) sendto()/recvfrom()
send()/recv()
(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>
App - 57 App - 57
APPENDIX
MELSEC-Q
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
if(nErrorStatus!=SOCK_OK) {
Sockerror(ERROR_INITIAL); // Error handling
return(SOCK_NG);
}
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);
}
// 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);
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
length=strlen(s_buf);
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
return(SOCK_OK);
}
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;
}
}
if(Closeflag==FLAG_ON){
nErrorStatus=shutdown(socketno,2); // Shutdown processing
nErrorStatus=closesocket(socketno); // Close processing
Closeflag=FLAG_OFF; // Connection completion flag off
}
App - 62 App - 62
APPENDIX
MELSEC-Q
This section provides the program example, execution environment and data
communication contents.
App - 63 App - 63
APPENDIX
MELSEC-Q
App - 64 App - 64
APPENDIX
MELSEC-Q
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>
App - 66 App - 66
APPENDIX
MELSEC-Q
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
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);
}
App - 67 App - 67
APPENDIX
MELSEC-Q
App - 68 App - 68
APPENDIX
MELSEC-Q
strcpy(s_buf, "500000FF03D000002C000A14010000D*0000000005112233445566778899AA");
// D0-D4 batch write request (3E frame, addressed to control system)
length = strlen(s_buf);
App - 69 App - 69
APPENDIX
MELSEC-Q
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);
}
}
App - 70 App - 70
APPENDIX
MELSEC-Q
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
App - 71 App - 71
APPENDIX
MELSEC-Q
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)
}
App - 73 App - 73
APPENDIX
MELSEC-Q
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.
(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.
Option Explicit
End Sub
End Sub
End Sub
App - 75 App - 75
APPENDIX
MELSEC-Q
End Sub
End Sub
End Sub
End Sub
End Sub
App - 76 App - 76
APPENDIX
MELSEC-Q
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.
MELSECNET/H communication
Ethernet communication
GOT
App - 78 App - 78
APPENDIX
MELSEC-Q
® ® ® ®
(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.
App - 80 App - 80
APPENDIX
MELSEC-Q
This section explains the procedure for creating programs and sample programs using
MX Component.
↓
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
Button1 or Command1
' Connect to the communication line.
Button2 or Command2
' Read the device data.
Button3 or Command3
' Cut the communication line.
®
1) When Visual Basic .NET 2003 is used
'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
End Sub
'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
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
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
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
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
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
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
App - 91 App - 91
APPENDIX
MELSEC-Q
Recording sheet 2
[Module number ]
GX Developer setting Setting data
Data item
screen Setting value Remarks
TCP zero
Default: 20 (500 ms)
window Timer
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
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 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
Network No.
Input format: Decimal
No. Station No.
Network No.
Input format: Decimal
No. Station No.
Network No.
Input format: Decimal
No. Station No.
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
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
. . .
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
Condition device
News data
Condition device
News data
Condition 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
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
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
App - 99 App - 99
APPENDIX
MELSEC-Q
Recording sheet 10
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
Recording sheet 11
Recording sheet 12
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
HTTP port
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
Connection 12
Connection 13
Connection 14
Connection 15
Connection 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.
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.
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
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