Mitsubishi Electric MELSEC iQ-F Series User Manual
Mitsubishi Electric MELSEC iQ-F Series User Manual

Mitsubishi Electric MELSEC iQ-F Series User Manual

Communication
Hide thumbs Also See for MELSEC iQ-F Series:
Table of Contents

Advertisement

Quick Links

MELSEC iQ-F
FX5 User's Manual (Communication)
- FX5S CPU module
- FX5UJ CPU module
- FX5U CPU module
- FX5UC CPU module
- Communication board
- Communication adapter
- FX5-ENET
- FX5-ENET/IP

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the MELSEC iQ-F Series and is the answer not in the manual?

Questions and answers

Summary of Contents for Mitsubishi Electric MELSEC iQ-F Series

  • Page 1 MELSEC iQ-F FX5 User's Manual (Communication) - FX5S CPU module - FX5UJ CPU module - FX5U CPU module - FX5UC CPU module - Communication board - Communication adapter - FX5-ENET - FX5-ENET/IP...
  • Page 3: Safety Precautions

    SAFETY PRECAUTIONS (Read these precautions before use.) Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety in order to handle the product correctly. This manual classifies the safety precautions into two categories: [ WARNING] and [ CAUTION].
  • Page 4 [DESIGN PRECAUTIONS] WARNING  Make sure to set up the following safety circuits outside the PLC to ensure safe system operation even during external power supply problems or PLC failure. Otherwise, malfunctions may cause serious accidents. Note that when the CPU module detects an error, such as a watchdog timer error, during self- diagnosis, all outputs are turned off.
  • Page 5 [SECURITY PRECAUTIONS] WARNING  To maintain the security (confidentiality, integrity, and availability) of the programmable controller and the system against unauthorized access, denial-of-service (DoS) attacks, computer viruses, and other cyberattacks from unreliable networks and devices via the network, take appropriate measures such as firewalls, virtual private networks (VPNs), and antivirus solutions.
  • Page 6 [WIRING PRECAUTIONS] CAUTION  Install module so that excessive force will not be applied to terminal blocks, power connectors, I/O connectors, communication connectors, or communication cables. Failure to do so may result in wire damage/breakage or PLC failure.  Make sure to observe the following precautions in order to prevent any damage to the machinery or accidents due to malfunction of the PLC caused by abnormal data written to the PLC due to the effects of noise: Do not bundle the power line, control line and communication cables together with or lay them...
  • Page 7  Do not disassemble or modify the PLC. Doing so may cause fire, equipment failures, or malfunctions. For repair, contact your local Mitsubishi Electric representative.  After the first use of the SD memory card, do not insert/remove the memory card more than 500 times.
  • Page 8: Introduction

    • Since the examples indicated by this manual, technical bulletin, catalog, etc. are used as a reference, please use it after confirming the function and safety of the equipment and system. Mitsubishi Electric will accept no responsibility for actual use of the product based on these illustrative examples.
  • Page 9: Table Of Contents

    Devices and software to be used ............54 Setting example 1: Connect three Mitsubishi Electric programmable controllers ......55 Setting example 2: Connect another company's device (KV-8000) .
  • Page 10 Data Communication Process ............. 97 Precautions .
  • Page 11 CHAPTER 11 TIME SETTING FUNCTION (SNTP CLIENT) CHAPTER 12 WEB SERVER FUNCTION 12.1 JavaScript Objects ..............208 Common information on JavaScript Objects .
  • Page 12 Termination resistor setting ..............262 Connection diagram .
  • Page 13 Cable ................. 318 Termination resistor setting (RS-485) .
  • Page 14 CHAPTER 20 NON-PROTOCOL COMMUNICATION 20.1 Function Summary ..............414 20.2 Procedure Before Operation .
  • Page 15 Details of related devices ..............494 PART 3 MODBUS/TCP COMMUNICATION CHAPTER 22 OUTLINE...
  • Page 16 For RS-232C ................529 For RS-485 .
  • Page 17 Message format and control procedure............591 Application data specification items.
  • Page 18 CHAPTER 41 MC PROTOCOL DATA COMMUNICATION 41.1 Type and Application of the Data Communication Frame ........692 41.2 Concept of Control Procedure of MC Protocol.
  • Page 19 43.3 Remote Control ............... . 764 Before the remote operation .
  • Page 20 CHAPTER 46 TROUBLESHOOTING BY SYMPTOM 46.1 Troubleshooting Flowchart ............. . 811 Error during communication between Ethernet-equipped module and other device.
  • Page 21 Appendix 9 Device Memory Extension Specification ..........918 Access to module access device.
  • Page 22: Relevant Manuals

    RELEVANT MANUALS Manual name <manual number> Description MELSEC iQ-F FX5S/FX5UJ/FX5U/FX5UC User's Manual (Hardware) Details of hardware of the CPU module, including I/O specifications, wiring, <SH-082452ENG> installation, and maintenance. MELSEC iQ-F FX5 User's Manual (Application) Describes the basic knowledge required for program design, functions of <JY997D55401>...
  • Page 23: Generic Term/Abbreviation

    A generic term for the protocol designed to use MODBUS protocol messages on a TCP/IP network. Module access device A generic term for the module access devices of the MELSEC iQ-R series/MELSEC iQ-F series and intelligent function module devices of the MELSEC-Q/L series OPEN instruction A generic term for SP.SOCOPEN instruction and GP.OPEN instruction...
  • Page 24 MEMO...
  • Page 25: Part 1 Ethernet Communication

    PART 1 Ethernet COMMUNICATION This part consists of the following chapters. 1 OUTLINE 2 SPECIFICATIONS 3 LIST OF FUNCTIONS 4 CONNECTION WITH MELSOFT PRODUCT AND GOT 5 SIMPLE CPU COMMUNICATION FUNCTION 6 SLMP FUNCTION 7 PREDEFINED PROTOCOL SUPPORT FUNCTION 8 SOCKET COMMUNICATION FUNCTION 9 FILE TRANSFER FUNCTION (FTP SERVER) 10 FILE TRANSFER FUNCTION (FTP CLIENT) 11 TIME SETTING FUNCTION (SNTP CLIENT)
  • Page 26: Chapter 1 Outline

    OUTLINE The following describes the Ethernet communication function of CPU module and Ethernet module. Connection with engineering tool and GOT • The CPU module can be connected to multiple engineering tools and GOT by using hub. Up to 8 external devices can be connected one CPU module at the same time.
  • Page 27 Web server function Monitors and diagnoses the CPU module using a Web browser via connected network. IP filter function This function identifies IP address of the access source and prevents access by unauthorized IP addresses. Remote password Unauthorized access from the outside can be prevented and the security can be enhanced by setting the remote password. IP address change function This function is provided to change the IP address of the CPU module by setting the desired IP address to special registers from a peripheral unit or another unit and turning ON a special relay.
  • Page 28: Chapter 2 Specifications

    SPECIFICATIONS Communication Specifications CPU module The following describes the communication specifications of the built-in Ethernet port of the CPU module. Item Specification Transmission Data transfer speed 100/10 Mbps specifications Communication mode Full-duplex or half-duplex Interface RJ45 connector Transmission method Base band Maximum segment length 100m (length between hub and node) Number of cascade...
  • Page 29: Ethernet Module

    Ethernet module The describes the communication specifications of the Ethernet port of the Ethernet module. For another specifications, refer to the following manuals.  MELSEC iQ-F FX5 Ethernet Module User's Manual  MELSEC iQ-F FX5 EtherNet/IP Module User's Manual Item Specification Transmission Data transfer speed...
  • Page 30: Connection Specifications

    Connection Specifications Ethernet cable Use one of the cables listed below for the Ethernet cable (100BASE-TX/10BASE-T cable) to connect to the Ethernet port of Ethernet-equipped module. Item Specifications When using 100BASE-TX Ethernet cable: Category 5 or higher (STP cable When using 10BASE-T Ethernet cable: Category 3 or higher (STP cable *1 Shielded twisted pair cable.
  • Page 31: Chapter 3 List Of Functions

    LIST OF FUNCTIONS The following table lists the functions of the built-in Ethernet of the Ethernet-equipped module. Some functions have restrictions on the firmware version and production information of the CPU module or the version of the engineering tool. (Page 942 Added and Changed Functions) : Supported, : Partially supported, : Not supported Function Outline of system...
  • Page 32 Function Outline of system Supported function Reference CPU module Ethernet module FX5S FX5UJ FX5U/ FX5- FX5- FX5UC ENET ENET/      IP filter function This function identifies IP address of the access Page 234 IP Filter Function source and prevents access by unauthorized IP addresses.
  • Page 33: Chapter 4 Connection With Melsoft Product And Got

    CONNECTION WITH MELSOFT PRODUCT AND This chapter describes the method of communication between the Ethernet-equipped module and MELSOFT Product (engineering tool, MX Component, etc.) or GOT. Direct Connection with Engineering Tool The Ethernet-equipped module can be directly connected to the engineering tool (GX Works3) with an Ethernet cable, without using a hub.
  • Page 34: Setting Method

    Setting method Set on the "Specify Connection Destination Connection" screen of GX Works3. [Online]  [Current Connection Destination] Simple setting method Select [Direct Coupled Setting] on the "Connection Destination Simple Setting Connection" screen. The Ethernet adapter on the personal computer side used for the Ethernet port direct connection can be specified.
  • Page 35 Detailed setting method CPU module On the "Connection Destination Simple Setting Connection" screen, select [Other Connection Method] and click the [Other Connection Method (Open the Specify Connection Destination window)] button. Select "Ethernet Board" for "PC side I/F". Select "PLC Module" for "PLC side I/F" and double-click it. In the "PLC side I/F Detailed Setting of PLC Module"...
  • Page 36 Select "No Specification" on "Other Station Setting" and double-click it. Set the other station specifications according to the operating environment. Click the [CPU Module Direct Coupled Setting] button. Select [Ethernet] for the connection method for the CPU module and click the [Yes] button. The Ethernet adapter on the personal computer side used for the Ethernet port direct connection can be specified.
  • Page 37 Ethernet module On the "Connection Destination Simple Setting Connection" screen, select [Other Connection Method] and click the [Other Connection Method (Open the Specify Connection Destination window)] button. Select "Ethernet Board" for "PC side I/F". 4 CONNECTION WITH MELSOFT PRODUCT AND GOT 4.1 Direct Connection with Engineering Tool...
  • Page 38 Select "Ethernet module" for PLC side I/F, and double-click it. Select "Ethernet Port Direct Connection" on the "PLC side I/F Detailed Setting of Ethernet Module" screen. Double-click "Other Station (Single Network)" in Other Station Setting. Set the other station specifications according to the operating environment. Click the [CPU Module Direct Coupled Setting] button.
  • Page 39: Precautions

    Precautions Connection to LAN line When connecting the CPU module to a LAN line, do not set direct connection. Doing so will apply a load on the LAN line and adversely affect communications with other external devices. Direct connection through the Ethernet module For direct connection through the Ethernet module, only one Ethernet port can be used.
  • Page 40: Connection Via A Hub

    When the communication setting cannot be established Even if direct connection with the Ethernet adapter of the personal computer is performed, the communication setting may not be established. When the communication setting cannot be established, set the appropriate IP address in the network setting for the personal computer.
  • Page 41: Setting The Ethernet-Equipped Module

    Setting the Ethernet-equipped module Setting module parameters CPU module Set the parameters on the "Module parameter Ethernet Port" screen of GX Works3. Navigation window  [Parameter]  Module name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [Own Node Settings] Set IP address of the CPU module.
  • Page 42 Ethernet module Set the parameters on the "n[Un]: FX5-ENET(/IP) Module Parameter" screen of GX Works3. Navigation window  [Parameter]  [Module Information]  [FX5-ENET] or [FX5-ENET/IP]  [Basic Settings]  [Own Node Settings] Set the IP address of the Ethernet module. Writing to the Ethernet-equipped module Write the set parameters to the Ethernet-equipped module.
  • Page 43: Engineering Tool Settings

    Engineering tool settings Set on the "Specify Connection Destination Connection" screen of GX Works3. [Online]  [Current Connection Destination] CPU module On the "Connection Destination Simple Setting Connection" screen, select [Other Connection Method] and click the [Other Connection Method (Open the Specify Connection Destination window)] button. Select "Ethernet Board"...
  • Page 44 Select "PLC Module" for "PLC side I/F" and double-click it. Input the CPU IP address or host name in the "PLC side I/F Detailed Setting of PLC Module" screen as shown in the following figure.   In case of host name, set the name specified in the Microsoft Windows hosts file.
  • Page 45 Ethernet module On the "Connection Destination Simple Setting Connection" screen, select [Other Connection Method] and click the [Other Connection Method (Open the Specify Connection Destination window)] button. Select "Ethernet Board" for "PC side I/F". Select "Ethernet module" for PLC side I/F, and double-click it. Input the IP address or host name of the Ethernet module in the "PLC side I/F Detailed Setting of Ethernet Module"...
  • Page 46: Searching Ethernet-Equipped Modules On Network

    Double-click "Other Station (Single Network)" in Other Station Setting. Set the other station specifications according to the operating environment. Searching Ethernet-equipped modules on network In the case of GX Works3, with connections using a hub, you can search for and display the list of Ethernet-equipped modules connected to the same hub as personal computer (GX Works3).
  • Page 47 [Ethernet module] [Online]  [Current Connection Destination]  Double-click [PLC side I/F Detailed Setting of Ethernet Module]  [Find] Target modules • Ethernet-equipped modules connected to the same hub as GX Works3 • Ethernet-equipped modules connected to cascaded hubs When a search is performed from the Ethernet module, only the Ethernet-equipped modules of iQ-F Series will be targets.
  • Page 48: Communication Via Router

    Ethernet-equipped modules cannot be searched in the following cases • The Ethernet-equipped module whose address is denied by the IP filter function cannot be searched. • Ethernet-equipped modules connected via router cannot be searched. • Some Ethernet-equipped modules connected via wireless LAN may not be found since Ethernet communication may not be stable due to packet loss.
  • Page 49: Precautions

    [Ethernet module] Navigation window  [Parameter]  [Module Information]  [FX5-ENET] or [FX5-ENET/IP]  [Basic Settings]  [Own Node Settings] Precautions IP address duplication Check that the IP address is not duplicated when configuring a network or connecting a new device to a network. If the IP address is duplicated, a device may communicate with the wrong device.
  • Page 50 TCP MELSOFT connection In case of TCP communication with multiple MELSOFT devices (GX Works3, etc.), set the same number of MELSOFT devices in the module parameters. Ethernet-equipped module Ethernet MELSOFT device MELSOFT device MELSOFT device Set the same number of devices as MELSOFT devices When all MELSOFT devices start communicating at the same time, devices may fail to communicate because of the congestion in communication.
  • Page 51: Chapter 5 Simple Cpu Communication Function

    Device data Ethernet Device Device Device Device Device data data data data data MELSEC iQ-F series MELSEC iQ-R series Programmable controller MODBUS/TCP SLMP MELSEC-F series MELSEC-Q series product manufactured by compatible device compatible MELSEC-L series other company device MELSEC iQ-L series •...
  • Page 52: Connectable Devices

    Connectable devices Manufacturer Applicable model Mitsubishi Electric MELSEC iQ-R (built-in Ethernet), MELSEC-Q (built-in Ethernet), MELSEC-L (built-in Ethernet), MELSEC iQ-F (built-in Corporation Ethernet), MELSEC iQ-F (Ethernet module), MELSEC iQ-L (built-in Ethernet), MELSEC-F (Ethernet block/adapter) OMRON Corporation Supported model for SYSMAC CJ/CP series...
  • Page 53: Utilization Examples

    Utilization Examples This section provides utilization examples of the simple CPU communication function. Enabling operation monitoring of production lines For a production line using multiple pieces of equipment, the FX5 CPU module can collect data, such as the production status and errors, from supported devices mounted on the equipment.
  • Page 54: Specifications List

    Batch-monitoring the communication status with the diagnostic function A dedicated window for the simple CPU communication diagnostics can be used to batch-monitor the communication status of simple CPU communications being executed. Settings, errors, and other information can be checked and utilized for means such as troubleshooting due to communication errors.
  • Page 55: Device Type

    MELSEC-L series (built- Built-in Ethernet port LCPU    in Ethernet)    MELSEC iQ-F series FX5S CPU module, FX5UJ CPU module, (built-in Ethernet) FX5U CPU module, FX5UC CPU module    MELSEC iQ-F series FX5-ENET (Ethernet module) ...
  • Page 56: Procedures For Use

    Procedures for Use Devices and software to be used This section describes devices and software to be used with the simple CPU communication function. ÒCPU module ÓCommunication target device ÔEthernet cable ÖPersonal computer GX Works3 Configuration tool for other company devices ÕUSB cable Name Description...
  • Page 57: Setting Example 1: Connect Three Mitsubishi Electric Programmable Controllers

    Setting example 1: Connect three Mitsubishi Electric programmable controllers This section describes a setting example for connecting the FX5S CPU module (own station) with the FX5U CPU module and a programmable controller CPU (communication target devices) to read and write device data at a fixed interval (100ms).
  • Page 58: Operating Procedure

    Operating procedure The following describes the operating procedure for setting example 1. Setting the IP address Create a project for each CPU module and set the IP addresses. Navigation window  [Parameter]  Module name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [Own Node Settings] CPU module IP address...
  • Page 59 Configure the settings that are used to read and write device data from the FX5S CPU module (own station) to the communication target devices. Configure the communication destinations (source and destination) on a one-to-one basis. Also, use the default values for settings that are not listed below.
  • Page 60: Checking The Communication Status

    Checking the communication status Check if communications are working as specified in the setting example. For checking the communication status of the simple CPU communication, refer to the following. Page 62 Checking the Simple CPU Communication Status Check that the SD/RD LED flashes on the CPU module. For all projects, register devices in the Watch window.
  • Page 61: Setting Example 2: Connect Another Company's Device (Kv-8000)

    Setting example 2: Connect another company's device (KV-8000) This section provides a setting example for connecting the FX5S CPU module (own station) with the KV-8000 (communication target device) to read and write device data at a fixed interval (100ms). KV-8000 FX5S CPU module Reading data from the KV-8000...
  • Page 62 Operating procedure The following describes the operating procedure for setting example 2. Setting the IP address Create a project for each CPU module and set the IP addresses. Navigation window  [Parameter]  Module name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [Own Node Settings] CPU module IP address...
  • Page 63 Setting the communication target device If the method for communicating with the communication target device is not MELSOFT UDP, set up communication via a protocol that matches the simple CPU communication method. For the communication method for each device, refer to the following.
  • Page 64: Checking The Simple Cpu Communication Status

    Checking the Simple CPU Communication Status The simple CPU communication status can be checked with "Simple CPU Communication Diagnostics" or from the device. Checking with "Simple CPU Communication Diagnostics" The communication status of the simple CPU communication function can be checked with "Simple CPU Communication Diagnostics".
  • Page 65 Checking with the device CPU module The simple CPU communication status can be checked with the storage status of the corresponding setting number on the following special devices. : Supported, : Not supported Item Communication Device No. Remarks setting Fixed interval request Simple CPU communication start request (for...
  • Page 66: Ethernet Module

    Ethernet module The simple CPU communication status can be checked with the storage status of the corresponding setting number in the following buffer memory areas. Item Device No. Remarks Execution status flag Un\G312, Un\G313 Un\G312.b0: Setting No.1 to Un\G312.b15: Setting No.16 Un\G313.b0: Setting No.17 to Un\G313.b15: Setting No.32 Ready Un\G316, Un\G317...
  • Page 67 Communication stop/restart request when the communication setting is "Fixed Intrvl" [When the own station is a CPU module] When the simple CPU communication status (SD10380 to SD10411) of the corresponding setting number on a special device is either of the following, communications can be stopped by turning off and on the bit of the corresponding setting number in the simple CPU communication stop request (SD10352, SD10353).
  • Page 68 Starting communication when the communication setting is "On Request" The version supporting "On Request" of the communication setting varies depending on the models. Refer to the following. Page 942 Added and Changed Functions [When the own station is a CPU module] In the following cases, when the bit of the corresponding setting number is turned off and on in Request to start communication at request (SD10350, SD10351), communication can be started.
  • Page 69: Specification Details

    Specification Details This section describes the details of the simple CPU communication settings. In the simple CPU communication settings, set the communication destinations on a one-to-one basis. In order from setting No.1, set the communication pattern, communication setting, execution interval, communication destination, device, and other settings.
  • Page 70 Registration of communication destination Set and register devices for both transmission source and transmission destination. The following number of devices can be registered as communication destinations. • FX5S/FX5UJ CPU module: 8 devices • FX5U/FX5UC CPU module: 16 devices • Ethernet module: 32 devices Item Description Setting range...
  • Page 71 IP Address, TCP/UDP, Port No., and Host Station Port No. Set the IP address of the communication destination, communication protocol, port number, and own station port number. Device Type IP Address TCP/ Port No. Host Station Port No. MELSEC iQ-R (built-in Ethernet) 0.0.0.1 to 5006 A number between 61696 and...
  • Page 72 Specifications of each Ethernet-equipped module The CPU module and Ethernet module differ in the following specifications. Item CPU module Ethernet module Connection Does not occupy any connection. Occupies one connection per communication target device (per group) Own station port number Duplication is not allowed.
  • Page 73: Device Setting

    Target PLC No. When the communication destination is "MELSEC iQ-R (built-in Ethernet)" and a multiple CPU system is used, specify the "Target PLC No." of the communication destination. Item Setting range Target PLC No. • Not Specified • PLC No.1 to PLC No.4 (Default: Not Specified) Device setting Set the device that sends/receives data to/from the communication destination.
  • Page 74 Number of device points Set the number of device points to the total number of all settings (8192 words maximum). Depending on the communication destination, the number of points per setting is as follows. Communication destination Number of points per setting •...
  • Page 75 Devices that can be specified on the own station For devices that can be specified, the size of a device is specified in units of 16 points for a bit device and 1 point for a word device. Use 0 or multiples of 16 to specify the device number of a bit device. Furthermore, the following table lists the device ranges when device types with the maximum number of points are used.
  • Page 76 When the communication destination is the MELSEC iQ-L (built-in Ethernet) For devices that can be specified, the size of a device is specified in units of 16 points for a bit device and 1 point for a word device. Use 0 or multiples of 16 to specify the device number of a bit device. Furthermore, the following table lists the device ranges when device types with the maximum number of points are used.
  • Page 77 When the communication destination is the MELSEC iQ-F (Ethernet module) For devices that can be specified, the size of a device is specified in units of 16 points for a bit device and 1 point for a word device. Use 0 or multiples of 16 to specify the device number of a bit device. Furthermore, the following table lists the device ranges when device types with the maximum number of points are used.
  • Page 78 When the communication destination is the MELSEC-Q (built-in Ethernet) For devices that can be specified, the size of a device is specified in units of 16 points for a bit device and 1 point for a word device. Use 0 or multiples of 16 to specify the device number of a bit device. Furthermore, the following table lists the device ranges when device types with the maximum number of points are used.
  • Page 79 When the communication destination is the MELSEC-FX3 (Ethernet block/adapter) Applicable devices differ depending on the device. For applicable devices, refer to the manual for the device used. The accessible device range of the communication destination side is the range that can be specified with the following commands of the MC protocol (A-compatible 1E frame): Batch read in units of words (01H) and Batch write in units of words (03H).
  • Page 80 When the communication destination is KEYENCE (KV series) For devices that can be specified, the size of a device is specified in units of 16 points for a bit device and 1 point for a word device. The format of bit devices other than "B" consists of the last two digits of bit specification and the upper digits of word specification.
  • Page 81 When the communication destination is Panasonic (FP0H series) For devices that can be specified, the size of a device is specified in units of one point. Type Applicable device Symbol Range Remarks Bit Device 0 to 109 The setting is available only when "Communication Pattern" is set to "Read". (The device is displayed ...
  • Page 82 Import/export of settings Import/export the simple CPU communication setting parameters from/to a CSV file. Export Click the [Export] button in the "Setting Item" window under "Simple CPU Communication Setting". Input the file name and click the [Save] button in the "Export to File" window. Edit the exported CSV file as necessary.
  • Page 83 Import Click the [Import] button in the "Setting Item" window under "Simple CPU Communication Setting". Select the file name and click the [Save] button in the "Import to File" window. Click the [OK] button. The data in the CSV file is reflected in the "Setting Item" window under "Simple CPU Communication Setting". For the file format at import, follow the following format.
  • Page 84 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) This setting is not required.
  • Page 85 Operation during the simple CPU communication Operation of the own station Since the own station operates without depending on the operating status of the Ethernet-equipped 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 86 Timeout Time/Communication Retry Count/Monitoring Time At Error Set the conditions for when communication errors occur. Item Description Setting range Timeout Time (ms) Set the time after which an error will occur or a retry will start when 10 to 65535ms (in increments of 1ms) no response is sent from the communication destination.
  • Page 87: Latency Time

    Latency Time Set the waiting time until communications are started. Item Description Setting range Latency Time Set the time required to start communications after completion of 0 to 255s (in increments of 1s) the Ethernet-equipped module startup. (Default: 0s) The time cannot be changed for each setting number, because the setting is common for the simple CPU communication function.
  • Page 88 Program example Devices used Classification Label name Description Device Module label FX5CPU.stS.bnSts_Start_Request[1] Communication start request for simple CPU SD10350.0 communication setting No.1 (when communication setting is "When requested") FX5CPU.stS.bnSts_Status_Flag[1] Execution status flag for simple CPU communication SD10356.0 setting No.1 FX5CPU.stS.bnReady[1] Ready flag for simple CPU communication setting No.1 SD10358.0 FX5CPU.stS.unStatus_SimplePLC[1]...
  • Page 89: When The Own Station Is An Ethernet Module

    When the own station is an Ethernet module The FX5-ENET (own station) and the FX5-ENET (communication destination) communicate with each other. Own station (client) Communication destination FX5-ENET FX5-ENET FX5 CPU module FX5-ENET FX5-ENET FX5 CPU module Bit device Writing to 4096 points BFFF M4095 Word device...
  • Page 90 Program example Devices used Classification Label name Description Device Module label FX5ENET_1.bnSts_Start_Request_D[1] "Communication start at request" request for simple CPU Un\G300.0 communication setting No.1 FX5ENET_1.bnSts_Status_Flag_D[1] Execution status flag for simple CPU communication Un\G313.0 setting No.1 FX5ENET_1.bnReady_D[1] Ready flag for simple CPU communication setting No.1 Un\G317.0 FX5ENET_1.unStatus_SimplePLC_D[1] Communication status storage location for simple CPU...
  • Page 91: Precautions

    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, SLMP communication, or MODBUS/TCP communication) is simultaneously performed by using UDP, the data reception of UDP may not be completed, resulting in a timeout error.
  • Page 92: Redundant System

    IP address and device type of communication target devices Check the IP address and device type of the communication target device before setting the parameters. The simple CPU communication cannot be performed when the communication destination does not exist (an incorrect IP address is specified) or when preparation processing is not completed.
  • Page 93 Communication on request • The time taken from when the Request to start communication at request (SD10350 or SD10351) for Simple CPU communication is turned on to when the communication is completed will differ according to the Ethernet line's load rate, operating status of other communication functions (such as MELSOFT connection, SLMP communication, socket communication function, and CC-Link IE Field Network Basic), scan time of the communication destination, and system configuration.
  • Page 94: Chapter 6 Slmp Function

    SLMP FUNCTION This chapter describes the SLMP function. The following operations can be performed by using the SLMP function. • Ethernet-equipped module device data can be read and written using SLMP (3E/1E frames) from external devices. • Ethernet-equipped module operation monitoring, data analysis, and production control is possible from external devices by reading and writing device data.
  • Page 95: Specifications

    Specifications Communication specifications Communication by the SLMP function is implemented with the following specifications, and they can be configured in module parameters in the GX Works3. Item Specification CPU module Ethernet module Transmission Data transfer speed 100/10 Mbps specifications Communication mode Full-duplex or half-duplex Interface RJ45 connector...
  • Page 96: Link Specifications

    Link specifications The method for calculating the link time of the CPU module is shown below. For applicable commands and devices, refer to  Page 97 SLMP Commands. The link time between Ethernet modules varies depending on the usage of other intelligent function modules. Link time Calculate the minimum processing time for transmission by SLMP with the following formula.
  • Page 97: Setting Method

    Setting Method The following shows the configuration for communication by SLMP. CPU module Navigation window  [Parameter]  Module name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [Own Node Settings] Under "Own Node Settings", set "IP Address" setting items and "Communication Data Code". Configure the connection for the SLMP connection.
  • Page 98: Ethernet Module

    Ethernet module Navigation window  [Parameter]  [Module Information]  [FX5-ENET] or [FX5-ENET/IP]  [Basic Settings]  [Own Node Settings] Under "Own Node Settings", set "IP Address" setting items and "Communication Data Code". Configure the connection for the SLMP connection. Navigation window ...
  • Page 99: Slmp Commands

    SLMP Commands For details on the SLMP commands, refer to the following. Page 606 3E FRAME COMMANDS Page 671 1E FRAME COMMANDS Data Communication Process Sending the SLMP frame When sending a request message from the CPU module to the external device, use the following dedicated instructions. Supported only for 3E frame.
  • Page 100: Precautions

    Precautions Checking communication status based on LED display Check the status of the "SD/RD" LED display at the Ethernet port of the Ethernet-equipped module. "SD/RD" LED display status Operation status Flashing Data is being sent or received. Data is not being sent nor received. The LED flashes brightly when performing SLMP (3E frame) communication normally.
  • Page 101 Access range • Only the connected Ethernet-equipped module can be accessed. Transmissions to other modules will result in an error. • Communication with other stations such as CC-Link via the connected Ethernet-equipped module cannot be done. For details on the access range, refer to the following. Page 563 Access range Precautions when the protocol is set to UDP •...
  • Page 102: Cpu Module Processing Time Of Slmp

    CPU module processing time of SLMP When accessing the CPU module from an external device using SLMP communication, the following "intervention time to the scan time" and "number of scans for processing" of the CPU module side are required. On the request from the external device using SLMP communication, the CPU module processes a specified number of points during each END processing in case the CPU module is running.
  • Page 103 1E frame • When communicating data in ASCII code Operation Command Access points Intervention time [ms] (extension of scan time) Number of 1) / 2) scans Access point 1) Access point 2) required for processing Batch Reading 1/256 0.0187 0.0646 1/64 0.0196 0.0232...
  • Page 104: Applicable Connections

    PREDEFINED PROTOCOL SUPPORT FUNCTION This chapter describes the predefined protocol support function (built-in Ethernet). For details on the predefined protocol support function (serial communication), refer to the following. Page 455 PREDEFINED PROTOCOL SUPPORT FUNCTION Outline 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.
  • Page 105: Data Communication

    Data Communication When the predefined protocol support function is used, data can be exchanged with the external device using the following procedure. Select the protocol with the predefined protocol support function, create or edit the data, and write the protocol setting data.
  • Page 106 Newly creating the protocol setting data Newly create the protocol setting data. [File]  [New]  "Protocol Setting" screen Item Description Protocol No. Displays the protocol number used with the dedicated instruction. 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 107 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 64 Manufacturer Set the maker of the protocol to be added.
  • Page 108 Protocol Detailed Setting Set the protocol send/receive parameters. "Protocol Setting" screen  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 109 Packet setting Set the configuration of the send/receive packets on the "Packet Setting" screen. "Protocol Setting" screen  Packet to be set The above screen opens when "Predefined Protocol Library" is selected on the "Add Protocol" screen. When "Add New" or "User Protocol Library" has been selected, configure the packets with the [Change Type] button and [Add New] button.
  • Page 110: Module Parameter Setting Procedure

    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 111: Packet Elements

    For UDP/IP Header Maximum data length: 2046 bytes Destination Sender's Type: UDP: MAC address: MAC address: Data 2 bytes 20 bytes 8 bytes 6 bytes 6 bytes Ethernet header UDP/IP header With the predefined protocol support function, data is exchanged with the external device with the procedures (communication type) shown below.
  • Page 112 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 113 • 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 114 Non-conversion variable Use this to send the CPU module device data as part of the send packet, or to store part of the received packet in the CPU module device. Multiple non-conversion variable can be arranged in one packet. The following table lists the items. Item Description Element Name...
  • Page 115 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" screen becomes the data storage area. The occupied data storage area differs according to the "Unit of Stored Data". •...
  • Page 116 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 117: Execution Conditions Of Predefined Protocol Communications

    Execution Conditions of Predefined Protocol Communications The predefined protocol communications can be executed when 'Predefined protocol ready' (SD10692) is "1". This section describes the operation of 'Predefined protocol ready' (SD10692). When the system is powered on or reset If protocol setting data is written, the CPU module checks the protocol setting data when the system is powered on or reset. If the protocol setting data is normal, the CPU module sets 'Predefined protocol ready' (SD10692) to "1"...
  • Page 118: 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.168.3.250) (192.168.3.251) Ethernet Parameter settings Connect GX Works3 to the CPU module and set the parameters. Sending side Set the CPU module in the following.
  • Page 119 Set the "Basic Settings" in the following. Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Basic Settings] Set the external device configuration in the following. Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [External Device Configuration] ...
  • Page 120 Select "CPU(Ethernet)" for "Module Type" and click the [OK] button. Newly create the protocol setting. [File]  [New] Set a protocol in the following. [Edit]  [Add Protocol] 7 PREDEFINED PROTOCOL SUPPORT FUNCTION 7.5 Example of Predefined Protocol Communications...
  • Page 121 Set each packet in the following. "Protocol Setting" screen  Packet to be set • Request • Normal response 7 PREDEFINED PROTOCOL SUPPORT FUNCTION 7.5 Example of Predefined Protocol Communications...
  • Page 122 • Error response SLMP communication frame for the predefined protocol library is 4E frame in the element. When using 3E frame, configure the settings as below. • Enable a protocol edit. [Edit]  [Editable Protocol] • Set the element settings for 1 in "Element No." as below. "Protocol Setting"...
  • Page 123: Receiving Side

    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] Receiving side Set the CPU module and add the module labels of the CPU module.
  • Page 124 Set the external device configuration in the following. Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [External Device Configuration]  [Detailed Setting]  [Ethernet Configuration (Built-in Ethernet Port)] screen Write the set parameters to the CPU module. Then reset the CPU module or power off and on the system. [Online] ...
  • Page 125: Predefined Protocol Support Function Instruction

    Predefined Protocol Support Function Instruction Executing the registered protocols SP.ECPRTCL This instruction executes the communication protocol registered using the engineering tool via Ethernet built in the module. Ladder diagram Structured text ENO: =SP_ECPRTCL (EN, U0, s1, s2, s3, d); (s1) (s2) (s3) FBD/LD ("SP_ECPRTCL"...
  • Page 126: Control Data

    Control data Device Item Description Setting range Set by (s3) + 0 Resulting number of The number of protocols executed by the SP.ECPRTCL 0, 1 to 8 System executed protocols instruction is stored. Any protocol where an error occurred is also included in the execution number.
  • Page 127 Device Item Description Setting range Set by (s3) + 10 Collation match If receiving is included in the communication type of the 0, 1 to 16 System Receive packet number 1 protocol that has been executed first, the receive packet number successful in collation match is stored.
  • Page 128: Processing Details

    Processing details This instruction executes the protocol registered using the engineering tool. Using the connection specified by (s1), the instruction executes the protocol in accordance with the control data stored in the device specified by (s3) and later. The instruction continuously executes as many protocols as specified by (s2) (a maximum of 8 protocols) at one time. The number of executed protocols is stored in the device specified by (s3)+0.
  • Page 129 • The following figure shows the protocol cancel operations timing. If a cancel request is issued before transmission The following figure shows the operation when the protocol execution status is "1: Waiting for transmission". SP.ECPRTCL instruction Completion device (d) Completed with an error Completion status indication device (d)+1 Protocol cancellation...
  • Page 130 If a cancel request is issued upon completion of transmission The following figure shows the operation when transmission has been completed while the protocol execution status is "2: Sending". SP.ECPRTCL instruction Completion device (d) Completed with an error Completion status indication device (d)+1 Protocol cancellation (for the connection number...
  • Page 131: Operation Error

    If a cancel request is issued during receiving The following figure shows the operation when the protocol execution status is "4: Receiving". SP.ECPRTCL instruction Completion device (d) Completed with an error Completion status indication device (d)+1 Protocol cancellation (for the connection number 1: Cancellation requested 2: Cancellation completed specified by (s1))
  • Page 132: Precautions

    Precautions This section provides other precautions for the predefined protocol support function. Port number Host station port number, 1 to 1023 (0001H to 03FFH), are assigned for reserved port numbers (WELL KNOWN PORT NUMBERS) and 61440 to 65534 (F000H to FFFEH) are for other communication functions. Therefore, using 1024 to 5548, 5570 to 61439 (0400H to 15ACH, 15C2H to EFFFH) is recommended.
  • Page 133: Chapter 8 Socket Communication Function

    SOCKET COMMUNICATION FUNCTION The socket communication function allows data communication with the devices on Ethernet by TCP or UDP using various dedicated instructions. Sending data SOCSND instruction Socket communication receive area Connection No. 1 Program Connection No. 2 Connection No. 3 SOCRCV instruction External device Receiving data...
  • Page 134: Communication Using Tcp

    Communication Using TCP TCP (Transmission Control Protocol) establishes a connection to a device with a port number, and performs reliable data communication. To perform socket communication using TCP, confirm the following in advance. • IP address and port number of the target device •...
  • Page 135: Program Example

    When "Do Not Open by Program" is set The Ethernet module is constantly in the open standby state, so the connection is established when Active open is initiated by the external device. This eliminates the need for an open processing program on the Ethernet module side. When the close processing is executed with a dedicated instruction from the Ethernet module, even if "Do Not Open by Program"...
  • Page 136: Parameter Setting

    Parameter setting The following parameters are set for the sample program. [CPU module] Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [External Device Configuration]  [Detailed Setting]  [Ethernet Configuration (Built-in Ethernet Port)] screen [Ethernet module] Navigation window ...
  • Page 137 Devices used in the sample program The following table lists the device numbers used in the sample program and their applications. The devices used when the CPU module is used are shown below. Device No. Application M1000 Open instruction D100 to D109 SP.SOCOPEN instruction control data M100 SP.SOCOPEN instruction normal completion device...
  • Page 138: Sample Program

    Sample program A program example using the CPU module is shown below. <<Connection No.1 open processing (Active)>> M1000 SD10680.0 SD10681.0 MOVP D100 Set execution type/completion type to 0 Execute connection 1 open SP.SOCOPEN ″U0″ D100 M100 M100 M101 M1002 Normal completion indication M101 M1003 Error completion indication...
  • Page 139 Program example for Passive open The following shows the communication flow of a Passive open. Start Waiting for a TCP connection in Passive open state Send and Receive? Send by SOCSND instruction or receive by SOCRCV instruction Parameter setting The following parameters are set for the sample program. [CPU module] Navigation window ...
  • Page 140 • Drag and drop the "Unpassive Connection Module" or "Fullpassive Connection Module" from "Module List" to the left side on the screen. Execute the settings as mentioned below. Item Description Port No. 4096 (Setting range: 1 to 5548, 5570 to 65534) Do not specify 5549 to 5569 because these ports are used by the system.
  • Page 141 Precautions for Passive open communication • Configure an interlock circuit using the Open completion signal (SD10680.n, Un\G152.bn, Un\G153.bn) and Open request signal (SD10681.n, Un\G154.bn, Un\G155.bn) in the program. The following chart shows on/off timings of the Open completion signal and Open request signal. TCP disconnection completed by the communication target Open completion signal...
  • Page 142: Communication Using Udp

    Communication Using UDP UDP (User Datagram Protocol) is a simple protocol that does not perform data sequencing and retransmission. To perform socket communication using UDP, confirm the following in advance. • IP address and port number of the target device •...
  • Page 143: Program Example

    Program example This section provides a program example for communication using UDP. Parameter setting [CPU module] Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [External Device Configuration]  [Detailed Setting]  [Ethernet Configuration (Built-in Ethernet Port)] screen [Ethernet module] Navigation window ...
  • Page 144 Devices used in the sample program The following table lists the device numbers used in the sample program and their applications. The devices used when the CPU module is used are shown below. Device No. Application M3000 Send instruction D3000 and D3001 SP.SOCSND instruction control data M300 SP.SOCSND instruction normal completion device...
  • Page 145: Sending And Receiving Data

    Precautions Use of UDP Data may be lost, or may arrive out of order. Consider using TCP if any problem is expected. Sending and receiving data Data sending process may complete normally even if the communication line between the CPU module and target device is not connected due to a reason such as cable disconnection.
  • Page 146: Socket Communication Function Instructions

    Socket Communication Function Instructions The socket communication function instructions are provided for the Ethernet-equipped module to use the socket communication function. This section explains the socket communication function instructions. The following is a list of the instructions. CPU module dedicated instruction Instruction Description Reference...
  • Page 147: Opening A Connection

    Opening a connection SP.SOCOPEN Establishes a connection. (CPU module dedicated instruction) Ladder diagram Structured text ENO: =SP_SOCOPEN(EN, U0, s1, s2, d); (s1) (s2) FBD/LD ("SP_SOCOPEN" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) ...
  • Page 148: Control Data

    Control data Device Item Description Setting range Set by (s2) + 0 Execution/completion Specify which settings are used to open a connection, 0000H User type parameter settings configured by an engineering tool or 8000H control data settings (s2) +2 to (s2) +6. 0000H: Connection is opened according to the settings set in "External Device Configuration"...
  • Page 149: Processing Details

    Processing details This instruction opens a connection specified in (s1). The set values used for the open processing is selected in (s2)+0. The result of the SP.SOCOPEN instruction can be checked with the completion device, (d)+0 and (d)+1. • Completion device (d)+0: Turns on in the END processing of the scan after completion of the SP.SOCOPEN instruction, and turns off in the next END processing.
  • Page 150 Program example Opening a connection using parameter settings When M1000 is turned on, connection No.1 is opened using the parameters set in "External Device Configuration" of module parameter. • Devices used Device No. Application SD10680 Open completion signal SD10681 Open request signal D100 SP.SOCOPEN instruction control data M100...
  • Page 151 GP.OPEN Establishes a connection. (Ethernet module dedicated instruction) Ladder diagram Structured text ENO: =GP_OPEN (EN, U, s1, s2, d); (s1) (s2) FBD/LD ("GP_OPEN" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) FX5UJ CPU module Position number of the module connected 16-bit unsigned binary...
  • Page 152 Control data Device Item Description Setting range Set by (s2) + 0 Execution/completion Specify which settings are used to open a connection, 0000H User type parameter settings configured by an engineering tool or 8000H control data settings (s2) +2 to (s2) +6. 0000H: Connection is opened according to the settings set in "External Device Configuration"...
  • Page 153 Processing details This instruction opens a connection specified in (s1). The set values used for the open processing is selected in (s2)+0. The result of the GP.OPEN instruction can be checked with the completion device, (d)+0 and (d)+1. • Completion device (d)+0: Turns on in the END processing of the scan after completion of the GP.OPEN instruction, and turns off in the next END processing.
  • Page 154 Program example Opening a connection using parameter settings When M100 is turned on, connection No.1 is opened using the parameters set in "External Device Configuration" of module parameter. • Devices used Device No. Application Un\G152, Un\G153 Open completion signal Un\G154, Un\G155 Open request signal Un\G158.b0 Initial normal completion status...
  • Page 155 Opening a connection using control data settings When M120 is turned on, connection No.1 is opened using control data. • Devices used Device No. Application Un\G152, Un\G153 Open completion signal Un\G154, Un\G155 Open request signal Un\G158.b0 Initial normal completion status D100, D102 to D106 GP.OPEN instruction control data M102...
  • Page 156: Disconnecting A Connection

    Disconnecting a connection SP.SOCCLOSE Closes a connection. (CPU module dedicated instruction) Ladder diagram Structured text ENO: =SP_SOCCLOSE (EN, U0, s1, s2, d); (s1) (s2) FBD/LD ("SP_SOCCLOSE" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) ...
  • Page 157 Processing details This instruction closes a connection specified in (s1). (Disconnecting a connection) The result of the SP.SOCCLOSE instruction can be checked with the completion device, (d)+0 and (d)+1. • Completion device (d)+0: Turns on in the END processing of a scan after completion of the SP.SOCCLOSE instruction, and turns off in the next END processing.
  • Page 158 Program example When M2000 is turned on, or when connection No.1 is disconnected from target device, this program disconnects connection No.1. • Devices used Device No. Application SD10680 Open completion signal SD10681 Open request signal D200 SP.SOCCLOSE instruction control data M161 Connection No.1 cutting flag M200...
  • Page 159 GP.CLOSE Closes a connection. (Ethernet module dedicated instruction) Ladder diagram Structured text ENO: =GP_CLOSE (EN, U, s1, s2, d); (s1) (s2) FBD/LD ("GP_CLOSE" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) FX5UJ CPU module Position number of the module connected 16-bit unsigned binary...
  • Page 160 Processing details This instruction closes a connection specified in (s1). (Disconnecting a connection) The result of the GP.CLOSE instruction can be checked with the completion device, (d)+0 and (d)+1. • Completion device (d)+0: Turns on in the END processing of a scan after completion of the GP.CLOSE instruction, and turns off in the next END processing.
  • Page 161 Program example When M400 is turned on, or when connection No.1 is disconnected from target device, this program disconnects connection No.1. • Devices used Device No. Application Un\G152, Un\G153 Open completion signal Un\G154, Un\G155 Open request signal D150 GP.CLOSE instruction control data M200 GP.CLOSE instruction completion device M201...
  • Page 162: Reading Received Data In The End Processing

    Reading received data in the END processing SP.SOCRCV Reads the data received. (Read at END processing) (CPU module dedicated instruction) Ladder diagram Structured text ENO: =SP_SOCRCV (EN, U0, s1, s2, d1, d2); (s1) (s2) (d1) (d2) FBD/LD ("SP_SOCRCV" goes into .) Setting data Descriptions, ranges, and data types Operand...
  • Page 163 Control data Device Item Description Setting range Set by    (s2) + 0 System area (s2) + 1 Completion status Completion status is stored  System 0000H: Completed Other than 0000H: Failed (error code) For the error codes, refer to  Page 822 ERROR CODES. (d1) + 0 Received data length The length of the data which was read from the Socket...
  • Page 164 The following figure shows the timing of reception processing with the SP.SOCRCV instruction. Open Data reading Send processing processing data Open completion signal (SD10680.n) END processing END processing END processing END processing Sequence program Receive state signal (SD10682.n) Execute SP.SOCRCV instruction SP.SOCRCV instruction 1 scan Completion device (d2)+0...
  • Page 165 Program example When M5000 is turned on, data received from the connected device is read. • Devices used Device No. Application SD10680 Open completion signal SD10682 Receive state signal D5000 SP.SOCRCV instruction control data D500 or later Received data length and received data storage location M450 SP.SOCRCV instruction normal completion device M451...
  • Page 166: Reading Received Data In The Processing

    Reading received data in the processing GP.SOCRCV Reads the data received. (Ethernet module dedicated instruction) Ladder diagram Structured text ENO: =GP_SOCRCV (EN, U, s1, s2, d1, d2); (s1) (s2) (d1) (d2) FBD/LD ("GP_SOCRCV" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range...
  • Page 167 Control data Device Item Description Setting range Set by    (s2) + 0 System area (s2) + 1 Completion status Completion status is stored  System 0000H: Completed Other than 0000H: Failed (error code) For the error codes, refer to  Page 822 ERROR CODES. (d1) + 0 Received data length The length of the data which was read from the Socket...
  • Page 168 Program example Data received from the connected device is read. • Devices used Device No. Application Un\G152, Un\G153 Open completion signal Un\G156, Un\G157 Socket communications receive status signal D400 GP.SOCRCV instruction control data D500 or later Received data length and received data storage location M460 GP.SOCRCV instruction completion device M461...
  • Page 169: Sending Data

    Sending data SP.SOCSND Sends data. (CPU module dedicated instruction) Ladder diagram Structured text ENO: =SP_SOCSND (EN, U0, s1, s2, s3, d); (s1) (s2) (s3) FBD/LD ("SP_SOCSND" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) ...
  • Page 170 Control data Device Item Description Setting range Set by (s2) + 0 System area    (s2) + 1 Completion status Completion status is stored.  System 0000H: Completed Other than 0000H: Failed (error code) For the error codes, refer to  Page 822 ERROR CODES. (s3) + 0 Send data length The length of send data is specified.
  • Page 171 The following figure shows the timing of send processing with the SP.SOCSND instruction. <Sending control method> Open Send processing data Open completion signal (SD10680.n) END processing END processing END processing Sequence program Execute SP.SOCSND instruction SP.SOCSND instruction 1 scan Completion device (d)+0 When failed Completion device (d)+1 Data send...
  • Page 172 • Program M3000 SD10680.0 Set length of the data to be sent D300 K1234 D301 K5678 D302 Set the data to be sent K8901 D303 SP.SOCSND ″U0″ D3000 D300 M300 Send data to connection No.1 M300 M301 M302 Normal completion indication M301 Error completion indication M303...
  • Page 173: Specification

    GP.SOCSND Sends data. (Ethernet module dedicated instruction) Ladder diagram Structured text ENO: =GP_SOCSND (EN, U, s1, s2, s3, d); (s1) (s2) (s3) FBD/LD ("GP_SOCSND" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) Position number of the module connected FX5UJ CPU module 16-bit unsigned binary...
  • Page 174 Control data Device Item Description Setting range Set by (s2) + 0 System area    (s2) + 1 Completion status Completion status is stored.  System 0000H: Completed Other than 0000H: Failed (error code) For the error codes, refer to  Page 822 ERROR CODES. (s3) + 0 Send data length The length of send data is specified.
  • Page 175 Program example When M300 is turned on, data (3412H, 7856H, BC9AH) are sent to the target device using the socket communication function. • Devices used Device No. Application Un\G152, Un\G153 Open completion signal D200 GP.SOCSND instruction control data D300 to D303 Send data length and send data storage location M300 GP.SOCSND instruction drive flag...
  • Page 176: Reading Connection Information

    Reading connection information SP.SOCCINF Reads connection information. (CPU module dedicated instruction) Ladder diagram Structured text ENO: =SP_SOCCINF (EN, U0, s1, s2, d); (s1) (s2) FBD/LD ("SP_SOCCINF" goes into .) Setting data Descriptions, ranges, and data types Operand Description Range Data type Data type (label) ...
  • Page 177 Control data Device Item Description Setting range Set by    (s2) + 0 System area (s2) + 1 Completion status Completion status is stored  System 0000H: Completed Other than 0000H: Failed (error code) For the error codes, refer to  Page 822 ERROR CODES. (d) + 0 Target device IP address IP address of the target device is stored.
  • Page 178: Reading Socket Communication Receive Data

    Reading socket communication receive data S(P).SOCRDATA Reads data from the socket communication receive data area. (CPU module dedicated instruction) Ladder diagram Structured text ENO: =S_SOCRDATA (EN, U0, s1, s2, n, d); ENO: =SP_SOCRDATA (EN, U0, s1, s2, n, d); (s1) (s2) FBD/LD ("S_SOCRDATA", "SP_SOCRDATA"...
  • Page 179 Processing details This instruction reads the data of the amount specified for n from the socket communication receive data area of connection that is specified in (s1), and stores them in the device specified in (d) or higher. No processing is performed when the number of read data (n) is 0.
  • Page 180: Precautions

    Precautions This section provides other precautions for the socket communication function. Port number Host station port number, 1 to 1023 (0001H to 03FFH), are assigned for reserved port numbers (WELL KNOWN PORT NUMBERS) and 61440 to 65534 (F000H to FFFEH) are for other communication functions. Therefore, using 1024 to 5548, 5570 to 61439 (0400H to 15ACH, 15C2H to EFFFH) is recommended.
  • Page 181 Checking receive data length Since no delimiter is provided for TCP communication data, separate data blocks that are sent continuously may be combined, or data sent all at once may be segmented, on the receiving end. The receive data length must be confirmed on the receiving end as necessary.
  • Page 182: Chapter 9 File Transfer Function (Ftp Server)

    FILE TRANSFER FUNCTION (FTP SERVER) The server function of FTP (File Transfer Protocol) used to transfer files to an external device is supported. An external device equipped with the FTP client functions can handle the files (data logging file, etc.) in the SD memory card installed on a CPU module as follows.
  • Page 183: Password Setting

    Item Description Setting range Page 181 Password Advanced Password Setting Set the password to be used for file transfer request (login) from the external Setting device. Setting Page 181 FTP timer FTP timer Settings Set the command input monitoring timer and the response monitoring timer used for the file transfer function (FTP server).
  • Page 184 Operations on external device (FTP client) side This section describes the procedures and required processes on the external device side for using the CPU module's file transfer function (FTP server). The FTP commands and input format used for the operation are shown in the explanation. (""...
  • Page 185 Logging into CPU module This section describes the steps from starting FTP and logging into the CPU module.   Start FTP from the Microsoft Windows command prompt.  FTP start (ftp )  Connect with FTP server (open CPU module IP address ) ...
  • Page 186: Files That Can Be Transferred With Ftp

    Files That Can Be Transferred with FTP The file transfer function (FTP server) enables transfer of files in the SD memory card installed on a CPU module. For the files that can be transferred (read, write, deleted) with the file transfer function (FTP server), refer to the file operation available which is described in the following manual.
  • Page 187 Subcommands usable with quote command This section describes the CPU 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 188 Details of FTP command This section describes the FTP commands on the FTP client side supported by the CPU 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 189 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 SD memory card into 20160101.LOG file mdir 2:\20160101.LOG...
  • Page 190 Command name Description quit Function Closes the connection with the FTP and quits the FTP. Specification format quit Similar command password-lock Function Locks the remote password function set for the CPU module. This command is executed when the FTP communication port is specified as a remote password check target port.
  • Page 191 Command name Description passwd-wr Function Sets the write password (file password) registered for the file transfer target file to the CPU 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 192: Precautions

    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 193: Deleting Files

    Deleting files • Decide the timing for deleting the files for the entire system including the CPU module and engineering tool. • Files with read-only attributes and files that are locked by a function other than FTP cannot be deleted. An error will occur if attempted.
  • Page 194: Chapter 10 File Transfer Function (Ftp Client)

    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 (transmission/get) in the SD memory card installed on a CPU module is possible.
  • Page 195: Procedure For Executing The File Transfer Function (Ftp Client)

    Path specification example When a logging file is specified 2:\LOGGING\LOG01\00000001\20200110_00000001.BIN When a memory dump file is specified 2:\DEBUG\MEMDUMP\MEMDUMP_00.DPD When an FTP server file is specified \DATABASE\DATA01.CSV "\"or "/" can be used as a delimiter between folder path and file. However, "\" cannot be used as a delimiter for some FTP servers.
  • Page 196: Setting In The Cpu Module (Ftp Client)

    Setting in the CPU module (FTP client) The file transfer function (FTP client) of the CPU module is as follows. Set the IP address of the CPU module to be used as an FTP client. ( Page 39 Setting module parameters) Set the file transfer function (the FTP client).
  • Page 197: Program Example

    10.3 Program Example Program examples to transfer logging files are shown below. For details on data logging function, refer to  MELSEC iQ-F FX5 User's Manual (Application). Program example to specify wild cards Following is a program example to log 30 word device points and 10 bit device points in the CSV format every 500 ms, and use the FTP client function to transfer logging files to the FTP server every hour.
  • Page 198: Logging Settings

    Logging settings Logging files to be transferred to the FTP server are those files created in accordance with the following logging settings. If any item is not described here, set it optionally. Item Setting value Logging type Logging type Continuous logging File format CSV file Sampling...
  • Page 199 Program Set application to the control data. b2: Transfer completion file delete: 1 = Delete b3: Temporary file create: 0 = Create SM402 To set "Delete transferred files" D0.2 To set "Crate temporary files" D0.3 When the SD memory card of the CPU module is available at the timing of logging file switchover completion of the logging setting No. 1 (at fall of SM1218), all files in "2:\LOGGING\LOG01\00000001\"...
  • Page 200: Program Example To Transfer Files One By One

    Program example to transfer files one by one Following is a program example to log 30 word device points and 10 bit device points in the binary format every 500 ms, and use the FTP client function to transfer files one by one to the FTP server every time 1200 records are logged. This program sequentially transfers the logging files (SP.FTPPUT (S2) operand) in the transfer logging files designated folder one by one.
  • Page 201 Logging settings Logging files to be transferred to the FTP server are those files created in accordance with the following logging settings. If any item is not described here, set it optionally. Item Setting value Logging type Logging type Continuous logging File format Binary file Sampling...
  • Page 202 Program [Control data initialization] Set application to the control data. b2: Transfer completion file delete: 0 = Do not delete b3: Temporary file create: 0 = Create SM402 To set "Do not delete transferred files" D0.2 To set "Create temporary files" D0.3 [Create transfer file name] Create the file name (ASCII code) to D2010.
  • Page 203: Example Of Program For Obtaining Files From Ftp Server

    Example of program for obtaining files from FTP server Below is shown an example of a program for storing the CSV data obtained from the FTP server in D1000 to D1999 of the CPU module by using the SP.FREAD instruction (file operation instruction). For the details of the file operation instruction, refer to ...
  • Page 204 Program example Devices used Device No. Application SM402 After RUN, ON for one scan only SM600 Memory card usable Devices used for SP.FTPGET instruction M300 SP.FTPGET instruction execution command D200 Application setting area (SP.FTPGET instruction control data) • D200.2: Select "0: Do not delete" for the transferred file deletion setting. •...
  • Page 205 Program "DATA1.CSV" file is obtained from "DATABASE" in the FTP server and uncompressed into D1000 and following. Set the application for the control data. SP.FTPGET instruction b2: Delete transfer complete file: 0 = Do not delete b3: Create temporary file: 0 = Create SP.FREAD +0: Execution type: 0100H = Read CSV format conversion, decimal (16-bit data) +2: Number of read-target data: K1000 = 1000 words...
  • Page 206: Precautions

    10.4 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 207: Chapter 11 Time Setting Function (Sntp Client)

    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 information server Time query Setting server time in the CPU module CPU module Ethernet Engineering tool...
  • Page 208: Setting Procedure

    Setting procedure The following shows time setting function (SNTP client). Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Application Settings]  [Time Setting] Item Description Setting range Time Setting (SNTP Client) Select whether to use the time setting function (SNTP client). •...
  • Page 209: Communication Timeout

    Confirming the execution results The time setting execution results can be checked with the following special device. For details, refer to  Page 866 List of Special Device Applications and Assignments. • Time setting function operation result (SD10290) • Time setting function execution time (SD10291 to SD10297) •...
  • Page 210: Chapter 12 Web Server Function

    WEB SERVER FUNCTION For details on Web server function, refer to  MELSEC iQ-R/MELSEC iQ-F Web Server Function Guide Book. This manual describes the JavaScript objects and CGI objects that can be used in the user Web page (User-customized Web page).
  • Page 211 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 212 Refreshing cycle Set the refreshing cycle of the user Web page to the variable "updateInterval" in HTML. This refreshing cycle applies to all objects in the user Web page. When the variable "updateInterval" is not described in HTML or it is out of range between 1 and 120, 5-second interval (default) applies to the operation.
  • Page 213: Data Block (Wsdatblk)

    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 a fixed interval. direction = 0 (Vertical) Window dev[0] devNamCol dev[5] devValCol yPos xPos devValHeight...
  • Page 214 Parameter Set dev[n] according to the number of devices to be displayed. (n: 0 to 31) : Required, : Optional Element name Item Description Requirement  dev[0].dsp Device display name 1 A name to be displayed with the data block ...
  • Page 215: Level Display (Wslevel)

    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. A different display color can be assigned in each case when the current value is above the upper limit value and when the current value is below the lower limit value.
  • Page 216 Parameter : Required, : Optional Element name Item Description Requirement  devName Device name Device type + device number  direction Level direction 0: Vertical 1: Horizontal (If omitted, it is 0) upperVal Upper limit value A numeric value (decimal) within the range of the specified data ...
  • Page 217 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 218 Parameter Set range[n] according to the number of display color ranges to be distinguished by the different colors. (n: 0 to 4) : Required, : Optional Element name Item Description Requirement  devName Device name Device type + device number ...
  • Page 219: Image Display (Wspicture)

    Image display (WSPicture) When the device value is within the specified range, the specified image file is 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 Parameter Set range[n] according to the number of ranges of images to be displayed.
  • Page 220: Historical Graph Display (Wshstgrp)

    Precautions • Write all the necessary parameters. If the necessary parameters are not written or the setting value is out of range, an error occurs. • The total size of the image file on one screen should be 100K bytes or smaller. •...
  • Page 221 Parameter Set grElm[n] according to the number of devices to be displayed. (n: 0 to 31) : Required, : Optional Element name Item Description Requirement  grElmNum Number of graph elements 1 to 32  devFormat The data format of the device 0: 16-bit signed 1: 16-bit unsigned 2: 32-bit signed...
  • Page 222: Write Button (Wswrtbtn)

    Write button (WSWrtBtn) This object writes the specified value to the specified device. Window wrBtn yPos btnWidth xPos btnHeight btnTxt Parameter : Required, : Optional Element name Item Description Requirement  devName Device name Device type + device number devBase Positional notation of device K: Decimal ...
  • Page 223: Logout Button (Wslogoutbtn)

    Logout button (WSLogoutBtn) This object places the button to log out. When the logout button is clicked, the user login page (Log-in_User.html) is displayed. Window logOutBtn yPos btnWidth xPos btnHeight btnTxt Parameter : Required, : Optional Element name Item Description Requirement logOutBtn Logout button...
  • Page 224: Cgi Object

    12.2 CGI Object By using the CGI object, a simple user Web page with small file size 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 for read/write data from/to devices can be used. File name Item Description...
  • Page 225: Device Size

    Device size Applicable device size differs depending on the device. For the notation of the device number, specify octal, decimal or hexadecimal depending on the device. : Applicable in both device read CGI and device write CGI, : Not applicable Device Notation Device size...
  • Page 226: Device Read Cgi

    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 227 Response specifications The following table lists the parameters used for the response. Parameter Data type Description name string Execution result (hexadecimal string) 0000: Normal completion 0001: Not login 0005: Incorrect request source (Referer) 4005: Exceeded the number of points 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 due to the specified module not existing...
  • Page 228: Application Example

    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) HTML example <!DOCTYPE html>...
  • Page 229 // Request to the CGI xhr = new XMLHttpRequest(); xhr.open('POST', "/cgi/RdDevRnd.cgi", true); xhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded'); var FUNC = function() { ReadDeviceRandomTbl_Response(xhr, devtblid); }; // Response analysis function setting xhr.onreadystatechange = FUNC; xhr.send(param); // 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 ) {...
  • Page 230 <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 231: Device Write Cgi

    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 232 Response specifications The following table lists the parameters used for the response. Parameter Data type Description name string Execution result (hexadecimal string) 0000: Normal completion 0001: Not login 0002: No permission (A user without device write permission executed the CGI.) 0005: Incorrect request source (Referer) 4005: Exceeded the number of points 4030: Incorrect device type...
  • Page 233 HTML 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> <!-- Write the JavaScript of the user here --> <script>...
  • Page 234 // 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 235: Error Message

    12.3 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 236: Chapter 13 Security Function

    SECURITY FUNCTION 13.1 IP Filter Function Identifies the IP address of the access source, and prevents access from an illegal IP address. The IP address of the external device to be allowed or denied is set in the parameters, and access from external devices is restricted.
  • Page 237: Setting Method

    Setting method Set the IP address to be allowed or denied in "IP Filter Settings" of "Security" under "Application Settings". ( Page 236 IP filter settings) Write the module parameters to the CPU module. The IP filter function is enabled when the CPU module power is turned off and on or reset. Even if the connection is established as set with the Ethernet-equipped module's "External Device Configuration"...
  • Page 238: Ip Filter Settings

    [Ethernet module] Navigation window  [Parameter]  [Module Information]  [FX5-ENET] or [FX5-ENET/IP]  [Application Settings]  [Security] Item Description Setting range IP Filter Settings IP Filter Set whether to enable the IP filter function. • Disable • Enable (Default: Disable) IP Filter Settings Set the IP address to be allowed or denied.
  • Page 239: Remote Password

    However, this function cannot completely prevent unauthorized access. Other measures should be taken at users' discretion if security of the programmable controller system against unauthorized access from external devices needs to be maintained. Mitsubishi Electric cannot be held responsible for any problems caused by unauthorized access.
  • Page 240: Remote Password Setting

    Remote password setting Setting a remote password Set a remote password and a target connection in the engineering tool, and write the data to the CPU module. Navigation Window  [Parameter]  [Remote Password]  [Remote Password Setting] screen Item Description Setting range Password...
  • Page 241: Writing To The Cpu Module

    • Remote password detail setting screen Item Description Setting range Built-in User Connection Connection No.1 to 8 Select whether the remote password is to be enabled for the Check/Do not check Ethernet No. Valid Setting built-in Ethernet port. checkbox for the target (Setting of an unused connection or MELSOFT connection is connection ignored.)
  • Page 242: Precautions

    Unlocking or locking the remote password The remote password is unlocked or locked from an external device such as a personal computer, as described below. When using MELSOFT connection Enter a remote password in the following screen that appears during communication. When the remote password is entered, the engineering tool performs unlock processing and then accesses the CPU module.
  • Page 243: Detection Of Unauthorized Access And Actions

    Detection of unauthorized access and actions When the password mismatch count reaches a fixed count (upper limit) in the unlock process of remote password, access is locked out. If this occurs, unauthorized access from outside the system can be considered as a cause of the error. Take the following actions as needed.
  • Page 244: Chapter 14 Ip Address Change Function

    IP ADDRESS CHANGE FUNCTION 14.1 Overview of the IP Address Change Function This function is provided to change the IP address of the Ethernet-equipped module by setting the desired IP address to special registers from a peripheral unit or another unit and turning ON a special relay. This function changes the IP address of the Ethernet-equipped module even if no settings are made in GX Works3 programmable controller parameters.
  • Page 245: Ip Address To Be Set For The Ethernet-Equipped Module

    • For details on special relay areas and special register areas to use IP address change function of CPU module, refer to  Page 866 List of Special Device Applications and Assignments. • For details on the corresponding buffer memory for using the IP address change function of the Ethernet module, refer to ...
  • Page 246: Write Operation To Ip Address Storage Area

    14.3 Write Operation to IP Address Storage Area Set the IP address and other data to be set to each device, and turn the IP address storage area write request (SM8492, Un\G56) from off to on or 0 to 1 to write the data to the IP address storage area. Set the IP address, etc.
  • Page 247 Case of the Ethernet module Store the value to be changed in Un\G50 to Un\G55 (IP address setting or other). Store 1 in the IP address storage area write request (Un\G56). Check the write results with the following buffer memory areas. Device No.
  • Page 248: Clear Operation To Ip Address Storage Area

    14.4 Clear Operation to IP Address Storage Area When the IP address storage area clear request (SM8495, Un\G58) turns from off to on or 0 to 1, IP address storage area can be cleared. (IP address change function can be disabled.) IP address storage area clear procedure IP address storage area clear procedure is described.
  • Page 249: Precautions

    14.5 Precautions The following section lists the precautions for using the IP address change function. Power off and reset operation Do not power off or reset the CPU module while data is being written to the IP address storage area or is being cleared in the area.
  • Page 250 MEMO 14 IP ADDRESS CHANGE FUNCTION 14.5 Precautions...
  • Page 251: Part 2 Serial Communication

    PART 2 SERIAL COMMUNICATION This part consists of the following chapters. 15 LIST OF FUNCTIONS 16 N:N NETWORK 17 PARALLEL LINK FUNCTION 18 MC PROTOCOL 19 INVERTER COMMUNICATION 20 NON-PROTOCOL COMMUNICATION 21 PREDEFINED PROTOCOL SUPPORT FUNCTION...
  • Page 252: Chapter 15 List Of Functions

    LIST OF FUNCTIONS The table below shows the serial communication types supported by the FX5. : Supported, : Not supported Communication Function outline Supported function Reference functions section FX5S CPU FX5UJ CPU FX5U/FX5UC module module CPU module    N:N Network Up to eight programmable controllers are connected, and Page 252...
  • Page 253 MEMO 15 LIST OF FUNCTIONS...
  • Page 254: Chapter 16 N:n Network

    N:N NETWORK This chapter explains the N:N Network. 16.1 Outline of System N:N Network allows connection of up to eight FX5 programmable controllers or FX3 programmable controllers via mutually linked devices through communication in accordance with RS-485. • One of three patterns can be selected according to the number of devices to be linked. •...
  • Page 255: Procedures Before Operation

    16.2 Procedures Before Operation The flow chart below shows the N:N Network setting procedures up until data link: Check communication specifications For communication specifications, link specifications, link pattern and number of link points, and link time, refer to Page 256 Specifications. System configuration and selection For system configuration and selection of communication devices, refer to Page 253 System Configuration.
  • Page 256 Precautions Total number of communication boards and communication adapters that can be connected is two. FX5UJ CPU module The N:N Network function can be used in the FX5UJ CPU module by using the communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below.
  • Page 257 FX5U CPU module The N:N Network function can be used in the FX5U CPU module by using the built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port CH2: Communication board Item...
  • Page 258: Specifications

    16.4 Specifications This section describes the communication specifications and performance of the N:N Network function. For the specifications of FX3 programmable controller, refer to FX Series User's Manual - Data Communication Edition. Communication specifications The N:N Network function is executed according to the communication specifications (fixed) shown in the table below. Specification items such as baud rate cannot be changed.
  • Page 259: Link Specifications

    Link specifications Link pattern and number of link points Settings of the link pattern are performed with GX Works3 Serial Communication setting. ( Page 265 Communication Setting) The number of occupied points of the link device differ depending on the number of link patterns and local stations to be used. The devices to be occupied are assigned according to the start number of the link device.
  • Page 260 Refresh range: pattern 1, link device start number: all station D1000/M4000 Master station: FX5 programmable controller, local station: FX5 programmable controller  3 Station number Master station Local stations Station No.0 Station No.1 Station No.2 Station No.3 (FX5 programmable (FX5 programmable (FX5 programmable (FX5 programmable controller)
  • Page 261 Refresh range: pattern 2, link device start number: station No.1 (D200/M2000), station No.2 (D500/M3000) Master station: FX3 programmable controller, local station: FX3 programmable controller  1/FX5 programmable controller  2 Station number Master station Local stations Station No.0 Station No.1 Station No.2 Station No.3 (FX3 programmable...
  • Page 262: Wiring

    16.5 Wiring This section explains about the wiring. For the wiring of FX3 programmable controller, refer to FX Series User's Manual - Data Communication Edition. Wiring procedure Prepare for wiring. Prepare cables required for wiring. ( Page 260 Cable) Turn OFF the programmable controller power. Before wiring, make sure that the programmable controller power is OFF.
  • Page 263 Connecting cables The table below shows applicable cables and tightening torques. Item Number of wires Wire size Tightening torque connected per Solid wire, Stranded wire Wire ferrule with terminal insulation sleeve FX5U CPU module built-in RS-485 port One wire 0.2 to 0.5 (24 to 20 AWG) 0.2 to 0.5...
  • Page 264: Termination Resistor Setting

    Termination resistor setting Make sure to provide a termination resistor at both ends of the wire. The built-in RS-485 port, FX5-485-BD and FX5-485ADP have a built-in termination resistor. Set the termination resistor selector switch to 110. FX5U CPU module built-in RS-485 port FX5UC CPU module built-in RS-485 port Termination resistor selector...
  • Page 265: Connection Diagram

    Connection diagram Use one-pair wiring for an N:N Network. Built-in RS-485 port Built-in RS-485 port Built-in RS-485 port FX5-485-BD FX5-485-BD FX5-485-BD FX5-485ADP FX5-485ADP FX5-485ADP (TXD+) (TXD+) (TXD+) Terminal Terminal (TXD-) (TXD-) (TXD-) resistor resistor 110Ω 110Ω (RXD+) (RXD+) (RXD+) (RXD-) (RXD-) (RXD-) Ground resistance of 100Ω...
  • Page 266: Grounding

    Grounding Grounding should be performed as stated below. • Provide a ground resistance of 100 or less. • Independent grounding should be performed for best results. If the programmable controller cannot be grounded independently, perform the "Shared grounding" shown below. For details, refer to User's Manual (Hardware) of the CPU module used.
  • Page 267: Communication Setting

    16.6 Communication Setting For the FX5 communication settings of this function, parameters are set using GX Works3. For details on GX Works3, refer to GX Works3 Operating Manual. Setting of parameter differs according to the module used. The procedure for each module is as follows. For the communication settings of FX3 programmable controller, refer to FX Series User's Manual - Data Communication Edition.
  • Page 268 Communication board (CH2) Navigation Window  Parameter  Model name  Module Parameter  Extended Board Window The following screen will be displayed if [FX5-485-BD] is set for the extended board and [N:N Network] is set for the communication protocol type. Other settings are the same as for the built-in RS-485 port (CH1). Basic Settings Communication adapter (CH3/CH4) When an expansion adapter is used, add the expansion adapter to Module Information.
  • Page 269: Programming

    Setting is not required (fixed value) for the board below. Item Descriptions Data length 7 bits Parity Even Stop bit 1 bit Start bit 1 bit Baud rate 38400 bps Header Not added Terminator Not added Control mode None Sum check code Not added Control procedure Form 1 (CR and LF are not added)
  • Page 270: Contents Of Related Devices

    Contents of related devices The device used in the program are shown below. ( Page 276 Related Devices) Devices for determining errors in the N:N Network These devices are used for determining errors in the N:N Network. Use these devices to output the link errors or use them in interlock sequence programs.
  • Page 271: Communication Test

    Precautions When creating a program, do not change the information in devices used by other stations. If such information is changed, the other stations will not operate normally. Communication test It is recommended to wire the master station and local station, perform communication settings, and then execute the communication test using the following procedure to confirm proper operation.
  • Page 272 Test program for communication (local station) Determine the station number of each local station, and then transfer a program corresponding to the station number to each local station. Assign station numbers from "1" in the ascending order. (Use one station number only once. Do not skip station numbers.) RUN monitor SM400 Steps for reading information from a local station...
  • Page 273: Creating Programs For The Master Station

    Creating programs for the master station Create programs for the master station. Arbitrarily create programs for reading and writing link devices. Program for indicating link errors This program is required to indicate the N:N Network status. Create this step for each connected local Data transfer sequence error in station.
  • Page 274 Program for reading link devices (local station → master station) This program is required to read information from Data transfer each local station to the master station. Monitor link sequence error in errors in each local station, and read them. local station No.
  • Page 275: Creating Programs For The Local Stations

    Creating programs for the local stations Create programs for the local stations. Arbitrarily create programs for reading and writing link devices. The following program is for the local station of station number 1. Program for station number 2 and later are similar. Program for indicating link errors This program is required to indicate the N:N Network Data transfer...
  • Page 276 Program for reading link devices (local station ← master or local station) This program is required to read information from the master station or another local station to a local station. Data transfer Monitor link errors in each local station, and read sequence error in local station No.
  • Page 277: Cautions On Program Creation

    Cautions on program creation • When N:N Network is used, the operation cycle in each programmable controller becomes longer by about 10% per station. • Set station numbers consecutively. If a station number that is used twice or more or is skipped, link will not be achieved normally.
  • Page 278: Related Devices

    16.8 Related Devices This section describes the special relay/special register functions used in the N:N Network function. Available communication channels vary depending on the CPU module and system configuration. For communication channels, refer to Page 253 System Configuration. "FX3 Series compatible" devices operate only on the communication channel specified in the compatible SM/ SD for communication settings.
  • Page 279 Device Name Descriptions Detection Available station Master Local station stations (Station No.0)   SM9081 Local station quantity setting Turns ON when SD latch setting is set for the number of M, L SD latch setting valid local stations setting. information FX3 Series compatible R: Read only, M: Master station (station number 0), L: Local station (station number 1 to 7)
  • Page 280 Special register FX5 only R: Read only, M: Master station (station number 0), L: Local station (station number 1 to 7) Device Name Descriptions Detection Available station Master Local station stations (Station No.0)   (Station 1 SD9040 Station number settings Provided to check the station number.
  • Page 281 Device Name Descriptions Detection Available station Master Local station stations (Station No.0)   SD9046 Number of communication Number of data transfer sequence errors occurred in other M, L error at local station 1 local station. (Except However, data sequence errors that occurred in the host station 1) station (local station) cannot be detected.
  • Page 282 FX3 Series compatible R: Read only, M: Master station (station number 0), L: Local station (station number 1 to 7) Device Name Descriptions Detection Available station Master Local station stations (Station No.0)   (Station 1 SD8173 Station number settings Provided to check the station number.
  • Page 283 Device Name Descriptions Detection Available station Master Local station stations (Station No.0)   SD8212 Data transmission error code Stores the data transfer error code occurred in other local M, L (local station 1) station. (Except However, data sequence errors that occurred in the host station 1) station (local station) cannot be detected.
  • Page 284: Details Of Related Devices

    Details of related devices Serial communication error Turns ON when an error occurs in serial communication. R: Read only FX5 only FX3 Series Descriptions compatible SM8500 SM8510 SM8520 SM8530 SM8063 SM8438 Turns ON when an error occurs in serial communication. After the devices above turns ON, the error code is stored in the compatible devices below.
  • Page 285 Data transfer sequence ON Turns ON the data send operation with the master station and also other local stations. R: Read only FX5 only FX3 Series compatible Descriptions SM9056 SM8191 ON: Data transfer sequence ON OFF: Data transfer sequence is stopped Precautions Do not turn ON with program or engineering tool.
  • Page 286 Station number settings status Stores the station number set in the communication settings (Page 265 Communication Setting). This device is for checking the setting status of station number of the local station. R: Read only FX5 only FX3 Series compatible Descriptions SD9040 SD8173...
  • Page 287 Number of local stations setting status Stores the number of local stations set in the communication settings (Page 265 Communication Setting). Use this device to check the number of local stations set in the master station. R: Read only FX5 only FX3 Series compatible Descriptions SD9041...
  • Page 288: Monitoring Time Setting

    Refresh range setting status Stores the refresh range set in the communication settings (Page 265 Communication Setting). Use this device to check the refresh range set in the master station. R: Read only FX5 only FX3 Series compatible Descriptions SD9082 SD8175 0: Pattern 0 1: Pattern 1...
  • Page 289 Present link scan time This device stores the current value of the network cycle in the N:N Network. R: Read only FX5 only FX3 Series compatible Descriptions SD9043 SD8201 0 to 32767 (10ms) Precautions Do not change the value with program or engineering tool. Maximum link scan time This device stores the maximum value of the network cycle in the N:N Network.
  • Page 290 Data transmission error code These devices store the error code (Page 839 Checking absence/presence of N:N Network function errors) of the master station or the local stations. R: Read only Station number Master Local stations station Station Station Station Station Station Station Station...
  • Page 291: Chapter 17 Parallel Link Function

    PARALLEL LINK FUNCTION This chapter explains parallel link. 17.1 Function Outline The parallel link function is designed to connect two FX5 programmable controllers and mutually link the devices. • The link mode can be selected from two modes, normal parallel link and high-speed parallel link modes, depending on the number of devices to be linked and link time.
  • Page 292: Procedure Before Operation

    17.2 Procedure Before Operation The flow chart below shows the procedures from parallel link function setting to data link: Check communication specifications For the communication specifications, link specifications, link time, link device numbers and number of link points, refer to Page 293 Specifications.
  • Page 293 Precautions Total number of communication boards and communication adapters that can be connected is two. FX5UJ CPU module The parallel link function can be used in the FX5UJ CPU module by using the communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below.
  • Page 294: Fx5U Cpu Module

    FX5U CPU module The parallel link function can be used in the FX5U CPU module by using the built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port CH2: Communication board Item...
  • Page 295: Specifications

    17.4 Specifications This section describes the communication specifications and performance of the parallel link function. Communication specifications The parallel link function is executed according to the communication specifications (fixed) shown in the table below. Specification items such as baud rate cannot be changed. Item Specifications Remarks...
  • Page 296: High-Speed Parallel Link Mode

    Link device number and number of link points The devices to be occupied are assigned according to the start number of the link device set by GX Works3. Also the link mode is specified by GX Works3. (Page 299 Communication Setting) Mode Normal parallel link mode High-speed parallel link mode...
  • Page 297: Wiring

    17.5 Wiring This section explains about the wiring. Wiring procedure Prepare for wiring. Prepare cables required for wiring. (Page 295 Cable) Turn OFF the programmable controller power. Before wiring, make sure that the programmable controller power is OFF. Wire the cables between the communication equipment. Connect the RS-485 communication equipment.
  • Page 298 Connecting cables The table below shows applicable cables and tightening torques. Item Number of Wire size Tightening torque wires Solid wire, Stranded wire Wire ferrule with connected insulation sleeve per terminal FX5U CPU module built-in RS-485 port One wire 0.2 to 0.5 (24 to 20 AWG) 0.2 to 0.5...
  • Page 299: Termination Resistor Setting

    • Tool For tightening the terminal, use a commercially available small screwdriver with straight tip that is not widened toward the end as shown below. Precautions With straight tip If the diameter of the screwdriver tip is too small, the required tightening torque cannot be achieved. To achieve the appropriate tightening torque shown in the previous page, use the following screwdriver or its equivalent (grip diameter: approximately 25mm).
  • Page 300: Connection Diagram

    Connection diagram One-pair wiring Two-pair wiring Built-in RS-485 port Built-in RS-485 port Built-in RS-485 port Built-in RS-485 port FX5-485-BD FX5-485-BD FX5-485-BD FX5-485-BD FX5-485ADP FX5-485ADP FX5-485ADP FX5-485ADP (TXD+) (TXD+) (TXD+) (TXD+) B(TXD-) B(TXD-) B(TXD-) B(TXD-) (RXD+) (RXD+) (RXD+) (RXD+) B(RXD-) B(RXD-) B(RXD-) B(RXD-) Ground resistance of 100Ω...
  • Page 301: Communication Setting

    17.6 Communication Setting For the FX5 communication settings of this function, parameters are set using GX Works3. For details on GX Works3, refer to GX Works3 Operating Manual. Setting of parameter differs according to the module used. The procedure for each module is as follows. Built-in RS-485 port (CH1) Navigation Window ...
  • Page 302 Communication adapter (CH3/CH4) When an expansion adapter is used, add expansion adapter to Module Information. Navigation window  Parameter  Module Information  Right-click  Add New Module After adding the expansion adapter, make settings on the screen displayed from the following operation. Navigation window ...
  • Page 303: Programming

    17.7 Programming This section explains how to set the parallel link and how to create programs. There are two parallel link modes, normal parallel link mode and high-speed parallel link mode. The modes vary in applicable devices and number of link points. When connecting FX5 programmable controllers through the parallel link, set the master and linked stations in the same link mode.
  • Page 304 Link device Device for master station • Sending device Device for sending information from master station to linked station Device No. Number of link Descriptions points In the case of normal parallel link mode Internal relay M4000 to M4099 100 points The status of the master station device is automatically updated to the linked station device.
  • Page 305: Communication Test

    Communication test It is recommended to wire the master and linked stations, perform communication settings, and then execute the communication test using the following procedure to confirm proper operation. Communication test program is not required during operation. Communication test process After writing the program and configuring the communication setting of the master station and linked station, turn OFFON or reset the power supply to the FX5 programmable controller.
  • Page 306: Creating Programs For The Master Station

    Creating programs for the master station Create programs for the master station. Parallel link operation SM9090 Program for indicating link errors When the parallel link of the master/linked station is suspended or a setting error occurs, Y10 is set to Program for writing link devices RUN monitor (master station →...
  • Page 307: Creating Programs For The Linked Station

    Creating programs for the linked station Create programs for the linked station. Parallel link operation SM9090 Program for indicating link errors When the parallel link of the master/linked station is suspended or a setting error occurs, Y10 is set to Program for writing link devices RUN monitor (linked station →...
  • Page 308: Related Devices

    17.8 Related Devices This section describes the special relay/special register functions used in the parallel link function. Available communication channels vary depending on the CPU module and system configuration. For communication channels, refer to Page 290 System Configuration. "FX3 Series compatible" devices operate only on the communication channel specified in the compatible SM/ SD for communication settings.
  • Page 309: Details Of Related Devices

    Details of related devices Serial communication error Turns ON when an error occurs in serial communication. R: Read only FX5 dedicated FX3 Series Descriptions compatible SM8500 SM8510 SM8520 SM8530 SM8063 SM8438 Turns ON when an error occurs in serial communication. After a device above turns ON, the error code is stored in the corresponding device below.
  • Page 310: Serial Communication Setting

    Serial communication setting Stores the communication parameters set in the communication settings (Page 299 Communication Setting). R: Read only FX5 dedicated FX3 Series Descriptions compatible SD8502 SD8512 SD8522 SD8532 SD8405 SD8425 Stores the setting of the communication parameter. The description of the communication parameter is as follows. Bit No.
  • Page 311 Link mode setting Stores the property setting value of the link mode in the serial communication settings. R: Read only FX5 dedicated Descriptions SD9091 0: Normal parallel link mode 1: High-speed parallel link mode Precautions Do not change the value with program or engineering tool. Error determination time setting Stores the error determination time setting value in the serial communication settings.
  • Page 312: Chapter 18 Mc Protocol

    MC PROTOCOL This chapter explains MC protocol. 18.1 Function Summary An MC protocol function is a function to access the equipment compatible with MC protocol from a CPU module and counterpart equipment (such as a personal computer or an HMI) using serial communication. In case of a serial port of FX5, communication is possible by MC protocol A-compatible 1C frame and QnA-compatible 3C/4C frame.
  • Page 313: System Configuration

    18.3 System Configuration This section outlines the system configuration required to use the MC protocol. FX5S CPU module A serial port of up to 2 channels can be connected in the FX5S CPU module by using a communication board and communication adapter.
  • Page 314 FX5UJ CPU module A serial port of up to 2 channels can be connected in the FX5UJ CPU module by using a communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below. [Configuration example 1] [Configuration example 2] CH4: Communication adapter-2...
  • Page 315: Fx5U Cpu Module

    FX5U CPU module A serial port of up to 4 channels can be connected in the FX5U CPU module by using the built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port...
  • Page 316: Specifications

    18.4 Specifications Communication specifications Communication is executed within the specifications shown in the table below. Set the baud rate, etc. in the parameter settings of an engineering tool. Items Specifications Remarks Number of connectable modules 16 maximum   Transmission standard RS-485 or RS-232C standard Maximum total RS-485...
  • Page 317: Link Specifications

    Link specifications Link time Data transfer Data transfer Data transfer Interval time Data transfer time R: Number of read data points, W: Number of written data points, T: Time to send or receive one character, V: Interval time, S: Max Scan Time of programmable controller, D: Message waiting time (1) 1C Frame Time to read continuous word devices (such as data registers) in one station (ms) + 4 ...
  • Page 318 Time to send or receive one character The table below shows the time required to send or receive one character when the start bit is 1-bit, the data length is 7-bit, the parity is 1-bit, and the stop bit is 1-bit (total 10-bits). Transmission speed (baud rate) (bps) Time to send or receive 1 character (ms) 33.34...
  • Page 319: Wiring

    18.5 Wiring This section explains the wiring. Wiring procedure Select the connection method. Select the connection method suitable to the application. (Page 317 Selecting connection method) Make arrangements for wiring. Prepare cables required for wiring. (Page 318 Cable) Turn OFF the programmable controller power. Before wiring, make sure that the programmable controller power is OFF.
  • Page 320: Cable

    In case of RS-485 (RS-422) communication (1:N) For communication in accordance with RS-485 (RS-422), up to 16 programmable controllers can be connected. Make sure that the total extension distance is 1200m or less. When using built-in RS-485 port, FX5-485-BD, or FX5-422-BD- GOT, the distance should be 50m or less.
  • Page 321 Connecting cables The table below shows applicable cables and tightening torques. Item Number of Wire size Tightening torque wires Solid wire, Stranded wire Wire ferrule with connected insulation sleeve per terminal FX5U CPU module built-in RS-485 port One wire 0.2 to 0.5 (24 to 20 AWG) 0.2 to 0.5...
  • Page 322: Termination Resistor Setting (Rs-485)

    • Tool For tightening the terminal, use a commercially available small screwdriver with straight tip that is not widened toward the end as shown below. Precautions With straight tip If the diameter of the screwdriver tip is too small, the required tightening torque cannot be achieved. To achieve the appropriate tightening torque shown in the previous page, use the following screwdriver or its equivalent (grip diameter: approximately 25mm).
  • Page 323: Connection Diagram

    Connection diagram RS-232C Representative wiring examples are shown in this section. When pin numbers in the counterpart equipment are different, wire the pins as shown below. Connection diagram between FX5 and personal computer Programmable controller side External equipment operating in accordance with RS-232C FX5-232ADP Using CS/RS Using DR/ER...
  • Page 324: Two-Pair Wiring

    Two-pair wiring Built-in RS-485 port Built-in RS-485 port Built-in RS-485 port FX5-485-BD FX5-485-BD FX5-485-BD RS-485/RS-422 Communication equipment FX5-485ADP FX5-485ADP FX5-485ADP (TXD+) (TXD+) (TXD+) (TXD+) (TXD-) (TXD-) (TXD-) (TXD-) (RXD+) (RXD+) (RXD+) (RXD+) (RXD-) (RXD-) (RXD-) (RXD-) Terminal Terminal LINK resistor resistor Ω...
  • Page 325: Communication Setting

    18.6 Communication Setting For the FX5 communication settings of this function, parameters are set using GX Works3. For details on GX Works3, refer to GX Works3 Operating Manual. Setting of parameter differs according to the module used. The procedure for each module is as follows. Built-in RS-485 port (CH1) Navigation Window ...
  • Page 326: Basic Settings

    Communication board (CH2) Navigation Window  Parameter  Model name  Module Parameter  Extended Board Window The following screen will be displayed if [FX5-232-BD], [FX5-485-BD], or [FX5-422-BD-GOT] is set for [Extended Board], and [MC Protocol] is set for [Communication Protocol Type]. Fixed settings and SM/SD settings are the same as for the built-in RS-485 port (CH1).
  • Page 327 Parameter setting details Set the following items in the channel that uses MC protocol. Items Setting value Reference section  Basic Settings Extended Board When using this function, select [FX5-232-BD], [FX5-485- BD], or [FX5-422-BD-GOT]. Protocol type When using this function, select [MC Protocol]. Advanced Settings Data Length 7bit/8bit...
  • Page 328: Mc Protocol Command

    18.7 MC Protocol Command Command list The following commands can be executed in MC protocol. 1C frame For details, refer to the following. Page 780 Command and Function Lists for 1C Frame 3C/4C frame For details, refer to the following. Page 716 3C/4C frame Applicable device The table below shows devices and device number range that can handled in commands used in communication by MC...
  • Page 329: Related Devices

    18.8 Related Devices This section describes the special relay/special register functions used in the MC protocol function. Available communication channels vary depending on the CPU module and system configuration. For communication channels, refer to Page 311 System Configuration. "FX3 Series compatible" devices operate only on the communication channel specified in the compatible SM/ SD for communication settings.
  • Page 330: Details Of Related Devices

    Special register FX5 only R: Read only Device No. Name Description SD8500 SD8510 SD8520 SD8530 Serial communication error Stores the error code when the serial communication error code occurs. SD8502 SD8512 SD8522 SD8532 Serial communication settings Stores the setting of the communication parameter. SD8503 SD8513 SD8523...
  • Page 331 Absence/presence of MC protocol Turns ON when MC protocol is set for serial communication. Turns ON by setting MC protocol for the protocol format by the parameters, and by turning power supply ONOFF or by reset. R: Read only FX5 only FX3 Series Description compatible...
  • Page 332: Serial Communication Settings

    Serial communication settings Stores the set communication parameter in the communication settings when turning OFFON the programmable controller power or resetting the system. (Page 323 Communication Setting) R: Read only Description SD8502 SD8512 SD8522 SD8532 Stores the setting of the communication parameter. The descriptions of the communication parameters are as follows.
  • Page 333: Message System

    Station number settings When SD latch setting is set to "no latch", a station number of a local station that is set in the engineering tool and used in MC protocol (station numbers 0 to 15 (00H to 0FH)) is stored when the power supply is turned OFFON or reset. When SD latch setting is set to "latch", the contents of station number settings can be changed by program or engineering tool, and by turning power supply ONOFF or by reset, it can be operated with the station number stored in the station number settings.
  • Page 334: Chapter 19 Inverter Communication

    INVERTER COMMUNICATION This chapter explains inverter communication. 19.1 Function Outline Inverter communication function allows connection between an FX5 programmable controller and up to 16 inverters through RS-485 communication, and monitors operations of inverters, gives various commands to inverters and reads and writes inverter parameters.
  • Page 335: System Configuration

    19.3 System Configuration This section outlines the system configuration required to use inverter communication. FX5S CPU module A serial port of up to 2 channels can be connected in the FX5S CPU module by using a communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration.
  • Page 336 FX5UJ CPU module A serial port of up to 2 channels can be connected in the FX5UJ CPU module by using a communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below. [Configuration example 1] [Configuration example 2] CH4: Communication adapter-2...
  • Page 337: Fx5U Cpu Module

    FX5U CPU module A serial port of up to 4 channels can be connected in the FX5U CPU module by using the built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port...
  • Page 338: Fx5Uc Cpu Module

    FX5UC CPU module A serial port of up to 3 channels can be connected in the FX5UC CPU module by using the built-in RS-485 port and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port Item...
  • Page 339: Specifications

    19.4 Specifications This section describes the communication specifications and performance of the inverter communication function. Communication specifications Items Specifications Remarks  Number of connectable modules Maximum of 16 Transmission standard RS-485 standard   Maximum overall distance When using FX5-485ADP: 1200m or less When using built-in RS-485 port or FX5-485-BD: 50m or less Protocol type Inverter computer link...
  • Page 340: Inverter Instruction Codes And Parameters

    Inverter instruction codes and parameters The tables below show the inverter instruction codes and the parameters that can be communicated. Inverter operation monitoring The table below shows instruction codes for reading the inverter which can be specified by IVCK instruction (Page 384 Inverter operation monitoring instruction) operand (s2) and their contents.
  • Page 341 Inverter operation control The table below shows instruction codes for writing to the inverter which can be specified by IVDR instruction (Page 386 Inverter operation control instruction) operand (s2) and their contents. For the instruction codes, refer to the pages explaining computer link in detail in each inverter manual. Inverter Write contents Applicable inverter...
  • Page 342: Time Required For Inverter Communication Instructions

    Time required for inverter communication instructions Outline The period of time after one inverter communication instruction is driven until communication with the inverter is completed (SM8029 turns ON) is considered as the required time for the inverter communication instruction as shown. Inverter communication instruction SM8029...
  • Page 343: Calculation Method

    Calculation method The required time "Tinv" for inverter communication instruction in units of "ms" is calculated as follows. "INT(n)" in the calculation formula indicates an integer obtained by truncating decimal places of "n". Length of 1 character In inverter communication, the communication setting is as shown in the following table. The length of 1 character is as shown in the following expression.
  • Page 344 Number of sent/received characters Inverter Parameter/instruction code First Second Third communication Send Receive Total Send Receive Total Send Receive Total instruction       IVCK H73, H7A, H7F, H6C Other than above      ...
  • Page 345: Calculation Example

    Calculation example This is a calculation example for the following communication settings and scan time when communicating with an inverter. Communication speed = 19200[bps] Length of 1 character = 10[bit] Scan time = 10[ms] Calculation example 1 Calculation of required time when Pr. 3 is read by the IVRD instruction Tinv=T =181[ms] =10[ms], T...
  • Page 346 Calculation example 3 Calculation of required time when Pr.10 to Pr.14 [(s2) = 5] are written by the IVBWR instruction Tinv=T =851[ms] =10(s2)=50[ms], T =1[ms] Calculate "T " as follows because Pr.10 to Pr.14 do not require change of the 2nd parameter and the time required for writing is same in each parameter.
  • Page 347: Wiring

    19.5 Wiring This section explains about the wiring. Wiring procedure Select the connection method Confirm the inverter connection method. (Page 345 Connection method) Make arrangements for wiring Prepare cables (Page 349 Cable), distributors (Page 351 Connection devices (RJ45 connector and distributor)) and termination resistors (Page 352 Termination resistor setting) required for wiring.
  • Page 348 F800/A800/A800 Plus/F700P/A700 series Built-in RS-485 terminal • In the case of 1-to-1 connection Built-in RS-485 terminal Twisted pair cable • In the case of 1-to-n connection Twisted pair cable Twisted pair cable Twisted pair cable Built-in Built-in Built-in RS-485 RS-485 RS-485 terminal terminal...
  • Page 349 E800/F700PJ/E700/E700EX/D700/V500 series PU connector • In the case of 1-to-1 connection Termination resistor Distributor 10BASE-T cable 10BASE-T cable connector • In the case of 1-to-n connection Termination 10BASE-T 10BASE-T resistor cable cable Distributor Distributor Distributor 10BASE-T 10BASE-T 10BASE-T cable cable cable 10BASE-T cable connector...
  • Page 350 • In the case of 1-to-n connection When a distributor is not used Twisted pair cable Twisted pair cable Twisted pair cable FR-E7TR FR-E7TR FR-E7TR FR-A5NR (V500 Series only) • In the case of 1-to-1 connection When a distributor is not used FR-A5NR Twisted pair cable Termination resistor...
  • Page 351: 10Base-T Cable

    Cable Twisted pair cable Use commercial three-pair type twisted cables of 0.3  or more. The specifications of the cables used in wiring are shown. RS-485 cable specifications Items Description Cable type Shielded cable Number of pairs Conductor resistance (20) 88.0/km or less Insulation resistance 10000M-km or more...
  • Page 352 Connecting cables The table below shows applicable cables and tightening torques. Item Number of Wire size Tightening torque wires Solid wire, Stranded wire Wire ferrule with connected insulation sleeve per terminal FX5U CPU module built-in RS-485 port One wire 0.2 to 0.5 (24 to 20 AWG) 0.2 to 0.5...
  • Page 353: Connection Devices (Rj45 Connector And Distributor)

    • Tool For tightening the terminal, use a commercially available small screwdriver with straight tip that is not widened toward the end as shown below. Precautions With straight tip If the diameter of the screwdriver tip is too small, the required tightening torque cannot be achieved. To achieve the appropriate tightening torque shown in the previous page, use the following screwdriver or its equivalent (grip diameter: approximately 25mm).
  • Page 354: Termination Resistor Setting

    Termination resistor setting Set or connect termination resistor of the inverter farthest from the FX5 programmable controller. For details on connection, refer to Page 354 Connection diagram. At the FX5 programmable controller The built-in RS-485 port, FX5-485-BD and FX5-485ADP have a built-in termination resistor. Set the termination resistor selector switch to 110.
  • Page 355: Shielded Wiring

    At the inverter Communication may be affected by noise echo depending on the transmission speed and transmission distance. If communication is hindered by noise echo, connect a termination resistor to the inverter. Built-in RS-485 terminal A built-in termination resistor is provided. Connect a 100 termination resistor to the inverter farthest from the programmable controller.
  • Page 356: Connection Diagram

    Connection diagram F800/A800/A800 Plus/F700P/A700 series Built-in RS-485 terminal • When one inverter is connected Set the termination resistor selector Built-in RS-485 port switch to "110Ω". FX5-485-BD FX5-485ADP Twisted pair cable (0.3 mm or more) Set the termination resistor selector 0.3 mm or more switch to "100Ω".
  • Page 357 E800/F700PJ/E700/E700EX/D700/V500 series PU connector • When one inverter is connected (4-wire type) Set the termination resistor selector switch to "110Ω". Built-in RS-485 port FX5-485-BD Distributor FX5-485ADP Connect a termination resistor of 100Ω, 1/2 W (not supplied). When seen from inverter front (receptacle side) 10BASE-T 5 4 3 6 1...
  • Page 358 • When multiple inverters are connected (up to 16) (2-wire type, E700 Series only) Connect a termination resistor of 100Ω, 1/2 W (not supplied) Set the termination resistor selector to the most distant inverter. switch to "110Ω". Built-in RS-485 port FX5-485-BD Distributor Distributor...
  • Page 359 For branching, perform wiring as shown below: (4-wire type) When connecting a 100Ω termination resistor, set the switch to "100:". Built-in RS-485 port For crossover wiring of a shielded cable using the SG terminal, FX5-485-BD set the terminal 2/SG selector switch to the right (ON) to change FX5-485ADP terminal 2 to SG.
  • Page 360 For branching, perform wiring as shown below: (2-wire type) When connecting a 100Ω termination resistor, set the switch to "100Ω". Built-in RS-485 port FX5-485-BD For crossover wiring of a shielded cable using the SG FX5-485ADP terminal, set the terminal 2/SG selector switch to the right (ON) to change terminal 2 to SG.
  • Page 361: Grounding

    Grounding Grounding should be performed as stated below. • Provide a ground resistance of 100 or less. • Independent grounding should be performed for best results. If the programmable controller cannot be grounded independently, perform the "Shared grounding" shown below. For details, refer to User's Manual (Hardware) of the CPU module used.
  • Page 362: Freqrol-F800/A800/A800 Plus Series

    Set in communication data setting N038 RS-485 communication CR/LF CR: Provided, LF: Not provided selection N000 Protocol selection Mitsubishi Electric inverter (computer link) protocol Operation D000 Operation mode selection External operation mode is selected when mode setting power is turned ON.
  • Page 363: Freqrol-E800 Series

    Pr.124 PU communication CR/LF presence/ CR: Provided, LF: Not provided absence selection Pr.549 Protocol selection Mitsubishi Electric inverter (computer link) protocol Operation Pr.79 Operation mode selection External operation mode is selected when power is turned ON. mode setting Pr.340...
  • Page 364 Parameters (test operation, operation) Parameters that must be adjusted for test operation and operation are as follows. Parameter No. Parameter item Setting Set conditions value Pr.121 Number of PU communication 0 to 10, 9999 Set the value shown on the left during adjustment, and set a value from 0 to 10 retries during operation.
  • Page 365: Freqrol-F700P/A700 Series

    Pr.341 RS-485 communication CR/LF CR: Provided, LF: Not provided selection Pr.549 Protocol selection Mitsubishi Electric inverter (computer link) protocol Operation Pr.79 Operation mode selection External operation mode is selected when power is turned mode setting Pr.340 Communication startup mode selection...
  • Page 366: Freqrol-F700Pj/E700/D700/E700Ex Series

    Pr.124 PU communication CR/LF presence/ CR: Provided, LF: Not provided absence selection Pr.549 Protocol selection Mitsubishi Electric inverter (computer link) protocol Operation Pr.79 Operation mode selection External operation mode is selected when power is turned ON. mode setting Pr.340...
  • Page 367 Parameters (test operation, operation) Parameters that must be adjusted for test operation and operation are as follows. Parameter No. Parameter item Setting Set conditions value Pr.121 Number of PU communication 9999 Set the value shown on the left during adjustment, and set a value from 1 to 10 retries during operation.
  • Page 368: Freqrol-V500 Series

    FREQROL-V500 series Connection destination: PU port, FR-A5NR Contents of communication setting (essential items) The table below shows parameters which should be set in all cases. Parameter No. Parameter item Setting Description conditions value Display Setting Pr.160 Extended function display selection Display simple mode + extended parameters Communication Pr.117...
  • Page 369: Programmable Controller Communication Settings

    19.7 Programmable Controller Communication Settings For the FX5 communication settings of this function, parameters are set using GX Works3. For details about GX Works3, refer to GX Works3 Operating Manual. Setting of parameter differs according to the module used. The procedure for each module is as follows. Built-in RS-485 port (CH1) Navigation Window ...
  • Page 370 Communication adapter (CH3/CH4) When an expansion adapter is used, add expansion adapter to Module Information. Navigation window  Parameter  Module Information  Right-click  Add New Module After adding the expansion adapter, make settings on the screen displayed from the following operation. Navigation window ...
  • Page 371: Programming

    19.8 Programming This section explains how to create programs which change parameters of inverters and give operation commands to inverters. A program example is shown for each inverter communication instruction. For details on related devices, refer to Page 407 Related Devices. Common items in inverter communication instructions Inverter communication types The programmable controller and inverter communicate using inverter communication instructions.
  • Page 372 Simultaneous driving of instructions and communication (1) Driving instructions at the same time • Two or more inverter communication instructions can be programmed, and driven at the same time. • When two or more instructions are driven at the same time for the serial port used for communication, the next inverter communication instruction in the program is executed after the current communication with the inverter has finished.
  • Page 373 • Inverter communication instructions standby for 11 ms after acquiring a serial port, and then starts communication. Even if the drive contact turns ON, the inverter communication instruction stands by until (SM8920) turns ONOFF when the SM8920 inverter communication busy flag has been turned ON by other inverter communication instruction. The programmable controller frees the serial port, and then executes inverter communication instructions driven in the next step and so on.
  • Page 374: Instruction Completion And Error Flag Operation

    (2) Precautions for programming When communicating with inverters for multiple items, set the command contact for inverter communication instruction to ON until transmission is complete. Program so that the command contact is turned OFF, when all communication with the inverter has been completed, using the instruction execution normal end flag ([d] +1 or [d2] +1), instruction execution abnormal end flag ([d] +2 or [d2] +2) or instruction execution completed flag (SM8029).
  • Page 375 Operation of instruction execution complete flag When communication with an inverter is completed, the instruction execution completed flag (SM8029) turns ON, and remains ON for 1 scan. SM8029 indicates completion of IVDR instruction communication as shown below, when M0, M2 are OFF and M1 is ON. If inverter communication instruction ends normally, instruction execution normal end flag (Page 369 Communication execution state output device) turns ON simultaneously with SM8029.
  • Page 376 Precautions for program creation Communication protocol setting If protocol of communication settings (Page 367 Programmable Controller Communication Settings) for the serial port to be used is not set to "Inverter Communication", inverter communication instructions cannot be used. Using inverter communication instruction together with another instruction A serial port using any other communication (such as RS2 instruction) cannot use inverter instruction and predefined protocol support instruction.
  • Page 377 Using an inverter communication instruction in a program flow An inverter communication instruction cannot be used in the following program flows. Program flow that cannot use the inverter communication Remarks instruction Between CJ and P instructions Conditional jump Between FOR and NEXT instructions Repeat Between P and RET instructions Subroutine...
  • Page 378: Program Example

    Program example This program performs operation monitoring, operation control, and parameter control for two inverters (Station number 0 and 1) from the built-in RS-485 port. Contents of operation Operation of the inverter is controlled by the input (X) of the FX5U CPU module, and the speed is changed by the device. Item Station number 0 Station number 1...
  • Page 379 Writing parameters to an inverter while the programmable controller is in RUN mode When M10 (or M510) turns ON, the parameters programmed in the inverter A (or inverter B) are written in. M10 (or M510) turns OFF when writing is completed. SM402 Clearing latch devices ZRST...
  • Page 380 *Inverter B (station number 1) M510 IVDR H0FD H9696 M309 The inverter is reset Driving of (station number 1) write Computer link operation instruction IVDR H0FB M312 is specified (station (station number 1) number 1) The maximum MOVP D700 frequency (Pr. 1) is specified (station number 1) The maximum...
  • Page 381 Changing the speed using a sequence program When M11 (or M511) turns ON, the operation speed stored in D10 (or D510) is written into the inverter A (or inverter B). M11 (or M511) turns OFF when writing is completed. *Inverter A (station number 0) "60 Hz"...
  • Page 382 Controlling operations of an inverter When M12 (or M512) turns ON, the inverter operation command is written in. M12 (or M512) turns OFF when writing is completed. * Inverter A (station number 0) H0FA is set to "00H" (Canceling the operation command) Operation stop Operation command input...
  • Page 383 * Inverter B (station number 1) H0FA is set to "00H" M515 (Canceling the operation command) Operation stop Operation command input stop (station number 1) (station number 1) Operation stop is reset M515 by input X11 or X12 Forward Operation stop Operation rotation command input...
  • Page 384 Monitoring operations of an inverter This program reads the status and output frequency written into the inverter A (or inverter B). * Inverter A (station number 0) While data is not written to an inverter, the status is read Driving of Driving of Driving of write...
  • Page 385 * Inverter B (station number 1) While data is not M510 M511 M512 written to an inverter, M570 the status is read Driving of Driving of Driving of write write write instruction instruction instruction (station (station (station number 1) number 1) number 1) M570 Inverter status is read...
  • Page 386: Inverter Operation Monitoring Instruction

    Inverter operation monitoring instruction This instruction reads the operation status of an inverter. For information concerning inverter communication instruction expressions and execution format, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks). IVCK Ladder FBD/LD ENO:=IVCK (EN, s1, s2, n, d1, d2); (s1) (s2) (d1) (d2)
  • Page 387: Operation Error

    Operation error Operation errors pertaining to the instruction are as follows. Operation error flag Operation error Description code SM56 SM8067 SD8067 1810H When specified channel is used with another instruction. 2820H When specified device exceeds the device range. 3405H When the value specified in (s1) is other than K0 to 31. When the value specified in (n) is other than the following channel numbers.
  • Page 388: Inverter Operation Control Instruction

    Inverter operation control instruction This instruction writes an inverter operation required set value to an inverter. For information concerning inverter communication instruction expressions and execution format, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks). IVDR Ladder FBD/LD ENO:=IVDR (EN, s1, s2, s3, n, d);...
  • Page 389 Operation error Operation errors pertaining to the instruction are as follows. Operation error flag Operation error Description code SM56 SM8067 SD8067 1810H When specified channel is used with another instruction. 2820H When specified device exceeds the device range. 3405H When the value specified in (s1) is other than K0 to 31. When the value specified in (n) is other than the following channel numbers.
  • Page 390: Inverter Parameter Read

    Inverter parameter read This instruction reads an inverter parameter to the programmable controller. For information concerning inverter communication instruction expressions and execution format, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks). IVRD Ladder FBD/LD ENO:=IVRD (EN, s1, s2, n, d1, d2); (s1) (s2) (d1) (d2)
  • Page 391 Operation error Operation errors pertaining to the instruction are as follows. Operation error flag Operation error Description code SM56 SM8067 SD8067 1810H When specified channel is used with another instruction. 2820H When specified device exceeds the device range. 3405H When the value specified in (s1) is other than K0 to 31. When the value specified in (s2) is outside the range that can be specified.
  • Page 392 Program example Reads value of the following inverter (station No.6) parameters to storage device for CPU module (CH1). Example of program using second parameter specification code (Page 401 Second parameter specification code) of FREQROL-F700P series inverter. Parameter No. Name Second parameter Storage devices specification code Terminal 2 frequency setting bias...
  • Page 393: Inverter Parameter Write

    Inverter parameter write This instruction writes a value from the programmable controller to a parameter in an inverter. For information concerning inverter communication instruction expressions and execution format, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks). IVWR Ladder FBD/LD ENO:=IVWR (EN, s1, s2, s3, n, d);...
  • Page 394 Operation error Operation errors pertaining to the instruction are as follows. Operation error flag Operation error Description code SM56 SM8067 SD8067 1810H When specified channel is used with another instruction. 2820H When specified device exceeds the device range. 3405H When the value specified in (s1) is other than K0 to 31. When the value specified in (s2) is outside the range that can be specified.
  • Page 395 Program example Writes setting values to parameter shown in the following table for inverter (station No.6) from the CPU module (CH1). Example of program using second parameter specification code (Page 401 Second parameter specification code) of FREQROL-F700P series inverter. Parameter No. Name Second parameter Setting values to be written...
  • Page 396: Inverter Parameter Block Write

    Inverter parameter block write This instruction writes parameters of an inverter at one time For information concerning inverter communication instruction expressions and execution format, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks). IVBWR Ladder FBD/LD ENO:=IVBWR (EN, s1, s2, s3, n, d); (s1) (s2) (s3) Setting data...
  • Page 397 Processing details Continuously writes parameter numbers and their values (2 words/parameter) for the number of points specified by (s2) starting from word device specified by (s3) for station No. (s1) of inverter connected to communication channel (n) (no limit to number of points that can be written).
  • Page 398 Program example Writes upper limit frequency (Pr.1): 120Hz, lower limit frequency (Pr.2): 5Hz, acceleration time (Pr.7): 1 second, deceleration time (Pr.8):1 second for inverter (station No.5) from CPU module (CH1). Write contents: Parameter No.1 = D200, 2 = D202, 7 = D204, 8 = D206, upper limit frequency = D201, lower limit frequency = D203, acceleration time = D205, deceleration time = D207 Initial pulse SM402...
  • Page 399: Multiple Inverter Commands

    Multiple inverter commands This instruction writes 2 types of settings (operation command and set frequency) to the inverter, and reads 2 types of data (inverter status monitor, output frequency, etc.) from the inverter at the same time. For information concerning inverter communication instruction expressions and execution format, refer to MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks).
  • Page 400 Processing details This instruction executes multiple commands to an inverter connected to the communication channel (n) whose station number is specified in (s1). Specify the send/receive data type using (s2), the start device which stores data to be written to the inverter using (s3), and the start device which stores values to be read from the inverter using (d1).
  • Page 401: Applicable Inverters

    Applicable inverters This instruction is applicable to the following inverters: • FREQROL-E700 series (February 2009 and later) • FREQROL-F800/A800/F700PJ/F700P/E700EX/D700 Series Program example Writes (s3): run command (expansion), (s3) +1: setting frequency (RAM) and reads (d1): inverter status monitor (expansion), (d1) +1: output frequency (rotation speed) for inverter (station No.0) from CPU module (CH1). Send/receive type code: H0000 •...
  • Page 402 • (d1) + 1: Output frequency (speed) Reads output frequency (rotation speed). Read contents: D21 = Output frequency (rotation speed) Switch Switch command command RUN monitor (Speed 1) (Speed 2) SM400 Initial value at startup: MOVP K6000 60 Hz Switch Switch command command...
  • Page 403: Second Parameter Specification Code

    Second parameter specification code When handling the following parameters in inverter communication, it is necessary to select second parameters. In IVRD, IVWR, and IVBWR instructions, when a value shown in the tables below is set in (s2) ((s3) in IVBWR instruction), the extension parameter and second parameter are automatically overwritten, and parameter values are either read or written.
  • Page 404 FREQROL-E800 series Second parameter specification codes for parameter numbers Pr.125, Pr.126, C2 to C7 and C38 to C45 Parameter No. Name Second parameter specification code Terminal 2 frequency setting bias (frequency) Terminal 2 frequency setting bias 1902 (analog value) Terminal 2 frequency setting gain (frequency) Terminal 2 frequency setting gain 1903...
  • Page 405 FREQROL-A800/A800 Plus series Second parameter specification codes for parameter numbers Pr.125, Pr.126, C2 to C19 and C38 to C41 Parameter No. Name Second parameter specification code Terminal 2 frequency setting bias frequency Terminal 2 frequency setting bias 1902 Terminal 2 frequency setting gain frequency Terminal 2 frequency setting gain 1903...
  • Page 406 FREQROL-F700P series Second parameter specification codes for parameter numbers Pr.125, Pr.126 and C2 to C7 Parameter No. Name Second parameter specification code Terminal 2 frequency setting bias frequency Terminal 2 frequency setting bias 1902 Terminal 2 frequency setting gain frequency Terminal 2 frequency setting gain 1903 Terminal 4 frequency setting bias...
  • Page 407 FREQROL-A700 series Second parameter specification codes for parameter numbers Pr.125, Pr.126, C2 to C7, C12 to C19 and C38 to C41 Parameter No. Name Second parameter specification code Terminal 2 frequency setting bias frequency Terminal 2 frequency setting bias 1902 Terminal 2 frequency setting gain frequency Terminal 2 frequency setting gain...
  • Page 408 FREQROL-F700PJ/E700/E700EX/D700 series Second parameter specification codes for parameter numbers Pr.125, Pr.126, C2 to C7 and C22 to C25 Parameter No. Name Second parameter specification code Terminal 2 frequency setting bias frequency Terminal 2 frequency setting bias 1902 Terminal 2 frequency setting gain frequency Terminal 2 frequency setting gain 1903...
  • Page 409: Related Devices

    19.9 Related Devices This section describes the special relay/special register functions used in the inverter communication function. Available communication channels vary depending on the CPU module and system configuration. For communication channels, refer to Page 333 System Configuration. "FX3 Series compatible" devices operate only on the communication channel specified in the compatible SM/ SD for communication settings.
  • Page 410: Details Of Related Devices

    Special registers FX5 only R: Read only Device No. Name Description SD8500 SD8510 SD8520 SD8530 Serial communication error Stores the error code when a serial communication error occurs. code SD8502 SD8512 SD8522 SD8532 Serial communication Stores the setting of the communication parameter. settings SD8503 SD8513...
  • Page 411 Serial communication error Turns ON when an error occurs in serial communication. These flags are used to check the serial communication error. Turns ON when a parity error, overrun error or framing error occurs during communication with inverters or when an inverter communication error occurs.
  • Page 412 Inverter communication error If FX3 Series compatible SM/SD area settings have been set, the devices turn ON if an error occurs for an inverter communication instruction. R: Read only FX3 Series compatible Description SM8152 SM8153 SM8157 SM8158 Turns ON when an inverter communication error occurs. *1 Supports latch function.
  • Page 413 Serial communication error code Stores the error code (Page 848 List of error codes for inverter communication) when the inverter communication instruction error occurs. R: Read only FX5 dedicated FX3 Series Description compatible SD8500 SD8510 SD8520 SD8530 SD8063 SD8438 When a serial communication error occurs, the error code is stored.
  • Page 414 Serial communication operation mode Stores the communication function code of the serial communication under execution. R: Read only FX5 dedicated FX3 Series Description compatible SD8503 SD8513 SD8523 SD8533 SD8419 SD8439 0: MELSOFT connection or MC protocol 3: N:N Network Communication 5: Non-Protocol Communication 6: Parallel Link Communication 7: Inverter Communication...
  • Page 415 IVBWR instruction error parameter number These devices store the parameter number in which an error has occurred when IVBWR instruction error flag turns ON. R: Read only FX5 dedicated FX3 Series Description compatible SD8921 SD8931 SD8941 SD8951 SD8154 SD8159 Stores the parameter number which could not be written by IVBWR instruction.
  • Page 416: Chapter 20 Non-Protocol Communication

    NON-PROTOCOL COMMUNICATION This chapter describes non-protocol communication. 20.1 Function Summary Non-protocol communication exchanges data between a printer, bar code reader, etc. with no protocol. Non-protocol communication is available using the RS2 instruction. The RS2 instruction can simultaneously communicate on maximum 4 channels by specifying the channels. •...
  • Page 417: Procedure Before Operation

    20.2 Procedure Before Operation The flow chart below shows the Non-Protocol Communication setting procedure up until data link: Check communication specifications For communication specifications, and communication applicability, refer to Page 418 Specifications. System configuration and selection. For system configuration of each programmable controller, refer to Page 415 System Configuration. Wiring For selection of cables and connection equipment, and wiring example, refer to Page 418 Wiring.
  • Page 418 FX5UJ CPU module A serial port of up to 2 channels can be connected in the FX5UJ CPU module by using a communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below. [Configuration example 1] [Configuration example 2] CH4: Communication adapter-2...
  • Page 419 FX5U CPU module A serial port of up to 4 channels can be connected in the FX5U CPU module by using the built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port...
  • Page 420: Specifications

    20.4 Specifications This section describes the communication specifications and performance of non-protocol communication. Items Specifications Transmission standard RS-485 and RS-422 standard RS-232C standard Maximum overall distance When using FX5-485ADP: 1200m or less 15m or less When using built-in RS-485 port or FX5-485-BD: 50m or less Number of Transfer Data 0 to 4096...
  • Page 421 Cable structural drawing (reference) Pair Shield Example of two-pair cable structural drawing Example of three-pair cable structural drawing Connecting cables The table below shows applicable cables and tightening torques. Item Number of Wire size Tightening torque wires Solid wire, Stranded wire Wire ferrule with connected insulation sleeve...
  • Page 422: Termination Resistor Setting

    <Reference> Item Manufacturer Model name Crimping tool FX5U CPU module built-in RS-485 port PHOENIX CONTACT GmbH & Co. KG AI 0.5-6 WH CRIMPFOX 6 CRIMPFOX 6T-F FX5UC CPU module built-in RS-485 port AI 0.5-8 WH FX5-485-BD FX5-485ADP • Tool For tightening the terminal, use a commercially available small screwdriver with straight tip that is not widened toward the end as shown below.
  • Page 423: Connection Diagram

    Connection diagram RS-232C communication equipment Connector pin arrangement For the connector arrangement, refer to the following. MELSEC iQ-F FX5S/FX5UJ/FX5U/FX5UC User's Manual (Hardware) Wiring Representative wiring examples are shown in this section. When pin numbers in the counterpart equipment are different, wire the pins as shown below.
  • Page 424: Communication Equipment

    RS-485 communication equipment One-pair wiring and two-pair wiring (for RS-422) are applicable for RS-485 communication. Wire according to the counterpart equipment. The wiring that can be used is limited by the control line setting in the communication settings (Page 423 Communication Settings).
  • Page 425: Grounding

    Grounding Grounding should be performed as stated below. • Provide a ground resistance of 100 or less. • Independent grounding should be performed for best results. If the programmable controller cannot be grounded independently, perform the "Shared grounding" shown below. For details, refer to User's Manual (Hardware) of the CPU module used.
  • Page 426: Basic Settings

    SM/SD Setting Communication board (CH2) Navigation Window  Parameter  Model name  Module Parameter  Extended Board Window The following screen will be displayed if [FX5-232-BD] or [FX5-485-BD] is set for the extended board and [Non-protocol Communication] is set for the communication protocol type. Fixed setting and SM/SD setting are the same as for the built-in RS-485 port (CH1).
  • Page 427 Parameter setting details Set the following items for the serial ports that use non-protocol communication. Items Items Setting value Reference section  Basic Settings Extended Board When using this function, select [FX5-232-BD] or [FX5-485-BD]. Protocol type When using this function, select [Non-protocol Communication]. Advanced Data Length 7bit/8bit...
  • Page 428: Programming

    20.7 Programming This section explains how to create programs for non-protocol communication using RS2 instruction and how such programs operate. For details on related devices, refer to Page 445 Related Devices. For communication settings, refer to Page 423 Communication Settings. Serial data transmission This section explains the function, operation and programming method of the RS2 instruction.
  • Page 429: Applicable Frames

    Processing details This instruction sends and receives data via non-protocol communication by way of built-in RS-485 port, communication board or communication adapter. This instruction specifies the start device storing the sent data from the CPU module, amount of data, start device storing the received data and the maximum allowable amount of received data. Precautions •...
  • Page 430 Terminator When terminators are set in the communication settings (Page 423 Communication Settings), the set values are stored in SD8625 and SD8626 for CH1, SD8635 and SD8636 for CH2, SD8645 and SD8646 for CH3 and SD8655 and SD8656 for CH4. Up to 4 terminators can be set.
  • Page 431: Function And Operation

    Function and operation RS2 instruction specifies start device of the send data, no. of data, start device for storing the received data, the maximum no. of data that can be received. Create a program as shown below. Serial communication settings (CH1) Drive contact D100...
  • Page 432: Send/Receive Data And Amount Of Data

    Send/receive data and amount of data RS2 instruction can handle sent and received data in two modes, 16-bit mode and 8-bit mode. The processing mode is set in the communication settings (Page 423 Communication Settings), and when the RS2 instruction is driven, the mode is switched to the set mode.
  • Page 433 • Receive data and amount of data received Header Data area Terminator Sum data The order is different from the data area. High High High High High order of order of order of order of order of order of order of order of order of order of...
  • Page 434 8-bit mode monitor SM400 16-bit data D100 D200 Ignored Lower 8 bits The upper 8 bits are ignored. Serial communication setting Only the lower 8 bits are valid. • Header : [Added] [DLE + STX (SD8623: 0210H, SD8624: 0000H)] • Terminator : [Added] [DLE + ETX (SD8625: 0310H, SD8626: 0000H)] •...
  • Page 435 • Receive data and amount of data received Header Data area Terminator Sum data The order is different from the data area. High High order of order of order of order of order of order of order of order of order of order of SD8623...
  • Page 436 Operation during data send When the sending request flag is set to ON while RS2 instruction is driven, the programmable controller sends the data stored in (s) to ((s) + (n1) - 1). Name FX5 dedicated Send request flag SM8561 SM8571 SM8581 SM8591...
  • Page 437 Time at which receiving is completed The time at which receiving is completed falls into the following 3 types. Receiving is completed when one of the following conditions is satisfied. • When the programmable controller receives the amount of receive data specified by the RS2 instruction •...
  • Page 438 When the control line is set to interlink mode When the interlink mode is set in the communication parameters, the following sequence is adopted from the start of receiving to completion: When the amount of data already received becomes "preset amount of received data -30", the control line ER (DTR) turns OFF.
  • Page 439 Full-duplex, bi-directional communication operation Send completed  start send operation When sending of the data is completed, the sending request flag is automatically set to OFF. When RS2 instruction is executed again after the sending request flag is set to ON, the programmable controller starts to send.
  • Page 440 Sum check code The sum check code is a two-digit ASCII code converted from the least significant byte (8-bit) of the sum obtained by adding the corresponding data as hexadecimal numbers. One can select whether to include the sum check in the message or not, using the communication settings (Page 423 Communication Settings).
  • Page 441: Operation Of Control Line (Rs-232C)

    Operation of control line (RS-232C) RS-232C communication is full-duplex, bi-directional communication. When using half-duplex, bi-directional communication, pay attention not to turn ON the sending request flag while receiving. If set to ON, the programmable controller starts to send and as a result, the counterpart equipment may not be able to receive data, and the sent and received data may be destroyed. In full-duplex, bi-directional communication, the sending wait flag does not turn ON.
  • Page 442: Modem Mode

    Receive only The DR (DSR) signal is not used. RS2 instruction execution RD(RXD) Message Message Message Receive data Time out judgement time Time out flag Turned off usually on completion of receiving. Receiving complete flag ER(DTR) (FX → other device) The sequence program resets the flag.
  • Page 443: Interlink Mode

    Interlink mode RS2 instruction OFF ON execution SD(TXD) Message Message Message Send data Sending request DR(DSR) (Other device → FX) Sending wait flag Up to 30 characters can be received. RD(RXD) Message Message Message 3 Receive data Time out judge time Time out judge flag Turned off during receiving when "No.
  • Page 444: Precautions For Program Creation

    Precautions for program creation Using multiple RS2 instructions The RS2 instructions can be used as many times as necessary in a program, but make sure that only one RS2 instruction is driven in each serial port at a time. For switching of the RS2 instruction used, make sure the OFF time is one scan time or more.
  • Page 445: Example Of Printing Using Rs2 Instruction

    Example of printing using RS2 instruction In this example, the set data is sent to a printer connected to an expansion board. Contents of operation The send data is sent to the printer by the input (X) of the FX5U CPU module. Item RS2 instruction execution Sending of data...
  • Page 446 System configuration The following shows an example of a system configuration in which a printer with an RS-232C interface is connected to the expansion board (CH2) connected to the FX5U CPU module, and the data sent from the FX5U CPU module is printed. FX5-232-BD (CH2) Printer FX5U CPU module...
  • Page 447: 20.8 Caution On Write During Run, When Rs2 Instruction Is Driven

    20.8 Caution on Write During RUN, When RS2 Instruction Is Driven When the RS2 instruction is eliminated by writing during RUN, non-protocol communication stops immediately. 20.9 Related Devices This section explains the special relay/special register functions used in the non-protocol communication function. Available communication channels vary depending on the CPU module and system configuration.
  • Page 448 Special registers FX5 only R: Read only, R/W: Read/write Device No. Name Description SD8500 SD8510 SD8520 SD8530 Serial communication error When a serial communication error occurs, the error code is stored. code SD8502 SD8512 SD8522 SD8532 Serial communication Stores the setting of the communication parameter. settings SD8503 SD8513...
  • Page 449: Details Of Related Devices

    Details of related devices Serial communication error Turns ON when an error occurs in serial communication. These flags are for check of the serial communication error. R: Read only FX5 dedicated FX3 Series Description compatible SM8500 SM8510 SM8520 SM8530 SM8063 SM8438 Turns ON when an error occurs in serial communication.
  • Page 450 Receiving completed flag Receiving completed flag turns ON when receiving is completed. When these devices turn ON, data cannot be received. R/W: Read/write FX5 dedicated Description SM8562 SM8572 SM8582 SM8592 These devices turn ON when serial communication data receiving is complete. Receiving is completed in one of the following three conditions.
  • Page 451 Time-out flag This turns ON when data receiving is suspended, and the next set of receive data is not received within the time set by the time-out time setting device. The receiving completed flag also turns ON. R: Read only FX5 dedicated FX3 Series Description...
  • Page 452: Serial Communication Settings

    Serial communication settings The communication parameters set in the communication settings are stored when the power is turned OFFON, STOPRUN or the reset. (Page 423 Communication Settings) R: Read only FX5 dedicated Description SD8502 SD8512 SD8522 SD8532 Stores the setting of the communication parameter. The descriptions of the communication parameters are as follows.
  • Page 453 Serial communication operation mode Stores the communication function code used in the serial communication under execution. R: Read only FX5 dedicated FX3 Series Description compatible SD8503 SD8513 SD8523 SD8533 SD8419 SD8439 0: MELSOFT connection or MC protocol 3: N:N Network Communication 5: Non-Protocol Communication 6: Parallel Link Communication 7: Inverter Communication...
  • Page 454 Communication parameter display The communication parameter content set in the communication settings (Page 423 Communication Settings) is stored when the power is turned OFF  ON or reset. The stored values are the same as the serial communication property values. (Page 450 Serial communication settings) R: Read only FX3 Series compatible...
  • Page 455 Sending sum When the sum check code is set to [Added] in the communication settings (Page 423 Communication Settings), the sum check is executed for the send data. These devices store the sum calculated by the CPU module from the send data. R: Read only FX5 dedicated FX3 Series...
  • Page 456 Header These devices store the contents of headers 1 to 4 set in the communication settings (Page 423 Communication Settings). When the headers are set to [Added] in the communication settings, the headers are added to the send and receive data.
  • Page 457: Chapter 21 Predefined Protocol Support Function

    Set the necessary protocol, and write in protocol setting data to the CPU module. Send Protocol Communication Manufacturer Model Protocol Name Packet Name Packet Setting Type Receive MITSUBISHI ELECTRIC FREQROL Series H7B:RD Operation Mode Send&Receive  H7B:RD Operation Mode Variable Set (1) NOR:RD Data(4 Digits Data) Variable Set (2) ERR:NAK Response...
  • Page 458: Procedure Before Operation

    21.2 Procedure Before Operation The flow chart below shows the Predefined Protocol Support Function setting and sequence program creation procedure up until communication with a counterpart device: Check communication specifications For communication specifications, and predefined protocol specifications, refer to Page 459 Specifications. System configuration and selection For system configuration, and select communication equipment, refer to Page 456 System Configuration.
  • Page 459 Precautions Total number of communication boards and communication adapters that can be connected is two. FX5UJ CPU module The communication protocol support function can be used in the FX5UJ CPU module by using the communication board and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below.
  • Page 460: Fx5U Cpu Module

    FX5U CPU module The communication protocol support function can be used in the FX5U CPU module by using the built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter-2 CH3: Communication adapter-1 CH1: Built-in RS-485 port CH2: Communication board...
  • Page 461: Specifications

    21.4 Specifications This section describes the communication specifications and performance of predefined protocol support function. Communication specifications Items Specifications Transmission standard RS-485 and RS-422 standard RS-232C standard Maximum overall distance When using FX5-485ADP: 1200m or less 15m or less When using built-in RS-485 port or FX5-485-BD: 50m or less Protocol type Predefined protocol support...
  • Page 462: Communication Type

    Communication type With the predefined protocol support function, communications with counterpart devices are performed using the following procedures (communication types). Communication type name Processing Send Only Sends a send packet once. One send packet is required. Receive Only Receives a packet if it matches any of up to 16 defined receive packets. One or more receive packets are required.
  • Page 463 Communication board (CH2) Navigation Window  Parameter  Model name  Module Parameter  Extended Board Window The following screen will be displayed if [FX5-232-BD] or [FX5-485-BD] is set for the extended board and [Predefined Protocol Support Function] is set for the communication protocol type. Basic Settings Communication adapter (CH3/CH4) When an expansion adapter is used, add expansion adapter to Module Information.
  • Page 464: Protocol Setting

    21.6 Protocol Setting Protocols can be selected and edited from the libraries that are pre-registered in GX Works3 or registered by the user. Execute the protocol setting from a protocol setting window displayed by the following operation in GX Works3. ToolPredefined Protocol Support FunctionCPU(Serial)New Window The fields in the protocol setting window are as follows.
  • Page 465: Adding Protocols

    The procedure to set a protocol on the protocol setting screen is as follows. Adding protocols Select or create a protocol from libraries. (Page 463 Adding protocols) Configuring detailed setting of protocols Set the information and operation of protocols. (Page 464 Configuring detailed setting of protocols) Setting packets Set the packets of protocols.
  • Page 466: Configuring Detailed Setting Of Protocols

    Configuring detailed setting of protocols Set the send/reception parameters of the added protocol. Set the detailed setting of the protocol on the screen displayed by the following operation. Protocol setting screen  Select a row of any protocol on the protocol setting screen  Edit Protocol Detailed Setting Window The setting items of the above screen are as follows.
  • Page 467 Item Description Setting requirement Setting range Predefined User Protocol Add New Protocol Library Library Number of Send Set the number of times the CPU module retries    0 to 10 Retries to send when the sending from the CPU module has not been completed within the set time of monitoring time.
  • Page 468: Operations For Protocol Setting Data

    Operations for protocol setting data The protocol setting data can be written to the CPU built-in memory or an SD memory card. The written protocol data in the memory can be read and verified. The following describes the operations for the protocol setting data. Writing protocol setting data Write the protocol setting data on the screen displayed by the following operation.
  • Page 469 Reading protocol setting data Read the protocol setting data on the screen displayed by the following operation. Online  Module Read Window The procedure to read the data is as follows. Select a CPU module from which the protocol setting data is read from Module Selection.
  • Page 470: Packet Setting

    21.7 Packet Setting The send packet to the counterpart device and the receive packet from the counterpart device of when process is executed are registered in a protocol. The packet which are set with the predefined protocol support function is created with some elements.
  • Page 471: Header

    Item Description Setting requirement Setting range Predefined User Protocol Add New Protocol Library Library Protocol Type The protocol type of the selected protocol.     (Send packet or receive packet)    Packet Name The packet name of the selected packet. Arbitrarily (32 characters) List of elements ...
  • Page 472: Terminator

    Considerations for configuring packet element • Only one header can be used in a packet. • A header can be set only at the start of a packet. Data area Header Terminator Terminator Use this element when a code or character string indicating the end of the packet is included. Window Item Description...
  • Page 473: Length

    Length Use this element when an element indicating the data length is included in a 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 474: Static Data

    Caution • When the number of digits of calculation result is greater than that specified in Data Length, digits greater than the specified digit are omitted (ignored). When 2 bytes is specified in Data Length and the calculation result is 123 bytes, the data length is considered as 23. •...
  • Page 475: Non-Conversion Variable

    Non-conversion Variable Use this element to send the data in the data device as a part of a send packet, or store a part of a receive packet to the device. Use when there is a variable element in the packet format that depends on the system. For data examples of non-conversion variable, refer to Page 891 Data examples of Non-conversion Variable.
  • Page 476 Configuration of the data storage area When Fixed Length/Variable Length is Fixed Length An area starting from the device number which is specified on the Element Setting screen is considered as the data storage area. The data storage area to be occupied varies depending on the setting of Unit of Stored Data. •...
  • Page 477 Settable devices Settable devices to data storage area is follows. Device Setting range Remarks FX5S CPU FX5UJ CPU FX5U/FX5UC module module CPU module Input 0 to 1023 0 to 1023 0 to 1023 • For FX5UJ CPU module The assignment cannot be changed. Output •...
  • Page 478: Conversion Variable

    Conversion Variable This element converts the numerical data in the value of device to an ASCII string and sends it, or converts the received data (ASCII string) to numerical data and stores it to the device. When a variable element that is dependent on the system exists during packet formatting, use this function.
  • Page 479 Item Descriptions Conversion Unit Word Converts one word as one data in the data storage area. Double word Converts two words as one data in the data storage area. Sign • Unsigned Select whether to add signs to date in the data storage area. This item can be set when Conversion is HEX ...
  • Page 480 Data storage area configuration per one data The following shows the data storage area configuration per one data. • Case of Conversion Unit is Word Number of Decimals No decimal Point/Fixed point Variable point For Variable Point, the decimal point position is set in the data storage area. Data storage area Data storage area Numeric data...
  • Page 481 Devices that can be specified Settable devices to data storage area is follows. Device Setting range Remarks FX5S CPU FX5UJ CPU FX5U/FX5UC module module CPU module Input 0 to 1023 0 to 1023 0 to 1023 • For FX5UJ CPU module The assignment cannot be changed.
  • Page 482 Precautions A string other than '0'-'9', 'A'-'F', or 'a'-'f' is received. When Conversion is ASCII HexadecimalHEX, an error may occur if a string other than '0'-'9', 'A'-'F', or 'a'-'f' is received. A string other than '0'-'9' is received. When Conversion is ASCII DecimalHEX, an error may occur if a string other than '0'-'9' is received. However, the error does not occur in the following cases.
  • Page 483: Check Code

    A data that cannot be distinguished between Terminator or a Static data In received packet data from counterpart devices, CPU module needs to be able to distinguish data corresponding to a conversion variable from those of a Terminator or a Static data following a Conversion variable. The reception processing may not be performed normally if they cannot be distinguished.
  • Page 484 Item Description Remarks Data Flow Forward Direction When Select a format in which a calculated Not settable when Processing Method is (Upper byte  Lower byte) sending check code is sent. 16-bit CRC (for MODBUS), or when the Data Length is set to 1 (byte). When Select a format in which data are receiving...
  • Page 485: Non-Verified Reception

    Non-verified Reception Use this element when received data includes unnecessary data while receiving data. CPU module skips the specified number of characters if a receive packet includes a non-verified reception. For data examples of non-verified reception, refer to Page 902 Data examples of Non-verified reception. Window Item Descriptions...
  • Page 486: Programming

    21.8 Programming This section explains how to create programs for predefined protocol support function using S(P).CPRTCL instruction and how such programs operate. For details on related devices, refer to Page 493 Related Devices. For communication settings, refer to Page 460 Communication Settings. For protocol settings, refer to Page 462 Protocol Setting.
  • Page 487 Applicable devices Operand Word Double word Indirect Constant Others specification X, Y, M, L, SM, F, T, ST, C, D, W, U\G K, H B, SB, S SD, SW, R           ...
  • Page 488: Processing Details

    Device Item Description Setting Set by range (s)+15 Verification match If receiving is included in the communication type of the protocol that has been 0, 1 to 16 System Receive packet number 6 executed sixth, the receive packet number successful in verification match is stored. If the communication type is "receive only", "0"...
  • Page 489 Protocol execution status The current status of the protocol can be checked with the following devices. Name Protocol execution status SD9150 SD9170 SD9190 SD9210 The value corresponding to the current protocol execution status is stored in each of the devices above. Any of the values listed in the following table is stored in each of the devices above.
  • Page 490 Protocol Cancel Executing protocol can be canceled by the cancel request ("1" is set for the protocol cancel setting value). (Page 499 Protocol cancel specification) Then canceled protocol ends abnormally. When two or more protocols are executed consecutively, executing protocol ends and following protocols are not executed. Drive S(P).CPRTCL instruction Completion device (d)
  • Page 491 Send/receive data monitoring function With the send/receive data monitoring function, send/receive data in the communication with a counterpart device can be monitored. Set the following devices to execute monitoring or specify the storage destination data device for the send/receive data. Setting item Description Reference...
  • Page 492: Monitor Data

    Monitor data The data stored in the monitor data area is as follows. Monitoring data device specification: D device (0) Monitoring data start device No. specification: 0 Monitoring data size specification: 100 Device Data Description Program Explanation of data 0032H Monitor data device No.
  • Page 493: Program Example

    Precautions When the monitor data areas overlap for each channel, the data of the smaller channel number is overwritten with the data of the larger channel number because data are stored from the smaller channel number. Caution • If an error occurs in the "n"th protocol while multiple protocols are being executed, the instruction does not execute the "n+1"th protocol and after and is completed with an error.
  • Page 494 When the send/receive data monitoring function is used, add a program as follows. Program example Monitor start Monitor start trigger Monitoring Monitoring data device specification SD9242 (R device) Monitoring data start device No. SD9243 specification (R0) Monitoring data size specification (33 •...
  • Page 495: Related Devices

    21.9 Related Devices This section describes the special relay/special register functions used in the predefined protocol support function. Available communication channels vary depending on the CPU module and system configuration. For communication channels, refer to Page 456 System Configuration. List of related devices Special relays R: Read only Device No.
  • Page 496: Details Of Related Devices

    Device No. Name Description SD9233 SD9243 SD9253 SD9263 Monitoring data start device The start device number of word devices used as the monitor data No. specification areas is stored. SD9234 SD9244 SD9254 SD9264 Monitoring data size The size of word devices used as the monitor data areas is stored in specification word units.
  • Page 497 Serial communication settings The communication parameters set in the communication settings are stored when the power is turned OFFON, STOPRUN or the reset. (Page 460 Communication Settings) R: Read only Description SD8502 SD8512 SD8522 SD8532 Stores the setting of the communication parameter. The descriptions of the communication parameters are as follows.
  • Page 498 Predefined protocol ready The reflected status after the protocol setting data has been written is stored. For details on operation, refer to Page 487 Information to judge whether the predefined protocol can be executed or not. R: Read only Device Description SD9102 0: Error...
  • Page 499 Predefined protocol setting data error information: Packet No. When a protocol setting data error was detected, the number of the packet where the error has occurred is stored. Starting from the smallest number of the send packets and receive packets (expected packets), packets are checked in order, and the packet number of the packet where the error has first been detected is stored.
  • Page 500 Predefined protocol: Protocol registration The ON/OFF state of the bit corresponding to a protocol number indicates whether the protocol setting data has been registered or not. R: Read only Device Description SD9132 A bit corresponding to each protocol number is turned on or off. 1 to 16 ( b0 to b15) SD9133 A bit corresponding to each protocol number is turned on or off.
  • Page 501 Protocol cancel specification The protocol in execution can be cancelled with a value to be stored in this area. For details, refer to Page 488 Protocol Cancel. R/W: Read/write Description SD9169 SD9189 SD9209 SD9229 0: Normal operation (do not cancel) 1: Cancel request 2: Cancel operation completed Send/receive data monitoring function setting...
  • Page 502 Monitoring data start device No. specification The start device number of word devices used as the monitor data areas with the send/receive data monitoring function is stored. For details, refer to Page 490 Monitor data. W: Write only Description SD9233 SD9243 SD9253 SD9263...
  • Page 503: Part 3 Modbus/Tcp Communication

    PART 3 MODBUS/TCP COMMUNICATION This part consists of the following chapters. 22 OUTLINE 23 SPECIFICATIONS 24 MODBUS/TCP COMMUNICATION SPECIFICATIONS 25 COMMUNICATION SETTING 26 FUNCTION...
  • Page 504: Chapter 22 Outline

    OUTLINE This chapter explains the FX5 MODBUS/TCP communication (slave station). For details on the predefined protocol support function, refer to the following. Page 102 PREDEFINED PROTOCOL SUPPORT FUNCTION 22.1 Outline of Function The FX5 MODBUS/TCP communication function allows communication, via Ethernet connection, with various MODBUS/TCP master devices which are connected to FX5 set as the slave station.
  • Page 505: Procedure For Operation

    22.2 Procedure for Operation The flow chart below shows the procedure for setting up a MODBUS/TCP communication (slave station): Check communication specifications (Page 504 Communication Specifications, Page 506 MODBUS/TCP COMMUNICATION SPECIFICATIONS) • Communication specifications • MODBUS serial communication specifications Details of MODBUS standard functions Communication settings (Page 508 COMMUNICATION SETTING) •...
  • Page 506: Chapter 23 Specifications

    SPECIFICATIONS This chapter explains the specifications of MODBUS/TCP communication. 23.1 Communication Specifications MODBUS/TCP communication is executed within the specifications shown in the table below. For details on communication specifications other than those shown below, refer to the following. Page 26 SPECIFICATIONS Item Specification Protocol type...
  • Page 507 MEMO 23 SPECIFICATIONS 23.1 Communication Specifications...
  • Page 508: Chapter 24 Modbus/Tcp Communication Specifications

    MODBUS/TCP COMMUNICATION SPECIFICATIONS This chapter explains the details of MODBUS Protocol for MODBUS/TCP communication and the MODBUS standard functions supported by the FX5. For usage of the supported MODBUS standard functions, refer to the following. Page 512 FUNCTION 24.1 MODBUS Protocol Frame specifications The following figure illustrates the frame specifications for the MODBUS protocol.
  • Page 509: List Of Supported Modbus Standard Functions

    List of supported MODBUS standard functions The following table lists the MODBUS standard functions supported by the MODBUS/TCP communication of FX5. Function code Function Name Details Accessible Reference devices per message Read coils Read binary (R/W) devices 1 to 2000 points Page 907 Read inputs Read binary (RO) devices...
  • Page 510: Chapter 25 Communication Setting

    COMMUNICATION SETTING This chapter explains the setup method for using slave station in MODBUS/TCP communication with an FX5. 25.1 Setup Method for Port No. Set the port No. to identify the communication between the slave station and the master station. Navigation window ...
  • Page 511: Setup Method For Modbus/Tcp Communication

    25.2 Setup Method for MODBUS/TCP Communication For the MODBUS/TCP communication setting of the FX5, set parameters with GX Works3. Navigation window  [Parameter]  Module model name  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [MODBUS/TCP Settings] Window Item Setting Remarks...
  • Page 512: Contents Of Parameter Setting

    Contents of parameter setting The device allocation used for parameter setting of MODBUS/TCP communication are as follows. MODBUS device allocation In the MODBUS device allocation, initial values are set for parameters. (Refer to Page 916 FX5 dedicated pattern.) Parameter contents can be changed from the following screen of GX Works3. Navigation window ...
  • Page 513 Available devices The following table shows devices that can be set to coil, input, input register, and holding register. List of devices Allocable MODBUS device Device type Device Coil Input Input register Holding register Special relay     ...
  • Page 514: Chapter 26 Function

    FUNCTION This chapter explains the function of MODBUS/TCP communication. 26.1 Master Function The master station of FX5 executes communication between the master station and the slave station by using the predefined protocol support function. The CPU module executing the predefined protocol support function will be the master station. The communication setup method and procedure for program of MODBUS/TCP communication (master) are shown below.
  • Page 515: Protocol Settings

    Protocol settings Send the request message from the master station to the slave station through the predefined protocol support function. Create the protocol data of MODBUS function requesting to the slave station. [Tool]  [Predefined Protocol Support Function]  [File]  [New]  "Protocol Setting" screen  [Edit]  [Add Protocol] Set the following items, and add the protocol of MODBUS/TCP communication.
  • Page 516: Slave Function

    Program The flow of the program performing the MODBUS/TCP communication by the FX5 master station is shown below. Establishes a connection Open a connection of the slave station for communication by SP.SOCOPEN instruction. Executes the protocols Execute the protocol (MODBUS standard function) set to the slave station for communication by SP.ECPRTCL instruction. Closes a connection Close a connection of the slave station for communication by SP.SOCCLOSE instruction.
  • Page 517: Related Devices

    26.3 Related Devices In this section, the functions of the special registers are described for MODBUS/TCP communication. The table shows the special registers used for the FX5 MODBUS/TCP communication. R: Read only Device number Name Valid Details SD10130 to SD10137 Error code Master/ Error code of built-in Ethernet (connection 1 to connection...
  • Page 518 MEMO 26 FUNCTION 26.3 Related Devices...
  • Page 519: Part 4 Modbus Serial Communication

    PART 4 MODBUS SERIAL COMMUNICATION This part consists of the following chapters. 27 OUTLINE 28 CONFIGURATION 29 SPECIFICATIONS 30 MODBUS COMMUNICATION SPECIFICATIONS 31 WIRING 32 COMMUNICATION SETTING 33 FUNCTION 34 CREATING PROGRAMS...
  • Page 520: Chapter 27 Outline

    OUTLINE This chapter explains the FX5 MODBUS serial communication. • When predefined protocol support function is used, refer to the following. Page 455 PREDEFINED PROTOCOL SUPPORT FUNCTION 27.1 Outline of Function The FX5 MODBUS serial communication function can control 32 slaves for RS-485 communication and one slave for RS- 232C communication by a single master.
  • Page 521: Procedure For Operation

    27.2 Procedure for Operation The flow chart below shows the procedure for setting up a MODBUS serial communication network: Check communication specifications (Page 523 SPECIFICATIONS, Page 527 MODBUS COMMUNICATION SPECIFICATIONS) • Communication Specifications Link Time • MODBUS Serial Communication Specifications MODBUS Serial Communication Protocol, Details of MODBUS Standard Functions System configuration and selection (Page 520 CONFIGURATION) •...
  • Page 522: Chapter 28 Configuration

    CONFIGURATION This chapter explains the configuration of RS-485 and RS-232C communication of the FX5. 28.1 System Configuration This section outlines the system configuration required to use MODBUS serial communication. FX5S CPU module For FX5S CPU modules, up to two channels of communication port can be connected by using communication boards and communication adapters.
  • Page 523 FX5UJ CPU module In FX5UJ CPU module, up to two communication port channels can be connected to a CPU module using communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. The combinations which can be configured are shown below. [Configuration example 1] [Configuration example 2] CH4: Communication adapter 2...
  • Page 524 FX5U CPU module In FX5U CPU module, up to four communication port channels can be connected to a CPU module using built-in RS-485 port, communication board, and communication adapter. Communication channel assignments are fixed regardless of the system configuration. CH4: Communication adapter 2 CH3: Communication adapter 1 CH1: Built-in RS-485 port CH2: Communication board...
  • Page 525: Chapter 29 Specifications

    SPECIFICATIONS This chapter explains the specifications of MODBUS serial communication. 29.1 Communication Specifications MODBUS serial communication is executed within the specifications shown in the table below. The baud rate, etc. can be changed in the parameter settings of GX Works3. Item Specifications Remarks...
  • Page 526: Link Time

    29.2 Link Time The link time indicates the cycle time in which a master module completes a single instruction with a slave, as illustrated by the diagram below. ADPRW SM8029 Instruction execution complete flag SM8029 Master processing time (Tm) Master Message to Message Delay Command...
  • Page 527 The master processing time (Tm) can be calculated in milliseconds (ms) as follows. "INT(n)" indicates an integer obtained by truncating decimal places of "n". Character length (bits): Start bit (1 bit) + Data Length (8 bit) + Parity bit (0 bit or 1 bit) + Stop bit (1 bit or 2 bit) Tm = T1 + T2 + T3 Max.
  • Page 528 Example link time calculations: Master processing time (Tm) SD8864 5 ms Max. scan time 5 ms Function Read holding registers 0 to 9 (function code: 03H) Frame mode RTU mode Number of bytes in request = 8 bytes (Address: 1 byte, Frame: 5 bytes, CRC: 2 bytes) Number of bytes in 25 bytes (Address echo: 1 byte, Frame: 22 bytes, CRC: 2 bytes) response...
  • Page 529: Chapter 30 Modbus Communication Specifications

    MODBUS COMMUNICATION SPECIFICATIONS This chapter explains the details of MODBUS Protocol for MODBUS serial communication and the MODBUS standard functions supported by the FX5. For usage of the supported MODBUS standard functions, refer to the following. Page 540 FUNCTION 30.1 MODBUS Protocol The following figure illustrates the frame specifications for the MODBUS protocol.
  • Page 530: Frame Mode

    Frame mode For the FX5, the following frame modes are available. If the frame mode of the FX5 differs from the one of the target device, it cannot be used. Available frame modes RTU mode In this mode, frames are received or sent in binary codes. The frame specifications are compliant with the MODBUS protocol specifications.
  • Page 531: Chapter 31 Wiring

    WIRING This chapter explains the wiring. 31.1 Wiring Procedure Preparing for wiring Prepare cables required for wiring. (Page 529 Selecting Connection) Turning off the power to the programmable controller Before wiring, make sure that the power of the programmable controller is off. Wiring communication equipment Connect RS-485 or RS-232C communication equipment.
  • Page 532: Connecting Cables

    Connecting cables The table below shows applicable cables and tightening torques. Item Number of Cable size Tightening connected electric torque Solid wire, Stranded wire Wire ferrule with wires per terminal insulating sleeve FX5U CPU module built-in RS-485 port 1-wire connection 0.2 to 0.5...
  • Page 533: Termination Resistor Setting

    Termination resistor setting Make sure to provide a termination resistor at each end of a line. Built-in RS-485 port, FX5-485-BD, and FX5-485ADP have a built-in termination resistor. Set the termination resistor selector switch accordingly. Wiring Termination resistor selector switch Two-pair wiring 330...
  • Page 534: Connection Diagram

    31.3 Connection Diagram Representative wiring examples are shown in this section. When pin numbers in the counterpart equipment are different, wire the pins as shown below. Connection diagram for RS-232C External equipment operating in Programmable controller accordance with RS-232C FX5-232-BD Using CS and RS Using DR and ER Name...
  • Page 535: Grounding

    Two-pair wiring Master Slave Slave Slave built-in RS-485 port built-in RS-485 port built-in RS-485 port built-in RS-485 port FX5-485-BD FX5-485-BD FX5-485-BD FX5-485-BD FX5-485ADP FX5-485ADP FX5-485ADP FX5-485ADP (TXD+) (TXD+) (TXD+) (TXD+) (TXD-) (TXD-) (TXD-) (TXD-) (RXD+) (RXD+) (RXD+) (RXD+) (RXD-) (RXD-) (RXD-) (RXD-) Termination...
  • Page 536: Chapter 32 Communication Setting

    COMMUNICATION SETTING This chapter explains the setup method for using MODBUS serial communication with an FX5. 32.1 Setup Method for MODBUS Serial Communication For the MODBUS serial communication setting of the FX5, set parameters with GX Works3. Setting of parameter differs according to the module used. The procedure for each module is as follows. Using the CPU module Navigation window ...
  • Page 537 Fixed Setting Item Setting Corresponding station Host Station No. 0 to 247 (Master station: 0, Slave station: 1 to 247) Master/Slave Slave Response Timeout 1 to 32767ms Master/Slave Broadcast Delay 1 to 32767ms Master/Slave Message to Message Delay 1 to 16382ms Master/Slave Timeout Retry Count Setting 0 to 20 times...
  • Page 538: Using An Extended Board

    SM/SD Setting Item Setting Corresponding station  Advanced Settings Do Not Latch Host Station No. Do Not Latch, Latch Master/Slave  Slave Response Timeout Do Not Latch  Broadcast Delay Do Not Latch  Message to Message Delay Do Not Latch ...
  • Page 539: Contents Of Parameter Setting

    Contents of parameter setting The MODBUS device allocation, Latch Setting, SM/SD storage area specification which are used for parameter setting of MODBUS serial communication are as follows. MODBUS device allocation In the MODBUS device allocation, initial values are set for parameters. (Refer to Page 916 FX5 dedicated pattern.) Parameter contents can be changed with following screen of GX Works3.
  • Page 540: Available Devices

    Available devices The following table shows devices that can be set to coil, input, input register, and holding register. List of devices Allocable MODBUS device Device type Device Coil Input Input register Holding register Special relay     ...
  • Page 541 Latch setting In latch setting, it can be set up whether the host number should operate using the GX Works3 parameter or special register. • In the case of "Do Not Latch", the host number operates using the value set by the parameter setting of GX Works3. •...
  • Page 542: Chapter 33 Function

    FUNCTION This chapter explains the function of MODBUS serial communication. 33.1 Master Function In the FX5 master function, communication is executed with the slave station using the ADPRW instruction. ADPRW [When six operands are used] This instruction allows to communicate (read/write data) with the slave station by the function code which is supported by the master.
  • Page 543 Available devices Operand Word Double word Indirect Constant Others specification X, Y, M, L, SM, F, T, ST, C, D, W, U\G K, H B, SB, S SD, SW, R           ...
  • Page 544 (s2): Function code (s3): MODBUS address (s4): Access points (s5)/(d1): Start device storing data Applicable device:  (Refer to the following table of the applicable devices.) MODBUS address: 0 (fixed) Start device storing write data Write coils 0000H to FFFFH Applicable Word device ...
  • Page 545 Precautions • Configure the MODBUS master station settings for the channel that uses the ADPRW instruction in GX Works3. (Page 535 Fixed Setting) When it is not set, the device does not operate even though the ADPRW instruction is executed. (Also no error occurs.) •...
  • Page 546: Specification

    Available devices Operand Word Double word Indirect Constant Others specification X, Y, M, L, SM, F, T, ST, C, D, W, U\G K, H B, SB, S SD, SW, R           ...
  • Page 547 (s2): Function code (s3): MODBUS address (s4): Access points (s5)/(d1): Start device storing data Applicable device:  (Refer to the following table of the applicable devices.) MODBUS address: 0 (fixed) Start device storing write data Write coils 0000H to FFFFH Applicable Word device device...
  • Page 548: Slave Function

    Precautions • Configure the MODBUS master station settings for the channel that uses the ADPRW instruction in GX Works3. (Page 535 Fixed Setting) When it is not set, the device does not operate even though the ADPRW instruction is executed. (Also, no error occurs.) •...
  • Page 549: List Of Related Devices

    List of related devices Special relays The table shows the special relays used for the FX5 MODBUS serial communication. Only for FX5 R: Read only, R/W: Read/write Device number Name Valid Details SM8500 SM8510 SM8520 SM8530 Serial communication error Master/ Turns on when an error occurs during the serial Slave communication.
  • Page 550: Special Registers

    Special registers The table shows the special registers used for the FX5 MODBUS serial communication. Only for FX5 R: Read only, R/W: Read/write Device number Name Valid Details SD8500 SD8510 SD8520 SD8530 Serial communication error Master/ Stores the current error code generated during serial code Slave communication.
  • Page 551: Details Of Related Devices

    Details of related devices Instruction execution complete This device checks whether the execution of the instruction is completed. R: Read only Only for FX5 For FX3 series Description compatibility SM8029 Turns on if the processing of the instruction is completed. SM8029 is also used as the execution completed flag for other instructions (such as positioning instructions).
  • Page 552 MODBUS communication error (latched) This device checks if an error occurs during MODBUS serial communication. R: Read only For FX3 series compatibility Description SM8403 SM8423 Turns on once an error occurs during MODBUS serial communication. Precautions Do not turn ON with program or engineering tool. The device is cleared when the power supply is turned from off to on, reset, or set from STOP to RUN.
  • Page 553 Timeout This device checks if a timeout occurs during MODBUS serial communication. R: Read only Only for FX5 For FX3 series Description compatibility SM8802 SM8812 SM8822 SM8832 SM8409 SM8429 Turns on if a response timeout occurs. Precautions Do not turn ON with program or engineering tool. The device is cleared when the power supply is turned from off to on, reset, set from STOP to RUN, SM50 (Error Detection Reset Completion) is turned on, or the next ADPRW instruction is executed.
  • Page 554 Serial communication error details This device stores the current error details during serial communication. (Page 856 MODBUS Serial Communication) R: Read only Only for FX5 For FX3 series Description compatibility SD8501 SD8511 SD8521 SD8531 SD8403 SD8423 Stores the current error details generated during serial communication.
  • Page 555 Operation mode display This device stores the operation mode of the serial communication being executed. R: Read only Only for FX5 For FX3 series Description compatibility SD8503 SD8513 SD8523 SD8533 SD8419 SD8439 0: MELSOFT connection or MC protocol 3: N:N Network Communication 5: Non-Protocol Communication 6: Parallel Link Communication 7: Inverter Communication...
  • Page 556 Slave response timeout This device stores the slave response timeout setting value. R: Read only Only for FX5 Description SD8862 SD8872 SD8882 SD8892 Stores the parameters (slave response timeout) set by an engineering tool. Precautions The setting value is reflected when the power supply is turned from off to on, reset, or the next ADPRW instruction is executed.
  • Page 557: Chapter 34 Creating Programs

    CREATING PROGRAMS This chapter explains an example of creating programs for the master in MODBUS serial communication. 34.1 Creating Programs for the Master Station Programs allowing the master station to read and write slave station devices can be created as shown in the example below. For the ADPRW instruction, refer to Page 540 ADPRW [When six operands are used].
  • Page 558: Cautions On Program Creation

    34.2 Cautions on Program Creation • Make sure the driving contact of the ADPRW instruction does not turn off until the instruction has been completed. • For the ADPRW instruction, a start timing of communication differs depending on the condition at the time of driving. When the ADPRW instruction is driven alone, communication is instantaneously started.
  • Page 559: Part 5 Slmp

    PART 5 SLMP This part consists of the following chapters. 35 OUTLINE 36 SLMP DATA COMMUNICATION 37 MESSAGE FORMAT 38 3E FRAME COMMANDS 39 1E FRAME COMMANDS...
  • Page 560: Chapter 35 Outline

    OUTLINE This manual describes the compatible devices, access ranges, communication procedures, and message formats of the SLMP. When transferring data using SLMP, always refer to Page 562 SLMP DATA COMMUNICATION. 35.1 Outline of SLMP SLMP is a protocol used for access from an Ethernet-equipped module or an external device (such as a personal computer or an HMI) to an SLMP compatible device through Ethernet.
  • Page 561: Features Of Slmp

    Data communication procedures The following shows the flow for starting SLMP communication. For details, refer to the following. Page 92 SLMP FUNCTION Connecting cables and external devices Make the connections for SLMP communication. Setting parameters Configure the module parameters with the engineering tool. Writing to the Ethernet-equipped module Write the parameters set in the Ethernet-equipped module.
  • Page 562: Access Via Network

    Connecting an external device used with MC protocol An external device that uses the QnA compatible 3E frame of MC protocol and A compatible 1E frame of MC protocol can be connected to an Ethernet-equipped module directly. External device (MC protocol) CPU module Ethernet module Personal computer...
  • Page 563 Easy SLMP communication with the predefined protocol support function SLMP communication can be easily used with the predefined protocol support function of the engineering tool. Like external devices communicating on SLMP, CPU modules can control SLMP-compatible devices. SLMP-compatible device Request message Read command of internal memory SLMP Memory...
  • Page 564: Chapter 36 Slmp Data Communication

    SLMP DATA COMMUNICATION This chapter describes the SLMP data communication by which the external equipment reads or writes data to an Ethernet- equipped module. 36.1 Type and Application of the Data Communication Frame This section describes the type and application of the frame (data communication message) by which the external equipment accesses an Ethernet-equipped module with SLMP.
  • Page 565: Allowable Access Range Of Each Data Communication Frame

    36.2 Allowable Access Range of Each Data Communication Frame The following shows the frame and access range of a message used in SLMP. SLMP frame Frame Type of the network which connects the Reference external device with the connecting stations Ethernet communication frame Ethernet Page 566 MESSAGE FORMAT...
  • Page 566: 36.4 Access Timing Of The Ethernet-Equipped Module Side

    36.4 Access Timing of the Ethernet-equipped Module Side The following shows the access timing of the Ethernet-equipped module side when the Ethernet port of the Ethernet-equipped module is accessed from the external device. • RUN External device Response to a command Read/Write command (Response) (Command)
  • Page 567: Transfer Time

    36.5 Transfer Time This section describes the method for calculating the link time of the CPU module. The link time between Ethernet modules varies depending on the usage of other intelligent function modules. Link time Calculation method Calculate the minimum processing time of the SLMP communication by the following calculation formula. However, the processing time may become longer depending on the load of the network (how much a line is crowded), window size of each connecting device, number of connections to be used simultaneously, and system configuration.
  • Page 568: Chapter 37 Message Format

    MESSAGE FORMAT This chapter describes the message data format, the data specification method, and limitations etc. when performing SLMP data communication using the 3E frame to the Ethernet port. Frame type Ethernet port Remarks 3E frame Communicable The message format is the same as the QnA compatible 3E frame of MC protocol.
  • Page 569: Application Data

    Application data Application data is divided into subheader and text. The subheader indicates whether a message is a command message or a response message. (Page 567 Subheader configuration) Text is the request data (command) and the response date (response) in each function. (Page 606 3E FRAME COMMANDS) When communicating data in ASCII code The text differs depending...
  • Page 570 Data code (ASCII/binary) to be used when communicating, it is determined by the parameters of GX Works3. [CPU module] Navigation window  [Parameter]  Module model  [Module Parameter]  [Ethernet Port]  [Basic Settings]  [Own Node Settings]  "Communication Data Code" [Ethernet module] Navigation window ...
  • Page 571 • When data is written from external equipment to an Ethernet-equipped module External equipment Ethernet-equipped module (command message) Character area C Text (command) Request data area (Data name) (Example) 35H 30H 30H 30H 46H 46H 30H 33H 46H 46H 30H 30H 30H 30H 32H 30H 30H 30H...
  • Page 572 When communicating data in binary code • When data is read from an Ethernet-equipped module by external equipment External equipment Ethernet-equipped module (command message) Character area A Text (command) Request data area (Data name) (Example) 50H 00H 00H FFH FFH 03H 00H 0CH 00H 00H ((Example) For 12 bytes)
  • Page 573 • When data is written from external equipment to an Ethernet-equipped module External equipment Ethernet-equipped module (command message) Character area A Text (command) Request data area (Data name) (Example) 50H 00H 00H FFH FFH 03H 00H 0CH 00H 00H ((Example) For 12 bytes) Ethernet-equipped module External equipment (response message) (When completed normally)
  • Page 574: Application Data Specification Items

    Application data specification items This section describes the data contents and the specification method of common data items in the application data in each message when performing the data communication using the 3E frame. Request destination network number and request destination station number Request message Header Application data...
  • Page 575 Another station Another station Multi-drop connection Multi-drop Multi-drop Multi-drop Connecting Relay connecting connecting connecting External device station station station station station Network Network No. 1 No. n MELSEC iQ-R series etc. Ethernet Another station Another station No. 1 No. 2 No.
  • Page 576 Request destination module I/O number Request message Header Application data Subheader Request Request Request Request Request Monitoring Command Subcommand Request destination destination destination destination data timer data multidrop length network station No. module I/O station No. Response message Header Application data Subheader Request Request...
  • Page 577 Request destination multi-drop station number Request message Header Application data Subheader Request Request Request Request Request Monitoring Command Subcommand Request destination destination destination destination data timer data network station No. module I/O multidrop length station No. Response message Header Application data Response Response Subheader...
  • Page 578 Request data length Request message Header Application data Subheader Request Request Request Request Request Monitoring Command Subcommand Request destination destination destination destination data timer data multidrop length network station No. module I/O station No. Specify the total data size from the Monitoring timer to the request data in hexadecimal. (Unit: byte) When the request data length is 24 (18H) bytes ASCII code Binary code...
  • Page 579 Monitoring timer Request message Header Application data Subheader Request Request Request Request Request Monitoring Command Subcommand Request destination destination destination destination data timer data network station No. module I/O multidrop length station No. This timer is used to set the wait time until a response is returned after the SLMP-compatible device that has received a request message from an external device sends a processing request to the accessed device.
  • Page 580 End code Response message Header Application data Subheader Request Request Request Request Response Response destination destination destination destination data length code data multidrop network station No. module I/O station No. The command processing result is stored. When normally completed, "0000H" is stored. When completed with error, an error code set at the request destination is stored.
  • Page 581: Error Information

    Error information The request destination network number, request destination station number, request destination module I/O number, and request destination multi-drop station number of the station which responded with errors are stored. Numbers which differ from the requested station specified by the request message may be stored because the information of the station which responded with errors is stored.
  • Page 582 Communicating data (when communicating in ASCII code) When bit device memory is read or written The bit device memory is handled in 1-bit (1-point) units or in 1-word (16-point) units. The transfer data in each case is described below. • In 1-bit (1-point) units When the bit device memory is handled in 1-bit units, specify 1-point (1-byte) with an ASCII code, and express "1"...
  • Page 583: When Word Device Memory Is Read Or Written

    When word device memory is read or written One word device is expressed with a 1-word (4-byte) 4-digit ASCII code (hexadecimal). Specify for the number of devices starting from the start device in 1-word units in the order from the most significant byte to the least significant byte (b15 to b0). When indicating the contents stored in the data registers D350 and D351 Device Number of...
  • Page 584 Communicating data (When communicating data in binary code) When bit device memory is read or written The bit device memory is handled in 1-bit (1-point) units or in 1-word (16-point) units. The transfer data in each case is described below. •...
  • Page 585 When word device memory is read or written One word device memory is expressed with a 1-word (2-byte) 4-digit binary code (hexadecimal). Specify for the number of devices starting from the start device in 1-word units in the order from the least significant bytes (b7 to b0) to the most significant bytes (b15 to b8).
  • Page 586: Character Areas

    Character areas This section explains character areas in the control procedure (data area when communicating in binary code). • Character areas differ depending on command to be used and contents to be specified. This section explains the data common to the character area when the device memory to be read or written is specified directly. •...
  • Page 587 Data of data area (when communicating in binary code) In the case of reading Data area (corresponding to character area A) External equipment Data area (corresponding to character area B) Ethernet-equipped module In the case of writing Data area (corresponding to character area C) External equipment Ethernet-equipped module...
  • Page 588: Device Code

    When communicating data in ASCII code The value 0000H (0), or the following value (), is converted to a 4 digit (hexadecimal) ASCII code and sequentially transmitted beginning from the most significant digit ("0"). When communicating data in binary code The value 0000H, or the following 2-byte value (), is used for transmission.
  • Page 589 Start device No. (device No.) Data is used to specify the device number where data is read or written. When specifying continuous device areas, specify the start number of the device range. Specify the start device number by the expressing method for the relevant device (octal, decimal, or hexadecimal number).
  • Page 590 Number of device points This data is for specifying the number of points to be read or written when each command is executed. It must be specified within the limits of the number of points that can be processed per communication. (Page 614 Commands) When communicating data in ASCII code Points are converted into 4-digit ASCII code (hexadecimal) and sequentially sent from the upper byte to lower byte.
  • Page 591 Device memory extension specification (subcommand: bit7) For details, refer to  Page 918 Device Memory Extension Specification. This section explains how to read or write a device from/to module access device areas and how to specify a device indirectly by using index register. Message format Response messages are extended as well.
  • Page 592 Module access device specification The following shows the approach for module access device specification in programming and request data. Extension Device Start device No. specification code or device No. • Extension specification Specify the start I/O number of intelligent function modules. ASCII code Binary code Specify the start I/O number in hexadecimal (3-digit ASCII code).
  • Page 593: Frame

    37.2 1E Frame This section describes the message format for each command when performing the data communication using the 1E frame. Message format and control procedure This section describes the message format and the control procedures when performing the data communication using the 1E frame.
  • Page 594 When communicating data in binary code The text differs depending on the function and whether Application data the command ends normally or not. 1 byte External equipment Subheader Text (command) Subheader Text (response) 1 byte The text differs Ethernet-equipped module depending on the function.
  • Page 595 When communicating data in ASCII code • When data is read from an Ethernet-equipped module by external equipment External equipment Ethernet-equipped module (command message) Text (command) Character area A Request data area (Data name) (Example) 30H 31H 46H 46H 30H 30H 30H 30H Ethernet-equipped module External equipment (response message)
  • Page 596 When communicating data in binary code • When data is read from an Ethernet-equipped module by external equipment External equipment Ethernet-equipped module (command message) Text (command) Character area A Request data area (Data name) (Example) 01H FFH 30H 30H Ethernet-equipped module External equipment (response message) (When completed normally) (When completed with error)
  • Page 597: Application Data Specification Items

    Application data specification items This section describes the data contents and the specification method of common data items in the application data in each message when performing the data communication using the 3E frame. PC No. Request message Header Application data Specify the request destination PC No.
  • Page 598 When communicating data in binary code Sending from the lower byte to the upper byte. Precautions Specify "0000H" (indefinite wait) for the CPU module. When specifying the 0000H (Unlimited wait) ASCII code Binary code 00H 00H Monitoring timer Monitoring timer End code Response message Header...
  • Page 599: Transfer Data In Character Area

    Response data Response message Header Application data The processing result of the request data is stored. (Some commands do not return response messages.) For details on the response data, refer to the paragraph relating to the command to be executed. (Page 672 Device Access) Transfer data in character area This section describes how to transfer bit device data and word device data and data alignment in the character area sent and...
  • Page 600 Communicating data (when communicating in ASCII code) When bit device memory is read or written The bit device memory is handled in 1-bit (1-point) units or in 1-word (16-point) units. The transfer data in each case is described below. • In 1-bit (1-point) units When the bit device memory is handled in 1-bit units, specify 1-point (1-byte) with an ASCII code, and express "1"...
  • Page 601: When Word Device Memory Is Read Or Written

    When word device memory is read or written One word device is expressed with a 1-word (4-byte) 4-digit ASCII code (hexadecimal). Specify for the number of devices starting from the start device in 1-word units in the order from the most significant byte to the least significant byte (b15 to b0). When indicating the contents stored in the data registers D350 and D351 Number Fixed...
  • Page 602 Communicating data (When communicating data in binary code) When bit device memory is read or written The bit device memory is handled in 1-bit (1-point) units or in 1-word (16-point) units. The transfer data in each case is described below. •...
  • Page 603 When word device memory is read or written One word device memory is expressed with a 1-word (2-byte) 4-digit binary code (hexadecimal). Specify for the number of devices starting from the start device in 1-word units in the order from the least significant bytes (b7 to b0) to the most significant bytes (b15 to b8).
  • Page 604: Character Areas

    Character areas This section explains character areas in the control procedure (data area when communicating in binary code). • Character areas differ depending on command to be used and contents to be specified. This section explains the data common to the character area when the device memory to be read or written is specified directly. •...
  • Page 605 Data of data area (when communicating in binary code) In the case of reading Data area (corresponding to character area A) External equipment Data area (corresponding to character area B) Ethernet-equipped module In the case of writing Data area (corresponding to character area C) External equipment Ethernet-equipped module...
  • Page 606 Data contents common to character areas Device name (Device code) Device codes are data for identifying the device memory to be read or written. Device codes are shown in Page 673 Device range. When communicating data in ASCII code Device codes are converted into 4-digit ASCII code (hexadecimal), and the device codes are sequentially sent beginning from the most significant digit.
  • Page 607 Number of device points This data is for specifying the number of points to be read or written when each command is executed. It must be specified within the limits of the number of points that can be processed per communication. (Page 672 Commands) When communicating data in ASCII code Points are converted into 4-digit ASCII code (hexadecimal), and the device codes are sequentially sent from the upper byte to lower byte.
  • Page 608: Chapter 38 3E Frame Commands

    3E FRAME COMMANDS This chapter explains 3E frame commands of SLMP. For parts of the transmission message other than the command part, refer to Page 566 3E Frame. 38.1 List of Commands and Functions This section describes commands and functions when accessing from the external equipment to the Ethernet-equipped module.
  • Page 609 Name Command Subcommand Processing content Number of points processed per communication Device Read 0403H 0000H This command reads data from word devices in units of 1 ASCII: Random word or 2 words by randomly specifying device numbers. (Word access points + double-word access points) ...
  • Page 610 Name Command Subcommand Processing content Number of points processed per communication Device Read 0406H 0080H With n points of buffer memory in intelligent function ASCII: Block modules and SLMP-compatible devices as 1 block, this (Number of word device blocks + number of bit device blocks) ...
  • Page 611 Name Command Subcommand Processing content Number of points processed per communication Device Write 1406H 0082H With n points of buffer memory in intelligent function ASCII: Block modules and SLMP-compatible devices as 1 block, this (Number of word device blocks + number of bit device blocks) ...
  • Page 612 Ethernet module, FX5-CCLGN-MS, FX5-CCLIEF, FX5-40SSC-G, FX5-80SSC-G Name Command Subcommand Processing content Number of points processed per communication Device Read 0401H 0001H This command reads data from a bit device in units of 1 bit. ASCII: 1792 points (Batch) BIN: 3584 points 0000H •...
  • Page 613 Name Command Subcommand Processing content Number of points processed per communication Device Read 0403H 0000H This command reads data from bit devices and word ASCII: Random devices in units of 1 word or 2 words by randomly specifying (Word access points + double-word access points) ...
  • Page 614 Name Command Subcommand Processing content Number of points processed per communication Device Read 0406H 0000H With n points of bit devices and word devices as 1 block, ASCII: Block this command reads data by randomly specifying multiple (Number of word device blocks + number of bit device blocks) ...
  • Page 615 Name Command Subcommand Processing content Number of points processed per communication Device Write 1406H 0082H • With n points of buffer memory in intelligent function ASCII: Block modules as 1 block, this command writes data by (Number of word device blocks + number of bit device blocks) ...
  • Page 616: Device Access

    38.2 Device Access This section explains the control procedure specification method and shows a specification example when the device memory is read and written. Commands This section explains commands when the device memory is read or written. Commands Function Command Processing content (Subcommand) Device Read (Batch)
  • Page 617: Device Range

    Device range This section shows accessible CPU module device. Specify the device and device number range that exist in the module targeted for data read or write. In the case of Ethernet-equipped module Classification Device Type Device code Device No. Device (Device specification compatibility...
  • Page 618: Device Compatibility

    Classification Device Type Device code Device No. Device (Device specification compatibility format: 4 digit code/8 digit number specification) ASCII code Binary code Internal user Counter Contact Specify within the Decimal  device (CS**) (C400H) device No. range of the module for ...
  • Page 619 *1 [ASCII code] If the device code is less than the specified character number, add "*" (ASCII code: 2AH) or a space (ASCII code: 20H) after the device code. [Binary code] When "Device code" is less than the size specified add "00H" at the end of the device code. *2 : SLMP-compatible device : FX5-incompatible device : SLMP-incompatible device...
  • Page 620: Device Read (Batch)

    Device Read (Batch) Data in devices are read in a batch. Request data When communicating data in ASCII code 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 6 bytes 4 bytes When extension is Device Subcommand Start device No.
  • Page 621: Device Code

    Subcommand Specify the subcommand selected from the item. Item Subcommand Data size Device Device memory ASCII code Binary code specification specification extension (Upper column: characters, lower column: format specification character code) Bit units 2 digit code/6 digit Not specified number specification Specified 4 digit code/8 digit Specified...
  • Page 622 Communication example When reading data in bit units M100 to M107 are read. • When communicating data in ASCII code (Request data) Device Subcommand Start device No. Number of devices code 30H 34H 30H 31H 30H 30H 30H 31H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H...
  • Page 623 • When communicating data in binary code (Request data) Device code Subcommand Start Number of devices device No. 01H 04H 00H 00H 64H 00H 00H 90H 02H 00H (Response data) 34H 12H 02H 00H 0 = OFF 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 = ON M107 M100 M115...
  • Page 624: Device Write (Batch)

    Device Write (Batch) Data in devices are written in a batch. Request data When communicating data in ASCII code 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 6 bytes 4 bytes When extension Number Device Write data for the Subcommand Start device No.
  • Page 625 Subcommand Specify the subcommand selected from the item. Item Subcommand Data size Device Device memory ASCII code Binary code specification specification extension (Upper column: characters, lower column: format specification character code) Bit units 2 digit code/6 digit Not specified number specification Specified 4 digit code/8 digit Specified...
  • Page 626: Response Data

    Response data There is no response data for the Device Write command. Communication example When writing data in bit units Values are written to M100 to M107. • When communicating data in ASCII code (Request data) Device Subcommand Start device No. Number of devices Write data code...
  • Page 627 When writing data in word units (word device) 6549 (1995H) is written in D100, 4610 (1202H) is written in D101, and 4400 (1130H) is written in D102. • When communicating data in ASCII code (Request data) Device Subcommand Start device No. Number of devices Write data code...
  • Page 628: Device Read Random

    Device Read Random This command specifies the device No. randomly and reads the device value. Request data When communicating data in ASCII code 2 digit code/6 digit number specification Specify the devices for the specified number of points. 4 bytes 4 bytes 2 bytes 2 bytes When...
  • Page 629 When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte When Word access Double-word access Double- Word extension word access Subcommand Device Device Device...
  • Page 630 Device code, device No. Specify the target device of reading. Item Description Word access Specify the device points specified as word access points. The specification is not necessary when the word access points are zero. Double-word access Specify the device points specified as double-word access points. The specification is not necessary when the double-word access points are zero.
  • Page 631 Communication example Read D0, T0, M100 to M115, X20 to X37 by word access, and D1500 to D1501, Y160 to Y217, M1111 to M1142 by double- word access. It is supposed that 6549 (1995H) is stored in D0, 4610 (1202H) is stored in T0, 20302 (4F4EH) is stored in D1500, 19540 (4C54H) is stored in D1501.
  • Page 632 When communicating data in binary code • Request data Word Double-word access points access points Subcommand 03H 04H 00H 00H 04H 03H Device Device Device Device Device Device Device Device code code code code 00H 00H 00H A8H 00H 00H 00H C2H 64H 00H 00H 90H 20H 00H 00H 9CH Device Device Device...
  • Page 633: Device Write Random

    Device Write Random This command specifies the device No. randomly and writes the data. Request data When writing data in bit units • When communicating data in ASCII code Specify the devices for the specified number of points. 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes...
  • Page 634 • When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte When extension Device Set or Device Set or Device No. Device No. access is not code...
  • Page 635 When writing data in word units • When communicating data in ASCII code Specify the devices for the specified number of points. 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 2 bytes When Word access Double- Word extension word...
  • Page 636 • When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte Word access Double-word access Double- When Word word access extension is Device Write Device...
  • Page 637 Bit access points, word access points, double-word access points Item Description Number of points ASCII code Binary code Bit access points Specify the number of bit device points in one-point 1 to 94 1 to 188 units. When device memory extension When device memory extension specification is used specification is used...
  • Page 638 Response data There is no response data for the Write Random command. Communication example When writing data in bit units Turn off M50 and turn on Y27. • When communicating data in ASCII code (X, Y OCT) (Request data) access Device Set or Device...
  • Page 639 When writing data in word units Write the value in a device as follows. Item Target device Word access D0, D1, M100 to M115, X20 to X37 Double-word access D1500 to D1501, Y160 to Y217, M1111 to M1142 • When communicating data in ASCII code (X, Y OCT) (Request data) Word Double-word...
  • Page 640 • When communicating data in binary code (Request data) Word Double-word access access points points Subcommand 02H 14H 00H 00H Device Write Device Write Data 1 Data 2 Device No. Device No. code data code data 00H 00H 00H A8H 50H 05H 01H 00H 00H A8H 75H 05H 64H 00H 00H 90H 40H 05H 20H 00H 00H 9CH 83H 05H Data 3 Data 4 DCH 05H 00H A8H 02H 12H 39H 04H 60H 01H 00H 9DH 07H 26H 75H 23H 57H 04H 00H 90H 75H 04H 25H 04H...
  • Page 641: Device Read Block

    Device Read Block The examples shown in this section explain the control procedure for reading by randomly specifying multiple blocks, where 1 block consists of n point(s) of a bit device memory (one point is specified by 16-bit) and a word device memory (one point is specified by 1-word).
  • Page 642 Contents of the character areas during device read block This section explains what is in the character area when a device read block function is performed. Number of word device blocks and number of bit device blocks This data is for specifying the number of word device blocks or bit device blocks to be sent directly after this data field in the batch read to the word device or bit device, respectively.
  • Page 643 Device code This data is for identifying the start device memory for each block for which batch read is performed. The device code for each device is shown in Page 615 Device range. Precautions Double word devices and long index registers (LZ) cannot be used in the multiple block batch read (0406H). •...
  • Page 644 Request data When communicating data in ASCII code 2 digit code/6 digit number specification Specify the devices for the specified number of points. 4 bytes 4 bytes 2 bytes 2 bytes When Number of Number of 1st word device in the nth block extension is word device bit device...
  • Page 645 When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte When 1st word device in the nth block Last bit device in the mth block Number of Number of extension is...
  • Page 646: Communication Example

    Device code, device No., number of device points Specify the device points while satisfying the following conditions: Total number of points for all word device blocks + total number of points for all bit device blocks  960 Item Description Word device Specify the device points specified in "Number of word device blocks".
  • Page 647 (Response data) 1st block data of the 2nd block data of the specified word device specified word device 30H 30H 38H 32H 30H 33H 35H 34H 35H 32H 38H 30H 39H 37H 30H 30H 31H 33H W100 W107 M143 M128 M159 M144 B10F B100 B11F B110 B12F...
  • Page 648: Device Write Block

    Device Write Block The examples shown in this section explain the control procedure for writing by randomly specifying multiple blocks, where 1 block consists of n point(s) of a bit device memory (one point is specified by 16-bit) and a word device memory (one point is specified by 1-word).
  • Page 649 When communicating data in binary code (Request data) (Data name) - - - - - - External equipment L H L H L - H L - H Specify the target device Specify the target device to be written. (1st block) to be written.
  • Page 650 Word device number and bit device number This data is for specifying the start word device or bit device for each block to which batch write is performed, where continuous word or bit devices are considered one block. • When communicating data in ASCII code The start device number of each block is converted to 6-digit ASCII code and sent.
  • Page 651: Number Of Devices

    Number of devices This data is for specifying the number of points in the continuous device range of each block for which batch write is performed (1 point = 16 bits for bit device memory and 1 point = 1 word for word device memory), where one block consists of continuous word or bit devices.
  • Page 652 Request data When communicating data in ASCII code Specify the devices for the specified number of points. 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 2 bytes When 1st word device in the nth block Number of Number of extension Start device...
  • Page 653 When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte When 1st word device in the nth block Last bit device in the mth block Number of Number of extension...
  • Page 654 Number of word device blocks and number of bit device blocks Specify the number of blocks of the device to be write in hexadecimal. • CPU module Item Description Number of points ASCII code Binary code Number of word device Specify the number of blocks of the (Number of word device blocks + number Number of word device blocks + number...
  • Page 655 Communication example Write values from devices as follows. Item Write contents Word device • Block 1: D0 to D3 (4 points) • Block 2: W100 to W107 (8 points) Bit device • Block 1: M0 to M31 (2 points) • Block 2: M128 to M159 (2 points) •...
  • Page 656 When communicating data in ASCII code (Request data) Number of word Number of bit device blocks device blocks Command Subcommand 31H 34H 30H 36H 30H 30H 30H 30H 30H 32H 30H 33H Device code Device No. Number of devices Write data 2AH 30H 30H 30H 30H 30H 30H 30H 34H...
  • Page 657 When communicating data in binary code (Request data) Number of word device Number of bit device blocks blocks Command Subcommand 06H 14H 00H 00H 02H 03H Device Device Number of Device Device Number of Write data Write data code devices code devices 00H 00H 00H A8H 04H 00H 08H 00H...
  • Page 658: Remote Control

    38.3 Remote Control This section describes the command to set the SLMP compatible device or Ethernet-equipped module to the RUN status or STOP status by a message from the external device. Before the remote operation The accessed device or module is turned off and on or reset after remote operation The information about the remote operation will be deleted.
  • Page 659: Clear Mode

    Mode This mode specifies whether Remote RUN can be executed forcibly by a device other than the external device which performed Remote STOP or Remote PAUSE. If forced execution is not allowed, Remote RUN can be executed only by the external device which performed Remote STOP or Remote PAUSE.
  • Page 660: Remote Stop

    Remote STOP This command executes Remote STOP to the access destination module. Request data When communicating data in ASCII code 4 bytes 4 bytes 4 bytes Subcommand 30H 30H 30H When communicating data in binary code 2 bytes 2 bytes 2 bytes Subcommand 10H 00H 00H...
  • Page 661: Remote Latch Clear

    Mode This mode specifies whether Remote PAUSE can be executed forcibly by a device other than the external device which performed Remote STOP or Remote PAUSE. If forced execution is not allowed, Remote PAUSE can be executed only by the external device which performed Remote STOP or Remote PAUSE.
  • Page 662: Remote Reset

    When communicating data in binary code 2 bytes 2 bytes 2 bytes Subcommand 10H 00H 00H Response data There is no response data for remote latch clear command. Communication example Send request messages from the external device by using the message format shown in the request data above. Remote RESET This command executes Remote RESET to the access destination module.
  • Page 663: Processor Type Read

    Processor type read This command reads the processor module name code (processor type) of the access destination module. Request data When communicating data in ASCII code 4 bytes 4 bytes Subcommand 00H 00H 00H When communicating data in binary code 2 bytes 2 bytes Subcommand...
  • Page 664 Model Model code (hexadecimal) FX5U-32MT/DS 4A49H FX5U-64MT/DS 4A4BH FX5U-80MT/DS 4A4CH FX5U-32MT/DSS 4A51H FX5U-64MT/DSS 4A53H FX5U-80MT/DSS 4A54H FX5UC-32MT/D 4A91H FX5UC-64MT/D 4A92H FX5UC-96MT/D 4A93H FX5UC-32MT/DSS 4A99H FX5UC-64MT/DSS 4A9AH FX5UC-96MT/DSS 4A9BH FX5UC-32MR/DS-TS 4AA9H FX5UC-32MT/DS-TS 4AB1H FX5UC-32MT/DSS-TS 4AB9H FX5UJ-24MR/ES 4B0DH FX5UJ-40MR/ES 4B0EH FX5UJ-60MR/ES 4B0FH FX5UJ-24MT/ES 4B14H FX5UJ-40MT/ES...
  • Page 665 Model Model code (hexadecimal) FX5S-30MT/DSS 4B71H FX5S-40MT/DSS 4B72H FX5S-60MT/DSS 4B73H FX5S-80MT/DSS 4B74H *1 Area-specific model • The model of the CPU module is identified by the model code. • When the Ethernet module is used, the model code of the connected CPU module is stored. Communication example When communicating data in ASCII code (Request data)
  • Page 666: Clear Error

    38.4 Clear Error This function turns off ERR LED of the CPU module from the external equipment and/or initializes the communication error information or error code stored in the buffer memory. This function is used to initialize the current error information due to an abnormal response for a command message and return it to the normal state or initialize the error code storage area of the buffer memory.
  • Page 667: Self-Test

    38.5 Self-Test This function tests whether the communication function between the external equipment and Ethernet-equipped module operates normally or not. The control procedure when this function is used is described with examples. • At the startup of the Ethernet-equipped module or when trouble occurs, this function can check whether the connection between the external equipment and Ethernet-equipped module is correct and/or whether the data communication function operates normally.
  • Page 668 Communication example Send request messages from the external device by using the message format in the request data. (Page 665 Request data) Examples of test with loopback data "ABCDE" are given below. When executing the Self-Test by communicating in ASCII code (Request data) Number of Command...
  • Page 669: Remote Password Unlock Or Lock

    38.6 Remote Password Unlock or Lock A remote password prevents illegal access from a user who is not allowed to operate the SLMP compatible device. The following modules support this function. • FX5 CPU module • FX5-CCLGN-MS • FX5-CCLIEF • FX5-40SSC-G, FX5-80SSC-G If a remote password is set to the SLMP compatible device, the remote password is checked when the SLMP compatible device is accessed.
  • Page 670: Lock

    • When the FX5CPU communicating data is set with a remote password, communication is enabled after the completion of the unlock process until the lock process. • All commands received while the remote password is in locked status will generate an error response. (Execute communication after executing the remote password unlock process.) •...
  • Page 671: Unlock

    Communication example When performing the lock process in communication using ASCII code Remote Command Subcommand password length Remote password 36H 33H 31H 30H 30H 30H 30H 31H 41H 61H 62H 63H 66H 67H 68H 69H 6AH 6BH 6EH 6FH 70H 71C 72H 73H 76H 77H 78H 79H 7AH...
  • Page 672 Remote password length Specify the remote password length. The password length is the specified characters (6 to 32 characters). Item Remote password length (when the number of remote password characters is 32) ASCII code Binary code 6 to 32 characters Characters ...
  • Page 673: Chapter 39 1E Frame Commands

    1E FRAME COMMANDS This chapter explains 1E frame commands of SLMP. For parts of the transmission message other than the command part, refer to Page 591 1E Frame. 39.1 List of Commands and Functions This section describes commands and functions when accessing from the external equipment to the Ethernet-equipped module.
  • Page 674: Device Access

    39.2 Device Access This section explains the control procedure specification method and shows a specification example when the device memory is read and written. Commands This section explains commands when the device memory is read or written. Commands Name Command Processing content Batch Reading Bit units...
  • Page 675: Device Range

    Device range This section shows accessible CPU module device. Specify the device and device number range that exist in the module targeted for data read or write. In the case of Ethernet-equipped module Classification Device Type Symbol Device code Device No. Access ASCII Binary...
  • Page 676: Batch Reading

    Batch Reading Data in devices are read in a batch. Request data When communicating data in ASCII code 2 bytes 2 bytes 4 bytes 4 bytes 8 bytes 2 bytes 2 bytes Number Fixed PC No. Monitoring timer Device name Start device No.
  • Page 677 Response data The read device value is stored in hexadecimal. The data order differs depending on the ASCII code or binary code. Read data Communication example When reading data in bit units Values in M100 to M111 are read. • When communicating data in ASCII code (Request data) Number Fixed...
  • Page 678 • When communicating data in binary code (Request data) Monitoring Device Number Fixed Subheader PC No. timer Start device No. name of devices value 00H 00H 40H 00H 00H 00H 20H 59H (Response data) 9DH 82H 3EH 55H 0 = OFF 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 0 0 0 1 1 1 1 1 0 0 1 0 1 0 1 0 1 1 = ON Y107 to...
  • Page 679: Batch Writing

    Batch Writing Data in devices are written in a batch. Request data When communicating data in ASCII code 2 bytes 2 bytes 4 bytes 4 bytes 8 bytes 2 bytes 2 bytes Number Fixed PC No. Monitoring timer Device name Start device No.
  • Page 680 Communication example When writing data in bit units Values are written to M50 to M61. • When communicating data in ASCII code (Request data) Number Fixed Subheader PC No. Monitoring timer Device name Start device No. of devices value 30H 32H 46H 46H 30H 30H 30H 30H 34H 44H 32H 30H 30H...
  • Page 681: Test (Random Write)

    When writing data in word units (word device) 4660 (1234H) is written in D100, 39030 (9876H) is written in D101, and 265 (109H) is written in D102. • When communicating data in ASCII code (Request data) Number Fixed Subheader PC No. Monitoring timer Device name Start device No.
  • Page 682 When writing data in word units • When communicating data in ASCII code Specify the devices for the specified number of points. 2 bytes 2 bytes 4 bytes 2 bytes 2 bytes Number Fixed Device Device Device PC No. Monitoring timer of devices value specification...
  • Page 683: Number Of Devices

    Number of devices Specify the number of devices of reading. Item Number of devices When reading data in 1-bit units 1 to 80 points When reading data in 16-bit units 1 to 10 words (16 to 160 points) When reading data in 1-word units 1 to 10 points Fixed value Specify the "00H".
  • Page 684 • When communicating data in binary code (Request data) Monitoring Number Fixed Device Device Subheader PC No. timer of devices value Start device No. name data 00H 00H 25H 00H 00H Turn on Y45. 3CH 00H 00H Turn off M60. 26H 00H 00H Turn on S38.
  • Page 685: Remote Control

    39.3 Remote Control This section describes the command to set the SLMP compatible device or Ethernet-equipped module to the RUN status or STOP status by a message from the external device. Before the remote operation When the Remote STOP operation is performed Unless the Remote RUN operation is performed by the external device that performed the Remote STOP operation, the Remote RUN/STOP operation by other external devices is invalid.
  • Page 686: Remote Stop

    PC No. Specify the "FFH". Monitoring timer Specify the "0000H". Response data There is no response data for the Remote RUN command. Remote STOP External equipment executes the Remote STOP operation for the Ethernet-equipped module. Request data When communicating data in ASCII code 2 bytes 2 bytes 4 bytes PC No.
  • Page 687: Read Pc Type Name

    39.4 Read PC Type Name This command reads the type name code of Ethernet-equipped module. Request data When communicating data in ASCII code 2 bytes 2 bytes 4 bytes PC No. Monitoring timer 31H 35H When communicating data in binary code 1 byte 1 byte 2 bytes...
  • Page 688: Loopback Test

    39.5 Loopback Test This function tests whether the communication function between the external equipment and Ethernet-equipped module operates normally or not. The control procedure when this function is used is described with examples. At the startup of the Ethernet-equipped module or when trouble occurs, this function can check whether the connection between the external equipment and Ethernet-equipped module is correct and/or whether the data communication function operates normally.
  • Page 689 Communication example "ABCDE" is sent. When communicating data in ASCII code (Request data) Data Subheader PC No. Monitoring timer length Transmission data 30H 32H 46H 46H 30H 30H 30H 30H 30H 35H 34H 31H 34H 32H 34H 33H 34H 34H 34H (Response data) Data length...
  • Page 690 MEMO 39 1E FRAME COMMANDS 39.5 Loopback Test...
  • Page 691: Part 6 Mc Protocol

    PART 6 MC PROTOCOL This part consists of the following chapters. 40 OUTLINE 41 MC PROTOCOL DATA COMMUNICATION 42 MESSAGE FORMAT 43 COMMANDS 44 COMMUNICATING USING 1C FRAMES...
  • Page 692: Chapter 40 Outline

    OUTLINE This manual describes the method for reading or writing data in a CPU module with the data communication function of the external device using MC protocol (serial communication). When transferring data using MC protocol, always refer to Page 692 MC PROTOCOL DATA COMMUNICATION. 40.1 Outline of MC Protocol MC protocol (MELSEC communication protocol) is a protocol used for access from a CPU module or an external device (such...
  • Page 693 MEMO 40 OUTLINE 40.2 Features of MC Protocol...
  • Page 694: Chapter 41 Mc Protocol Data Communication

    MC PROTOCOL DATA COMMUNICATION This chapter describes the MC protocol data communication by which the external device reads or writes data to a CPU module. 41.1 Type and Application of the Data Communication Frame This section describes the type and application of the frame (data communication message) by which the external device accesses a CPU module with MC protocol.
  • Page 695: Concept Of Control Procedure Of Mc Protocol

    41.2 Concept of Control Procedure of MC Protocol This section describes the concept of the procedure (control procedure) when the external device accesses a CPU module with MC protocol. Sending a request message Data communication using MC protocol communication is executed in half-duplex communication. To access the CPU module, send the next request message after receiving a response message for the preceding request message from the CPU module.
  • Page 696: Access Timing Of The Cpu Module Side

    41.3 Access Timing of the CPU Module Side The following shows the access timing of the CPU module side when the CPU module is accessed from the external device using the serial communication port. • RUN External device Request message Response message CPU module Step 0...
  • Page 697: Transfer Time

    41.4 Transfer Time Link time Data transfer Data transfer Data transfer Interval time Data transfer time R: Number of read data points, W: Number of written data points, T: Time to send or receive one character, V: Interval time, S: Max Scan Time of programmable controller, D: Message waiting time (1) 1C Frame Time to read continuous word devices (such as data registers) in one station (ms)
  • Page 698 Time to send or receive one character The table below shows the time required to send or receive one character when the start bit is 1-bit, the data length is 7-bit, the parity is 1-bit, and the stop bit is 1-bit (total 10-bits). Transmission speed (baud rate) (bps) Time to send or receive 1 character (ms) 33.34...
  • Page 699: Cpu Module Processing Time Of Mc Protocol

    41.5 CPU Module Processing Time of MC Protocol When accessing the CPU module from an external device using MC protocol communication, the following "intervention time to the scan time" and "number of scans for processing" of the CPU module side are required. On the request from the external device using MC protocol communication, the CPU module processes a specified number of points during each END processing in case the CPU module is running.
  • Page 700: Chapter 42 Message Format

    MESSAGE FORMAT This chapter describes the message data format, the data specification method, and limitations etc. when performing MC protocol data communication using the 3C/4C frame to the serial communication port. 42.1 Types and Purposes of Messages The messages of MC protocol can be classified as shown in the following table depending on the supported device and its intended purpose.
  • Page 701: Message Formats Of Each Format

    42.2 Message Formats of Each Format This section explains the message format and setting data per each format. Format 1 There are 2 types of formats: format 1 (X, Y OCT) and format 1 (X, Y HEX). The specification method of the device number for the X (input) and Y (output) to be accessed is different from each other. (Page 718 Device Access) •...
  • Page 702: Format 4

    Format 4 There are 2 types of formats: format 4 (X, Y OCT) and format 4 (X, Y HEX). The specification method of the device number for the X (input) and Y (output) to be accessed is different from each other. (Page 718 Device Access) •...
  • Page 703: Format 5

    Format 5 Message format Request message Frame Control code Control code Number of Access route Request ID No. Sum check code data bytes data Specify the number of bytes in this range. Sum check range Response message (Normal completion: Response data) Normal Frame Response...
  • Page 704: Details Of Setting Data (Format)

    42.3 Details of Setting Data (Format) This section explains how to specify the common data items and their content in each message. Control code Control code is a data that has special meaning (such as start data of a message) for transmission control. Control code used in a message (format 1 to format 4) in ASCII code The control code used for a message in ASCII code (format 1 to format 4) is shown in the following table.
  • Page 705: Number Of Data Bytes

    Control code used in a message (format 5) in binary code The control code used for a message in binary code (format 5) is shown in the table below. Symbol name Description Code (hexadecimal) Start of Text End of Text Data Link Escape Additional code (10H) The additional code is added to distinguish the data when the control code (10H) is the same as the setting data in frame 5.
  • Page 706: Block Number

    Block number Block number is an arbitrary number defined by an external device and used for data defragmentation. Block number converts data to 2-digit (hexadecimal) ASCII code within the range of '00H' to 'FFH' and sends them from the upper digits. CPU module only checks if the block number is specified within the correct range.
  • Page 707: Sum Check Code

    Sum check code Set the sum check code when performing sum check. For sum check code, set the value to be calculated from the data with the range of sum check for error detection. Sum check Sum check is a function for detecting error when data changes while data transmission. Set the sum check existence by Engineering tool.
  • Page 708 Calculation of a sum check code For sum check code, set the numerical values of the lower 1 byte (8 bits) of the added result (sum) as binary data within the sum check range. Calculate sum check code except for the additional code. (Page 703 Additional code (10H)) In the following case of 3C frame format 1, the sum check code will be '1C'.
  • Page 709: Error Code

    Error code Error code indicates the content of error. If more than one error occurs at the same time, the error code detected first is returned. For the content of error code and its corrective action, refer to the following. Page 842 1C frame MELSEC iQ-F FX5 User's Manual (Application) Setting method...
  • Page 710: 42.4 Accessible Ranges And Settable Data For Each Frame

    42.4 Accessible Ranges and Settable Data for Each Frame The accessible range of each frame and the data items to set an access route are as shown below. 4C frame Accessible range of 4C frame The following ranges can be accessed. External device Multidrop connection Multidrop connection...
  • Page 711: Frame

    3C frame Accessible range of 3C frame The following ranges can be accessed. External device Multidrop connection Network Network No.1 No.n (Relay station) Connected station (Host station) :Accessible target station by FX5 Message format (Setting example for accessing connected station (host station)) Network No.
  • Page 712: 1C Frame

    1C frame Accessible range of 1C frame The following ranges can be accessed. External device Multidrop connection Network Connected station (Host station) :Accessible target station by FX5 Message format (Setting example for accessing connected station (host station)) Station No. PC No. Data to be set Set the following items.
  • Page 713: Details Of Setting Data (Frame)

    42.5 Details of Setting Data (Frame) This section explains the content and specification method of the data items to set the access route. : Setting required, : Setting not required Item 4C frame 3C frame 1C frame Reference Station No. ...
  • Page 714: Network No., Pc No

    Setting method The station No. is specified by the following parameter items of engineering tool, and writes the "module parameter" in the CPU module. • GX Works3: "Station Number Settings" in "Module Parameter" Data communication in ASCII code Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. Data communication in binary code Send 1-byte numerical value.
  • Page 715: Request Destination Module I/O No., Request Destination Module Station No

    Setting method Data communication in ASCII code Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. Data communication in binary code Send 1-byte numerical value. Accessing connected station (host station) or multidrop connection station ASCII code Binary code Network...
  • Page 716: Self-Station No

    Self-station No. The following fixed value is specified in FX5 CPU module. Self-station No. Setting method Data communication in ASCII code Convert the numerical value to 2-digit ASCII code (hexadecimal), and send it from the upper digits. Data communication in binary code Send 1-byte numerical value.
  • Page 717: Chapter 43 Commands

    COMMANDS This chapter explains commands of MC protocol. 43.1 List of Commands and Functions The functions of a message is defined by each command. The message format for request data and response data varies with commands. Depending on the type of frame to be used, the specific value is assigned to a command. The value of command is specified at the start of a request data.
  • Page 718: Command List

    Command list 1C frame For the commands for 1C frame, refer to Page 780 Command and Function Lists for 1C Frame. 3C/4C frame Name Command Subcommand Contents of processing Number of points processed in one- time update Batch read 0401H 0001H Reads data in 1-point units from bit devices or word devices.
  • Page 719 Name Command Subcommand Contents of processing Number of points processed in one- time update Random write 1402H 0001H Writes data in 1-bit unit to a bit device by randomly specifying the device 188 points number. 0000H • Writes data in 16-bit unit to a bit device by randomly specifying the (Number of word access points) ...
  • Page 720: Device Access

    43.2 Device Access This section explains the control procedure specification method and shows a specification example when the device memory is read and written. Data to be specified in commands This section explains the contents and specification methods for data items which are set in each command related to device access.
  • Page 721: Device Codes

    Devices Specify the device to be accessed by device code and device number. • The data order differs between ASCII code and binary code. • The data size to set up changes with setting of the device specification format of subcommand. Device specification format of ASCII code Binary code...
  • Page 722: Device Number

    Device number Specify the number of the device to be accessed. Specify the device number within the range of the access target module. Data communication using ASCII code Convert the numerical value to 6-digit or 8-digit ASCII code, and sent it from the upper digits. Specify the device number in octal, decimal, or hexadecimal, depending on the device type.
  • Page 723: Device Code List

    Device code list The table below shows devices and device number range that can handled in commands used in communication by MC protocol. Specify devices and device number range that are there in the targeted unit for performing data reading, writing etc. 1C frame For device code used in 1C frame, refer to Page 781 Data to be specified in command.
  • Page 724 3C/4C frame In 3C/4C frame, in the following "Device code", specify a device of the access point. Division Device Type Device code Device No. (Device specification format: device Long) available ASCII code Binary code  Internal user Input X* (X***) 9CH (9C00H) Specify within the devices...
  • Page 725: Number Of Device Points

    *1 [ASCII code] When a device code is less than the specified number of characters, add "*" (ASCII code: 2AH), or <space> (ASCII code: 20H) at the end of the device code. [Binary code] When a device code is less than the specified size, add "00H" at the end of the device code. *2 : FX5 device : No FX5 device *3 Depends on the message format.
  • Page 726: Access Points

    Access points Specify the number of device points to be accessed in word unit, double word unit, or bit unit. Specify it within the number of points that can be processed in one communication. The number of points is shown in the table of the command list (Page 716 Command list).
  • Page 727: Number Of Blocks

    Number of blocks Specify the number of blocks of the device to be accessed in hexadecimal. Set each number of blocks within the following range. • Number of word device blocks + Number of bit device blocks  120 In the following case, calculate it as number of blocks  2. •...
  • Page 728: Read Data, Write Data

    Read data, write data The read device value is stored for reading. The data to be written is stored for writing. The data order differs between bit units or word units. For bit units The following shows the data to be read and written in bit units. Data communication using ASCII code The ON/OFF status of each device are represented with single-digit ASCII code.
  • Page 729 For word units (16-point unit for bit device) The following shows the data to be read and written in word units. When handling data other than bit data, refer to the following section. Page 731 Considerations for handling real number data and character string data Data communication using ASCII code Convert the 1-word (16 points of bit device) numerical value to 4-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 730 Data communication using binary code Send the numerical value in order from the lower byte (L: bit 0 to 7) by handling 16 points unit as 2 bytes. When indicating ON/OFF status of 32 points from M16 The device point value becomes "02" in 16-points units. Number of Start Device...
  • Page 731 For double word unit (32-point unit for bit device) The following shows the data to be read and written in double word units. Data communication using ASCII code Convert the 2-word numerical value (32 points of bit device) to 8-digit ASCII code (hexadecimal), and send it from the upper digits.
  • Page 732 Data communication using binary code Send the numerical value in order from the lower byte (L: bit 0 to 7) by handling 32 points unit as 4 bytes. When indicating ON/OFF status of 32 points from M16 Device Device Data number code b7 b6 b5 b4 b3 b2...
  • Page 733 Considerations for handling real number data and character string data The word data and double word data are handled as integer value (16-bit data or 32-bit data). When data other than integer (real number, character string) is stored in a device, the stored value is read as integer value. •...
  • Page 734: Device Memory Extension Specification (Subcommand: Bit7)

    Device memory extension specification (subcommand: bit7) For details, refer to  Page 930 Device Memory Extension Specification. This section explains how to read or write a device from/to module access device areas and how to specify a device indirectly by using index register. Message format Response messages are extended as well.
  • Page 735: Set/Reset

    Module access device specification The following shows the approach for module access device specification in programming and request data. Extension Device Start device No. specification code or device No. • Extension specification Specify the start I/O number of intelligent function modules. ASCII code Binary code Specify the start I/O number in hexadecimal (3-digit ASCII code).
  • Page 736: Batch Read

    Batch read Data in devices are read in a batch. Request data When communicating data in ASCII code 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 6 bytes 4 bytes When extension is Device Subcommand Start device No. Number of devices not specified code...
  • Page 737: Device Code

    Subcommand Specify the subcommand selected from the item. Item Subcommand Data size Device Device memory ASCII code Binary code specification specification extension (Upper column: characters, lower column: format specification character code) Bit units 2 digit code/6 digit Not specified number specification Specified 4 digit code/8 digit Specified...
  • Page 738 Communication example When reading data in bit units M100 to M107 are read. • When communicating data in ASCII code (Request data) Device Subcommand Start device No. Number of devices code 30H 34H 30H 31H 30H 30H 30H 31H 4DH 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H...
  • Page 739 • When communicating data in binary code (Request data) Device code Subcommand Start Number of devices device No. 01H 04H 00H 00H 64H 00H 00H 90H 02H 00H (Response data) 34H 12H 02H 00H 0 = OFF 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 = ON M107 M100 M115...
  • Page 740: Batch Write

    Batch write Data in devices are written in a batch. Request data When communicating data in ASCII code 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 6 bytes 4 bytes When extension Number Device Write data for the Subcommand Start device No.
  • Page 741: Write Data

    Subcommand Specify the subcommand selected from the item. Item Subcommand Data size Device Device memory ASCII code Binary code specification specification extension (Upper column: characters, lower column: format specification character code) Bit units 2 digit code/6 digit Not specified number specification Specified 4 digit code/8 digit Specified...
  • Page 742 Response data There is no response data for the Device Write command. Communication example When writing data in bit units Values are written to M100 to M107. • When communicating data in ASCII code (Request data) Device Subcommand Start device No. Number of devices Write data code...
  • Page 743 When writing data in word units (word device) 6549 (1995H) is written in D100, 4610 (1202H) is written in D101, and 4400 (1130H) is written in D102. • When communicating data in ASCII code (Request data) Device Subcommand Start device No. Number of devices Write data code...
  • Page 744: Random Read

    Random read This command specifies the device No. randomly and reads the device value. Request data When communicating data in ASCII code 2 digit code/6 digit number specification Specify the devices for the specified number of points. 4 bytes 4 bytes 2 bytes 2 bytes When Word access...
  • Page 745 When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte When Word access Double-word access Double- Word extension word access Subcommand Device Device Device...
  • Page 746 Device code, device No. Specify the target device of reading. Item Description Word access Specify the device points specified as word access points. The specification is not necessary when the word access points are zero. Double-word access Specify the device points specified as double-word access points. The specification is not necessary when the double-word access points are zero.
  • Page 747 • Response data Word access Word access Word access Word access read data 1 read data 2 read data 3 read data 4 39H 39H 35H 31H 32H 30H 30H 33H 30H 34H 38H 34H M115 M100 D1501 D1500 Y217 Y160 M1142 M1111...
  • Page 748 • Response data Word Word Word Word Double-word Double-word Double-word access access access access access access access read read read read read data 1 read data 2 read data 3 data 1 data 2 data 3 data 4 95H 19H 02H 12H 30H 20H 49H 48H 4EH 4FH 54H 4CH AFH B9H DEH C3H B7H BCH DDH BAH M115 D1500 D1501 Y217...
  • Page 749: Random Write

    Random write This command specifies the device No. randomly and writes the data. Request data When writing data in bit units • When communicating data in ASCII code Specify the devices for the specified number of points. 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes...
  • Page 750 • When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte When extension Device Set or Device Set or Device No. Device No. access is not code...
  • Page 751 When writing data in word units • When communicating data in ASCII code Specify the devices for the specified number of points. 2 digit code/6 digit number specification 4 bytes 4 bytes 2 bytes 2 bytes When Word access Double- Word extension word...
  • Page 752 • When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte Word access Double-word access Double- When Word word access extension is Device Write Device...
  • Page 753 Bit access points, word access points, double-word access points Item Description Number of points ASCII code Binary code Bit access points Specify the number of bit device points in one-point units. 1 to 188 When device memory extension specification is used 1 to 94 1 ...
  • Page 754 Response data There is no response data for the Random write command. Communication example When writing data in bit units Turn off M50 and turn on Y27. • When communicating data in ASCII code (X, Y OCT) (Request data) access Device Set or Device...
  • Page 755 When writing data in word units Write the value in a device as follows. Item Target device Word access D0, D1, M100 to M115, X20 to X37 Double-word access D1500 to D1501, Y160 to Y217, M1111 to M1142 • When communicating data in ASCII code (X, Y OCT) (Request data) Word Double-word...
  • Page 756 • When communicating data in binary code (Request data) Word Double-word access access points points Subcommand 02H 14H 00H 00H Device Write Device Write Data 1 Data 2 Device No. Device No. code data code data 00H 00H 00H A8H 50H 05H 01H 00H 00H A8H 75H 05H 64H 00H 00H 90H 40H 05H 20H 00H 00H 9CH 83H 05H Data 3 Data 4 DCH 05H 00H A8H 02H 12H 39H 04H 60H 01H 00H 9DH 07H 26H 75H 23H 57H 04H 00H 90H 75H 04H 25H 04H...
  • Page 757: Batch Read Multiple Blocks

    Batch read multiple blocks The examples shown in this section explain the control procedure for reading by randomly specifying multiple blocks, where 1 block consists of n point(s) of bit device memory (one point is specified by 16-bit) or word device memory (one point is specified by 1-word).
  • Page 758 When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte When 1st word device in the nth block Last bit device in the mth block Number of Number of extension is...
  • Page 759 Device code, device No., number of device points Specify the device points while satisfying the following conditions: Total number of points for all word device blocks + total number of points for all bit device blocks  960 Item Description Word device Specify the device of the points specified in "Number of word device blocks".
  • Page 760 (Response data) 1st block data of the 2nd block data of the specified word device specified word device 30H 30H 38H 32H 30H 33H 35H 34H 35H 32H 38H 30H 39H 37H 30H 30H 31H 33H W100 W107 M143 M128 M159 M144 B10F B100 B11F B110 B12F...
  • Page 761: Batch Write Multiple Blocks

    Batch write multiple blocks The examples shown in this section explain the control procedure for writing by randomly specifying multiple blocks, where 1 block consists of n point(s) of a bit device memory (one point is specified by 16-bit) and a word device memory (one point is specified by 1-word).
  • Page 762 When communicating data in binary code 2 digit code/6 digit number Specify the devices for the specified number of points. specification 2 bytes 2 bytes 1 byte 1 byte When 1st word device in the nth block Last bit device in the mth block Number of Number of extension...
  • Page 763 Number of word device blocks and number of bit device blocks Specify the number of blocks of the device to be written in hexadecimal. Item Description Number of points ASCII code Binary code Number of word device blocks + Number of bit device blocks  120 Number of word device Specify the number of blocks of the word device blocks...
  • Page 764 Communication example Write values from devices as follows. Item Write contents Word device • Block 1: D0 to D3 (4 points) • Block 2: W100 to W107 (8 points) Bit device • Block 1: M0 to M31 (2 points) • Block 2: M128 to M159 (2 points) •...
  • Page 765 When communicating data in binary code (Request data) Number of word device Number of bit device blocks blocks Command Subcommand 06H 14H 00H 00H 02H 03H Device Device Number of Device Device Number of Write data Write data code devices code devices 00H 00H 00H A8H 04H 00H 08H 00H...
  • Page 766: Remote Control

    43.3 Remote Control This section describes the command to set the MC protocol compatible device or CPU module to the RUN status or STOP status by a message from the external device. Before the remote operation Access destination is turned OFF  ON or system is reset after remote operation The information about the remote operation will be deleted.
  • Page 767 Mode This mode specifies whether Remote RUN can be executed forcibly by a device other than the external device which performed Remote STOP or Remote PAUSE. If forced execution is not allowed, Remote RUN can be executed only by the external device which performed Remote STOP or Remote PAUSE.
  • Page 768: Remote Stop

    Remote STOP This command executes Remote STOP to the access destination module. Request data When communicating data in ASCII code 4 bytes 4 bytes 4 bytes Subcommand 30H 30H 30H When communicating data in binary code 2 bytes 2 bytes 2 bytes Subcommand 10H 00H 00H...
  • Page 769: Remote Latch Clear

    Mode This mode specifies whether Remote PAUSE can be executed forcibly by a device other than the external device which performed Remote STOP or Remote PAUSE. If forced execution is not allowed, Remote PAUSE can be executed only by the external device which performed Remote STOP or Remote PAUSE.
  • Page 770: Remote Reset

    When communicating data in binary code 2 bytes 2 bytes 2 bytes Subcommand 10H 00H 00H Response data There is no response data for remote latch clear command. Communication example Send request messages from the external device by using the message format shown in the request data above. Remote RESET This command executes Remote RESET to the access destination module.
  • Page 771: Read Cpu Model Name

    Read CPU model name This command reads the processor module name code (processor type) of the access destination module. Request data When communicating data in ASCII code 4 bytes 4 bytes Subcommand 00H 00H 00H When communicating data in binary code 2 bytes 2 bytes Subcommand...
  • Page 772: Model Code

    Model code The following model codes will be stored. When communicating in ASCII code, the data is stored in order from the upper byte to the lower byte. When communicating in binary code, the data is stored in order from the lower byte to the upper byte. Model Model code (hexadecimal) FX5U-32MR/ES...
  • Page 773 Model Model code (hexadecimal) FX5S-80MR/ES 4B51H FX5S-30MT/ES 4B55H FX5S-40MT/ES 4B56H FX5S-60MT/ES 4B57H FX5S-80MT/ES 4B58H FX5S-30MT/ESS 4B5CH FX5S-40MT/ESS 4B5DH FX5S-60MT/ESS 4B5EH FX5S-80MT/ESS 4B5FH FX5S-30MR/DS 4B63H FX5S-40MR/DS 4B64H FX5S-60MR/DS 4B65H FX5S-80MR/DS 4B66H FX5S-30MT/DS 4B6AH FX5S-40MT/DS 4B6BH FX5S-60MT/DS 4B6CH FX5S-80MT/DS 4B6DH FX5S-30MT/DSS 4B71H FX5S-40MT/DSS 4B72H FX5S-60MT/DSS...
  • Page 774: Clear Error

    43.4 Clear Error This function turns off ERR LED of the FX5CPU from the external device and/or initializes the communication error information or error code stored in the buffer memory. This function is used to initialize the current error information due to an abnormal response for a request message and return it to the normal state or initialize the error code storage area of the buffer memory.
  • Page 775: Loopback Test

    43.5 Loopback Test This function tests whether the communication function between the external device and FX5CPU operates normally or not. The control procedure when this function is used is described with examples. • At the startup of the FX5CPU or when trouble occurs, this function can check whether the connection between the external device and FX5CPU is correct and/or whether the data communication function operates normally.
  • Page 776 Communication example Send request messages from the external device by using the message format shown in the request data (Page 773 Request data). The following shows an example when loopback data is "abcdefghijkl". When executing the Self-Test by communicating in ASCII code (Request data) Number of Command...
  • Page 777: Chapter 44 Communicating Using 1C Frames

    COMMUNICATING USING 1C FRAMES This chapter explains the functions when accessing using 1C frame and their message format. 1C frame is compatible with the communication function of the dedicated protocols supported by computer link of FX3 and A series computer link modules. Only the commands for 1C frame explained in this chapter can be used for 1C frame.
  • Page 778: Setting Data

    Setting data Set the following items. Item Description Reference Data by format The message formats differ depending on the set format (Format 1, Format 4). Page 699 Message Formats of Each Format Access route Station No. Specify the station to be connected from an external device. Page 711 Station No.
  • Page 779: Details Of Setting Data

    44.2 Details of Setting Data This section explains how to specify the common data items and their content in each message. Command Set the command type. (Page 780 Command and Function Lists for 1C Frame) The setting values for each command are as follows. Function Command Reference...
  • Page 780: Character Area

    Character area The content of the character areas differs depending on the command. The character area of request data is equivalent to the character A area and the character C area of the dedicated protocols for computer link of FX3 and A series computer link module. The character are of response data is equivalent to the character B area of a dedicated protocols.
  • Page 781: Error Code

    Error code An error code indicates the content of error. If more than one error occurs at the same time, the error code detected first is returned. For the content of error code and its corrective action, refer to the following. MELSEC iQ-F FX5 User's Manual (Application) Page 842 Checking error codes of MC protocol function Setting method...
  • Page 782: Command And Function Lists For 1C Frame

    44.3 Command and Function Lists for 1C Frame Use the following commands for data communication using 1C frame. Name Command Contents of processing Number of points Symbol ASCII code processed in onetime update Device Batch Bit units 42H, 52H Reads data in 1-point units from bit devices. 256 points memory reading...
  • Page 783: Device Memory Read And Write

    44.4 Device Memory Read and Write This section explains the specification content and examples of the control procedure when reading from/writing to the device memory are as shown below. For the message formats other than request data and response data, refer to the following sections. Page 775 Message Format Page 777 Details of Setting Data Considerations...
  • Page 784 BR, BW, BT, WR, WW, WT commands • Device code: Convert the device name to 1-digit ASCII code (2-digits for timer or counter), and send it from the upper digits. • Device number: Convert the numerical value to 4-digit ASCII code (3-digits for timer or counter), and send it from the upper digits.
  • Page 785 *2 Access LCS0 to LCS55 by specifying CS200 to CS255 (CS00200 to CS00255). *3 Access LCN0 to LCN55 by specifying CN200 to CN255 (CN00200 to CN00255). *4 Access SM8000 to SM8511 by specifying M8000 to M8511 (M008000 to M008511). *5 Access SD8000 to SD8511 by specifying D8000 to D8511 (D008000 to D008511). Precautions •...
  • Page 786: Batch Read (Bit Units) (Command: Br)

    Batch read (bit units) (command: BR) Reads bit devices in batch. Message format The following shows the message format of the request data and response data of the command. Request data Number of Command Message wait Start device device points Response data The value of read device is stored in bit units.
  • Page 787: Batch Read (Word Units) (Command: Wr, Qr)

    Batch read (word units) (command: WR, QR) Reads bit devices in 16-point units. Reads word devices in 1-point units Message format The following shows the message format of the request data and response data of the command. Request data Number of device Command Message wait Start device...
  • Page 788 Communication example (Reading bit device memory) Read bit devices in 16-point units under the following conditions. • Message wait: 0ms • Start device: X40 • Number of device points: 32 points (2 words) (Request data) When using WR Message wait Number of device points Start device (Number of words)
  • Page 789: Batch Write (Bit Units) (Command: Bw)

    Batch write (bit units) (command: BW) Writes bit devices in batch. Message format The following shows the message format of the request data and response data of the command. Request data Number of Write data for the number of Command Message wait Start device device points...
  • Page 790: Batch Write (Word Units) (Command: Ww, Qw)

    Batch write (word units) (command: WW, QW) Write data to bit devices in 16-point units. Write data to word devices in 1-point units. Message format The following shows the message format of the request data and response data of the command. Request data Number of Write data for the number of...
  • Page 791 Communication example (Writing to word bit memory) Write data to bit devices in 16-point units under the following conditions. • Message wait: 0ms • Start device: M640 • Number of device points: 32 points (2 words) (Request data) When using WW Message wait Number of device points (Number of words) Write data for the number of device points...
  • Page 792: Test (Random Write) (Bit Units) (Command: Bt)

    Test (random write) (bit units) (command: BT) Set/reset devices and device numbers to bit devices by specifying them randomly in 1 point units. Message format The following shows the message format of the request data and response data of the command. Request data Number of Device...
  • Page 793: Test (Random Write) (Word Units) (Command: Wt, Qt)

    Test (random write) (word units) (command: WT, QT) Set/reset devices and device numbers to bit devices by specifying them randomly in 16 point units. Write devices and device numbers to word devices by specifying them randomly in 1 point units. A mixture of word devices and bit devices (16 bit units) can be specified.
  • Page 794 Communication example Write data with mixture specification of word devices and bit devices (16-point unit) under the following conditions. • Message wait: 0ms • Number of device points: 3 points (3 words) • Device: Set 1234H to D500, BCA9H to 'Y100 to Y117', and 64H to current values of C100 (Request data) When using WT Message wait...
  • Page 795: Remote Operation

    44.5 Remote Operation Remote RUN, remote STOP (command: RR, RS) Perform remote RUN (RR) and remote STOP (RS) of the FX5 programmable controller from the target device. Message format The following shows the message format of the request data and response data of the command. Request data Command Message wait...
  • Page 796: Read Cpu Model Name (Command: Pc)

    Read CPU model name (command: PC) Read the model name of the programmable controller which links to the target device. Message format The following shows the message format of the request data and response data of the command. Request data Message wait Response data Model name...
  • Page 797: Global Function

    44.6 Global Function Global signal ON/OFF (command: GW) Turn on and off the special relay of all stations or the specified station of the programmable controller at the multi drop link from the target device. Message format The following shows the message format of the request data and response data of the command. Request data Message wait Factor number...
  • Page 798: Loopback Test

    44.7 Loopback Test A loopback test checks whether the communication function between an external device and FX5 CPU module operates normally. Loopback test (Command: TT) Return the characters received from an external device to the external device unchanged. Message format The following shows the message format of the request data and response data of the command.
  • Page 799 Communication example Return 5-digit data received from an external device to the external device unchanged under the following conditions. • Message wait: 0ms • Character length: 5 • Loopback data: 'ABCDE' (Request data) Message wait Character length Loopback data (Response data) Character length Loopback data 44 COMMUNICATING USING 1C FRAMES...
  • Page 800 MEMO 44 COMMUNICATING USING 1C FRAMES 44.7 Loopback Test...
  • Page 801: Part 7 Troubleshooting

    PART 7 TROUBLESHOOTING This part consists of the following chapters. 45 TROUBLESHOOTING PROCEDURE 46 TROUBLESHOOTING BY SYMPTOM 47 ERROR CODES 48 EVENT CODES...
  • Page 802: Chapter 45 Troubleshooting Procedure

    TROUBLESHOOTING PROCEDURE This section contains an explanation of errors that may occur during communication between the FX5 CPU module or Ethernet-equipped module and other devices, and troubleshooting for such errors. For module-specific troubleshooting, refer to the manual of each module. When an error occurs, saving the program or device status will be useful for clarifying the cause of the error.
  • Page 803: Error Information Read/Clear Method

    • Check/correct built-in Ethernet parameter setting values using GX Works3. In case of CPU module error (hardware error): • For repair, contact your local Mitsubishi Electric representative. Flashes when power of CPU Check the contents of the error by error code stored when error is detected by the following processing, module is turned on or and eliminate the cause of the error.
  • Page 804: Checking With Engineering Tool

    45.2 Checking with Engineering Tool Use the engineering tool to check the errors that have occurred and their history, and identify the cause(s) of the errors. This method will yield more detailed information, the cause(s) of the errors, and the actions to eliminate them, compared with checking with LEDs.
  • Page 805: Module Diagnostics

    Module diagnostics Module diagnostics is a function for diagnosing the target module (checking currently occurring errors and their detailed information). It displays the error that occurred, its detailed information, the cause, and the action, so the information necessary for troubleshooting can be checked. In addition, the location of the parameter or program error can be identified by selecting the error and clicking the [Error Jump] button.
  • Page 806: Event History

    Event history Event history is a function that displays event information such as errors that occurred in each module, operations that were executed, and errors on the network. Information collected before the power was turned off or reset can also be displayed. This allows the user to identify the cause of an error based on past operations and error occurrence trends.
  • Page 807: Ethernet Diagnostics

    Ethernet diagnostics The communication status between an Ethernet-equipped module and external device can be checked by using Ethernet diagnostics. Select the Ethernet-equipped module to be diagnosed in "Target Module Specification". • Ethernet diagnostics item Item Description Status of Each Connection Displays information concerning status of each connection.
  • Page 808 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 (MELSOFT direct connection). Host Station Port No.
  • Page 809: Status Of Each Protocol

    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 810: Connection Status

    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 the communication mode of line. Status  Connection Status Displays the cable connection status. ...
  • Page 811 PING Test The PING test checks existence of an Ethernet device on the same Ethernet network. Only CPU module is supported. This test is performed on the network of stations connected to the GX Works3 by sending packets for check. If a response returns, the communication can be performed.
  • Page 812: Cc-Link Ie Field Network Basic Diagnostics

    CC-Link IE Field Network Basic diagnostics Perform troubleshooting by checking the network status and error details with GX Works3. For details, refer to the following manual.  CC-Link IE Field Network Basic Reference Manual Simple CPU communication diagnostics The communication status of the simple CPU communication function can be checked with GX Works3. For details, refer to the following.
  • Page 813: Chapter 46 Troubleshooting By Symptom

    TROUBLESHOOTING BY SYMPTOM The following shows troubleshooting by symptom in flowchart format. For details on corrective action, refer to  Page 817 IP Address Duplication Detection onward. 46.1 Troubleshooting Flowchart Error during communication between Ethernet-equipped module and other device Data communications cannot be performed. Check if an error has occurred in Ethernet-equipped module.
  • Page 814 • If trouble occurs while using Ethernet, check the error status with the Ethernet diagnostics function of GX Works3. For error contents, refer to  Page 826 Error codes of the Ethernet communication. • For information concerning when the [ERR] LED or [ERROR] LED is lit, refer to  Page 800 Checking with LEDs.
  • Page 815: Errors During Slmp Communication

    Errors during SLMP communication Communication error Check the status of target device connection configuration. Is the target device Set the target device connection connection configuration configuration. correct? Send the command to built-in Is command sent from the target device? Ethernet. Is response sent to the device that sent the command?
  • Page 816 Is the IP address Modify the IP address and send the specified in the command command once again. correct? Is the specification of the command format such as command type, Modify the command format. device specification, address specification correct? Is there an open error, Check the error code, cause of error initial error in each of each channel and rectify.
  • Page 817: Errors During File Transfer Function (Ftp Server)

    Errors during file transfer function (FTP server) Communication error Check the FTP server settings in the CPU module. Log in the system with the log-in Are the log-in name and name and the password that you the password collect? have established in the parameters. Log in the system with the IP address Is the IP address of the CPU module that you have...
  • Page 818: Errors During File Transfer Function (Ftp Client)

    Errors during file transfer function (FTP client) For check items other than those shown below, refer to  Page 204 Precautions. Communication error Check the FTP client settings in the CPU module. Are IP address Log in the system with the IP address set at settings for the FTP the FTP server side.
  • Page 819: Ip Address Duplication Detection

    46.2 IP Address Duplication Detection When turning the power from off to on, resetting, or connecting to the network, the Ethernet-equipped module check whether there is any device with duplicated IP address on the same network. When the IP address duplication is detected, an error occurs and appears in the event history.
  • Page 820: When The Simple Cpu Communication Function Is Used

    46.3 When the Simple CPU Communication Function is Used Communications cannot be performed with the communication destination. When communications with the external device cannot be performed using the simple CPU communication function, check the following items and take action. Check item Action Does any error occur in the simple CPU communication diagnostics or simple Eliminate the error cause.
  • Page 821 Communications with unstable communication destination. When communications with the communication destination using the simple CPU communication is unstable, check the following items and take action. Check item Action Does any error occur in the simple CPU communication diagnostics or simple Eliminate the error cause.
  • Page 822: When Using The File Transfer Function

    Access to the CPU module cannot be performed If access to the CPU module from the target device cannot be performed during the simple CPU communication, check the following items and take action. Check item Action Is not the communication time check of the target device short? Set the communication time check of the target device more than 30 seconds.
  • Page 823: When Using The Inverter Communication Function

    46.5 When Using the Inverter Communication Function When the operation mode of an inverter is not changed to computer link operation mode • Verify that the inverter is set to the external operation mode. • Verify that no signal is being input to the external terminals STF and STR. •...
  • Page 824: Chapter 47 Error Codes

    ERROR CODES 47.1 Ethernet Communication For the error codes (stored in SD0/SD8067) common among CPU modules, refer to the  MELSEC iQ-F FX5 User's Manual (Application). Error codes of the IP address change function The description and corrective action for error codes generated by the IP address change function are explained. CPU module Error codes are stored in SD8498 (IP address storage area write error code) or SD8499 (IP address storage area clear error code).
  • Page 825: Error Codes Of The Simple Cpu Communication Function

    Error codes of the simple CPU communication function The description and corrective action for error codes generated by the simple CPU communication function are explained. Error codes for those detected by the own station CPU module Error codes detected in the own station are stored in Simple PLC Communication error code (FX5S/FX5UJ CPU module: SD10412 to SD10427, FX5U/FX5UC CPU module: SD10412 to SD10443).
  • Page 826 Ethernet module Error code Error details and causes Action (hexadecimal) CFB0H Transmission has failed due to retransmission timeout. • Check the operation of the external device. • Check the conditions of the cables, hubs and routers on the lines to the external devices.
  • Page 827: Error Codes Of Completion Status

    Error codes of completion status Described here are descriptions and actions for error codes of completion status for those occurred in the file transfer function (the FTP client). Any of the error codes of completion status will be stored in control data (s1)+1 of the file transfer function instruction (the SP.FTPPUT instruction, SP.FTPGET instruction).
  • Page 828: Error Codes Of The Ethernet Communication

    Error code Error details and causes Action (hexadecimal) C619H FTP command execution to the FTP server failed. • Review the FTP server settings (folder path, connection method). • Check whether the FTP server or the specified file has access authority (write authority, read authority).
  • Page 829 Error code Error details and causes Action (hexadecimal) C027H Socket communication send message has failed. • Check the operation of the external device or switching hub. • Since there may be congestion of packets on the line, send data after a certain period of time.
  • Page 830 Error code Error details and causes Action (hexadecimal) C400H The SP.ECPRTCL instruction was executed when • Execute the SP.ECPRTCL instruction after "Predefined protocol ready "Predefined protocol ready (SD10692)" was "0". (SD10692)" has become "1". • Execute the SP.ECPRTCL instruction after rewriting the protocol setting data to the CPU module.
  • Page 831 Error code Error details and causes Action (hexadecimal) CF20H • The setting value of the communication setting is out of Correct the setting details, and retry the operation. range. • The items of communication setting which cannot be set on the target device are set. •...
  • Page 832 Error code Error details and causes Action (hexadecimal) C050H When the communication data code is set to "ASCII", ASCII • For communication, set to "Binary" in the communication data code and code data which cannot be converted to binary is received. restart the CPU module.
  • Page 833 Error code Error details and causes Action (hexadecimal) C1B0H The open processing of the specified connection has been Perform the open processing after completing the close processing. already completed. C1B1H The open processing of the specified connection has not Perform the open processing. been completed.
  • Page 834: Slmp Function Error Code

    SLMP function error code Error codes stored when communication ends in error during SLMP are as provided in the following table. CPU module 3E: 3E frame, 1E: 1E frame, : Supported, : Not supported Error code Error details and causes Action SLMP (hexadecimal)
  • Page 835 Ethernet module 3E: 3E frame, 1E: 1E frame, : Supported, : Not supported Error code Error details and causes Action SLMP (hexadecimal) C035H The existence of the external device could not be confirmed • Check the operation of the external device. ...
  • Page 836: Module Error Code Of Ethernet Module

    Module error code of Ethernet module Error codes when a module error occurs are classified into major error, moderate error, and minor error, and can be checked in the [Error Information] tab of the "Module Diagnostics" screen of the Ethernet module. ( Page 803 Module diagnostics) The error codes are stored in 'Latest error code' (Un\G29).
  • Page 837 Error code Error details and causes Action (hexadecimal) 1900H A memory check error has occurred. • Execute the IP address change function again. • If the error occurs again even after the above action is taken, the possible cause is a hardware failure of the module on which the error occurred. Please consult your local Mitsubishi representative.
  • Page 838 Error code Error details and causes Action (hexadecimal) 2C81H A parameter error was detected in the external device • Check the external device configuration settings in the Ethernet module configuration. parameters. • Set so that the sum of the number of connections in External Device Configuration and the number of settings in the simple CPU communication settings is 32 or less.
  • Page 839 Error code Error details and causes Action (hexadecimal) 306FH The subnet mask is outside the range. Please consult your local Mitsubishi representative. 3073H The gateway address (IPv4) is outside the range. Please consult your local Mitsubishi representative. 3074H The subnet mask is outside the range. Please consult your local Mitsubishi representative.
  • Page 840 Error code Error details and causes Action (hexadecimal) 480DH The operation cannot be executed because the Re-execute after the completion of the communication setting reflection communication setting reflection function is being executed. function. 480EH The operation cannot be executed because the parameter Re-execute after the completion of the parameter read/write function.
  • Page 841: Serial Communication

    47.2 Serial Communication Checking absence/presence of N:N Network function errors Verify that link errors have not occurred in the master station and local stations. The error can be checked using the flags specified below. Serial communication error Error flags If a communication error occurs in the N:N Network, the serial communication error flag turns ON. Verify that the device specified in the table below is ON.
  • Page 842 Error codes When the data transfer sequence error turns ON, the error code is stored in the following device. Station number Master Local stations station Station Station Station Station Station Station Station Station No. 0 No. 1 No. 2 No. 3 No.
  • Page 843: Checking Absence/Presence Of Parallel Link Function Errors

    Checking absence/presence of parallel link function errors Confirm that no error has occurred in the programmable controllers at the master or linked station. To confirm, check the following flags. Parallel link operation "Parallel link operation" flag is ON while the parallel link is running. Verify that the device specified in the table below is ON.
  • Page 844: Checking Error Codes Of Mc Protocol Function

    Checking error codes of MC protocol function 1C frame Error codes when NAK is sent The table below shows error codes (hexadecimal) and contents of errors when NAK is sent in communication between the counterpart equipment and a CPU module. As an error code, a 2-digit ASCII code (hexadecimal) within the range from 00H to FFH is sent.
  • Page 845 List of error codes is as follows. Error code Error item Description of error Action (hexadecimal) 7001H Serial Communication CH parameter setting duplication error Confirm whether the serial port is not used for other communication communication. common error 7010H Serial Parity error, overrun error or framing error Check the following.
  • Page 846 3C/4C frame Error codes when NAK is sent The table below shows error codes (hexadecimal) and contents of errors when NAK is sent in communication between the counterpart equipment and a CPU module. When two or more errors occur at the same time, priority is given to the error code with the smallest number, and the error code with the smallest number is sent.
  • Page 847 Error code Error item Description of error Action (hexadecimal) 7F68H Framing error • A disturbance occurred in the line due to power supply ON/ • Take counter measures for noise. OFF of the target station. • At the time of multi drop connection, have an •...
  • Page 848 Operation error Error flags The operation error flag turns ON when an operation error occurs in the communication settings. Verify that the device specified in the table below is ON. FX5 only Name Descriptions Latest self diagnostics error (including annunciator ON) Turns ON when an operation error occurs.
  • Page 849: Checking Absence/Presence Of Inverter Communication Function Errors

    Checking absence/presence of inverter communication function errors If an inverter communication error occurs, it is processed as a serial communication error. (Page 373 Processing of communication errors) Serial communication error Error flags The following devices turn ON when an error occurs during serial communication. FX5 dedicated FX3 Series Name...
  • Page 850: Inverter Operation

    List of error codes for inverter communication The error codes shown below are stored when a communication error is caused by an inverter communication instruction. Error code Description of error Inverter operation (hexadecimal) 0000H Normal end (No Errors)  7601H ...
  • Page 851 IVMC instruction error codes When errors occur in the send data of the IVMC instruction, the following error codes are stored. Error code Description of error Inverter operation (hexadecimal)  0000H No error has occurred in both send data 1 and send data 2. Normal end 7640H IVMC instruction send data 1: Mode error...
  • Page 852: Checking Absence/Presence Of Non-Protocol Communication Function Errors

    Checking absence/presence of non-protocol communication function errors Serial communication error Error flags If a communication error occurs in the non-protocol communication, the serial communication error flag turns ON. Verify that the device specified in the table below is ON. FX5 only FX3 Series Name Descriptions...
  • Page 853 Operation error Error flags The operation error flag turns ON when an operation error occurs in the RS2 instruction. Verify that the device specified in the table below is ON. FX5 only Name Descriptions Latest self-diagnostic error Turns ON when an operation error occurs. (Including the annunciator ON) Latest self-diagnostic error (Not including the annunciator ON)
  • Page 854: Checking Absence/Presence Of Predefined Protocol Support Function Errors

    Checking absence/presence of predefined protocol support function errors Serial communication error Error flags If a communication error occurs in the predefined protocol support function, the serial communication error flag turns ON. Verify that the device specified in the table below is ON. Name Descriptions SM8500...
  • Page 855 Error code Name Description of error Error handling (hexadecimal) 7D1AH Data length error In the data received from the counterpart device, • Check the packet format of the counterpart device the Length value does not match the data length of to confirm that the conversion variable is set the conversion variable(s).
  • Page 856 Error code Name Description of error Error handling (hexadecimal) 7F68H Framing error • The stop bit settings do not match. • Match the settings of the CPU module with that of • A disturbance occurred in the line due to power the counterpart device.
  • Page 857 Operation error Error flags The operation error flag turns ON when an operation error occurs in the S(P).CPRTCL instruction. Verify that the device specified in the table below is ON. FX5 only Name Descriptions Latest self-diagnostic error Turns ON when an operation error occurs. (Including the annunciator ON) Latest self-diagnostic error (Not including the annunciator ON)
  • Page 858: Modbus Serial Communication

    47.3 MODBUS Serial Communication Communication error Error flags If a communication error occurs in the serial communication, the serial communication error flag turns ON. Verify that the device specified in the table below is ON. FX5 only FX3 Series Name Descriptions compatible SM8500...
  • Page 859 Error Error details Description of error MODBUS Station in code communication which error occurred Serial    7309H Slave response timeout Master A slave does not respond within the time set in the time-out time setting of the communication parameter 730AH The following "response message formats"...
  • Page 860: Slmp

    Operation error Error flags The operation error flag turns ON when an operation error occurs in the ADPRW instruction. Verify that the device specified in the table below is ON. FX5 only Name Descriptions Latest self-diagnostic error Turns ON when an operation error occurs. (Including the annunciator ON) Latest self-diagnostic error (Not including the annunciator ON)
  • Page 861: Ethernet Module

    Error code Error details and causes Action SLMP (hexadecimal) C058H Request data length after ASCII-to-binary After reviewing and correcting the content of text or length of request   conversion does not match the number of data in the data in the header, send to CPU module again. character section (part of text).
  • Page 862 Error code Error details and causes Action SLMP (hexadecimal)   C057H The request data length in the SLMP message does After reviewing and correcting the content of text or length of request not match the number of data in the character data in the header, send to Ethernet module again.
  • Page 863: Chapter 48 Event Codes

    EVENT CODES The following table lists events that occur in the Ethernet module. Event Event Event Event Detected event Detailed information code type category status Detailed Detailed Detailed information 1 information 2 information 3  0800 System Error Minor Link-down Operation source Communication information...
  • Page 864 Event Event Event Event Detected event Detailed information code type category status Detailed Detailed Detailed information 1 information 2 information 3  2DA4 System Error Moderate Connection setting parameter (Open Parameter Failure system error) information information  2DA5 System Error Moderate Connection setting parameter (Fixed Parameter...
  • Page 865 Event Event Event Event Detected event Detailed information code type category status Detailed Detailed Detailed information 1 information 2 information 3   306C System Error Moderate The consecutive number of timeouts to Parameter disconnection detection is outside the information range.
  • Page 866 Event Event Event Event Detected event Detailed information code type category status Detailed Detailed Detailed information 1 information 2 information 3   309F System Error Moderate The gateway address (IPv6) is outside Parameter the range. (Gateway address setting information parameter) ...
  • Page 867 Event Event Event Event Detected event Detailed information code type category status Detailed Detailed Detailed information 1 information 2 information 3    3E56 System Error Major Factory test mode error 3E60 to System Error Major MPU error  ...
  • Page 868: Appendices

    APPENDICES Appendix 1 List of Special Device Applications and Assignments For special relays and special registers other than described below, refer to  MELSEC iQ-F FX5 User's Manual (Application). Special relays R: Read only, R/W: Read/write Device No. Name Description SM1392 FTP client connection status This relay turns on when the connection with the FTP server is established.
  • Page 869 Device No. Name Description SD10061 Subnet mask (High-order) Higher part of the subnet mask setting value. SD10064 Default gateway IP address Lower part of the default gateway IP address setting value. (Low-order) SD10065 Default gateway IP address Higher part of the default gateway IP address setting value. (High-order) SD10074 to Host MAC address...
  • Page 870 Device No. Name Description SD10297 Time setting function The day of the week which the time setting function is executed is stored in a binary code. execution time (Day of the 0: Sunday week) 1: Monday 2: Tuesday 3: Wednesday 4: Thursday 5: Friday 6: Saturday...
  • Page 871 Device No. Name Description SD10380 to Simple CPU communication The simple CPU communication status is stored. SD10411 status SD10380: Setting No.1 to SD10395: Setting No.16 SD10396: Setting No.17 to SD10411: Setting No.32 When the communication setting is "Fixed" 0H: Unset 1H: Preparing 3H: Communicating 4H: Stopped...
  • Page 872 Device No. Name Description SD10711 Predefined protocol setting 0 is stored if an error is detected in the packet setting or element setting. data check area setting type 1 is stored if an error is detected in the protocol detailed setting. (Valid when protocol number value is 1 to 64) 0: Packet setting or element setting 1: Configuring detailed setting of protocols...
  • Page 873 Device No. Name Description SD10747 Connection No.1 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10748 Connection No.1 received Stores the verification results of receive packet No.7.
  • Page 874 Device No. Name Description SD10767 Connection No.2 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10768 Connection No.2 received Stores the verification results of receive packet No.7.
  • Page 875 Device No. Name Description SD10787 Connection No.3 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10788 Connection No.3 received Stores the verification results of receive packet No.7.
  • Page 876 Device No. Name Description SD10807 Connection No.4 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10808 Connection No.4 received Stores the verification results of receive packet No.7.
  • Page 877 Device No. Name Description SD10827 Connection No.5 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10828 Connection No.5 received Stores the verification results of receive packet No.7.
  • Page 878 Device No. Name Description SD10847 Connection No.6 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10848 Connection No.6 received Stores the verification results of receive packet No.7.
  • Page 879 Device No. Name Description SD10867 Connection No.7 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10868 Connection No.7 received Stores the verification results of receive packet No.7.
  • Page 880 Device No. Name Description SD10887 Connection No.8 received Stores the verification results of receive packet No.6. data verification result Element No. where the verification result did not match (b0 to b7) (receive packet No.6) The cause of mismatch (verification result code) (b8 to b15) SD10888 Connection No.8 received Stores the verification results of receive packet No.7.
  • Page 881: Appendix 2 List Of Buffer Memory Applications And Assignments

    Appendix 2 List of Buffer Memory Applications and Assignments The buffer memory is used to exchange data between the Ethernet module and the CPU module or external devices. Buffer memory values are set to their defaults (initial values) when the system is powered off or the CPU module is reset. For details on the listed buffer memories, as well as the buffer memories not described below, refer to following manuals.
  • Page 882 Buffer memory No. Name Description Decimal Hexadecimal IP address change function You can confirm whether or not the IP address change function is enabled. enable flag 0: Disabled 1: Enabled IP address storage area Stores error codes if writing to IP address storage area fails. write error code 0: Normal (no error) 1920H: IP address setting or other (Un\G50 to Un\G55) value exceeds the setting...
  • Page 883 Buffer memory No. Name Description Decimal Hexadecimal 205 to 207 CDH to CFH MAC address of the station Stores the MAC address of the station with duplicated IP address in the station connected later which was connected earlier to the network. Un\G205: Serial ID Un\G206: Lower one digit of vendor ID, model ID Un\G207: Upper two digits of vendor ID...
  • Page 884: Appendix 3 Port Numbers Used By Ethernet-Equipped Modules

    Appendix 3 Port Numbers Used by Ethernet- equipped Modules The following port numbers are used by the system and cannot be specified. This applies to FX5U/FX5UC CPU modules. Port No. Applications Protocol Default port status Decimal Hexadecimal For FTP server function (data port) TCP/IP Close For FTP server function (control port)
  • Page 885: Appendix 4 Combined Use Of Serial Communication

    Appendix 4 Combined Use of Serial Communication Channel specification The same serial port cannot be used for more than one communication function. Duplicate channel numbers cannot be specified in communication settings. If the channel number specified by the following instruction and the channel number of another communication function are specified twice, an error may occur. Inverter communication Non-protocol communication Predefined protocol support function...
  • Page 886: Operation Image Of Each Communication Type

    Appendix 5 Operation Image and Data Structure of Predefined Protocol Operation image of each communication type Operation image of each communication type of protocol as shown below. Send only The specified packet is transmitted once. Counterpart Terminator Header Data area CPU module device The operation is as follows.
  • Page 887 Receive only When data are received from the counterpart device, the process completes when the received data matches the receive packet and the receiving process is performed. For verification mismatch, the receive data is discarded, and the CPU unit waits for the next receive data. (Page 888 Verification operation) Settable receive packet (expected packet) is up to 16.
  • Page 888: Send & Receive

    Send & receive A packet is sent once, and the status changes to the data receive wait status after the transmission completes normally. Then, data is received from the counterpart device, and the process completes when the received data matches the receive packet and the receiving process is performed.
  • Page 889 • When variables are included in receive packet elements, variable parts are not verified. • When more than one receive packet is specified, received data is verified with the receive packet information of the first registered packet in the order of registration. The receive processing is performed once received data match one of the receive packet number, and further verification is not performed.
  • Page 890: Verification Operation

    Verification operation The following shows the verification operations of receive packets (expected packets) of when receive is included in the selected communication type. Receive data and receive packets are compared in the receive processing, and the processing is completed when the verification result is "matched".
  • Page 891: Data Examples Of Length

    Data examples of Length Shows the data examples of element length that can be placed in a packet. Data example The following is an example in the case where the calculated value of length is 258 bytes in decimal (hexadecimal: 102H). Data flow is Forward Direction Code type Data length...
  • Page 892 The send/receive image is as follows. When sending When receiving Length calculation Data Length Length calculation Data Length result setting result setting Send Receive 2 byte 2 byte 3 byte 3 byte 4 byte 4 byte Data flow is Byte Swap Code type Data length 1 byte...
  • Page 893: Data Examples Of Non-Conversion Variable

    Data examples of Non-conversion Variable Shows the data examples of element non-conversion variable that can be placed in a packet. Data example 1 The following table shows data to be stored in the data storage area when the string of send data is 'ABCD' (ASCII code: A = 41H, B = 42H, C = 43H, and D = 44H).
  • Page 894: Data Examples Of Conversion Variable

    Data examples of Conversion Variable Shows the data examples of element conversion variable that can be placed in a packet. Data example The following table shows send data when a packet consists of [Header], [Conversion variable], [Terminator] and data stored in the data storage area is D0=837 (0345H), D1=18 (0012H).
  • Page 895 Data example 3 Item Description Conversion HEXASCII Hexadecimal HEXASCII Hexadecimal HEXASCII Hexadecimal Fixed Number of Data/Variable Fixed Number of Data Fixed Number of Data Fixed Number of Data Number of Data Number of Send Data Number of Send Digits of Data Variable Number of Digits Variable Number of Digits ...
  • Page 896 Operation of Number of Decimals Sending • Fixed point Conversion: HEXASCII Decimal Number of Send Data: 2 Conversion Unit: Word Number of Send Digits of Data: 4 Number of Decimals: 1 Data Storage Area Send 123.4 1234 (04D2H) Value First data 567.8 5678 (162EH) Value...
  • Page 897 Operation of Delimiter Sending • Comma (Space too) Conversion: HEXASCII Decimal Number of Send Data: 1 Conversion Unit: Word Number of Send Digits of Data: 4 Data Storage Area Send 1234 (04D2H) "1" "2" "3" "4" "," First data Conversion: HEXASCII Decimal Number of Send Data: 2 Conversion Unit: Word Number of Send Digits of Data: 4 Data Storage Area Send 1234 (04D2H)
  • Page 898: Data Examples Of Check Code

    • No Delimiter Conversion: ASCII DecimalHEX Number of Receive Data: 2 Conversion Unit: Word Number of Receive Digits of Data: 4 Receive Data Storage Area 1234 (04D2H) "1" "2" "3" "4" "5" "6" "7" "8" 5678 (162EH) First data Second data Data examples of Check Code Shows the data examples of element check code that can be placed in a packet.
  • Page 899 • Two's complement is designated (Two's complement for 0000 0015H: FFFF FFEBH). When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal. (Hexadecimal: FFFBH, Decimal: 65515) Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte...
  • Page 900 • Two's complement is designated (Two's complement for 0000 0015H: FFFF FFEBH). When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal. (Hexadecimal: FFFBH, Decimal: 65515) Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte...
  • Page 901 Data Flow: Reverse Direction • No complement calculation is designated (Reference) Hexadecimal: 1FDH, Decimal: 509 Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte 4 byte  ASCII hexadecimal DF (44H 46H) DF1 (44H 46H 31H) DF10 (44H 46H 31H 30H) ...
  • Page 902 • Two's complement is designated (Two's complement for 0000 01FDH: FFFF FE03H). When Code Type is ASCII Decimal, the lower one word is extracted and converted from hexadecimal to decimal. (Hexadecimal: FE03H, Decimal: 65027) Code type Data length (Values in ( ) indicate ASCII code.) 1 byte 2 byte 3 byte...
  • Page 903 CRC error checking procedure 16-bit register (MSB) Flag Calculating procedure 07H (Function code)  0000 0111 Exclusive OR (XOR) 1000 0001 0011 1001 Shift 1 0100 0000 1001 1100 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1110 0000 1001 1101 Shift 2 0111 0000...
  • Page 904: Data Examples Of Non-Verified Reception

    Data examples of Non-verified reception Shows the data examples of element non-verified reception that can be placed in a packet. The usage example for non-verified reception is shown below. Example of format of packet from other device Data to be read Variable number 1 byte 2 byte...
  • Page 905: Appendix 6 Ascii Code Table

    Appendix 6 ASCII Code Table ASCII code table (8-bit code expressed in hexadecimal) Hexadecimal value " & < > APPX Appendix 6 ASCII Code Table...
  • Page 906: Appendix 7 Frame Specifications

    Appendix 7 Frame Specifications Procedure for generating of CRC The error check in the MODBUS serial communication (RTU mode) is conducted by CRC (Cyclic Redundancy Check). A procedure for generating a CRC is: Load the register whose 16 bits are all "1" (FFFFH). Call this the CRC register. Exclusive OR the first 8 bit byte of the message with the low-order byte of the 16 bit CRC register, putting the result in the CRC register.
  • Page 907 The following is a calculation example in the case where function code 05H is sent to station No. (address field) 2. CRC error check procedure 16-bit register Carry Flag (Load the register whose 16 bits are all "1") 1111 1111 1111 1111 02H (Station No.)
  • Page 908: Modbus Protocol Data Unit Formats

    MODBUS protocol data unit formats This section explains MODBUS protocol data unit formats of the MODBUS standard functions. The MODBUS protocol data unit contains request messages sent from the master to a slave and response messages sent from the slave to the master. How to see the request/response message formats Request/Response message format diagram The following shows how to see the request/response message format diagrams provided in Page 907 Read coils to...
  • Page 909: Read Coils

    Read coils Reads the status (ON/OFF) of one or more coils. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Data Function code Function code Start coil number Read points (01H) (0000H to FFFFH) (0001H to 07D0H) Response message format (Slave ...
  • Page 910: Read Inputs

    Read inputs Reads the status (ON/OFF) of one or more inputs. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Function code Data Function Start input number Read points code (0000H to FFFFH) (0001H to 07D0H) (02H) Response message format (Slave ...
  • Page 911: Read Holding Registers

    Read holding registers Reads the values of one or more holding registers. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Function code Data Function Start holding Read points code register number (0001H to 007DH) (0000H to FFFFH) (03H) Response message format (Slave ...
  • Page 912: Read Input Registers

    Read input registers Reads the values of one or more input registers. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Data Function code Function Start input register number Read points (0000H to FFFFH) (0001H to 007DH) code (04H) Response message format (Slave ...
  • Page 913: Write Single Coil

    Write single coil Writes a value (ON/OFF) to one coil. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Data Function code ON/OFF specification Function Coil number code (0000H to 0000H: OFF (05H) FFFFH) FF00H: ON Response message format (Slave ...
  • Page 914: Write Multiple Coils

    Write multiple coils Writes values (ON/OFF) to multiple coils. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Function code Data Function Start coil number Write points Number of Device data Device data code (0000H to FFFFH) (0001H to 07B0H) bytes n (0FH)
  • Page 915: Write Multiple Registers

    Write multiple registers Writes values to multiple holding registers. Supports the MODBUS serial communication and MODBUS/TCP communication. Request message format (Master  Slave) Data Function code Number of Function Start holding register Write points n Device data Device data bytes code number (0000H to (0001H to 007BH)
  • Page 916 Mask write register Masks the values stored in a single holding register with AND or OR and writes the value. The masked values written to the holding register are as shown below. • Value to be written = (Register current value  AND mask value)  (OR mask value  AND mask value) Supported only by the MODBUS/TCP communication.
  • Page 917: Read/Write Multiple Registers

    Read/Write multiple registers Reads from and writes to multiple holding registers. Writing is executed first and reading is then executed. Supported only by the MODBUS/TCP communication. Request message format (Master  Slave) Function Data code Function Read start holding Read points Write start holding Write points Number of...
  • Page 918: Appendix 8 Initial Values Of Modbus Device Allocation

    Appendix 8 Initial Values of MODBUS Device Allocation Parameter initial value of MODBUS device allocation The FX5 dedicated pattern and the FX3 compatible pattern are provided for the parameter initial values. FX5 dedicated pattern MODBUS address FX5 device <Bit device> Coil (read/write) Input (read only) FX5S/FX5UJ...
  • Page 919 MODBUS address FX5 device <Word device> Input register (read only) Holding register (read/write) FX5S/FX5UJ FX5U/FX5UC FX5S/FX5UJ FX5U/FX5UC FX5S/FX5UJ FX5U/FX5UC F000H to F0FFH F000H to F0FFH   CN0 to 255 CN0 to 255     F100H to FFFFH F100H to FFFFH FX3 compatible pattern MODBUS address...
  • Page 920: Access To Module Access Device

    Appendix 9 Device Memory Extension Specification The following accesses are available by setting the subcommand of request data to 008. • Access to module access device • Access with indirect specification of the device No. by using index register or long index register •...
  • Page 921 Command The following commands can be used for accessing. Item Command Type Operation Device Read 0401 Write 1401 Read Random 0403 Write Random 1402 Read Block 0406 Write Block 1406 Subcommand Subcommand ASCII code Binary code 80H 00H 82H 00H Extension specification Specify the start I/O number of intelligent function modules.
  • Page 922: Response Data

    Response data The same as when extension is not specified. Communication example Access to the buffer memory (Address: 1) of the intelligent function module whose start I/O number is 0030H. • When communicating data in ASCII code (Request data) Start device No. Extension Device or device No.
  • Page 923: Access With Indirect Specification Of The Device No. By Using Index Register Or Long Index Register

    Access with indirect specification of the device No. by using index register or long index register Indirect specification of the device No. can be performed by using the index register or long index register when accessing the device. The access destination can be switched with one message, by changing the value of the index register or long index register in CPU module programs.
  • Page 924 Request data ASCII Device Start device No. When extension is Command Subcommand Number of devices code or device No. not specified Extension Extension Device Start device No. Device specification When extension is specified specification code or device No. modification modification Binary When extension is Start device No.
  • Page 925 Command The following commands can be used for accessing. Item Command Type Operation Device Read Random 0403 Write Random 1402 Subcommand Item Subcommand ASCII code Binary code When accessing in bit units 81H 00H 83H 00H When accessing in word units 80H 00H 82H 00H Extension specification...
  • Page 926 Extension specification modification Treat the value specified in "extension specification" as the offset value. Specify the index register or long index register number when performing indirect specification of the module number with index register or long index register. The following value is specified when the access point is a module of the MELSEC iQ-R/iQ-F Series. Subcommand ASCII code Binary code...
  • Page 927: Device Modification

    Device modification Treat the value specified in "Start device or device No." as the offset value. Specify the index register or long index register number when performing indirect specification of the device No. with index register or long index register. The following value is specified when the access point is a module of the MELSEC iQ-R/iQ-F Series.
  • Page 928: Access With Indirect Specification Of The Device No. By Using The Values Stored In Word Device

    Communication example Accessing the device of D100 + Z4. • When communicating data in ASCII code (Request data) Extension Extension specification Device Start device No. Device Subcommand specification modification code or device No. modification • When communicating data in binary code (Request data) Direct Extension...
  • Page 929 Request data ASCII When extension is Device Start device No. Command Subcommand Number of devices code or device No. not specified Device Start device No. Device Indirect When extension is specified code or device No. modification specification Binary When extension is Start device No.
  • Page 930 Indirect specification, Device modification Specify the "@" part of the indirect specification device. Indirect specification can be specified only for word devices. When communicating data in ASCII code When communicating data in binary code : Without indirect specification : With indirect specification Device code (Only word device codes can be specified at indirect specification) Specify the code of the device to be accessed.
  • Page 931: Appendix 10Command Comparison Between Mc Protocol And Slmp

    Appendix 10 Command Comparison between MC Protocol and SLMP The correspondence table of MC protocol and SLMP is shown below. When connecting an external device which uses MC protocol to an SLMP compatible device, check if replacement of command is required. Applicable 3E frame command list The message format of 3E frame of the SLMP is the same as that of the QnA compatible 3E frame of MC protocol.
  • Page 932: Appendix 11 Device Memory Extension Specification

    Appendix 11 Device Memory Extension Specification The following accesses are available by setting the subcommand of request data to 008. • Access to module access device • Access with indirect specification of the device No. by using index register or long index register •...
  • Page 933 Command The following commands can be used for accessing. Function Command Batch read 0401 Batch write 1401 Random read 0403 Random write 1402 Multiple block batch read 0406 Multiple block batch write 1406 Subcommand Subcommand ASCII code Binary code 80H 00H 82H 00H Extension specification Specify the start I/O number of intelligent function modules.
  • Page 934 Communication example Access to the buffer memory (Address: 1) of the intelligent function module whose start I/O number is 0030H. • When communicating data in ASCII code (Request data) Start device No. Extension Device or device No. Subcommand specification code •...
  • Page 935: Access With Indirect Specification Of The Device No. By Using Index Register Or Long Index Register

    Access with indirect specification of the device No. by using index register or long index register Indirect specification of the device No. can be performed by using the index register or long index register when accessing the device. The access destination can be switched with one message, by changing the value of the index register or long index register in CPU module programs.
  • Page 936 Request data ASCII Device Start device No. When extension is Command Subcommand Number of devices code or device No. not specified Extension Extension Device Start device No. Device specification When extension is specified specification code or device No. modification modification Binary When extension is Start device No.
  • Page 937 Command The following commands can be used for accessing. Function Command Random read 0403 Random write 1402 Subcommand Item Subcommand ASCII code Binary code When accessing in bit units 81H 00H 83H 00H When accessing in word units 80H 00H 82H 00H Extension specification Specify the module number.
  • Page 938 Extension specification modification Treat the value specified in "extension specification" as the offset value. Specify the index register or long index register number when performing indirect specification of the module number with index register or long index register. The following value is specified when the access point is a module of the MELSEC iQ-R/iQ-F Series. Subcommand ASCII code Binary code...
  • Page 939 Device modification Treat the value specified in "Start device or device No." as the offset value. Specify the index register or long index register number when performing indirect specification of the device No. with index register or long index register. The following value is specified when the access point is a module of the MELSEC iQ-R/iQ-F Series.
  • Page 940: Access With Indirect Specification Of The Device No. By Using The Values Stored In Word Device

    Communication example Accessing the device of D100 + Z4. • When communicating data in ASCII code (Request data) Extension Extension specification Device Start device No. Device Subcommand specification modification code or device No. modification • When communicating data in binary code (Request data) Direct Extension...
  • Page 941 Request data ASCII When extension is Device Start device No. Command Subcommand Number of devices code or device No. not specified Device Start device No. Device Indirect When extension is specified code or device No. modification specification Binary When extension is Start device No.
  • Page 942 Indirect specification, Device modification Specify the "@" part of the indirect specification device. Indirect specification can be specified only for word devices. When communicating data in ASCII code When communicating data in binary code : Without indirect specification : With indirect specification Device code (Only word device codes can be specified at indirect specification) Specify the code of the device to be accessed.
  • Page 943: Appendix 12Software Licenses And Copyrights

    Appendix 12 Software Licenses and Copyrights This section describes the licenses and copyrights of the software used in this product. MD5 Message-Digest Algorithm This product includes code that was developed by RSA Data Security, Inc. Copyright (C) 1991-2, RSA Data Security, Inc. License to copy and use this software is granted provided that it is identified as the "RSA Data Security, Inc.
  • Page 944: Appendix 13Added And Changed Functions

    Appendix 13 Added and Changed Functions The functions added or changed with the Ethernet-equipped module and engineering tool, and the supported Ethernet- equipped modules' firmware version and engineering tool software version are given below. The firmware version of the CPU module can be checked with module diagnosis (CPU diagnosis). Refer to the following manuals for details on diagnosing the module (CPU diagnosis).
  • Page 945 Add/Change Function Supported CPU module Supported engineering tool Reference firmware version software version MODBUS/TCP-compatible device "1.040" or later "1.090U" or later Page 70 optional setting (simple CPU communication function) is supported. Port number duplication (simple CPU "1.040" or later "1.090U" or later Page 69 communication function) in the following devices is supported.
  • Page 946 Add/Change Function Supported CPU module Supported engineering tool Reference firmware version software version MC protocol 1C frame support is "1.110" or later "1.050C" or later Page 314 supported. FREQROL-E800/A800 Plus inverters are From the first "1.080J" or later Page 332 supported.
  • Page 947: Motion Module

    Ethernet module When FX5UJ CPU module is used Add/Change Function Supported versions Reference CPU module Ethernet module Engineering tool firmware version firmware version software version MELSOFT connection "1.010" or later "1.100" or later "1.075D" or later Page 31 SLMP communication function "1.010"...
  • Page 948: Index

    INDEX ......579 0 to 9 Error information ......21 External device .
  • Page 949 ......21,310 MC protocol ..... . 699 Message formats .
  • Page 950: Revisions

    Japanese manual number: SH-082624-G This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which may occur as a result of using the contents noted in this manual.
  • Page 951: Warranty

    WARRANTY Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty 2. Onerous repair term after discontinuation of production Range If any faults or defects (hereinafter "Failure") found to be Mitsubishi shall accept onerous product repairs for the responsibility of Mitsubishi occurs during use of the seven (7) years after production of the product is product within the gratis warranty term, the product shall...
  • Page 952: Information And Services

    INFORMATION AND SERVICES For further information and services, please contact your local Mitsubishi Electric sales office or representative. Visit our website to find our locations worldwide. MITSUBISHI ELECTRIC Factory Automation Global Website Locations Worldwide www.MitsubishiElectric.com/fa/about-us/overseas/ TRADEMARKS Microsoft and Windows are trademarks of the Microsoft group of companies.
  • Page 954 Manual number: SH(NA)-082625ENG-G MODEL: FX5-U-COMMU-E HEAD OFFICE: TOKYO BLDG., 2-7-3, MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS: 1-14, YADA-MINAMI 5-CHOME, HIGASHI-KU, NAGOYA 461-8670, JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. Specifications subject to change without notice.

Table of Contents