Mitsubishi Electric MELSEC iQ-RJ71EN71 User Manual

Mitsubishi Electric MELSEC iQ-RJ71EN71 User Manual

Ethernet
Hide thumbs Also See for MELSEC iQ-RJ71EN71:
Table of Contents

Advertisement

MELSEC iQ-R Ethernet
User's Manual (Application)
-RJ71EN71
-R00CPU
-R01CPU
-R02CPU
-R04CPU
-R04ENCPU
-R08CPU
-R08ENCPU
-R08PCPU
-R08PSFCPU
-R08SFCPU
-R16CPU
-R16ENCPU
-R16PCPU
-R16PSFCPU
-R16SFCPU
-R32CPU
-R32ENCPU
-R32PCPU
-R32PSFCPU
-R32SFCPU
-R120CPU
-R120ENCPU
-R120PCPU
-R120PSFCPU
-R120SFCPU

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Electric MELSEC iQ-RJ71EN71

  • Page 1 MELSEC iQ-R Ethernet User's Manual (Application) -RJ71EN71 -R00CPU -R01CPU -R02CPU -R04CPU -R04ENCPU -R08CPU -R08ENCPU -R08PCPU -R08PSFCPU -R08SFCPU -R16CPU -R16ENCPU -R16PCPU -R16PSFCPU -R16SFCPU -R32CPU -R32ENCPU -R32PCPU -R32PSFCPU -R32SFCPU -R120CPU -R120ENCPU -R120PCPU -R120PSFCPU -R120SFCPU...
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. The precautions given in this manual are concerned with this product only. For the safety precautions of the programmable controller system, refer to the MELSEC iQ-R Module Configuration Manual.
  • Page 4 [Design Precautions] WARNING ● When connecting an external device with a CPU module or intelligent function module to modify data of a running programmable controller, configure an interlock circuit in the program to ensure that the entire system will always operate safely. For other forms of control (such as program modification, parameter change, forced output, or operating status change) of a running programmable controller, read the relevant manuals carefully and ensure that the operation is safe before proceeding.
  • Page 5 [Design Precautions] CAUTION ● Do not install the control lines or communication cables together with the main circuit lines or power cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction due to noise. ●...
  • Page 6 [Installation Precautions] WARNING ● Shut off the external power supply (all phases) used in the system before mounting or removing the module. Failure to do so may result in electric shock or cause the module to fail or malfunction. [Installation Precautions] CAUTION ●...
  • Page 7 [Wiring Precautions] CAUTION ● Individually ground the FG and LG terminals of the programmable controller with a ground resistance of 100 ohms or less. Failure to do so may result in electric shock or malfunction. ● Use applicable solderless terminals and tighten them within the specified torque range. If any spade solderless terminal is used, it may be disconnected when the terminal screw comes loose, resulting in failure.
  • Page 8 [Startup and Maintenance Precautions] WARNING ● Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction. ● Correctly connect the battery connector. Do not charge, disassemble, heat, short-circuit, solder, or throw the battery into the fire. Also, do not expose it to liquid or strong shock. Doing so will cause the battery to produce heat, explode, ignite, or leak, resulting in injury and fire.
  • Page 9 [Startup and Maintenance Precautions] CAUTION ● Do not drop or apply shock to the battery to be installed in the module. Doing so may damage the battery, causing the battery fluid to leak inside the battery. If the battery is dropped or any shock is applied to it, dispose of it without using.
  • Page 10: Conditions Of Use For The Product

    Mitsubishi representative in your region. INTRODUCTION Thank you for purchasing the Mitsubishi Electric MELSEC iQ-R series programmable controllers. This manual describes the functions, programming, and troubleshooting of the relevant products listed below. Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC iQ-R series programmable controller to handle the product correctly.
  • Page 11: Table Of Contents

    CONTENTS SAFETY PRECAUTIONS ..............1 CONDITIONS OF USE FOR THE PRODUCT .
  • Page 12: Table Of Contents

    Procedure for writing from external device ........... . . 96 Physical address and logical address of random access buffer .
  • Page 13: Table Of Contents

    Setting example............... . . 234 CHAPTER 2 PARAMETER SETTINGS Setting Parameters .
  • Page 14: Table Of Contents

    TCP/IP communications ..............378 UDP/IP communications .
  • Page 15: Relevant Manuals

    This manual does not include information on the module function blocks. For details, refer to the Function Block Reference for the module used. e-Manual refers to the Mitsubishi Electric FA electronic book manuals that can be browsed using a dedicated tool.
  • Page 16: Terms

    TERMS Unless otherwise specified, this manual uses the following terms. Term Description The abbreviation for Address Resolution Protocol. This protocol is used to obtain the MAC address of Ethernet from an IP address. Buffer memory Memory in an intelligent function module for storing data such as setting values and monitored values. When integrated into the CPU module, this memory refers to a memory for storing data such as setting values and monitored values of the Ethernet function, and data used for data communication of the multiple CPU system function.
  • Page 17 Term Description New control system A system that has switched to control system from standby system after system switching. OPEN A generic term for the GP.OPEN and ZP.OPEN A generic term for the partner products with built-in EZSocket that supports a redundant system. For communications with an OPS, use "OPS Connection Module"...
  • Page 18 Term Description System B A system that is set as system B to distinguish two systems, which are connected with two tracking cables. When the two systems start up at the same time, this system will be a standby system. System switching does not affect the system A/B setting.
  • Page 19: Chapter 1 Functions

    FUNCTIONS Connection with MELSOFT Product and GOT Programming and monitoring of the programmable controller with the engineering tool, and monitoring and testing of the programmable controller from the GOT can be performed via Ethernet. This function enables remote operations using Ethernet's long-distance connection and high-speed communication.
  • Page 20 When connecting multiple MELSOFT products with TCP/IP, drag "MELSOFT Connection Module" from the "Module List" to "List of devices" or "Device map area" in "External Device Configuration" under "Basic Settings". ( Page 244 External Device Configuration) 1 FUNCTIONS 1.1 Connection with MELSOFT Product and GOT...
  • Page 21 ■Settings on the engineering tool side Set in the "Specify Connection Destination Connection" window. [Online]  [Current Connection Destination] Set "PC side I/F" to "Ethernet Board". Double-click "Ethernet Board", and open the "PC side I/ F Detailed Setting of Ethernet Board" window. Set the network number, station number, and protocol of the personal computer.
  • Page 22 Double-click the icon set in step 4, and open the detailed setting window. Select "Connection via HUB" for the connection method, and enter the station number and IP address or host name for the Ethernet-equipped module. Select "RJ71EN71" to connect the RnENCPU (network part). Set "Other Station Setting"...
  • Page 23 Searching modules on the network When connecting with a hub, a list of modules that can be searched for will appear by clicking the [Find] button on the detailed setting window. ■Search target modules • The control CPU of the RJ71EN71 or the CPU module connected to the same hub as the engineering tool •...
  • Page 24 ■When module does not appear after search If a connected Ethernet-equipped module does not appear in the list after searching the modules on the network, check the following items. • Search cannot be performed if it is disabled with the IP filter function. •...
  • Page 25 ■Communications by network number/station number by using the CPU module (built-in Ethernet port part) • The UDP/IP protocol is used for the connection and data is always exchanged as binary codes. • When accessing another station, set the network number for the CPU module (built-in Ethernet port part) so that it is unique among the network numbers of the other network.
  • Page 26: Direct Connection

    Direct connection The Ethernet-equipped module and engineering tool can be directly connected with one Ethernet cable without using a hub. When direct connection is made, communication is possible without setting the IP address or host name in the "Specify Connection Destination Connection" window. (Communicate using broadcast communications) •...
  • Page 27 Double-click the icon set in step 4, and open the detailed setting window. Select "Ethernet Port Direct Connection" for the connection method. When connecting directly with the CPU module (built-in Ethernet port part), setting is also possible by clicking the [CPU Module Direct Coupled Setting] button of the "Specify Connection Destination Connection" window. Precautions ■Connection with LAN line Do not connect with a LAN line and set direct connection.
  • Page 28 ■Conditions that cannot communicate with direct connection Communication with a direct connection may be disabled if the following conditions apply. If connection is not possible, review the settings for the Ethernet-equipped module and personal computer. • When all bits of the IP address for the Ethernet-equipped module that correspond with the 0 section of the subnet mask for the personal computer are on or off IP address for the Ethernet-equipped module: 64.64.255.255 IP address for the personal computer: 64.64.1.1...
  • Page 29: Slmp Communications

    SLMP Communications SLMP is a protocol used by external devices to access SLMP-compatible devices via the Ethernet. SLMP communications are available among devices that can receive/send messages with the SLMP control procedure. The Ethernet-equipped module processes and transfers data following instructions (command) from the external device, so the programmable controller only needs the open/close processing and does not require a program for data communication.
  • Page 30: Communication Structure

    Communication structure When a message is sent from the external device to the Ethernet-equipped module using the SLMP message format, the Ethernet-equipped module executes a processing corresponding to the received message. During communication, the Ethernet-equipped module functions as a server and the external device (terminals such as a personal computer) functions as the client.
  • Page 31 Setting procedure Set "External Device Configuration" under "Basic Settings". ( Page 244 External Device Configuration) Select "SLMP Connection Module" in "Module List" and drag it to "List of devices" or "Device map area". Set the other items to the connection if required. Communications using an auto-open UDP port The auto-open UDP port is used for communication with SLMP.
  • Page 32: List Of Valid Commands

    List of valid commands The following table lists the commands that can be executed from the external device to the Ethernet-equipped module. "" in the "Sub-command" field differs according to the specified device. For details on each command, refer to the following. ...
  • Page 33 Item Command Description command Type Operation Remote Control Remote Run 1001 0000 Executes the remote RUN to the access destination module. Remote Stop 1002 0000 Executes the remote STOP to the access destination module. Remote Pause 1003 0000 Executes the remote PAUSE to the access destination module. Remote Latch 1005 0000...
  • Page 34: Communications Using The Predefined Protocol

    Communications Using the Predefined Protocol Data can be exchanged between the external device (such as measuring instrument and bar code reader) and the CPU module following the protocol of the device. Data that varies according to communication session can be handled by incorporating a device or buffer memory into the communication packet.
  • Page 35: Data Communication Procedures

    Data communication procedures When the predefined protocol support function is used, data can be exchanged with the external device using the following procedure. Select, create or edit the protocol with the predefined protocol support function, and write the protocol setting data. ( Page 33 Creating the protocol setting data) Set the module parameter.
  • Page 36 ■Newly creating the protocol setting data Newly create the protocol setting data. [File]  [New] Item Description Protocol No. Displays the protocol number used with the dedicated instruction in the program. Manufacturer Displays the name of the manufacturer of the device for which the protocol is being set. Model Displays the model of the protocol to be set.
  • Page 37 ■Adding protocol Add protocol. [Edit]  [Add Protocol] Item Description Setting range Type Select the type of protocol to be added. • Predefined Protocol Library • User Protocol Library • Add New Protocol No. Select the protocol number to be added. 1 to 128 Manufacturer Set the maker of the protocol to be added.
  • Page 38 ■Protocol Detailed Setting Set the protocol send/receive parameters. "Protocol Setting" window  Select a protocol  [Edit]  [Protocol Detailed Setting] Item Description Connected Device Manufacturer Set the protocol maker name. Information Type Set the protocol device type. Model Set the protocol model. Version Set the protocol device version.
  • Page 39 ■Packet setting Set the configuration of the send/receive packets on the "Packet Setting" window. "Protocol Setting" window  Packet to be set The above window opens when "Predefined Protocol Library" is selected on the "Add Protocol" window. When "Add New" or "User Protocol Library" has been selected, configure the packets with the [Change Type] button and [Add New] button.
  • Page 40 The following data is not written as the protocol setting data so it will not be displayed even when read. However, when the protocol is selected from the predefined protocol library, the following can be displayed. • Manufacturer • Packet Name •...
  • Page 41 Setting procedure Set "External Device Configuration" under "Basic Settings". ( Page 244 External Device Configuration) Select the external device to be connected in "Module List" and drag it to "List of devices" or "Device map area". External device name Description UDP Connection Module Select to communicate with the external device using UDP/IP Active Connection Module...
  • Page 42: Protocol Communication Type

    Protocol communication type The packets sent to the external device when a processing is executed and the external device's receive packets are registered in the protocol. The packet elements set with the predefined protocol support function are the data section of the packets that are actually sent and received.
  • Page 43: Packet Elements

    Packet elements The packet is created with a combination of packet elements. Up to 32 elements can be set in one packet. One packet can have a maximum data length of 2046. This section describes the details of the packet elements. For examples of the packet element data, refer to the following.
  • Page 44 Length The length code is used when there is an element that indicates the data length in the packet. • When sending: Automatically calculates the data length in the specified range, and adds it to the packet. • When receiving: From the received data, the data (value) corresponding to the length is verified as the specified range's data length.
  • Page 45 • If there are no elements other than length, an element error occurs. (When using length, one or more elements other than length are required.) • If the calculation result exceeds the number of digits set with "Data Length", the excessive digit value is discarded (invalidated).
  • Page 46 Non-conversion variable Use this to send the CPU module device or buffer memory data as part of the send packet, or to store part of the received packet in the CPU module device or buffer memory. Multiple non-conversion variable can be arranged in one packet. The following table lists the items.
  • Page 47 Item Description Data Storage Area Specify the start device for storing the variable value. Specification The settable devices are listed below. *1*2 Inner user • Input (X) • Output (Y) • Internal relay (M) • Latch relay (L) • Link relay (B) •...
  • Page 48 The following figures show the configuration of the data storage area. ■When "Fixed Length/Variable Length" is "Fixed Length" The area after the device number specified on the "Element Setting" window becomes the data storage area. The occupied data storage area differs according to the "Unit of Stored Data". •...
  • Page 49 When "Fixed Length/Variable Length" is "Variable Length" and the configuration is set as follows, an error occurs: • An element other than static data is placed behind a non-conversion variable element when non-conversion variable is out of the length calculating range or when there is no length element (except for when non- conversion variable is placed at the end of the packet elements).
  • Page 50: Execution Conditions Of Predefined Protocol Communications

    Execution conditions of predefined protocol communications The predefined protocol communications can be executed when 'Predefined protocol ready' (Un\G1901002.0) is on. This section describes the operation of 'Predefined protocol ready' (Un\G1901002.0). When the system is powered on or reset If protocol setting data is written in, the Ethernet-equipped module checks the protocol setting data when the system is powered on or reset.
  • Page 51 ■When protocol setting data is normal Power on/reset Normal result Checking the protocol Ethernet-equipped module setting data Bit 0 turns on when the check result is normal. 'Predefined protocol ready' (Un\G1901002.0) 'Predefined protocol setting The number of registered protocols and information data check area' about whether protocols have been registered are stored.
  • Page 52: Example Of Predefined Protocol Communications

    Example of predefined protocol communications This section describes an example of predefined protocol communications using UDP/IP. System configuration Sending side Receiving side GX Works3 (192.0.1.100) (192.0.1.101) Ethernet Parameter settings Connect the engineering tool to the CPU module and set the parameters. ■Sending side Set the CPU module as follows.
  • Page 53 Set the RJ71EN71 as follows. [Navigation window]  [Parameter]  [Module Information]  Right-click  [Add New Module] Click the [OK] button to add the module labels of the RJ71EN71. Set the items in "Basic Settings" as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings] 1 FUNCTIONS 1.3 Communications Using the Predefined Protocol...
  • Page 54 Set the network configuration as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings]  [External Device Configuration] Start the predefined protocol support function. [Tool]  [Predefined Protocol Support Function] Select "Ethernet Module"...
  • Page 55 Set the protocol as follows. [Edit]  [Add Protocol] Set each packet as follows. "Protocol Setting" window  Packet to be set • Request 1 FUNCTIONS 1.3 Communications Using the Predefined Protocol...
  • Page 56 • Normal response • Error response 1 FUNCTIONS 1.3 Communications Using the Predefined Protocol...
  • Page 57 Write the protocol setting data to the CPU module. [Online]  [Write to Module] Write the set parameters to the CPU module. Then reset the CPU module or power off and on the system. [Online]  [Write to PLC] In this example, default values were used for parameters that are not shown above. For the parameter setting, refer to the chapter explaining the parameters in this manual.
  • Page 58 Set the network configuration as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings]  [External Device Configuration] Write the set parameters to the CPU module. Then reset the CPU module or power off and on the system. [Online] ...
  • Page 59 Program examples Classification Label name Description Device Module label EN71_EE_1.bnCompletion_ConnectionOpen[1] Open completion signal (connection No.1) U0\G1900000.0 EN71_EE_1.uCompletion_EthernetInitialized_D.0 Initial status U0\G1900024.0 EN71_EE_1.bReady_PredefinedProtocol_D Predefined protocol ready U0\G1901002.0 Label to be defined Define global labels as shown below: 1 FUNCTIONS 1.3 Communications Using the Predefined Protocol...
  • Page 60 When 'bStart' (M0) is turned on, the protocol is executed by the GP.ECPRTCL instruction and D100 to D109 of the receiving side CPU module is read and stored in D14 to D23 of the sending side CPU module. 'bComp_OK' (M10) is turned on when the protocol completed successfully. D0 to D8 stores the following as a protocol setting data.
  • Page 61: Socket Communications

    Socket Communications Using dedicated instructions, arbitrary data can be exchanged with an external device connected by Ethernet over TCP/IP or UDP/IP. Use this for bidirectional communication one-on-one with an external device. Ethernet Receive or broadcast receive External device Ethernet-equipped module Send Broadcast send External device...
  • Page 62: Applicable Dedicated Instructions

    Applicable dedicated instructions The following table lists the dedicated instructions for exchanging data with socket communications. For details on dedicated instructions, refer to the following.  MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks  MELSEC iQ-R Programming Manual (Module Dedicated Instructions) List of dedicated instructions The following table lists the dedicated instructions used by each module.
  • Page 63 Communication structure With socket communications, port numbers that identify the communication are used to enable multiple communication sessions with the external device. These are used for both TCP/IP and UDP/IP. For send: Specify send source Ethernet-equipped module's port number and the send destination external device's port number.
  • Page 64: Communications Using Tcp/Ip

    Communications using TCP/IP TCP/IP protocol establishes a connection between the external device's port number for reliable data exchange. Check the following items before performing socket communications using TCP/IP. • IP addresses and port numbers on external device side • IP addresses and port numbers on the Ethernet-equipped module side •...
  • Page 65 Precautions for TCP/IP communications ■Conditions for closing In addition to when close is requested from the external device, the TCP/IP communications processing will be closed in the following cases if 'Open completion signal' (Un\G1900000 to Un\G1900007) turns off. • When alive check function times out •...
  • Page 66 ■Checking the receive data length There is no concept of delimiting the communication data during communication with TCP/IP. Thus, the continuously sent data may be merged on the received side, or the data sent in a group may be split on the receive side. If necessary, the receiving side must check the receive data length and perform the processing.
  • Page 67: Communications Using Udp/Ip

    ■Precautions for Passive open • Use 'Open completion signal' (Un\G1900000 to Un\G1900007) and 'Open request signal' (Un\G1900008 to Un\G1900015) in the program to create an interlock circuit. The on/off timing for the open completion signal and open request signal is shown below.
  • Page 68: Broadcast Communications

    Broadcast communications Broadcast communications is a communication method that does not specify the external device. Data is exchanged between all Ethernet-equipped module stations and external devices on the same Ethernet to which the Ethernet-equipped modules are connected. Item Description Broadcast sending The same data is sent to all Ethernet devices on the same Ethernet.
  • Page 69: Precautions

    Precautions This section describes the precautions for exchanging data with socket communications. Port number Port numbers 1 to 1023 are typically reserved port numbers (WELL KNOWN PORT NUMBERS) and 61440 to 65534 are used by other communication functions, so 1024 to 4999 or 5010 to 61439 should be used for the own station port numbers. 5000 to 5009 are used by the system and must not be specified.
  • Page 70: Communications Using The Fixed Buffer

    Communications Using the Fixed Buffer Communications using the fixed buffer uses TCP/IP and UDP/IP to send and receive arbitrary data with the external device connected to the Ethernet with dedicated instructions in the same manner as exchanging data with socket communications. Exchanges arbitrary data between the CPU module and external device using the fixed buffer of the RJ71EN71 and the RnENCPU (network part).
  • Page 71 Applicable dedicated instructions The following table lists the dedicated instructions used for communications using the fixed buffer. For details on dedicated instructions, refer to the following.  MELSEC iQ-R Programming Manual (Module Dedicated Instructions) List of dedicated instructions The following table lists the dedicated instructions used by each module. Instruction Description GP.CONOPEN...
  • Page 72 External devices capable of data exchange Data can be exchanged with the following external devices. • Devices in Ethernet to which the RJ71EN71 is connected • Devices in Ethernet to which the RnENCPU (network part) is connected • Device connected via router As the following figure shows, the external device for communication and the working application (for send/receive and "Procedure Exist"/"No Procedure") are set in "External Device Configuration"...
  • Page 73: Send Procedure

    Send procedure The following figure shows the processing when sending data from the RJ71EN71 or the RnENCPU (network part) to the external device. Procedure exists The following figure shows the send processing for the fixed buffer No.1 area corresponding to the connection No.1. Initial processing Open processing Sending data Receiving a response...
  • Page 74 No procedure The following figure shows the send processing for the fixed buffer No.1 area corresponding to the connection No.1. Initial processing Open processing Sending data Ò 'Initial status' (Un\G1900024.0) Ó 'Open completion signal (connection No.1)' (Un\G1900000.0) BUFSND instruction Ô Ö...
  • Page 75: Receive Procedure

    Receive procedure The following figure shows the processing for the RJ71EN71 or the RnENCPU (network part) to receive data from the external device. The following receive methods can be used. • Receiving with main program (BUFRCV instruction) • Receiving with interrupt program (BUFRCVS instruction) Receiving with main program (procedure exists) The following figure shows the receive processing for the fixed buffer No.1 area corresponding to the connection No.1.
  • Page 76 Receiving with main program (no procedure) The following figure shows the receive processing for the fixed buffer No.1 area corresponding to the connection No.1. Initial processing Open processing Receiving data Ò 'Initial status' (Un\G1900024.0) Ó 'Open completion signal (connection No.1)' (Un\G1900000.0) BUFRCV instruction Õ...
  • Page 77 Reception with interrupt program (procedure exists) Use the BUFRCVS instruction for receiving data with the interrupt program. The interrupt program is started when data is received from the external device. It enables the reading of receive data to the CPU module. The interrupt settings are required to use the interrupt program.
  • Page 78 Reception with interrupt program (no procedure) Use the BUFRCVS instruction for receiving data with the interrupt program. The interrupt program is started when data is received from the external device. It enables the reading of receive data to the CPU module. The interrupt settings are required to use the interrupt program.
  • Page 79: Pairing Open

    Pairing open Pairing open is an opening method that pairs a fixed buffer communication reception connection and send connection, and establishes a connection using one port each from the own station and external device. When pairing open is specified, data can be exchanged with two connections using an open processing for one port. (TCP/IP or UDP/IP RJ71EN71 or RnENCPU (network part) communications)
  • Page 80 Broadcast communications Broadcast communications is a communication method that does not specify the external device. Data is exchanged between all Ethernet-equipped module stations and external devices on the same Ethernet to which the Ethernet-equipped modules are connected. Item Description Broadcast sending The same data is sent to all Ethernet devices on the same Ethernet.
  • Page 81: Data Format

    Data format This section describes the data format used during communications using the fixed buffer. The communication data is configured of the header and application data. Header The header is for TCP/IP or UDP/IP. The RJ71EN71 or the RnENCPU (network part) automatically adds and deletes the header, the setting is not required.
  • Page 82 With nonprocedural, the subheader and data length added for procedural are not used, so the data is all handled as valid text. The RJ71EN71 and the RnENCPU (network part) turn on the fixed buffer reception status signal after storing the size of the received message (packet) in the receive data length storage area. Providing a check procedure including the data length, data type code, and so on, in the message's application data is recommended so that the application data's byte size and data type can be seen on the receiving side.
  • Page 83 ■Subheader The RJ71EN71 or the RnENCPU (network part) automatically adds and deletes the subheader, the setting is not required. Command (external device  RJ71EN71 or Data Format Response (RJ71EN71 or RnENCPU (network part)  external device) RnENCPU (network part)) Binary code ⋅⋅⋅...
  • Page 84 ■Text (command) Shows the format of the command/response. • When exchanging data with binary codes Command format Maximum of 5113 words ⋅⋅⋅ Subheader Data specifying/ storing device for sending/ receiving instructions Data length setting Send/ receive data n+setting data length 1 word (2 bytes) •...
  • Page 85 ■End code The error code is stored in the end command added to the response. ( Page 331 End Codes Returned to an External Device During Data Communications) The end code is also stored in the BUFSND instruction and BUFRCV instruction completion status area (inside control data). The following cases may apply if an error code for communications using the SLMP or random access buffer is stored even when executing communications using the fixed buffer.
  • Page 86: Example Of Communications Using The Fixed Buffer

    Example of communications using the fixed buffer This section describes the socket communications examples using Active open of TCP/IP communications. System configuration Sending side Receiving side GX Works3 (192.0.1.100) (192.0.1.101) Ethernet Parameter settings Connect the engineering tool to the CPU module and set the parameters. ■Sending side Set the CPU module as follows.
  • Page 87 Set the RJ71EN71 as follows. [Navigation window]  [Parameter]  [Module Information]  Right-click  [Add New Module] Click the [OK] button to add the module labels of the RJ71EN71. Set the items in "Basic Settings" as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings] 1 FUNCTIONS 1.5 Communications Using the Fixed Buffer...
  • Page 88 Set the network configuration as follows. Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings]  [External Device Configuration] Write the set parameters to the CPU module. Then reset the CPU module or power off and on the system. [Online] ...
  • Page 89 Set the network configuration as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings]  [External Device Configuration] Write the set parameters to the CPU module. Then reset the CPU module or power off and on the system. [Online] ...
  • Page 90 Program examples ■Sending side Classification Label name Description Device Module label RCPU.stSM.bAlways_ON Always on SM400 EN71_EE_1.stPort1.uStatus_HUB_Connection_D.0 Connection status U0\G5192.0 EN71_EE_1.bnCompletion_ConnectionOpen[1] Open completion signal (connection No.1) U0\G1900000.0 EN71_EE_1.bnStatus_ConnectionOpenExecution[1] Open request signal (connection No.1) U0\G1900008.0 EN71_EE_1.uCompletion_EthernetInitialized.0 Initial status U0\G1900024.0 Label to be defined Define global labels as shown below: 1 FUNCTIONS 1.5 Communications Using the Fixed Buffer...
  • Page 91 1 FUNCTIONS 1.5 Communications Using the Fixed Buffer...
  • Page 92 1 FUNCTIONS 1.5 Communications Using the Fixed Buffer...
  • Page 93 The refresh processing of the module label is performed. (The processing is required for when using the module function block.) When the refresh processing is completed, 'bRunRefresh' (M0) is turned on. (56) When 'bStartOpen' (M1) is turned on, the open processing of connection No.1 is performed. When the open processing is completed successfully, 'bOpen_OK' (M3) is turned on.
  • Page 94 ■Receiving side Classification Label name Description Device Module label RCPU.stSM.bAlways_ON Always on SM400 EN71_EE_1.bnCompletion_ConnectionOpen[1] Open completion signal (connection No.1) U0\G1900000.0 EN71_EE_1.bnCompletion_ReceiveSocket_FixedBuffer[1] Socket/fixed buffer reception status signal U0\G1900016.0 (connection No.1) EN71_EE_1.uCompletion_EthernetInitialized.0 Initial status U0\G1900024.0 Label to be defined Define global labels as shown below: 1 FUNCTIONS 1.5 Communications Using the Fixed Buffer...
  • Page 95 The refresh processing of the module label is performed. (The processing is required for when using the module function block.) When the refresh processing is completed, 'bRunRefresh' (M0) is turned on. (98) When 'bStartRecv' (M9) is turned on, the data sent from the sending side is received and stored in 'uRecvData' (D2000). (The device range in which data is stored varies depending on the data length of the received data.) When the data receive is completed successfully, 'bRecv_OK' (M11) is turned on.
  • Page 96: Communications Using The Random Access Buffer

    Communications Using the Random Access Buffer With communications using the random access buffer, data can be freely read and written between any external device (excluding Ethernet-equipped module) and the RJ71EN71 or the RnENCPU (network part). The external device does not need to be fixed.
  • Page 97 Communication structure This section describes the mechanism of communications using the random access buffer. Data flow The following figure shows the flow of data communications using the random access buffer. A dedicated packet is used to exchange data between the external device and the RJ71EN71 or the RnENCPU (network part).
  • Page 98: Procedure For Writing From External Device

    Procedure for writing from external device The following shows the procedure when writing data from the external device to the random access buffer of the RJ71EN71 or the RnENCPU (network part). After the module parameters are set, check that the initial processing of the RJ71EN71 or the RnENCPU (network part) has completed normally.
  • Page 99: Physical Address And Logical Address Of Random Access Buffer

    Physical address and logical address of random access buffer This section describes the start address of the random access buffer of the RJ71EN71 or the RnENCPU (network part) specified in the command. The address specified for the random access buffer differs from the address specified by the external device and the address specified with the FROM/TO instruction.
  • Page 100 Application data The application data expresses the following data code as binary code or ASCII code. Switch between the binary code and ASCII code with "Own Node Settings" under "Basic Settings". ( Page 242 Own Node Settings) ■Format • When exchanging data with binary codes Application data area (command message) Maximum of...
  • Page 101 • During read Command (external device  RJ71EN71 or Data format Response (RJ71EN71 or RnENCPU (network part)  external device) RnENCPU (network part)) Binary code ⋅⋅⋅ ⋅⋅⋅ 61H 00H Subheader Subheader ASCII code ⋅⋅⋅ ⋅⋅⋅ "6" "1" "E" "1" 36H 31H 30H 30H Subheader Subheader 1 FUNCTIONS...
  • Page 102 ■Start Address The start address of the random access buffer range where data read/write is executed is expressed as a logical address. ( Page 97 Physical address and logical address of random access buffer) • When exchanging data with binary codes Specify the head address with a binary value.
  • Page 103 ■Text • When exchanging data with binary codes Data length (maximum of 1017 words) Random access buffer Specified address n + set number of words to be read 1 word (2 bytes) • When exchanging data with ASCII codes Data length × 2 (maximum of 1016 words) (L) (H) ASCII-binary conversion Random access...
  • Page 104 Example of command/response format The following section shows an example of the command and response format. ■Writing to buffer with write request from external device • When exchanging data with binary codes Command format (external device  RJ71EN71) Subheader Start address Data length Text (10 words) Random access buffer...
  • Page 105 • When exchanging data with ASCII codes Command format (external device  RJ71EN71) Subheader Start address Data length Text (20 words) ASCII-binary conversion Random access buffer Physical address Logical address 20000 20001 20002 20009 (10 words) 26143 6143 Response format (RJ71EN71  external device) Subheader End code 1 FUNCTIONS...
  • Page 106 ■Reading from buffer with read request from external device • When exchanging data with binary codes Command format (external device  RJ71EN71) Subheader Start address Data length Response format (RJ71EN71  external device) Subheader End code Text (10 words) Random access buffer Physical address Logical address 20000...
  • Page 107 • When exchanging data with ASCII codes Command format (external device  RJ71EN71) Subheader Start address Data length Response format (RJ71EN71  external device) Subheader End code Text (20 words) ASCII-binary conversion Random access buffer Physical address Logical address 20000 20020 20021 20022...
  • Page 108: Example Of Communications With Random Access Buffer

    Example of communications with random access buffer The following figure shows an example of the write operation from the external device. External device RJ71EN71 CPU module Random access buffer Device memory D10000 21710 Ô Data received Data received 21719 D10009 21720 Ó...
  • Page 109: Communications Using Modbus/Tcp

    Communications Using MODBUS/TCP MODBUS/TCP is a protocol for using MODBUS protocol messages on a TCP/IP network. The RJ71EN71 and RnENCPU (network part) support the MODBUS/TCP slave function so that they can communicate with MODBUS/TCP master devices. For communications using MODBUS/TCP, refer to the following. ...
  • Page 110: Automatic Response Function

    Automatic response function The automatic response function is a function that the RJ71EN71 or RnENCPU (network part) automatically executes a necessary processing based on the function code in a request message received from a MODBUS/TCP master device and sends the response message to the MODBUS/TCP master device. A program is not required on the RJ71EN71 or RnENCPU (network part) side to send the response message.
  • Page 111: Modbus Device Assignment Function

    MODBUS device assignment function This function automatically converts the access to the MODBUS devices of the RJ71EN71 and RnENCPU (network part) into the access to the devices of the CPU module. Use the MODBUS device assignment parameters to create the association between the MODBUS devices and the device memory areas of the CPU module.
  • Page 112 MODBUS device assignment parameters The MODBUS device assignment parameters are used to associate the MODBUS devices with the device memory areas of the CPU module. This enables direct access from a MODBUS/TCP master device to the device memory areas of the CPU module.
  • Page 113 MODBUS devices The following table lists the MODBUS devices supported by the RJ71EN71 and RnENCPU (network part). MODBUS device type Unit Read/write Number of access MODBUS device No. points Coil Read/write 65536 points 1 to 65536 Input Read 65536 points 100001 to 165536 Input register Word...
  • Page 114 Applicable devices The following table lists the devices of the CPU module that can be set in the MODBUS devices. MODBUS device (: Can be assigned, : Cannot be assigned) Device name Symbol Coil Input Input register Holding Extended file register register ...
  • Page 115 ■Reading of the long timer and long retentive timer Note that the following items cannot be set for reading the long timer and long retentive timer. • Long timer (contact) • Long timer (coil) • Long retentive timer (contact) • Long retentive timer (coil) When, however, the current value of the long timer or long retentive timer is set in units of four words, the contact and coil will be read simultaneously.
  • Page 116 Default assignment parameters The MODBUS device assignment parameters include default assignment parameters as initial values. The following diagram shows the MODBUS device assignment using the default assignment parameters. Coil Input Input register Holding register (000001 to 065536) (100001 to 165536) (300001 to 365536) (400001 to 465536) 000001...
  • Page 117: List Of Modbus Standard Functions

    List of MODBUS standard functions This section lists the function codes that can be executed from the MODBUS/TCP master device to the RJ71EN71 and RnENCPU (network part). For details, refer to the following.  MELSEiQ-R MODBUS/TCP Reference Manual Function code (FC) Sub-code (SC) Function name ...
  • Page 118: Link Dedicated Instruction Communication

    Link Dedicated Instruction Communication The link dedicated instructions are used to exchange random data between another network or other station's CPU module connected to Ethernet, read/write arbitrary data, and access other stations such as remote RUN/STOP. If the initial processing for the RJ71EN71 or the RnENCPU (network part) of the own station, relay station, and access station are completed normally, the other station can be accessed with the link dedicated instructions.
  • Page 119 Data communication procedures This section describes the procedure for communication with link-dedicated instructions. After the module parameters are set, check that the initial processing of the RJ71EN71 or the RnENCPU (network part) has completed normally. ('Initial status' (Un\G1900024.0): On) Data is exchanged with link dedicated instructions. Communication with the link dedicated instructions uses the MELSOFT transmission port (UDP/IP), so the open/close processing is not required.
  • Page 120: File Transfer Function (Ftp Server)

    File Transfer Function (FTP server) The server function of FTP (File Transfer Protocol) used to transfer files with the external device is supported. The external device with FTP client function can easily and directly access files in the CPU module. The following operations can be executed on the CPU module files from the external device with FTP client function.
  • Page 121 Data communication procedures The following section describes the settings for FTP communication. Setting in the Ethernet-equipped module side To use the file transfer function (FTP server), set "Use" for "FTP Server" in "FTP Server Settings" under "Application Settings". For details on other setting items, refer to the following. Page 252 FTP Server Settings 1 FUNCTIONS 1.9 File Transfer Function (FTP server)
  • Page 122 Operations on external device (FTP client) side This section describes the procedures and required processes on the external device side for using the Ethernet-equipped module's file transfer function (FTP server). The FTP commands and input format used for the operation are shown in the explanation.
  • Page 123: Files That Can Be Transferred With Ftp

    Logging into Ethernet-equipped module This section describes the steps from starting FTP and logging into the Ethernet-equipped module.   Start FTP from the Microsoft Windows command prompt. Ò Ó Ô Õ  FTP start (FTP )  Connect with FTP server (open Ethernet-equipped module IP address ) ...
  • Page 124: Ftp Command

    FTP command FTP command list The FTP client side commands supported by the Ethernet-equipped module are shown below. : Executable , : Not executable Command Function CPU module status Remote password STOP Unlocked Locked Enable Disable binary Notifies that the file will be transferred without conversion. ...
  • Page 125 ■Subcommands usable with quote command This section describes the Ethernet-equipped module dedicated commands added to the quote command and used. When executing this command from the FTP client, input the subcommand after the quote command. ("" means to input CR, Enter or the Return key.) Executing the STOP command Input the following at the command prompt.
  • Page 126 Specifying an FTP command This section describes the method of specifying the files specified with the FTP command on the FTP client (external device side) supported by the Ethernet-equipped module. With the CPU module, the drive name and file name are distinguished when specifying the file. When specifying a file with FTP, specify the target file with the following arrangement.
  • Page 127 Details of FTP command This section describes the FTP commands on the FTP client side supported by the Ethernet-equipped module, and the methods of using those commands. • Note that depending on the client side FTP application, some of the FTP commands may not operate as described in this manual.
  • Page 128 Command name Description mdir Function Stores the detailed information (file name, date of creation, volume) of the file stored in the CPU module in the FTP client side file as log data. Specification format mdir "source drive name":\"destination file path name" Example When storing the detailed information of file stored in data memory into 20120702.LOG file mdir 4:\20120702.LOG...
  • Page 129 Command name Description Function Displays current directory name of the CPU module. Specification format Caution "\" is displayed as the pwd command execution results. quit Function Closes the connection with the FTP and quits the FTP. Specification format quit Similar command quote Function Sends the FTP server's subcommand (Ethernet-equipped module dedicated subcommand).
  • Page 130 ■Ethernet-equipped module dedicated subcommand This section describes the Ethernet-equipped module dedicated subcommands that are added to the FTP command's quote command and sent. Command name Description change Function Shows or changes the attributes of files stored in the CPU module. Specification format When displaying the file attributes quote change file path name...
  • Page 131 Command name Description passwd-wr Function Sets the write password (file password) registered in the file transfer target file to the Ethernet-equipped module. Shows/clears the write password set in FTP. Use this command only when a write password is registered for the file transfer target file. The CPU module checks the password when accessing the specified file.
  • Page 132 Command name Description Function Sets the CPU module to the RUN state (remote RUN). Clearing of the device memory can be specified when entering the RUN state. Specification format quote run [mode [clear mode]] Mode: Specify whether to forcibly execute remote RUN •...
  • Page 133 Command name Description fastmode Function Enables the high-speed write mode. Since both of the following processing are not performed in high-speed write mode, the program (.PRG) and FB file (.PFB) can be transferred to the "$MELPRJ$" folder at high speed. •...
  • Page 134 Precautions Precautions for designing system Design the system (such as configuration of interlock circuits in the program) so that the entire system always functions properly during file transfer to the operating system and during status control of the programmable controller. FTP client •...
  • Page 135 Writing files • An existing file cannot be overwritten. Delete or rename an existing file with the file delete command (delete, mdelete) or the file rename command (rename) before writing files. • A read-only file or a file locked by the function except for FTP cannot be written. If attempted, a write error occurs. •...
  • Page 136 Setting a firewall on the FTP client side If the FTP communication is blocked by a firewall on the FTP client side, data cannot be exchanged from the FTP server. Check the firewall settings, enable FTP communication and then access the FTP server. Monitoring timer When operation of files such as program (.PRG) and FB file (.PFB) is performed in a CPU module with a large program capacity, a timeout may occur due to long processing time on the CPU module.
  • Page 137: File Transfer Function (Ftp Client)

    1.10 File Transfer Function (FTP Client) The CPU module becomes an FTP client and can execute file transfer with the FTP server connected to Ethernet using the file transfer function instruction. File transfer function instruction SP.FTPPUT SP.FTPGET · External device (FTP server) CPU module (FTP client) Retrieving a specified file Ethernet...
  • Page 138: Transferable Files

    Transferable files The following table lists the files that can be transferred using the file transfer function (FTP client). : Transferable, : Not transferable File type CPU built-in memory SD memory File name and card extension Program Device/label Data memory memory memory Drive 0...
  • Page 139: Procedure For Executing The File Transfer Function (Ftp Client)

    Procedure for executing the file transfer function (FTP client) To execute the file transfer function (FTP client), set an FTP client and an FTP server in parameters, and execute a file transfer function instruction. Follow the procedures described below. Setting an FTP server Set the login name, password, and home directory for the FTP client to the FTP server.
  • Page 140 Executing a file transfer function instruction Use the following instructions to execute the file transfer function (FTP client). ( MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks)) Instruction Description SP.FTPPUT This instruction sends files in the CPU module (FTP client) to the folder path of the specified FTP server. SP.FTPGET This instruction retrieves files on the FTP server to the folder path of the specified CPU module (FTP client).
  • Page 141 Precautions Connection with the FTP server If a response to an alive check request is not returned from the FTP server, the CPU module (FTP client) determines that the FTP server is not alive and disconnects the connection. The connection may also be disconnected if the FTP server does not support the TCP KeepAlive function (response to a KeepAlive ACK message).
  • Page 142 ■SP.FTPPUT instruction immediately after system switching When the SP.FTPPUT instruction is executed immediately after the system switching, execute the instruction with transfer files existing (such as generated files) in the new control system. 1 FUNCTIONS 1.10 File Transfer Function (FTP Client)
  • Page 143: Time Setting Function (Sntp Client)

    1.11 Time Setting Function (SNTP Client) Time information is collected from the time information server (SNTP server) connected on the LAN at the specified timing, and the CPU module's time is automatically set. Time query Setting server time in the CPU module Ethernet-equipped module Ethernet Personal computer...
  • Page 144 Precautions ■Time to be set The time to be set in the CPU module is the time which is obtained by adjusting the time information (UTC) retrieved from the SNTP server (time information server) based on the time zone set in "Clock Related Setting" under "Operation Related Setting"...
  • Page 145: Web Server Function

    1.12 Web Server Function The Web server function can read/write device data from/to the CPU module by using a Web browser. The device data can be read/written from/to the CPU module by using a general-purpose Web browser of an Ethernet-connected personal computer and also by using a general-purpose Web browser of a tablet or smartphone via Ethernet.
  • Page 146: Javascript Objects

    JavaScript objects JavaScript objects in the library of user Web pages enable device data to be read or written easily on the user Web page. The following table lists the objects in the JavaScript object library for the user Web page (RUserWebLib.js). Object name (function Description Reference...
  • Page 147 ■Parameter settings of JavaScript objects • When an optional parameter setting is omitted, the object will be displayed as default. Also, when the optional parameter setting is abnormal, the object will be displayed as default. • Set parameters using the specified data formats. A parameter error occurs if a parameter is set in the data format other than the specified one (for example, when a character string such as '1' is set in the parameter that should be a numeric value).
  • Page 148 ■Refreshing cycle Set the refreshing cycle of the user Web page to the variable updateInterval in HTML. This refreshing cycle applies to all the objects in the user Web page. When the variable updateInterval is not described in HTML or it is out of range between 5 and 120, 5-second interval (default) applies to the operation.
  • Page 149 Data block (WSDatblk) This object displays the specified device data in a table format. The current values of the devices are displayed as center aligned and updated in the fixed interval. • direction = 0 (Vertical) Window dev[0] devNamCol dev[5] devValCol yPos xPos...
  • Page 150 Parameter Item Description Requirement  dev[31].format The data format of the device 32 0: 16-bit signed 1: 16-bit unsigned 2: 32-bit signed 3: 32-bit unsigned 4: Single-precision real number 5: Double-precision real number 6: Bit direction Display direction 0: Vertical ...
  • Page 151 Level display (WSLevel) This object displays the current value of the specified device as a level for the range between the upper and lower limit values. The displayed color can be changed when the current value is above or below the specified value. The current values of the devices are updated in the fixed interval.
  • Page 152 Parameter Item Description Requirement  upperCol Display color when the current The RGB value or color name value is above the upper limit of (If omitted, it is alarm value. the same as the level display lowerCol Display color when the current color.) value is below the lower limit of alarm value.
  • Page 153 Figure display (WSFigure) When the device value is within the specified range, a figure is displayed in the specified color. The device value is monitored in the fixed interval. • figType = 'Oval' (oval) Window yPos range[n].high ≥ Current value ≥ range[n].low defCol figWidth xPos...
  • Page 154 Parameter Item Description Requirement  range[0].col Display color when device value is The RGB value or color name within setting range 1  range[1].low Lower limit of setting range 2 A numeric value (decimal) within the range of the specified data format.
  • Page 155 Image display (WSPicture) When the device value is within the specified range, the specified image file can be displayed. The device value is monitored in the fixed interval. Window defPicture yPos range[n].high ≥ Current value ≥ range[n].low pictWidth STOP xPos pictHeight range[n].picture Set range[n] for the range in which the image is to be displayed.
  • Page 156 Historical graph display (WSHstgrp) This object displays the device value in a time-series line graph. The device value is read in every refreshing cycle. After the number of records is reached, the display shifts to left and old records are deleted. Window yPos xPos...
  • Page 157 Parameter Item Description Requirement  xPos X-coordinate The horizontal coordinate of the historical graph display at the upper left end (unit: px) yPos Y-coordinate The vertical coordinate of the historical graph display at the upper left end (unit: px)  rightMargin Right margin Positive real numbers (unit: px)
  • Page 158 Write button (WSWtrBtn) This object writes the specified value to the specified device. Window wrBtn yPos btnWidth xPos btnHeight btnTxt : Required, : Optional Parameter Item Description Requirement  devName Device name Device type + device number  devBase Positional notation of device K: Decimal H: Hexadecimal B: Binary...
  • Page 159 Logoff button (WSLogoutBtn) This object places the button to log off. When the logoff button is clicked, the user login page (Log-in_User.html) is displayed. Window logOutBtn yPos btnWidth xPos btnHeight btnTxt : Required, : Optional Parameter Item Description Requirement  logOutBtn Logoff button Class element name of button object...
  • Page 160: Cgi Object

    CGI object By using the CGI object, a simple and small file size user Web page can be created. For an overview of CGI, refer to reference books on the market. For the user Web page, the following CGI objects dedicated to read/write data from/to devices can be used. File name Item Description...
  • Page 161 ■Device size Applicable device size differs depending on the device. For the notation of the device number, specify decimal or hexadecimal depending on the device. : Applicable in both device read CGI and device write CGI, : Not applicable Device Notation Device size B: Bit...
  • Page 162 Device read CGI Reads the current value of the specified device. ■Access method and access information Item Description Access method POST Access destination information (URL) /cgi/RdDevRnd.cgi ■Request specifications The following table lists the parameters used for the request. Parameter Data type Description Setting range name...
  • Page 163 ■Response specifications The following table lists the parameters used for the response. Parameter Data type Description name string Execution result (hexadecimal string) 0000: Normal 0001: Not logged on 0005: Incorrect request source (Referer) 4005: Number of points over 4030: Incorrect device type 4031: Out of device range 4041: Error due to the specified buffer memory number + specified number of transfer points out of buffer memory range 4043: Error of when the specified module does not exist...
  • Page 164 ■Application example An example for reading values by using the device read CGI is shown below. • Display of HTML (1) Set DEV1. (2) Set TYP1. (3) Set VAL1. (4) Click to call the ReadDeviceRandomTbl function of JavaScript (Set the table ID for the argument). •...
  • Page 165 • JavaScript example <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- charset setting*Set UTF-8 which is set in the Web server setting --> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <!-- Set the title name --> <title>Sample</title> <link href="./css/UserWebStyle.css" rel="stylesheet" media="all" /> <!-- Library JavaScript reading (change the path depending on the storage position) --> <script src="./RUserWebLib.js"></script>...
  • Page 166 // The function for analyzing a response function ReadDeviceRandomTbl_Response(xhr, devtblid) { // XMLHttpRequest Client status check // 0:UNSENT 1:OPENED 2:HEADERS_RECEIVED 3:LOADING 4:DONE if( 4 != xhr.readyState ) { // End the processing if the status 4 is other than DONE (operation complete). return;...
  • Page 167 <body> <form> <table id="devtbl" class="devtbl" border="1"> <tr> <th>Device Name</th> <th>Data Type</th> <th>Value</th> </tr> <tbody> <tr> <td><input type="text" id="DEV1" name="DEV1" class="input" value="D10"/></td> <td><input type="text" id="TYP1" name="TYP1" class="input" value="16-bit Integer"/></td> <td><input type="text" id="DATA1" name="DATA1" class="read-input" ></td> </tr> <tr> <td><input type="text" id="DEV2" name="DEV2" class="input" value="D11"/></td> <td><input type="text"...
  • Page 168 Device write CGI Writes the specified value to the specified device. ■Access method and access information Item Description Access method POST Access destination information (URL) /cgi/WrDev.cgi ■Request specifications The following table lists the parameters used for the request. Parameter Data type Description Setting range name...
  • Page 169 ■Response specifications The following table lists the parameters used for the response. Parameter Data type Description name string Execution result (hexadecimal string) 0000: Normal 0001: Not logged on 0002: No permission (A user without device write permission executed the CGI.) 0005: Incorrect request source (Referer) 4005: Number of points over 4030: Incorrect device type...
  • Page 170 ■Application example An example for writing a value by using the device write CGI is shown below. • Display of HTML (1) Set DEV1. (2) Set TYP1. (3) Set VAL1. (4) Click it to call the WriteDeviceBlockTbl function of JavaScript. (Set the table ID, the line number where the write starts, and the number of write points 1 for the arguments.) •...
  • Page 171 • JavaScript example <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <!-- charset setting*Set UTF-8 which is set in the Web server setting --> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"/> <!-- Set the title name --> <title>Device write CGI sample</title> <link href="./css/UserWebStyle.css" rel="stylesheet" media="all" /> <!-- Library JavaScript reading (change the path depending on the storage position) -->...
  • Page 172 // The function for analyzing a response function WriteDeviceBlockTbl_Response(xhr, typitem, dataitem) { // XMLHttpRequest Client status check // 0:UNSENT 1:OPENED 2:HEADERS_RECEIVED 3:LOADING 4:DONE if( 4 != xhr.readyState ) { // End the processing if the status 4 is other than DONE (operation complete). return;...
  • Page 173: Error Message

    Error message Display example of error messages If an object of the user Web page is used incorrectly, a button to notify the user of an error is displayed at the upper left of the object when the user Web page is displayed. The error message related to the common processing which is not limited to the object is displayed at the upper left of the window.
  • Page 174 ■List of error messages of the user Web page The following table lists error messages, causes, and action of the user Web page. Description Cause Action A required parameter "XXX" has not been set. A required parameter has not been set. Check the contents of the HTML file.
  • Page 175: Security Function

    1.13 Security Function Security suitable for the network environment can be structured by restricting access by each communication path that accesses the CPU module. The security function has the following access restriction methods. Function Description IP filter function Identifies the IP address of the other device side, and prevents access from an illegal IP address. Access is restricted by setting to allow or deny access from the IP address (external device) set in the parameters.
  • Page 176: Remote Password

    The IP filter function is one method of preventing illegal access (such as program or data destruction) from an external device. It does not completely prevent illegal access. Incorporate measures other than this function if the programmable controller system's safety must be maintained against illegal access from an external device.
  • Page 177 Number of settable modules Up to eight modules can be set for remote passwords. When using the multiple CPU system configuration, up to eight modules can be set for each CPU module. 1 FUNCTIONS 1.13 Security Function...
  • Page 178 Setting procedure Set the remote password as follows. [Navigation window]  [Parameter]  [Remote Password] Register the remote password on the "Register Password" window. [Password] button Select the module for which the remote password is to be applied, and set the start I/O number. Select the following items when using the RnENCPU.
  • Page 179 Access permit/prohibit processing operation This section describes the processing for permitting or prohibiting access of the CPU module with remote password by the external device. ■Access permit processing (Unlock processing) The external device trying to communicate unlocks the remote password set for the connected Ethernet-equipped module. If the password is not unlocked, the Ethernet-equipped module to which the external device is connected prohibits access, so an error occurs in the external device.
  • Page 180 ■Accessible station The station accessible from the external device when a remote password is set for the CPU module and the station that can unlock/lock the remote password are limited to those in the same network number. The following figure shows an example of when the remote password is set for multiple stations in the system. Station 1-2 Station A RJ71EN71...
  • Page 181 Precautions The following section lists the precautions for using remote password. ■Set connection Set the remote password for the connection used to exchange data with an external device that can execute the unlock/lock processing. ■When remote password is set for UDP/IP connection •...
  • Page 182 ■When the CPU module is used as a relay station for the connection between the MELSOFT product and GOT A remote password is enabled when the following items are set in "System Connection" in "Remote Password Detail Setting". "PLC side I/F Detailed Setting of PLC Module" of "Current "System Connection"...
  • Page 183: Simple Cpu Communication Function (Cpu Module (Built-In Ethernet Port Part))

    1.14 Simple CPU Communication Function (CPU Module (Built-in Ethernet Port Part)) This function allows data communications between specified devices at the specified timing just by making simple settings of the CPU module (built-in Ethernet port part) from an engineering tool. Send/receive is performed with a specified communication destination on a one-to-one basis.
  • Page 184: Setting Procedure

    Setting procedure The following section describes the settings for using this function. Set "Enable" for "To Use or Not to Use Simple PLC Communication Setting" in "Simple PLC Communication Setting" under "Application Settings". [Navigation window]  [Parameter]  Target module  [Module Parameter] [Application Settings]  [Simple PLC Communication Setting] Double-click "<Detailed Setting>"...
  • Page 185 Communication Destination (IP Address) Set the devices for both transmission source and transmission destination. Up to 64 devices can be registered. ■Module type list The following table shows the communication devices and specifications applicable to each module. Module type Communication destination Communication specification MELSEC iQ-R (built-in Ethernet) RnCPU, RnENCPU...
  • Page 186 Target PLC No. When the communication destination is set to "Mitsubishi iQ-R (Built-in Ethernet)" or "Mitsubishi Q (Built-in Ethernet)" and a multiple CPU system is configured, set the "Target PLC No." of the communication destination. Number of device points Set the number of device points to the total number of setting No.1 to 64 (8192 words maximum). The maximum number of points per setting is 512 words (bit device 8192 points maximum, word device 512 points maximum).
  • Page 187 Type Applicable device Symbol Range Word device 0 to 10117631 0H to 9A61FFH 0H to 9A61FFFH 0 to 4095 0 to 32767 0 to 10027007 0 to 1048575 *1 The maximum number of points when the NZ2MC-16MBS is connected to the R120CPU. The number of points differs depending on the model of the CPU module used, whether to use or not an extended SRAM cassette, or the type of the extended SRAM cassette.
  • Page 188 ■When the communication destination is the MELSEC-L (built-in Ethernet) Type Applicable device Symbol Range Bit device 0H to 1FFFH 0H to 1FFFH 0 to 61439 0 to 32767 0H to EFFFH 0H to 7FFFH 0 to 2047 Word device 0 to 421887 0H to 66FFFH 0H to 7FFFH 0 to 2047...
  • Page 189 Operation during the simple CPU communication ■Operation of the own station Since the own station operates without depending on the operating status of the CPU module, the simple CPU communication is performed even when the CPU module is in the STOP state because of stop error. When an initial communication error occurs, communications of the corresponding setting numbers are stopped and ones of the setting numbers, where no error occurs will operate.
  • Page 190 Latency Time By setting the latency time, the start timing in the communications can be switched in the following cases. • To prevent an error due to the overlap of the start timing in the communications • To start communications after the communication destination is ready for the communications During the latency time, "Preparing"...
  • Page 191: Checking The Simple Cpu Communication Status

    Checking the simple CPU communication status The simple CPU communication status can be checked with the buffer memory or diagnostic functions. Checking with the buffer memory The simple CPU communication status can be checked with the storage status of the corresponding setting number in the following CPU buffer memory areas.
  • Page 192 The operation at communication stop/restart request for the setting No.1 Stop Communication Communication Restart Communication Communication request stop stop request restart restart On by the program Off by the system Regular communication stop request (Un\G1094.0) On by the program Off by the system Regular communication restart request (Un\G1098.0)
  • Page 193 Precautions This section provides precautions for the simple CPU communication function. Incomplete data reception and timeout Because the load of Ethernet communication becomes heavy during the simple CPU communication, if the other communication (MELSOFT connection or SLMP) is simultaneously performed by using UDP, the data reception of UDP may not be completed, resulting in a timeout error.
  • Page 194 When the communication destination is a redundant system Use the control system IP address of redundant system settings for the Process CPU (redundant mode) side, and set the IP address of the communication destination of the simple CPU communication to the control system IP address. 1 FUNCTIONS 1.14 Simple CPU Communication Function (CPU Module (Built-in Ethernet Port Part))
  • Page 195: Simple Cpu Communication Function (Rj71En71, Rnencpu (Network Part))

    1.15 Simple CPU Communication Function (RJ71EN71, RnENCPU (Network Part)) This function allows data communications between specified devices at the specified timing just by making simple settings of the RJ71EN71 and RnENCPU (network part) from an engineering tool. Send/receive is performed with a specified communication destination on a one-to-one basis.
  • Page 196 Setting procedure The following section describes the settings for using this function. Set "Enable" for "To Use or Not to Use Simple PLC Communication Setting" in "Simple CPU Communication Setting" under "Application Settings". [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Application Settings] ...
  • Page 197 Registration of communication destination Set the devices for both transmission source and transmission destination. Up to 64 devices can be registered. ■Module type list The following table shows the communication devices and specifications applicable to each module. Module type Communication destination Communication specification MELSEC iQ-R (built-in Ethernet) RnCPU, RnENCPU...
  • Page 198 65534 are used by other communication functions, so it is recommended to use 1024 to 4999 or 5010 to 61439 for the own station port numbers. • If the communication destination is Mitsubishi Electric programmable controllers, the number between 61696 and 65534 is dynamically used for the own station port number. Consequently, do not specify the number between 61696 and 65534 for the own station port number in the SP.SOCOPEN instruction.
  • Page 199 Communication Destination Setting The settings differ depending on the communication destination. Specify the protocol and own station port number for each setting to be the same as those set in the simple CPU communication settings. Communication destination Necessary setting  MELSEC iQ-R (built-in Ethernet) MELSEC iQ-R (Ethernet module) MELSEC iQ-F (built-in Ethernet)
  • Page 200 Devices that can be specified The devices that can be specified as transmission source and transmission destination vary depending on the communication destination. Bit device and word device can be set together for each setting number. For devices that can be specified, the size of a device is specified in units of 16 points for a bit device and one point for a word device.
  • Page 201 ■When the communication destination is the MELSEC iQ-R (built-in Ethernet) or MELSEC iQ-R (Ethernet module) Type Applicable device Symbol Range Bit device 0H to 2FFFH 0H to 2FFFH 0 to 161882111 0 to 32767 0H to 9A61FFFH 0H to 9A61FFFH 0 to 4095 Word device 0 to 10117631...
  • Page 202 ■When the communication destination is the MELSEC iQ-F (built-in Ethernet) Type Applicable device Symbol Range Bit device 0 to 1777 0 to 1777 0 to 32767 0 to 32767 0H to 7FFFH 0H to 7FFFH 0 to 9999 Word device 0 to 7999 0H to 7FFFH 0H to 7FFFH...
  • Page 203 ■When the communication destination is the MELSEC-L (built-in Ethernet) or MELSEC-L (Ethernet module) Type Applicable device Symbol Range Bit device 0H to 1FFFH 0H to 1FFFH 0 to 61439 0 to 32767 0H to EFFFH 0H to 7FFFH 0 to 2047 Word device 0 to 421887 0H to 66FFFH...
  • Page 204 ■When the communication destination is KEYENCE (KV series) Type Applicable device Symbol Range *1*2 Bit device 0 to 199915 0H to 7FFFH 0 to 399915 0 to 99915 0 to 7915 0 to 3999 0 to 3999 Word device 0 to 5999 0 to 65534 0 to 65534 0 to 32767...
  • Page 205 ■When the communication destination is Panasonic (FP7 series) Type Applicable device Symbol Range Bit device 0 to 511 0 to 511 0 to 2047 0 to 1023 001000000 to 468000511 001000000 to 468000511 001000000 to 468002047 001000000 to 468001023 Word device 0 to 16383 0 to 999423 001000000 to 468016383...
  • Page 206 ■When the communication destination is Yokogawa FA-M3 series Type Applicable device Symbol Range Bit device 201 to 71664 201 to 71664 1 to 165535 1 to 4096 1 to 78192 1 to 9984 Word device 1 to 65535 1 to 4096 1 to 256 1 to 262144 1 to 78192...
  • Page 207 ■When the communication destination is an SLMP-compatible device (QnA-compatible 3E frame) Applicable devices differ depending on the device. For applicable devices, refer to the manual for the device used. The device types that can be set are X, Y, M, L, B, SB, SM, D, W, SW, SD, R, and ZR. The accessible device range of the communication destination is the range which can be specified with the subcommand (0000) of the SLMP (QnA-compatible 3E frame of the MC protocol).
  • Page 208 Communication Time-out Period/Communication Retry Count/Monitoring Time At Error When the communication destination does not respond or returns an error response, the communication will be retried (resent) after the time-out period has passed. At this time, after communications are performed for the communication retry count + 1 times, the fixed interval communication is performed during the monitoring time at error.
  • Page 209 Checking the simple CPU communication status The simple CPU communication status can be checked with the buffer memory or diagnostic functions. Checking with the buffer memory The simple CPU communication status can be checked with the storage status of the corresponding setting number in the following buffer memory areas.
  • Page 210 When 'Simple CPU communication status for each setting number' (Un\G721936 to Un\G721999) is "4H: Communication stop", communications can be restarted by turning off and on 'Request to restart fixed interval communication for each setting number' (Un\G721904 to Un\G721907). (If the status is other than "4H: Communication stop", the restart request is invalid.) The operation at communication stop/restart request for the setting No.1 Stop request Communication stop...
  • Page 211 Precautions This section provides precautions for the simple CPU communication function. Incomplete data reception and timeout Because the load of Ethernet communication becomes heavy during the simple CPU communication, if the other communication (MELSOFT connection or SLMP) is simultaneously performed by using UDP, the data reception of UDP may not be completed, resulting in a timeout error.
  • Page 212 Security function The simple CPU communication cannot be performed when a remote password is set for the module which performs the simple CPU communication. Clear the remote password setting of the communication destination. If the IP filter function has been set in the destination, check the setting and correct it if necessary. If any security function specific to the communication destination (programmable controller products manufactured by other companies), disable the function.
  • Page 213: Ip Address Change Function

    1.16 IP Address Change Function This function can change the IP address of the Ethernet-equipped module or other item without changing the parameter settings. Case of the CPU module (built-in Ethernet port part) Ó Store the IP address of the special register (SD) to the IP address storage area (system memory) by turning the special relay (SM) on.
  • Page 214: Ip Address Of The Ethernet-Equipped Module

    IP address of the Ethernet-equipped module The value set with the module parameters during initial processing is set as the IP address of the Ethernet-equipped module. When this function is used, the IP address set during initial processing is the value stored in the IP address storage area instead of the value set in the parameters.
  • Page 215 ■Case of the RJ71EN71 or RnENCPU (network part) The IP address value is written into the IP address storage area (flash ROM). The write and clear operations are performed with the buffer memory. IP address storage area Buffer memory (flash ROM) Un\G11700 IP address IP address...
  • Page 216: Usage Methods

    Usage methods Write operation ■Case of the CPU module (built-in Ethernet port part) Follow the steps below. Store the value to be changed in 'IP address setting' (SD1518 to SD1525). Turn off and on 'IP address storage area write request' (SM1520). Check the write results with the following special relays and special registers.
  • Page 217 ■Operation of the special relays and special registers, or of the buffer memory The following section shows the operation of the special relays and special registers or of the buffer memory when writing to the IP address storage area. • Operation at normal completion The system is powered off when writing was Write start...
  • Page 218 Clearing operation ■Case of the CPU module (built-in Ethernet port part) Execute clearing by turning off and on 'IP address storage area clear request' (SM1522). Turn on 'IP address storage area clear request' (SM1522). Check the write results with the following special relays and special registers. Device At normal completion At abnormal completion...
  • Page 219: Checking The Ip Address

    ■Cause of error at abnormal completion If the IP address storage area is not cleared correctly, the cause of the error is stored as follows: Module Storage location Stored value Cause of error CPU module (built-in 'IP address storage area 200H Error occurred during clearing.
  • Page 220 Write processing and clear processing execution timing • Executing the write or clear processing to the IP address storage area may not be possible if an operation that turns off and on, or on and off an IP address storage area write request or IP address storage area clear request in a short time is performed.
  • Page 221: Redundant System Function

    1.17 Redundant System Function The redundant system function improves system reliability by mounting the RJ71EN71s on the base units of both systems of a redundant system so that the new control system can continue communication even if an error occurs on the line for the control system.
  • Page 222: System Switching Operation

    System switching operation In a redundant system, if the control system fails, the control system and the standby system are switched. For Ethernet, after system switching, the connection destination is changed to the Ethernet-equipped module of the new control system to continue the communication with the external device.
  • Page 223: System Switching Request To The Control System Cpu Module

    System switching request to the control system CPU module This function issues a system switching request to the control system CPU module if the RJ71EN71 mounted on the control system in a redundant system detects a communication error or cable disconnection. However, depending on the operating status of the standby system, system switching is not executed.
  • Page 224 ■ULP timeout When the TCP/IP connection is open and when data is being sent, if no ACK response is returned from the external device for a period exceeding the TCP/ULP timer value set in the "Timer Settings for Data Communication" under "Application Settings", a send error occurs and a system switching request is issued to the control system CPU module.
  • Page 225: Redundant Group Setting

    Redundant group setting The redundant group setting is used to ensure that when the Ethernet network is duplicated in a redundant system, system switching is not executed for an error that occurs in one network. There are two types of redundant group setting: redundant module group setting and port group setting. The redundant group setting is not available for the CPU module (built-in Ethernet port part).
  • Page 226 Port group setting This setting ensures that, by using two RJ71EN71 Ethernet ports, even if a communication error occurs in one of the ports, as long as communication is possible on the other port, systems are not switched and communication by the control system continues.
  • Page 227: Communication Path Bypass Function

    Communication path bypass function When a communication error occurs between the application and Ethernet-equipped module supporting the following redundant system, the path on which the error occurs is bypassed so that communication can continue without changing the communication path setting. •...
  • Page 228: Both Systems Identical Ip Address Setting Function

    Both systems identical IP address setting function When an IP address common to systems A and B (control system IP address) is used, even if system switching occurs, programs can perform communication without changing the connection destination. Note that even when this setting is used, communication using the individual IP address of systems A and B each is possible. 192.168.1.100 192.168.1.100 This control system IP address cannot be used when the network type for the RJ71EN71 is set to "Q...
  • Page 229 Availability of control system IP address for each function The following table lists the availability of control system IP address for each function. : Available, : Restrictions exist, : Not available Function Availability Precautions  Connection with MELSOFT products and a GOT •...
  • Page 230 Precautions • When using the control system IP address, set connections separately for system A and B IP addresses. When the control system IP address and IP addresses of systems A and B are used together for the same connection, loss of data, data arrival order interchange, and others may be occur.
  • Page 231: Functions Restricted In A Redundant System

    Functions restricted in a redundant system Functions with restrictions when communicating with a redundant system over Ethernet are as follows. Re-initial processing When performing the re-initial processing, specify "0H" for the modification specification (S+2) in the control data of the UINI instruction to execute the instruction.
  • Page 232 ■When the control system IP address is not used When the control system IP address is not used, access the control system CPU module by using the following procedure. Execute the open processing in the order system A  B. Read 'Control system judgment flag' (SM1634) and 'Standby system judgment flag' (SM1635) to judge the control system.
  • Page 233 Communications using the fixed buffer ■Receive processing by the standby system If data is sent to the standby system Ethernet-equipped module, data reception processing will not be performed because the module reads and discards the received data. ■Receive processing with interrupt program If system switching occurs before execution with the interrupt program, and the control system is switched to the standby system, the interrupt factor will not be transferred to the other system.
  • Page 234 Communication using the random access buffer Because tracking is not performed on the buffer memory of the Ethernet-equipped module, when writing data to the random access buffer, write the same data to the control and standby systems. Communications using a dedicated instruction ■System switching during dedicated instruction execution When systems are switched during execution of a dedicated instruction, the dedicated instruction may not be completed.
  • Page 235 File transfer function (FTP server) Perform file writing with the file transfer function (FTP server) as follows. Log into the Ethernet-equipped modules of both systems. Perform remote STOP on the CPU modules of both systems. Write the file to the CPU modules of both systems. Perform remote RUN on the CPU modules of both systems.
  • Page 236: Setting Example

    Setting example This section describes the setting details for socket communications in a redundant system. System configuration example Receiving side (redundant system) settings Connect the engineering tool to the CPU module to be set as the control system and set the parameters. In a redundant system, the same program and parameter are written to both systems.
  • Page 237 In the I/O assignment setting, set the redundant function module for slot No.0. [Navigation window]  [Parameter]  [System Parameter]  [I/O Assignment] tab  [I/O Assignment Setting] Set the RJ71EN71 for slot No.1 Click the [OK] button to add the module labels of the RJ71EN71. 1 FUNCTIONS 1.17 Redundant System Function...
  • Page 238 Set the items in "Basic Settings" as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings] Set the network configuration as follows. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings] ...
  • Page 239 Set the redundant settings in the following items. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Application Settings]  [Redundant System Settings] Set whether to issue a system switching request for the user connection. [Navigation window] ...
  • Page 240 Write the set parameters to the system A CPU module. [Online]  [Write to PLC] Click the [Yes] button to write to the CPU modules of both systems. Either reset the CPU modules of both systems or power off and on both systems. In this setting example, default settings are used for the parameters other than those described.
  • Page 241 In the I/O assignment setting, set the RJ71EN71 for slot No.0. [Navigation window]  [Parameter]  [System Parameter]  [I/O Assignment] tab  [I/O Assignment Setting] Click the [OK] button to add the module labels of the RJ71EN71. Set the items in "Basic Settings" as follows. [Navigation window] ...
  • Page 242 Set the network configuration as follows. The redundant system control system IP address is specified for the send destination IP address. [Navigation window]  [Parameter]  [Module Information]  [RJ71EN71]  [Port 1 Module Parameter (Ethernet)]  [Basic Settings]  [External Device Configuration] Write the set parameters to the CPU module.
  • Page 243: Chapter 2 Parameter Settings

    PARAMETER SETTINGS This chapter describes the parameter settings required for communications between the Ethernet-equipped module and external devices. Setting Parameters Add the RJ71EN71 in the engineering tool. [Navigation window]  [Parameter]  [Module Information]  Right-click  [Add New Module] The basic setting and application setting are included in the parameter settings.
  • Page 244: Own Node Settings

    Own Node Settings Set the IP address and communication data code of the Ethernet-equipped module. Item Description Setting range Parameter Setting Method Set the own station settings by parameters. Parameter Editor (fixed) IP Address IP Address Set the IP address of the own station. •...
  • Page 245 IP Address ■IP Address When the parameters are written without setting the IP address, the following address is set. Module IP address RJ71EN71 P1 connector 192.168.3.40 P2 connector 192.168.4.40 RnENCPU (network part) P1 connector 192.168.3.40 CPU module (built-in Ethernet port part) 192.168.3.39 Communications by Network No./Station No.
  • Page 246: External Device Configuration

    External Device Configuration Set the method and protocol used for communicating with external devices. Setting procedure The procedure for setting the external device to be connected is shown below. Select the external device to be connected in "Module List" and drag it to "List of devices" or "Device map area". Set the required items.
  • Page 247 Setting items Item Description Setting range [Detect Now] button Execute the automatic detection of connected devices.  The [Detect Now] button] is displayed only when the CPU module (built-in Ethernet port part) is used. For details, refer to the following. ...
  • Page 248 Item Description Setting range Existence Confirmation Select the method of alive check which is performed when the • KeepAlive Ethernet-equipped module has not communicated with the external • UDP device for a certain period of time. When the module cannot •...
  • Page 249: Application Settings

    Application Settings Set frame or communication speed of the Ethernet-equipped module. RJ71EN71, RnENCPU (network part) Setting item Description Reference Frame Settings Set parameters for the Ethernet frame. Page 250 Frame Settings Communication Speed Set the communication speed between the module and the external device. Page 250 Communication Speed FTP Server Settings Set the file transfer function (FTP server).
  • Page 250 Setting item Description Reference Module Operation Mode Set the module operation mode. Page 275 Module Operation Mode *1 This setting is not available when the RJ71EN71 network type is set to "Q Compatible Ethernet". CPU module (built-in Ethernet port part) Setting item Description Reference...
  • Page 251 Setting item Description Reference Redundant System Settings Set the redundant system function. Page 276 Redundant System Only functions that meet usage conditions with a redundant system can be set. ( Settings Page 219 Redundant System Function) Built-in database access setting Set the function of CPU module built-in database access from an external device.
  • Page 252: Frame Settings

    Frame Settings Set parameters for the Ethernet frame. Item Description Setting range Send Frame Set the frame of the Ethernet header for the data link layer to be sent Ethernet (V2.0) Frame (fixed) by the RJ71EN71 or the RnENCPU (network part) to the Ethernet (V2.0) frame.
  • Page 253 • When the auto-negotiation function is used, there is a time lag before starting communication because it requires the time to determine the communication speed and communication mode by FLP burst. • It is recommended to set the auto-negotiation also in the communication partner when using the auto- negotiation function.
  • Page 254: Ftp Server Settings

    FTP Server Settings Set the file transfer function (FTP server). Item Description Setting range FTP Server Select whether to use the file transfer function (FTP server) of the • Not Use Ethernet-equipped module. • Use (Default: Not Use) Login Name Set the login name to be used for file transfer request (login) from the 12 characters maximum (one-byte external device.
  • Page 255: Ftp Client Settings

    ■Response Monitoring Timer Set the monitoring time for a response from the CPU module after the Ethernet-equipped module receives the request data from the external device and requests the CPU module for read/write. It is recommended to use the default value (5s) for this timer value as much as possible. When changing the setting value, determine the response monitoring timer value upon consulting with the system administrator.
  • Page 256: Modbus/Tcp Settings

    MODBUS/TCP Settings Set MODBUS/TCP. Item Description Setting range To Use or Not to Use MODBUS/TCP "Use" is displayed when a MODBUS/TCP connection device is added • Not Use Setting in "External Device Configuration" under "Basic Settings". ("To Use or • Use Not to Use MODBUS/TCP Setting"...
  • Page 257 Device Assignment Set the MODBUS device assignment parameters to use the MODBUS device assignment function. Create the association between the following MODBUS devices and the device memory areas of the CPU module. • Coil • Input • Input register • Holding register Item Description Device...
  • Page 258: Simple Cpu Communication Setting (Rj71En71, Rnencpu (Network Part))

    Simple CPU Communication Setting (RJ71EN71, RnENCPU (Network Part)) Set the following items when using the simple CPU communication function with the RJ71EN71 and RnENCPU (network part). Item Description Setting range To Use or Not to Use Simple PLC Select whether to use the simple CPU communication or not. •...
  • Page 259 Item Description Setting range Bit device Points Set the type, start number, and end number of the "Source" bit The setting range differs depending on device and the type and start number of the "Destination" bit the communication destination. Type device.
  • Page 260 Item Description Setting range Port No. Set the port number of the communication destination. 1 to 65534 (Default: Blank) Host Station Port No. Set the port number of the own station. 1 to 65534 (Default: Blank) 2 PARAMETER SETTINGS 2.3 Application Settings...
  • Page 261: Time Setting

    Time Setting Set the time setting function (SNTP client). Item Description Setting range Time Setting (SNTP Client) Select whether to use the time setting function (SNTP client). • Not Use • Use (Default: Not Use) SNTP Server IP Address Set the IP address of the SNTP server. 0.0.0.1 to 223.255.255.254 (Default: 0.0.0.1) Timer Setting After Power-on and Reset...
  • Page 262: Timer Settings For Data Communication

    Timer Settings for Data Communication Set the timer used for the following communications. • Connection with MELSOFT products and a GOT • Communications using the SLMP • Communications using the predefined protocol • Socket communications/Communications using the fixed buffer • Communication using the random access buffer •...
  • Page 263 Precautions for settings ■Setting value for each timer of the Ethernet-equipped module side. Set the timer values so that the following formula is met. Response TCP ULP TCP end ≥ ≥ ≥ > monitoring timer resend assembly timer value timer value value timer value timer value...
  • Page 264 ■Number of retries When a communication failure occurs due to a problem such as noise, change the value so that the number of retries may increase. The number of retries is obtained using the following formula. (When using the default values, 3 = 30  10) Number of retries = TCP ULP timer value ...
  • Page 265: Security

    Security Set the security measures for access to the Ethernet-equipped module. Item Description Setting range IP Filter IP Filter Set whether to enable the IP filter function. • Not Use Settings • Use (Default: Not Use)  IP Filter Settings Set the IP address to be allowed or denied.
  • Page 266 Gateway Information ■Gateway IP Address When communicating with an external device on another Ethernet network through a gateway other than the default gateway, set the IP address of the gateway. (Setting range: 0.0.0.1 to 223.255.255.254) Set a value that satisfies the following conditions. •...
  • Page 267: Network/Station No. <-> Ip Information Setting

    When the classes differ between the Ethernet-equipped module on the own station and the external device Network address Own station IP address (Class B) External device 2 IP address (Class A) Set the network address of the external device 2. Network address Subnet address setting value When the network address of the Ethernet-equipped module on the own station is the same as that of the external device...
  • Page 268 • When transferring messages which are sent to other stations specifying network number and station number, to another network, "Gateway Parameter Settings" in "Application Settings" is required. ( Page 263 Gateway Parameter Settings) • "Network/Station No. <-> IP information setting" is required when other stations are accessed via other Ethernet network systems and must be registered in all the Ethernet-equipped module which has the network number and station number.
  • Page 269 ■Automatic Response System This system differs from the other conversion method in that specification can only be made when the own station is the communication request destination station or communication relay receiving station. Relay communications via other networks can be performed easily because the IP address and port number of the destination station are not required to be set.
  • Page 270 ■IP Address Calculation System This system obtains the IP address of the destination station by calculating the network number and station number with the formula described below. The UDP port number predefined for the Ethernet-equipped module is used as the UDP port number of the destination.
  • Page 271 (For class C) • When the own station IP address is CA65300AH • When the net mask pattern for routing other networks is FFFFFF00H • When the destination station number is 02H (The network number is not used.) Own station IP Address Logical product Net Mask Pattern Logical product value...
  • Page 272 Conversion table registration example The following shows the example of conversion table registration based on the network map. (1) Communication request source station Network No.: 1 RJ71 Station No.: 11 module EN71 IP Address: (192. 0. 1. 11) Ethernet (Network No.1) (2) Communication relay receiving station (3) Communication relay sending station Network No.: 1...
  • Page 273 Item Setting details of each Ethernet-equipped module when accessing from (4) to (3) (4) Communication request destination station (a) Setting Network Number, Station Setting not required Setting not required Setting not required 2, 21 value (decimal) IP Address 192.0.2.21 2 PARAMETER SETTINGS 2.3 Application Settings...
  • Page 274 ■Combination System This system combines the IP address calculation system and the table conversion system. Select this system when accessing other stations with the same network number, accessing other stations in other networks or Ethernet with different network number, or relaying from other networks to the Ethernet network system. The set target Ethernet-equipped module can be installed either at a communication request source station, communication relay station, or communication request destination station.
  • Page 275: Interrupt Settings

    Interrupt Settings Set the parameters required for starting up an interrupt program. Item Description Setting range Interrupt Occurrence Factor Set the interrupt cause. • SEND Instruction Data Reception • Reception Connection (Default: Blank) Channel No./Connection No. Set the start condition of an interrupt program. When "Interrupt •...
  • Page 276: Network Dynamic Routing

    Network Dynamic Routing Set when using the dynamic routing. Setting "Network Dynamic Routing" is possible only when values are set in "Network Number" and "Station No." under "Own Node Settings" of "Basic Settings". ( Page 243 Communications by Network No./Station No.) For details, refer to the following.
  • Page 277: Module Operation Mode

    Module Operation Mode Set the module operation mode. Set the same operation mode for both of the P1 connector and P2 connector. For a redundant system, select the module operation mode of system A. For details on module communication test mode, refer to the following. Page 284 Module communication test Item Description...
  • Page 278: Redundant System Settings

    Redundant System Settings Set when using an Ethernet-equipped module in a redundant system. Item Description Setting range Own Node (System A) IP Address The IP address set in "Own Node Settings" under "Basic Settings" is  displayed. Not displayed when it has not been set. System B IP Address Set the IP address of system B.
  • Page 279 Item Description Setting range System Auto-open UDP Set whether to issue a system switching request when a • No System Switching Request at Connection Port communication error occurs using the auto open UDP port. This port is Communication Error used when using SLMP communications. •...
  • Page 280: Simple Cpu Communication Setting (Cpu Module (Built-In Ethernet Port Part))

    Simple CPU Communication Setting (CPU Module (Built-in Ethernet Port Part)) Set the following items when using the simple CPU communication function with the CPU module (built-in Ethernet port part). Item Description Setting range Latency time Sets the time required to start communications after completion 0 to 255s (in increments of 1s) of the CPU module startup.
  • Page 281 Item Description Setting range Comment Sets a comment for the setting number, if required. 32 one-byte characters (16 double- byte characters) maximum (Default: Blank) *1 When the communication destination is an "SLMP-compatible device (QnA-compatible 3E frame)", the value is fixed at 65535ms. *2 When the communication destination is an "SLMP-compatible device (QnA-compatible 3E frame)", the value is fixed at 0.
  • Page 282: Chapter 3 Troubleshooting

    TROUBLESHOOTING This chapter describes troubleshooting of when the Ethernet function is used. Checking with LED This section describes troubleshooting using LED. Error status can be determined by status of the RUN LED and the ERR LED. RUN LED ERR LED Error status Description On, flashing...
  • Page 283 When the SD/RD LED does not turn on at data sending When the SD/RD LED does not turn on at data sending, check the following items. Check item Action Is the ERROR LED or ERR LED on or flashing? Identify the error cause using the engineering tool. ( Page 282 Checking the Module Status, ...
  • Page 284: Checking The Module Status

    Checking the Module Status The following table lists the functions which can be used in the "Module Diagnostics" window of the Ethernet-equipped module. FUNCTIONS Applications Error Information Displays the details of the errors currently occurring. Click the [Event History] button to check the history of errors that have occurred on the network, errors detected for each module, and operations that have been executed.
  • Page 285 Module Information List Switch to the [Module Information List] tab to check various status information of the Ethernet-equipped module. (The displayed items vary depending on the module.) Item Description LED information Displays the LED status of the Ethernet-equipped module. Individual information (P1: Network Number Displays the network number set for the selected module.
  • Page 286 Module communication test The module communication test checks the hardware of the RJ71EN71 or the RnENCPU (network part). When the communication using the RJ71EN71 or the RnENCPU (network part) is unstable, whether a hardware failure occurs or not can be checked. The following table lists the tests performed.
  • Page 287 ■Checking the status and result of module communication test. The test status and result can be checked with the dot matrix LED of the module. Test status LED display Test in progress The dot matrix LED displays "UCT". Normal completion The dot matrix LED displays "OK".
  • Page 288: Checking The Network Status

    Checking the Network Status Ethernet diagnostics The communication status of the Ethernet-equipped module and external device can be checked with Ethernet diagnostics. [Diagnostics]  [Ethernet Diagnostics] Set the Ethernet-equipped module to be diagnosed in "Target Module Specification". • In a redundant system configuration of the remote head module, the Ethernet diagnostics cannot be started when the engineering tool is connected to the remote head module of the standby system.
  • Page 289 Precautions If the communication path includes the following items, the Ethernet diagnostics cannot be started. • MELSECNET/H • Multidrop connection with a serial communication module • Interface board for a personal computer • GOT (when the transparent function is used) •...
  • Page 290 Status of Each Connection The status of each connection of the Ethernet-equipped module selected. The following table lists the displayed items in "Status of Each Connection" tab. Item Description Connection No./Function Displays the connection number and functions (FTP server, FTP client , MELSOFT direct connection).
  • Page 291 Status of Each Protocol The total number of packets sent/received by each protocol of the selected Ethernet-equipped module can be checked. The following table lists the displayed items in "Status of Each Protocol" tab. Item Description Display range Total Number of Receives Displays the total number of received packets.
  • Page 292 Connection Status The communication status of the Ethernet-equipped module. The following table lists the displayed items in "Connection Status" tab. Item Description Display range  Communication Full Duplex/Half Duplex Displays whether the line is full-duplex or half-duplex. Status  Connection Status Displays the cable connection status.
  • Page 293 PING Test The PING test checks existence of an Ethernet device on the same Ethernet network. This test is performed on the network of stations connected to the engineering tool by sending packets for check. If a response returns, the communication can be performed. "Ethernet Diagnostics"...
  • Page 294 Communication Status Test The communication status test checks whether the communication between the own station and the external device on the same Ethernet is operated normally. The following external devices are the target of communication status test. • RJ71EN71 (when the Ethernet function is used) •...
  • Page 295 ■Action for abnormal end If the communication status test fails, "No Response" or an error code is displayed in the "IP Address / Error Code" field in "Result". Displayed test Status of the Cause Action result external device No Response No error The initial process for the Ethernet-equipped module Correct the module parameters.
  • Page 296: Simple Cpu Communication Diagnostics

    Simple CPU communication diagnostics The communication status of the simple CPU communication function can be checked with "Simple CPU Communication Diagnostics". [Diagnostics]  [Simple CPU Communication Diagnostics] Item Description Set No. Displays the setting number of the simple CPU communication. Comm Patn Displays the communication pattern (read/write) set with the parameters.
  • Page 297: Troubleshooting By Symptom

    Troubleshooting by Symptom This section describes troubleshooting method by symptom. If an error has occurred in the Ethernet-equipped module, identify the error cause using the engineering tool. ( Page 282 Checking the Module Status) Communications cannot be performed with the external device. The following table lists how to troubleshoot the problem when the Ethernet-equipped module cannot communicate with the external device.
  • Page 298 When the problem cannot be solved with above actions, check the error cause according to the communication processing and take action. • Communications using the SLMP ( Page 298 Communications using the SLMP cannot be performed.) • Communications using the predefined protocol ( Page 299 Communications using the predefined protocol cannot be performed.) •...
  • Page 299 A message sent from the external device cannot be received frequently. When the Ethernet-equipped module frequently fails to receive a message sent from the external device, check the following items. Check item Action Are there many detected errors in 'Simultaneous transmission error detection If many errors are detected or a system error is stored, there may be a heavy count (receive buffer full count)' (Un\G5022 to Un\G5023)? load on the Ethernet line due to data sending and receiving between...
  • Page 300 CPU module search on the network cannot be performed. When the CPU module search on the network cannot be performed, check the following items. Check item Action Is "Do Not Respond to CPU Module Search" under "Security" of "Application Set "Do Not Respond to CPU Module Search" under "Security" of "Application Settings"...
  • Page 301 Communications using the predefined protocol cannot be performed. When communications using the predefined protocol cannot be performed, check the following items and take action. Check item Action Is the IP address setting of the external device correct? Check and correct the IP address of the external device. Has the connection with the external device been opened? (Check 'Open •...
  • Page 302 Socket communications/communications using the fixed buffer cannot be performed. When socket communications or communications using the fixed buffer cannot be performed, check the following items and take action. Check item Action Has the connection with the external device been opened? (Check 'Open •...
  • Page 303 Communications using the random access buffer cannot be performed. When communications using the random access buffer cannot be performed, check the following items and take action. Check item Action Has the connection with the external device been opened? (Check 'Open •...
  • Page 304 Communications using MODBUS/TCP cannot be performed. ■Communication fails at MODBUS/TCP connection. When communication is not possible at MODBUS/TCP connection, check the following items and take action. Check item Action Does the external device support MODBUS/TCP? If the device does not support MODBUS/TCP, replace it with the one supporting the MODBUS/TCP standard.
  • Page 305 A dedicated instruction is not completed. If the dedicated instruction is not completed when using the RJ71EN71 or the RnENCPU (network part), check if an option other than "Online" is set in "Module Operation Mode" under "Application Settings". Set "Online". Communications using a link dedicated instruction cannot be performed.
  • Page 306 Access using the file transfer function (FTP client) cannot be performed. When the CPU module cannot access to the external device (FTP server) during execution of the file transfer function (FTP client), check the following items and take action. Check item Action Is a value other than 0000H stored in (s1)+1 (Completion status) of the Take action for the error code stored in (s1)+1 (Completion status), and...
  • Page 307 Communications using the built-in Ethernet port are slow. When communications using the built-in Ethernet port are slow, check the following items and take action. Check item Action Is the communication request load from the external device high? Check the buffer memory Un\G100 (receive packet count (current) per unit time (one second)) of the CPU module (built-in Ethernet port part), and if the value is significantly large compared to the normal communications, the following actions may improve the processing speed.
  • Page 308 When the communication destination of the simple CPU communication is a the range of 61696 to 65534? Mitsubishi Electric programmable controller, the own station port number is dynamically set within the range of 61696 to 65534. When the own station port number is set within the range of 61696 to 65534 in the external device configuration, the port numbers overlap, resulting in a communication failure.
  • Page 309 ■The update by reading and writing the device data is slow. When the update by reading and writing the device data is slow in the simple CPU communications, check the following items and take action. Check item Action The scan time of the CPU module where the simple CPU communication Incorporate the COM(P) instruction and CCOM instruction into the sequence function is set is long.
  • Page 310 When the redundant system function is used ■Communications cannot be performed with the external device. When communications with the external device cannot be performed using the redundant system function, check the following items and take action. Check item Action Are the control system IP address and the IP addresses of systems A and B Set the different connections for the each of control system IP address and IP used together for the same connection? addresses of systems A and B.
  • Page 311 ■Communication fails at OPS connection. When communication using the redundant system function is not possible at the time of an OPS connection, check the following items and take action. Check item Action In "External Device Configuration" under "Basic Settings", is "OPS Connection Correct the settings for "External Device Configuration"...
  • Page 312: List Of Error Codes

    List of Error Codes This section lists the error codes, error details and causes, and action for the errors occur in the processing for data communication between the Ethernet-equipped module and slave stations or caused by processing requests from the CPU module on the own station.
  • Page 313 Error Error details and causes Action Detailed information code 1155H • The specified connection was already closed in TCP/IP • Perform the open processing for the specified  communications. connection. • Open processing is not performed. • Check if the open processing has been performed in the external device.
  • Page 314 Error Error details and causes Action Detailed information code 1801H IP address of the external device could not be acquired. • Correct the IP address in "Network/Station No. <-> IP Parameter information information setting" under "Application Settings". • Parameter type •...
  • Page 315 Error Error details and causes Action Detailed information code 3C00H A hardware failure has been detected. • Take measures to reduce noise.  • Reset the CPU module, and run it again. If the same 3C03H error code is displayed again, the possible cause is a hardware failure of the error module.
  • Page 316 Error Error details and causes Action Detailed information code C024H • Communications using the fixed buffer or • Check that there is no error in the connection number  communications using a random access buffer were specification of the dedicated instruction. executed when communication method is set to the •...
  • Page 317 Error Error details and causes Action Detailed information code C052H The number of read/write points from/to the device of Correct the number of read/write points and send the  SLMP message is out of the allowable range in the CPU SLMP message to the Ethernet-equipped module again.
  • Page 318 Error Error details and causes Action Detailed information code C061H • The request data length of the SLMP message does • Check and correct the text or request data length, and  not match with the number of data in the character (a send the SLMP message to the Ethernet-equipped part of text).
  • Page 319 Error Error details and causes Action Detailed information code C0B2H There is no sufficient space in the receive buffer or the • Increase the request interval (execution interval) and  send buffer of the relay station or external station for the execute the operation.
  • Page 320 Error Error details and causes Action Detailed information code C1A2H • A response to the request could not be received. • Check and correct the response waiting time.  • In transient transmission, the number of relay to other • Change the system configuration so that the number of networks exceeded seven.
  • Page 321 Error Error details and causes Action Detailed information code C1BDH The target station number of the link dedicated instruction • Execute the link dedicated instruction again after  is incorrect. correcting the target station number. • When specifying another network station, check if the settings in "Routing Setting"...
  • Page 322 Error Error details and causes Action Detailed information code C1CBH The transient data is incorrect. • Correct the transient data at the request source, and  retry the operation. • If the error occurs again even after taking the above, please consult your local Mitsubishi representative.
  • Page 323 Error Error details and causes Action Detailed information code C403H Multiple dedicated instructions was executed • Do not execute the dedicated instructions which do not  simultaneously. support simultaneous execution. • Correct the specified connection number and execute the dedicated instruction again. ...
  • Page 324 Error Error details and causes Action Detailed information code C431H Close processing of the connection was performed • Check the operation of the external device.  during the ECPRTCL instruction execution. • Check the connection open status with the external device.
  • Page 325 Error Error details and causes Action Detailed information code C622H An error has occurred during file transfer to the FTP • Delete unnecessary files on the FTP server to increase  server. free space. • Check connection with the FTP server. •...
  • Page 326 Error Error details and causes Action Detailed information code C842H The routing setting is not set to reach to the destination • Execute the link dedicated instruction again after  network number. correcting the target network number and station number. •...
  • Page 327 Error Error details and causes Action Detailed information code C86AH In MODBUS/TCP communications, the content of the Check the data part of the request message on the  data part of the received request message is incorrect. master side that issued the message. The size of the received request message is smaller than the minimum size required for the function code, or larger than the maximum size required for the function code.
  • Page 328 Error Error details and causes Action Detailed information code CFB0H Sending data failed due to a resend timeout. • Check the operation of the external device.  • Check the line status with the external device such as a cable, hub, and router. •...
  • Page 329: List Of Parameter Numbers

    List of Parameter Numbers This section lists the parameter numbers displayed in the module diagnostics. System Parameter Item Parameter No. Redundant Module Group Setting 0400H Basic Settings Item Parameter No. Own Node Settings Parameter Setting Method 7100H IP Address IP Address A012H Subnet mask A012H...
  • Page 330 Item Parameter No. Module Operation Mode 7100H Redundant System Settings System B IP Address A03CH System B Station Number 7110H Use of Control System IP Address A03CH Control System IP Address A03CH System B Module Operation Mode 7110H Port Group Setting A03CH System Switching Request Issuing at Disconnection Detection A03CH...
  • Page 331: Event List

    Event List This section lists the events occurs in Ethernet. Event Event type Description Cause code 00100 System Link-up Link-up has occurred when the network cable connected to the external device was connected. 00110 TCP connection communication start/end Communication using the TCP connection with the external device was started or ended.
  • Page 332 Event Event type Description Cause code 10200 Security Remote password lock The lock processing of the remote password was performed. 10201 Remote password unlock successful The unlock processing of the remote password was succeeded. 10202 Remote password unlock failed The unlock processing of the remote password has failed. 10300 Access from IP restricted with IP filter setting Accessed from IP address restricted with the IP filter setting.
  • Page 333: End Codes Returned To An External Device During Data Communications

    End Codes Returned to an External Device During Data Communications The following table lists the error codes stored in the end code appended to a response during data communications. Error details and causes Action code Normal completion When each communication is normally completed, the error code 00H is stored.
  • Page 334 Error details and causes Action code In communications using the fixed buffer, the remote password of the • After unlocking the remote password using the SLMP, perform port for the destination Ethernet module is in the lock status. communications using the fixed buffer. •...
  • Page 335: Appendices

    APPENDICES Appendix 1 Module Label The I/O signals and buffer memory of the Ethernet-equipped module can be set using module label. Structure of the module label The module label name is defined with the following structure. "Instance name"_"Module number"."Port number"."Label name" "Instance name"_"Module number"."Label name"...
  • Page 336: Appendix 2 I/O Signals

    Appendix 2 I/O Signals This section describes the I/O signals of the RJ71EN71 and the RnENCPU (network part) for the CPU module. The I/O signal assignment of when the start I/O number of the RJ71EN71 or the RnENCPU (network part) is "0" is listed below. List of I/O signals The following table lists I/O signals.
  • Page 337 When the network type is "Q Compatible Ethernet" With the Q-compatible Ethernet, the same I/O signals as the MELSEC-Q series Ethernet interface module can be used except in some cases. The following table lists the differences of the RJ71EN71 and MELSEC-Q series Ethernet interface modules. Device number RJ71EN71 QJ71E71-100...
  • Page 338: Appendix 3 Buffer Memory

    Appendix 3 Buffer Memory The buffer memory is used for the following applications. Module Application RJ71EN71, RnENCPU (network part) Exchanges data with the CPU module. CPU module (built-in Ethernet port Stores data such as the setting values for the Ethernet function and monitor values, and data used for exchanging part) data with the multiple CPU function.
  • Page 339 P1 address (P2 address Application Name Decimal Hexadecimal 27H (1E84A7H) Own node setting status MELSOFT connection UDP port number (2000039) storage area 28H (1E84A8H) MELSOFT direct connection port number (2000040) 41 to 99 29H to 63H System area (2000041 to (1E84A9H to 2000099) 1E84E3H)
  • Page 340 P1 address (P2 address Application Name Decimal Hexadecimal 5052 to 5053 13BCH to 13BDH Status for each protocol ICMP packet Received echo reply total count (2005052 to (1E983CH to 2005053) 1E983DH) 5054 to 5079 13BEH to 13D7H System area (2005054 to (1E983EH to 2005079) 1E9857H)
  • Page 341 P1 address (P2 address Application Name Decimal Hexadecimal 5204 to 5206 1454H to 1456H Own node operation IP address duplication status storage area MAC address of the station with the IP (2005204 to (1E98D4H to status storage area address already used 2005206) 1E98D6H) 5207 to 5300...
  • Page 342 P1 address (P2 address Application Name Decimal Hexadecimal 8336 to 8875 2090H to 22ABH Predefined protocol Connection No.2 to Connection No.16 (2008336 to (1EA510H to support function 2008875) 1EA72BH) execution status check area 8876 to 10999 22ACH to 2AF7H System area (2008876 to (1EA72CH to 2010999)
  • Page 343 P1 address (P2 address Application Name Decimal Hexadecimal 11670 to 11671 2D96H to 2D97H Area for both systems Control system IP address (2011670 to (1EB216H to identical IP address 2011671) 1EB217H) setting function 11672 to 11699 2D98H to 2DB3H System area (2011672 to (1EB218H to 2011699)
  • Page 344 P1 address (P2 address Application Name Decimal Hexadecimal 720896 B0000H Error log area for Number of errors (2720896) (298480H) MODBUS/TCP function 720897 B0001H Error log write pointer (2720897) (298481H) 720898 B0002H Error log 1 Detail error code (2720898) (298482H) 720899 B0003H Abnormal response code (2720899)
  • Page 345 P1 address (P2 address Application Name Decimal Hexadecimal 722064 to 722127 B0490H to Simple CPU Abnormal response code for each setting number (2722064 to B04CFH communication area 2722127) (298910H to 29894FH) 722128 to 722191 B04D0H to Execution interval (current value) for each setting number (2722128 to B050FH 2722191)
  • Page 346 ■P1/P2 common area Address Application Name Decimal Hexadecimal 1900000 to 1CFDE0H to Ethernet PORT1/2 Open completion signal 1900007 1CFDE7H common information 1900008 to 1CFDE8H to Open request signal 1900015 1CFDEFH 1900016 to 1CFDF0H to Socket/fixed buffer reception status signal 1900023 1CFDF7H 1900024 1CFDF8H...
  • Page 347 CPU module (built-in Ethernet port part) The following table lists the buffer memory addresses related to the Ethernet function of the CPU module (built-in Ethernet port part). Address Application Name Decimal Hexadecimal 50 to 51 32H to 33H Own node setting status Own node IP address storage area 60 to 61...
  • Page 348 Address Application Name Decimal Hexadecimal 224 to 225 E0H to E1H Status for each protocol Receiving error Framing error count 226 to 227 E2H to E3H Receive FIFO overflow count 228 to 229 E4H to E5H CRC error count Own node operation Hub connection status area Communication mode status storage area...
  • Page 349 Address Application Name Decimal Hexadecimal 2C6H Predefined protocol Predefined protocol setting data error Protocol number setting data check area information 2C7H Setting type 2C8H Packet number 2C9H Element number 2CAH Number of registered predefined protocols 722 to 729 2D2H to 2D9H Predefined protocol registration 740 to 741 2E4H to 2E5H...
  • Page 350 When using the RJ71EN71 (network type: Q-compatible Ethernet) With the Q-compatible Ethernet, the same buffer memory addresses as the MELSEC-Q series Ethernet interface module can be used, excluding some addresses. ■Buffer memory addresses usable only with RJ71EN71 The following table lists the buffer memory addresses that can be used only with RJ71EN71. Address Application Name...
  • Page 351 Address Name Decimal Hexadecimal MELSEC-Q series Ethernet interface module RJ71EN71 108 to 110 6CH to 6EH Own station MAC address Own station MAC address Initial value: 0H Initial value: MAC address of the RJ71EN71 Auto-open UDP port number Auto-open UDP port number Initial value: 0H Initial value: 1388H LED status...
  • Page 352 Address Name Decimal Hexadecimal MELSEC-Q series Ethernet interface module RJ71EN71 20605 507DH Connection No.3 Accumulated count of unlock process Connection No.3 Remote password mismatch count abnormal end 20610 5082H Connection No.4 Accumulated count of unlock process Connection No.4 Remote password mismatch count abnormal end 20615 5087H...
  • Page 353 ■Buffer memory addresses not supported by the RJ71EN71 The following table lists the buffer memory addresses of the MELSEC-Q series Ethernet interface modules that are not supported by the RJ71EN71. Address Application Name Decimal Hexadecimal Error log area Error log write pointer 229 to 372 E5H to 174H Error log block area...
  • Page 354 Address Application Name Decimal Hexadecimal 20622 508EH Monitoring area Remote password function Connection No.6 Accumulated count of lock monitoring area process abnormal end 20623 508FH Accumulated count of lock process based on close 20624 5090H Connection No.7 Accumulated count of unlock process normal completion 20626 5092H...
  • Page 355 Address Application Name Decimal Hexadecimal 20659 50B3H Monitoring area Remote password function Connection No.14 Accumulated count of unlock monitoring area process normal completion 20661 50B5H Accumulated count of lock process normal completion 20662 50B6H Accumulated count of lock process abnormal end 20663 50B7H Accumulated count of lock...
  • Page 356 Address Application Name Decimal Hexadecimal 20992 5200H "Issue system "Issue system switching request at disconnection detection" switching request at 20993 5201H Disconnection detection monitoring time disconnection detection" status storage area 21008 to 5210H to 5211H "System switching settings when communication error occurs" status storage area 21009 22640 to 5870H to...
  • Page 357: Details Of Buffer Memory Addresses (Rj71En71, Rnencpu (Network Part))

    Details of buffer memory addresses (RJ71EN71, RnENCPU (network part)) This section describes the details of buffer memory addresses of the RJ71EN71 and RnENCPU (network part). The buffer memory addresses are for when the P1 connector is used. Own node setting status storage area ■Own node IP address (Un\G4 to Un\G5) The IP address set with the module parameter is stored.
  • Page 358 Connection status storage area ■Connection No.1 latest error code to connection No.64 latest error code (Un\G100 to Un\G163) The latest error code for each connection is stored. Address Name Un\G100 Connection No.1 latest error code Un\G101 Connection No.2 latest error code ...
  • Page 359 Own node operation status storage area ■LED status (Un\G5189) Address Description Un\G5189 Stores the on/off status of the P ERR LED. 0: Off 1: On or flashing ■Hub connection status area (Un\G5191 to Un\G5194) The hub connection status of the Ethernet-equipped module is stored. Address Name Description...
  • Page 360 Address Name Description Un\G5325 ZNWR instruction execution result Stores the execution result of the ZNWR instruction. 0: Completed successfully Other than 0: Completed with an error (An error code is stored.) Remote password lock status storage area The remote password lock status of each connection is stored. •...
  • Page 361 Predefined protocol support function execution status check area ■Connection No.1 (Un\G8300 to Un\G8335) The execution status of the predefined protocol support function is stored. For addresses corresponding to connections after the connection No.2, refer to the following. Page 336 List of buffer memory addresses Address Name Description...
  • Page 362 Time setting function (SNTP) area ■Time setting function operation result (Un\G11000) Address Description Un\G11000 Stores the operation result of the time setting function. 0: Unexecuted 1: Success FFFFH: Failure ■Time setting function execution time (Un\G11001 to Un\G11007) Address Name Description Un\G11001 Year Stores the year that the time setting function was executed.
  • Page 363 Dynamic routing function area ■Communication path determination status (Un\G11500 to Un\G11514) The determination status of the communication path for each network number of the destination station is stored. • 0: Path undetermined • 1: Path determined Address Un\G11500  Un\G11514 Empt The numbers in the table indicate network numbers.
  • Page 364 IP address change function area ■IP address setting (Un\G11700 to Un\G11705) Set the IP address, subnet mask, and default gateway to be stored in the IP address storage area (flash ROM). Address Name Description Un\G11700 IP address Third octet, fourth octet Un\G11701 First octet, second octet Un\G11702...
  • Page 365 ■IP address storage area clear error cause (Un\G11714) Address Description Un\G11714 Stores the cause of the abnormal end of clearing the IP address storage area (flash ROM). No error 200H:Error occurred during clearing. 400H:Clearing was started during the write processing. ■IP address change function operating status (Un\G11715) Address Description...
  • Page 366 Error log area for MODBUS/TCP function ■Number of errors (Un\G720896) This area is used for storing the number of errors that occurred during communications using MODBUS/TCP. ■Error log write pointer (Un\G720897) This area is used for storing the error log number at which the latest error log was registered. ■Error log 1 (Un\G720898 to Un\G720905) Address Name...
  • Page 367 Simple CPU communication area ■Request to stop fixed interval communication for each setting number (Un\G721900 to Un\G721903) This request contact stops the data send when the communication setting is "Fixed" and is stored using the following bit pattern for each setting number. •...
  • Page 368 ■Simple CPU communication error code for each setting number (Un\G722000 to Un\G722063) Address Name Description Un\G722000 Simple CPU communication error code setting No.1 The cause of the error detected in the simple CPU communication is stored. Un\G722001 Simple CPU communication error code setting No.2 0: No error (function not used) ...
  • Page 369 Ethernet PORT1/2 common information ■Open completion signal (Un\G1900000 to Un\G1900007) The open status of each connection is stored. • 0: Closed or not open • 1: Open completed Address Un\G1900000  Un\G1900007 The numbers in the table indicate connection numbers. ■Open request signal (Un\G1900008 to \G1900015) The open processing status of each connection is stored.
  • Page 370 Receive buffer status storage area ■State of receive buffer (Un\G1900030) Address Description Un\G1900030 Stores the receive buffer status. 0: Receive buffer not full 1: Receive buffer full Predefined protocol support function check area ■Predefined protocol ready (Un\G1901002) Address Description Un\G1901002 Stores the ready status of the protocol setting data.
  • Page 371 ■Predefined protocol registration (Un\G1901032 to Un\G1901047) Whether protocol setting data is registered or not is stored. All bits are set to 0 if the protocol setting data check result is abnormal. • 0: No registration • 1: Registered Address Un\G1901032 ...
  • Page 372: Details Of Buffer Memory Addresses (Cpu Module (Built-In Ethernet Port Part))

    Details of buffer memory addresses (CPU module (built-in Ethernet port part)) This section descries the details of buffer memory addresses of the CPU module (built-in Ethernet port part). Own node setting status storage area ■Network number/Station number setting status (Un\G87) This area is used for storing the setting status of the network number/station number.
  • Page 373 Connection status storage area ■Connection No.1 latest error code (communication error) to Connection No.16 latest error code (communication error) (Un\G770 to Un\G785) The latest error code (communication error) for each connection is stored. Address Name Un\G770 Connection No.1 latest error code (communication error) Un\G771 Connection No.2 latest error code (communication error) ...
  • Page 374 Simple CPU communication function ■Request to stop fixed interval communication for each setting number (Un\G1094 to Un\G1097) This request contact stops the data send when the communication setting is "Fixed" and is stored using the following bit pattern for each setting number •...
  • Page 375 ■Simple CPU communication error code for each setting number (Un\G1194 to Un\G1257) Address Name Description Un\G1194 Simple CPU communication error code setting No.1 The cause of the error detected in the simple CPU communication is stored. Un\G1195 Simple CPU communication error code setting No.2 0: No error (function not used) ...
  • Page 376: Appendix 4 Dedicated Instruction

    Appendix 4 Dedicated Instruction This section describes the dedicated instruction that can be used in Ethernet. For details on dedicated instructions, refer to the following.  MELSEC iQ-R Programming Manual (CPU Module Instructions, Standard Functions/Function Blocks)  MELSEC iQ-R Programming Manual (Module Dedicated Instructions) Open/close instructions The following table lists the dedicated instructions used for open or close processing.
  • Page 377 Socket communications instructions The following table lists the dedicated instructions used for socket communications. : Available, : Not available Instruction Description Availability RJ71EN71, CPU module (built-in RnENCPU (network Ethernet port part) part)   GP.SOCRCV Reads the receive data from the external device. SP.SOCRCV ...
  • Page 378 Link dedicated instructions The following table lists the dedicated instructions used in the RJ71EN71 and the RnENCPU (network part) for transient transmission with programmable controllers on other stations. Each link dedicated instruction allows access to a station on a network other than Ethernet. Instruction Description SEND...
  • Page 379: Precautions For Dedicated Instructions

    Precautions for dedicated instructions This section describes precautions when using dedicated instructions. Precautions for dedicated instructions (common) ■When changing data specified by dedicated instructions Do not change any data (such as control data) until execution of the dedicated instruction is completed. ■When the dedicated instruction is not completed Check whether "Module Operation Mode"...
  • Page 380: Appendix 5 Tcp/Ip Communications, Udp/Ip Communications

    Appendix 5 TCP/IP Communications, UDP/IP Communications This chapter describes the communication flow and procedure of TCP/IP communications and UDP/IP communications. TCP/IP communications This section describes TCP/IP communications. Establishing a connection With TCP/IP communications, a connection must be established between the communicating devices. If the server side device has executed the Passive open processing and is in the standby state, the client side device makes an open request (Active open processing) to the server.
  • Page 381 Communication flow This section describes the flow from the establishment of connection to end of communication. Server Client Ethernet-equipped module External device After performing Passive open, the server will wait for an open request from the client. Passive open When the client sends an Active open request Open request and the server accepts it,...
  • Page 382 Active open procedure Active open is a connection method that performs an active open processing in respect to an external device (Passive open) that is in a passive open standby state for a connection. The following figure shows the process for the Ethernet-equipped module to Active open.
  • Page 383 Passive open procedure The following two types of connection methods can be used to Passive open the Ethernet-equipped module. Connection Description method Unpassive This connection method executes a passive open processing for the connection to all devices connected to the network without restriction to the IP address or port number of the communication destination.
  • Page 384 ■When "Open by Program" is set Before the open/close request is received from the external device, the Ethernet-equipped module must execute the OPEN/ CLOSE instruction and enter the open/close standby state. Data can be sent and received after the open processing completes normally.
  • Page 385: Udp/Ip Communications

    UDP/IP communications This section describes the UDP/IP communications. Since UDP/IP communications does not establish a connection during communication and does not check that the communication destination has correctly received the data, the line load is lower. Note that the data reliability is lower than TCP/IP communications. Communication flow UDP/IP communications does not require a process to establish a connection with the external device as is required with TCP/IP communications.
  • Page 386 ■When "Open by Program" is set Before the open/close request is received from the external device, the Ethernet-equipped module must execute the OPEN/ CLOSE instruction and enter the open/close standby state. Data can be sent and received after the open processing completes normally.
  • Page 387: Appendix 6 Communications With Different Networks

    Appendix 6 Communications with Different Networks Different network stations can be accessed with dedicated instructions or the engineering tool, allowing seamless communication. CC-Link IE Controller Network Network No.1 Engineering tool (Relay station) Ethernet CC-Link IE Field Network Network No.3 Network No.2 The following functions are used to communicate with different networks.
  • Page 388 When the networks consist of only MELSEC iQ-R series Communication paths are automatically set for communication with the following networks of MELSEC iQ-R series. • Ethernet • CC-Link IE Controller Network • CC-Link IE Field Network ■Setting procedure Use the following procedure. Set the network number, station number, and transient transmission group number in the "Own Node Settings"...
  • Page 389 When the networks contain a redundant system • When setting a communication path automatically, after the time specified by the destination alive check timer (time calculated from destination alive check start interval timer value, destination alive check interval timer value, and destination alive check resend count), the communication path setting will be changed.
  • Page 390: Appendix 7 Processing Time

    Appendix 7 Processing Time Calculate the minimum processing time for each function with the following formula. Note that the processing time may be even longer due to the network load rate (line congestion), each connected device's window size, number of connections being used simultaneously, and the system configuration.
  • Page 391 Processing time of communications using MODBUS/TCP The following shows the time required by the Ethernet-equipped module when it receives a request message from the MODBUS/TCP master device, completes the processing, and sends a response message. ■Calculation formula Tsl = Ks1 + (Ks2  n1) + (St  n2) [ms] Variable Meaning Processing time, constant...
  • Page 392 System switching time when a redundant system is used The following shows the system switching time when the Ethernet-equipped module mounted on the control system in the redundant system detects a communication error or cable disconnection and sends a system switching request to the control system CPU module.
  • Page 393 ■Timing chart This section describes a timing chart for each system switching cause. • Communication error detection (alive check error) Communications have not been performed with the external device for a fixed period. (Tr = 2) Operating as a control system RJ71EN71 (system A) Operating as a standby system Issuing a system...
  • Page 394: Performance List Of Simple Cpu Communication Function

    Performance list of simple CPU communication function The following shows the performance of the execution interval (simple CPU communication function). The execution interval varies depending on the number of settings, the number of communication points, and the scan time of the CPU module. The interval is also affected by the execution conditions of other functions or Ethernet communication condition.
  • Page 395: Appendix 8 When Connecting The Module To A Remote Head Module

    Appendix 8 When Connecting the Module to a Remote Head Module This section describes the restrictions for when connecting the RJ71EN71 to a remote head module. Restricted functions and specifications Function This section describes the restricted functions of when connecting the RJ71EN71 to a remote head module. Function Restrictions Communications using the SLMP...
  • Page 396: Appendix 9 Port Numbers Used By Ethernet-Equipped Module

    Appendix 9 Port Numbers Used by Ethernet- equipped Module The following port numbers are used by the system and cannot be specified. Port Number Applications Decimal Hexadecimal CPU module (built-in Ethernet port part) RJ71EN71, RnENCPU (network part) 5000 1388H For system Auto-open UDP port (default value) 5001 1389H...
  • Page 397: Appendix 10Operation Image And Data Structure Of Predefined Protocol

    Appendix 10 Operation Image and Data Structure of Predefined Protocol Operation image of each communication type of protocol With the predefined protocol support function, data is communicated with the external device using the "Send Only", "Receive Only", and "Send & Receive" communication types. This section describes the operation images of each communication type.
  • Page 398 For details on errors that occur when the communication completed abnormally, refer to the error code stored in the buffer memory. ( Page 310 List of Error Codes) For "Receive Only" communication type When data is received from the external device, it is verified with the receive packet (expected packet). If it matches, the receive processing ends.
  • Page 399 ■When the instruction completed with an error (timeout error) An error has occurred. ECPRTCL instruction Completion device The device turns on upon abnormal end. Completion device + 1 t: waiting time to receive or the time specified by the destination alive check timer Ethernet-equipped module The receive data did not match the...
  • Page 400 For "Send & Receive" communication type The packet is sent once. If the send completed successfully, the module shifts to the receiving standby state. When data is received from the external device, it is verified with the receive packet (expected packet). If it matches, the receive processing ends.
  • Page 401 ■When the instruction completed with an error (timeout error at sending) An error has occurred. ECPRTCL instruction Completion device The device turns on upon abnormal end. Completion device + 1 Waiting time t: TCP ULP timer to send Ethernet-equipped module Send packet The packet cannot be sent or no response is...
  • Page 402: Verification Operation Of Receive Packet

    Verification operation of receive packet This section describes the receive packet (expected packet) verification operation for communication with an external device when the protocol communication type contains reception. When received data are matched with a receive packet (expected packet) The received data is compared against the receive packet (expected packet), and the receive processing completes when the verification matches.
  • Page 403: Example Of Packet Element Data

    Example of packet element data The element processing procedures that can be set for the packets, the actual data examples, and others are shown below. Length ■Process procedure The Ethernet-equipped module processes the length with the following procedure. [During send] Data flow Forward direction Sending...
  • Page 404 ■Data flow Data flow is used to specify the order of send data and receive data. The data flow can be specified in forward direction (upper byte  lower byte), reverse direction (lower byte  upper byte), and byte swap (by word). •...
  • Page 405 When receiving data whose length is an odd number No byte swap (Word) Specified device Data length storage area 0005H Data storage area 0201H External device 0403H Send data 0005H Receiving (Word) Specified device Byte swap Data length storage area 0005H Data storage area 0102H...
  • Page 406: Appendix 11 Example Of External Device Program

    Appendix 11 Example of External Device Program An example of the program in the external device connected to the same Ethernet as the Ethernet-equipped module is shown below. Each program is the minimum required program for the communication test. Change the IP address or port number according to the system.
  • Page 407: Appendix 12How To Turn Off Err Led

    Appendix 12 How to Turn Off ERR LED If an error occurs in communications with the external device, the ERR LED turns on. Even though the error cause is eliminated, the ERR LED does not turn off. This section describes how to turn off the ERR LED. Method using a dedicated instruction The ERR LED can be turned off by the ERRCLEAR instruction.
  • Page 408: Appendix 13Added And Enhanced Functions

    Appendix 13 Added and Enhanced Functions The following table lists the added and enhanced functions in the Ethernet-equipped module. : Available (No version restriction), : Not available Added and enhanced function Firmware version RJ71EN71 RnENCPU CPU module (network part) (built-in Ethernet port part) ...
  • Page 409 MEMO APPX Appendix 13 Added and Enhanced Functions...
  • Page 410: Index

    INDEX ......367 Initial error code ......367 Initial status .
  • Page 411 ..... . 252 Password setting ......97 Physical address .
  • Page 412: Revisions

    Japanese manual number: SH-081253-L This manual confers no industrial property 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.
  • Page 413: Warranty

    WARRANTY Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty Range If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company.
  • Page 414: Trademarks

    TRADEMARKS Microsoft and Windows are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries. Oracle and JavaScript are registered trademarks of Oracle and/or its affiliates. The company names, system names and product names mentioned in this manual are either registered trademarks or trademarks of their respective companies.
  • Page 416 SH(NA)-081257ENG-L(1810)MEE MODEL: R-ETHER-U-OU-E MODEL CODE: 13JX16 HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission.

Table of Contents