Mitsubishi Melsec-L Series User Manual
Mitsubishi Melsec-L Series User Manual

Mitsubishi Melsec-L Series User Manual

Communication module
Hide thumbs Also See for Melsec-L Series:
Table of Contents

Advertisement

Advertisement

Table of Contents
loading

Summary of Contents for Mitsubishi Melsec-L Series

  • Page 3: Safety Precautions

    • SAFETY PRECAUTIONS • (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. The instructions given in this manual are concerned with this product. For the safety instructions of the programmable controller system, please read the user's manual of the CPU module to use.
  • Page 4 [Design Precautions] WARNING • Do not write data into the "system area" of the buffer memory of intelligent function modules. Also, do not use any "use prohibited" signals as an output signal to an intelligent function module from the CPU module. Writing data into the "system area"...
  • Page 5 [Wiring Precautions] WARNING • Shut off the external power supply for the system in all phases before wiring. Failure to do so may result in electric shock or cause the module to fail or malfunction. • After installation and wiring, attach the included terminal cover to the product before turning it on for operation.
  • Page 6 [Startup/Maintenance Precautions] WARNING • Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction. • Shut off the external power supply for the system in all phases before cleaning the module or retightening the terminal block screw. Failure to do so may result in electric shock. [Startup/Maintenance Precautions] CAUTION •...
  • Page 7 [Operation Precautions] CAUTION • When controlling a running programmable controller (especially, changing data, program modification, and operation status change) from an external device such as a personal computer connected to an intelligent function module, read the relevant user's manual carefully and ensure the safety before the operation.
  • Page 8: Conditions Of Use For The Product

    PRODUCT in one or more of the Prohibited Applications, provided that the usage of the PRODUCT is limited only for the specific applications agreed to by Mitsubishi and provided further that no special quality assurance or fail-safe, redundant or other safety features which exceed the general specifications of the PRODUCTs are required.
  • Page 9: Introduction

    (hereinafter referred to as the C24) and programming. Before using the equipment, please read this manual and the related manuals carefully to develop full familiarity with the functions and performance of the MELSEC-L series programmable controller you have purchased, so as to ensure correct use.
  • Page 10: Compliance With The Emc And Low Voltage Directives

    COMPLIANCE WITH THE EMC AND LOW VOLTAGE DIRECTIVES (1) Method of ensuring compliance To ensure that Mitsubishi programmable controllers maintain EMC and Low Voltage Directives when incorporated into other machinery or equipment, certain measures may be necessary. Please refer to the manual included with the CPU module or base unit.
  • Page 11: Relevant Manuals

    RELEVANT MANUALS Basic specifications, functions, and usage of special functions can be confirmed in this manual. In addition, use the following manuals according to the intended use. (1) Relevant manuals for the C24 Manual number Manual name (model code) MELSEC-Q/L Serial Communication Module User's Manual (Application) Specifications and operating procedures for the special module functions, the settings for special SH-080007 (13JL87)
  • Page 12 (4) Operating manual Manual number Manual name (model code) GX Works2 Version1 Operating Manual (Common) System configuration, parameter settings, and online operations (common to Simple project and SH-080779ENG (13JU63) Structured project) of GX Works2 (Sold separately) GX Works2 Version1 Operating Manual (Intelligent Function Module) System configuration, parameter settings, and online operations (common to Simple project and SH-080921ENG (13JU69)
  • Page 13: Table Of Contents

    CONTENTS SAFETY PRECAUTIONS..........................A- 1 CONDITIONS OF USE FOR THE PRODUCT .....................A- 6 INTRODUCTION............................A- 7 COMPLIANCE WITH THE EMC AND LOW VOLTAGE DIRECTIVES............A- 8 RELEVANT MANUALS ..........................A- 9 CONTENTS..............................A-11 TERMS ................................A-17 PACKING LIST...............................A-19 1 SERIAL COMMUNICATION MODULE FUNCTIONALITY 2 PART NAMES 3 SPECIFICATIONS 3.1 General Specifications ..........................
  • Page 14 6.3.4 Precautions when transferring data using RS-422/485 circuit ............6-16 6.3.5 Enabling or disabling echo back of the RS-422/485 interface............6-19 6.4 Individual Station Test..........................6-21 6.4.1 ROM/RAM/switch test........................6-22 6.4.2 Self-loopback test..........................6-25 6.5 Loopback Test............................6-28 7 SETTINGS FOR THE C24 7.1 Adding the C24 to Projects ........................
  • Page 15 10.1.3 Sequence program for data reception..................10-11 10.1.4 How to detect and check the reception errors ................10-14 10.1.5 Receive data clear ........................10-17 10.1.6 Received data count and receive complete code settings ............10-23 10.2 Sending Data to the External Device ....................10-26 10.2.1 Transmission methods.........................
  • Page 16 13.3.2 Checking with the buffer memory....................13-15 14 MAINTENANCE AND INSPECTION 14.1 Inspection Items ..........................14- 1 14.2 When Replacing Modules........................14- 2 14.2.1 Procedure of C24 replacement and re-registration of data ............14- 2 15 TROUBLESHOOTING 15.1 Checking the Status of the C24......................15- 1 15.1.1 Checking the H/W LED information.....................
  • Page 17 APPENDIXES Appendix 1 Buffer Memory ........................App.- 1 Appendix 2 How to Confirm the Serial No. and Function Version............App.-21 Appendix 3 Differences between L Series C24 and Q Series C24............App.-22 Appendix 3.1 Specification comparisons.....................App.-22 Appendix 3.2 Precautions for utilizing programs.................App.-22 Appendix 4 When Using GX Developer or GX Configurator-SC ............App.-23 Appendix 4.1 Compatible software packages ..................App.-23 Appendix 4.2 Specification comparisons.....................App.-23 Appendix 4.3 Operation comparison ....................App.-24...
  • Page 18 INDEX REVISIONS WARRANTY A - 16 A - 16...
  • Page 19: Terms

    Abbreviation for the LJ72GF15-T2 CC-Link IE Field Network head module Display unit A liquid crystal display to be attached to the CPU module A MELSEC-L series module that has functions other than input or output, such as A/D converter Intelligent function module module and D/A converter module...
  • Page 20 Term Description A function available in GX Works2 and GX Configurator-SC (Predefined protocol support function), which includes: Predefined protocol support function • Registration of the protocol appropriate to each target device • Writing protocol setting data to or reading them from the flash ROM of the C24 •...
  • Page 21: Packing List

    PACKING LIST The following items are included in the package of the C24. Before use, check that all the items are included. (1) LJ71C24 Before Using the Product LJ71C24 A set of terminating resistors Terminating resistor for Terminating resistor for RS-422 communication, RS-485 communication, "CAUTION"...
  • Page 22 (2) LJ71C24-R2 Before Using the Product LJ71C24-R2 A - 20 A - 20...
  • Page 23 MEMO A - 21 A - 21...
  • Page 24: Serial Communication Module Functionality

    1 SERIAL COMMUNICATION MODULE FUNCTIONALITY 1 SERIAL COMMUNICATION MODULE FUNCTIONALITY The C24 performs data communication with another device connected by an RS-232 or RS-422/485 line, using any of the following four protocols. Through a modem or terminal adapter, a public line (analog/digital) can be used for data communication with a remotely located device.
  • Page 25 1 SERIAL COMMUNICATION MODULE FUNCTIONALITY (2) Predefined protocol Data can be transferred in accordance with a protocol for the external device. The same data communication can be performed in the nonprocedural protocol explained in (3). However, the following shows the convenient functions when comparing this protocol and the nonprocedural protocol.
  • Page 26 1 SERIAL COMMUNICATION MODULE FUNCTIONALITY (3) Nonprocedural protocol Fixed or variable length messages can be received in accordance with the external device specifications. Nonprocedural protocol enables communication between an external device and the CPU module by freely setting the data format and transmission control procedures.
  • Page 27: Part Names

    2 PART NAMES 2 PART NAMES This chapter shows part names of the C24. LJ71C24 LJ71C24-R2 Name Description Indicator LED Indicator LED (For details, refer to (1).) RS232 interface for serial communication with external RS-232 interface devices (D-Sub 9 pin female) RS422/485 interface for serial communication with external RS-422/485 interface devices (2-piece terminal block)
  • Page 28 2 PART NAMES (1) Indicator LED Applicable protocol Description Flashing Non- Pre- Bidirectional procedural defined RUN Normal operation Normal — Faulty or reset — Valid ERR. Error ( 1) Error has occurred — Normal Waiting for MC MC protocol NEU. Neutral status on the protocol command —...
  • Page 29: Specifications

    3 SPECIFICATIONS 3 SPECIFICATIONS This chapter explains the general specifications, performance specifications, function list, and I/O signals. 3.1 General Specifications For the general specifications of C24, refer to "Safety Guidelines", the manual supplied with the CPU module or head module. The latest manuals in PDF can be downloaded from the MELFANSweb.
  • Page 30 3 SPECIFICATIONS (Continued from preceding page) Model name Item LJ71C24 LJ71C24-R2 Parity check Selected for all protocols and when this check is enabled, ODD or EVEN is selected by a parameter. For the MC or bidirectional protocol, selected by a parameter. Error detection Sum check code For the predefined protocol, whether or not a sum check code is needed depends on the selected protocol.
  • Page 31: Number Of Parameter Settings

    3 SPECIFICATIONS 3.2.1 Number of parameter settings For the parameter settings of the initial setting and auto refresh setting of the C24, set parameters (including the parameters for other intelligent function modules) not to exceed the maximum number of parameters that can be set for a CPU module or the head module.
  • Page 32: Function List

    3 SPECIFICATIONS 3.3 Function List 3.3.1 Basic functions The following shows the basic functions of the C24. Function Description Reference Executes batch read/write in bit/word units. Reading/writing from/to the Executes monitoring of device memory. device memory of the CPU Executes batch read/write of multiple blocks. module Executes read/write by extension designation.
  • Page 33: Additional Functions

    3 SPECIFICATIONS 3.3.2 Additional functions The following shows the additional functions of the C24. The following abbreviations appear in the protocol column of the function list. MC: MC protocol Pd: Predefined protocol Non: Nonprocedural protocol Bi: Bidirectional protocol : Applicable protocol) Protocol Function Description...
  • Page 34 3 SPECIFICATIONS : Applicable protocol) Nonproced Bidirectional Function Description ural Reference protocol protocol This control notifies the availability of data DC code control reception in the host station and the (including Xon/Xoff effective range of sent/received data to control) external devices, using the data for Transmission User's manual transmission control in the C24.
  • Page 35: List Of Input/Output Signals

    3 SPECIFICATIONS 3.4 List of Input/Output Signals This section describes the input/output signals of the C24. The following I/O signal assignment is based on the case where the start I/O No. of the C24 is "0000". Device numbers starting with X indicate input signals from the C24 to the CPU module. Device numbers starting with Y indicate output signals from the CPU module to the C24.
  • Page 36 3 SPECIFICATIONS Device Device Signal description Reference Signal description Reference number number CH1 Global signal ON: Output instructed MELSEC-Q/L MELSEC Communication Use prohibited — Protocol CH2 Global signal ON: Output instructed Reference Manual System setting default completion System setting default request —...
  • Page 37: Procedures Prior To Operation

    4 PROCEDURES PRIOR TO OPERATION 4 PROCEDURES PRIOR TO OPERATION This chapter explains the procedures required before starting the operation. 1 The same communication is available using the predefined protocol. By the Predefined protocol, programs can be created easily, and the number of steps can be drastically reduced. 4 - 1 4 - 1...
  • Page 38 4 PROCEDURES PRIOR TO OPERATION MEMO 4 - 2 4 - 2...
  • Page 39: System Configuration

    5 SYSTEM CONFIGURATION 5 SYSTEM CONFIGURATION This chapter explains the system configuration and the number of applicable modules of the C24. 5.1 Overall Configuration (1) When installing the C24 to the CPU module Display unit (optional) RS-232 adapter Power supply module CPU module LJ71C24 END cover...
  • Page 40 5 SYSTEM CONFIGURATION (3) System examples (a) Connecting two external devices to the C24 Connect external devices such as a GOT and a barcode reader to one C24. Data can be exchanged between a GOT and a device such as a barcode reader via the C24.
  • Page 41: Applicable Systems

    5 SYSTEM CONFIGURATION 5.2 Applicable Systems (1) Applicable CPU modules and No. of modules Refer to the following. MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) MELSEC-L CC-Link IE Field Network Head Module User's Manual (2) Supported software packages (a) Setting and monitoring tools Refer to the following.
  • Page 42: Systems That Can Be Configured And Functions

    5 SYSTEM CONFIGURATION 5.3 Systems that can be Configured and Functions The following describes the system configurations and available functions when using the C24. (1) System configurations System configurations (combinations of the C24 and external device) for data communication are shown below. (a) External device and C24 with 1:1 system configuration RS-232/422 (b) External device and C24 with n:1 system configuration...
  • Page 43 5 SYSTEM CONFIGURATION External device and C24 with 1:n system configuration RS-485 RS-232 RS-485 External device and C24 with m:n system configuration RS-485 RS-485 RS-485 5 - 5 5 - 5...
  • Page 44 5 SYSTEM CONFIGURATION (2) Correspondence between the data communication functions and system configurations The following shows system configurations that can use the data communication functions of the C24. (a) Communication using the MC protocol : Available, : Not available) System configuration Function Reference (External device: C24)
  • Page 45 5 SYSTEM CONFIGURATION (d) Communication using the bidirectional protocol : Available, : Not available) System configuration Function Reference (External device: C24) 1 : 1 n : 1 1 : n m : n Data transmission/receiving Chapter 11 Reading received data using interrupt programs User's Manual (Application) Sending/receiving ASCII data using ASCII-BIN conversion In general, if data communication is performed using a system configuration of...
  • Page 46: Setting And Wiring

    6 SETTING AND WIRING 6 SETTING AND WIRING This chapter explains the setting and wiring methods in the system for using the C24. 6.1 Installation Environment and Position of the Module For the installation environment and position of the module, refer to the following manual.
  • Page 47: External Wiring With Rs-232 Interface

    6 SETTING AND WIRING 6.2 External Wiring with RS-232 Interface This section explains the specifications of RS-232 and how to connect with external devices. 6.2.1 RS-232 connector specifications The following shows the specifications of the RS-232 connector that connects the C24 to an external device.
  • Page 48 6 SETTING AND WIRING 4) ER(DTR) signal (4) • When communicating data using the nonprocedural protocol, the C24 turns this signal on or off (on when data is receivable) depending on the amount of unused memory in the OS area allocated for receive data storage, if DTR/DSR control is being performed.
  • Page 49 6 SETTING AND WIRING (2) The ON and OFF states of each signal indicate the following conditions: (Output side) (Input side) 5 V to 15 V DC, 3 V to 15 V DC –15 V to –5 V DC, –15 V to –3 V DC (3) Interface connector The following RS-232 interface connector is used for the C24.
  • Page 50 6 SETTING AND WIRING REMARKS (1) Confirmation of RS-232 control signal status Each status of the control signals, ER(DTR), DR(DSR), RS(RTS) and CD(DCD) can be confirmed in RS-232 control signal status (address: /264 Buffer memory address Bit position CH1 side CH2 side RS(RTS) DR(DSR)
  • Page 51: Cable Specification

    6 SETTING AND WIRING 6.2.2 RS-232 cable specification Use a cable conforming to the RS-232 standard with 15m or shorter in length. Material Temperature rating Diameter Type AWG28 to 24 Stranded Copper 60°C or more [Recommended cable] • Oki Electric Cable Co., Ltd. 7/0.127 P HRV-SV ( : Specify the number of pairs.
  • Page 52: Connecting The Rs-232 Interface (Full-Duplex Communications)

    6 SETTING AND WIRING 6.2.3 Connecting the RS-232 interface (full-duplex communication) The following shows the connection precautions and connection examples when using the C24 RS-232 interface for full-duplex communication. (1) Connection precautions (a) Refer to Appendix 11 for the bend radius of the connection cable. (b) Do not install the control lines or communication cables together with the main circuit lines or power cables.
  • Page 53 6 SETTING AND WIRING (2) Connection examples (a) Connection example with an external device capable of turning on and off the CD(DCD) signal (Pin No. 1) The CD terminal check setting is set according to the specification of the external device.
  • Page 54: External Wiring With Rs-422/485 Interface

    6 SETTING AND WIRING 6.3 External Wiring with RS-422/485 Interface This section explains the specifications of RS-422/485 and how to connect them with external devices. 6.3.1 RS-422/485 terminal block specifications The following shows the specifications of the RS-422 connector and RS-422/485 terminal block that connect to an external device.
  • Page 55: Rs-422/485 Cable Specifications

    60°C or more [Recommended cable] 3P ..(MITSUBISHI CABLE INDUSTRIES, Ltd.) SPEV (SB)-MPC-0.2 3P ..... (MITSUBISHI CABLE INDUSTRIES, Ltd.) SPEV (SB)-0.2 3P ..... (MITSUBISHI CABLE INDUSTRIES, Ltd.) SPEV (SB)-0.3 The recommended cables above have the same electrical characteristics, but different external diameter and internal wire colors.
  • Page 56: Connection Method For The Rs-422/485 Interface

    6 SETTING AND WIRING 6.3.3 Connection method for the RS-422/485 interface The following explains the connection precautions and examples when using the C24 RS-422/485 interface. (1) Connection precautions (a) Refer to Appendix 11 for the bend radius of the connection cable. (b) Do not install the control lines or communication cables together with the main circuit lines or power cables.
  • Page 57 6 SETTING AND WIRING (g) Terminating resistors must be set (or connected) for both terminal stations on the line. On the C24 side, connect the terminating resistor (included with the C24) according to the specifications of the external device. On the external device side, connect, or set a terminating resistor according to the instruction manual of the external device.
  • Page 58 6 SETTING AND WIRING (2) Connection examples (a) External device and C24 with 1:1 system configuration External device Terminating Signal name Signal name resistor Terminating resistor (b) External device and C24 with 1:n (multidrop) system configuration 1) Connection example 6 - 13 6 - 13...
  • Page 59 6 SETTING AND WIRING 2) Connection example 2 External device C24 1) C24 2) C24n RS-422/485 RS-422/485 RS-422/485 cable cable cable Terminating resistor (c) External device and C24 with n:1 (multidrop) system configuration External device 1) C24 1) External device 2) C24n RS-422/485 RS-422/485...
  • Page 60 6 SETTING AND WIRING (d) External device and C24 with m:n (multidrop) system configuration 1) Connection example 1 External device 1) External device 2) RS-232 RS-232 C24 1) C24 2) C24n RS-422/485 RS-422/485 cable cable Terminating Linked Linked resistor operation operation 2) Connection example 2 External device 1)
  • Page 61: Precautions When Transferring Data Using Rs-422/485 Circuit

    6 SETTING AND WIRING 6.3.4 Precautions when transferring data using RS-422/485 circuit The following precautions must be observed when transferring data with an external device through the C24 RS-422/485 interface. Take the following into account when the transferring data with the external device. (1) Error receive data countermeasures at external device during RS- 422/485 connection If the external device may receive erroneous data, install a pull-up or pull-down...
  • Page 62 6 SETTING AND WIRING (2) RS-422/485 interface operation 1) RS-422-485 interface structure The following illustration shows the structure of the C24 RS-422/485 interface driver (send)/receiver (receive). 1 "Output control input" (also called send gate) of Driver the driver (send) section of the illustration at Send data the left determines whether or not data from Output control input ( 1)
  • Page 63 6 SETTING AND WIRING POINT When the external device and the C24 connected in n:1 and m:n configurations When the send signal of each device is connected as shown below, if the "Output control input" is turned ON at two or more devices, the relevant devices output (send) data at the same time.
  • Page 64: Enabling Or Disabling Echo Back Of The Rs-422/485 Interface

    6 SETTING AND WIRING 6.3.5 Enabling or disabling echo back of the RS-422/485 interface The following describes the enabling and disabling of the echo back. This function can be used for CH2 of the LJ71C24. The echo back of the LJ71C24 is defined as the function that, when data are sent through RS-485 (2-wire type) from the RS-422/485 interface, the same data are also sent to RDA or RDB of the LJ71C24.
  • Page 65 6 SETTING AND WIRING [Example of a setting in sequence program] Send command Set echo back to "Disable". Set the value in the echo back H1C2 enable/disable setting area (address: 450 (1C2H)). Data transmission program POINT The echo back enable/disable setting must be done before sending data. Any setting changed during transmission does not take effect.
  • Page 66: Individual Station Test

    If an error occurs even though the correct settings have been made for the C24 through an individual station test, please consult your local Mitsubishi service center or representative, explaining a detailed description of the problem. 6 - 21...
  • Page 67 6 SETTING AND WIRING 6.4.1 ROM/RAM/switch test A ROM/RAM/switch test checks the contents of the memory of the C24 and the switch settings set with GX Works2. Perform a ROM/RAM/switch test with the procedure described below. (Procedure 1) Communication protocol setting and transmission setting (refer to Section 7.3) In the switch setting, set the communication protocol setting on the CH2 side to "ROM/RAM/Switch test".
  • Page 68 6 SETTING AND WIRING (Procedure 3) Checking results of ROM/RAM/switch test When the result of the test is normal The CH1 NEU LED turns on and the ERR LED turns off. When the result of the test is abnormal The CH1 NEU LED turns on and the ERR LED turns on. (Procedure 4) Ending a ROM/RAM/switch test When the result of the test is normal (a) Perform an Self-loopback test.
  • Page 69 Out of the setting station number range Section 7.3.4) and perform the number test again. ( 1) 1 When an error occurs even after performing the test again, consult your local Mitsubishi service center or representative. 6 - 24 6 - 24...
  • Page 70 6 SETTING AND WIRING 6.4.2 Self-loopback test The Self-loopback test checks the communication between the C24 and CPU modules and the operation of the communication function of the C24. Also, tests two interfaces of the C24 at once. Follow the procedure below to perform an Self-loopback test. (Procedure 1) Connecting cable Connect cables to two interfaces as follows.
  • Page 71 6 SETTING AND WIRING (Procedure 4) Checking the results of an Self-loopback test When the result of the test is normal If the ERR. LED turns off and the LED status of the CH1 and CH2 are as follows for over 5 seconds, the result is normal. NEU.LED Flashing SD LED...
  • Page 72 6 SETTING AND WIRING Item When the "Current Value" is 1 (ON) Corrective action Error in the CPU module. Remove errors in the CPU module. Insufficient power supply capacity. Examine the power supply capacity. Module is not connected correctly. Reinstall the module properly. Check each module and remove the Error in the cable, CPU module, or cause of the error.
  • Page 73: Loopback Test

    6 SETTING AND WIRING 6.5 Loopback Test A loopback test performs a communication test using the loopback test function of the MC protocol, in order to check the connection between the C24 and an external device, the communication function of each device, and the operation of the communication program of the external device.
  • Page 74 6 SETTING AND WIRING (Procedure 4) Checking loopback test result Check on the external device whether the data received from the C24 in response to the data received from the external device matches the data sent from the external device. (The C24 sends back to the external device the received data, as is.) When the result of the test is normal The data received from the C24 in response to the data received from the...
  • Page 75 6 SETTING AND WIRING TT (ACPU common command) Two characters (hexadecimal) … Designate the number of characters (1 to 254) of return data to be Start data sent sent immediately afterward. by the external device Designate with a character string consisting of "0" to "9" and "A" to "F" (upper case) (In the case of Format 1) Sum check Loopback data...
  • Page 76: Settings For The C24

    7 SETTINGS FOR THE C24 7 SETTINGS FOR THE C24 The switch settings, parameter settings, monitor/test and others for the C24 are performed by GX Works2. The same settings can be configured in GX Developer and GX Configurator-SC. For details, refer to Appendix 4. Refer to the User’s Manual (Application) when performing the remote password settings.
  • Page 77: Adding The C24 To Projects

    7 SETTINGS FOR THE C24 7.1 Adding the C24 to Projects [Setting purpose] Add the C24 to projects with GX Works2 to perform various settings. [Startup procedure] Display the "New Module" screen. Project window [Intelligent Function Module] Right click [New Module] [Setting screen] [Setting description] Item name...
  • Page 78: List Of Setting Items For C24

    7 SETTINGS FOR THE C24 7.2 List of Setting Items for C24 This section explains the items to be set in GX Works2 to perform the data communication with external devices. Before performing the following settings, add the C24 to the GX Works2 project and set the I/O range.
  • Page 79 7 SETTINGS FOR THE C24 ( : Applicable protocol) Setting items MC Non Bi Reference Receive data — — — For designation of transmission control Section 11.3.1 Transmission data — — — No-reception monitoring time (timer 0) designation — For designation of data communication User's Manual —...
  • Page 80 7 SETTINGS FOR THE C24 (3) PLC_Monitoring_Function Set the programmable controller CPU monitoring function. ( : Applicable protocol) Setting items MC Non Bi Reference — — Cycle time units designation Cycle time designation (programmable controller CPU monitoring cycle — — time) —...
  • Page 81 7 SETTINGS FOR THE C24 (4) Modem_Function Set for the data communication with the modem functions. ( : Applicable protocol) Protocol Setting items Reference MC Non Bi — Modem connection channel designation — Number of connection retries designation Connection retry interval designation —...
  • Page 82 7 SETTINGS FOR THE C24 (5) User_Register_Frame_Content Register user frames. ( : Applicable protocol) Protocol Setting items Reference MC Non Bi User's Manual User frame Registration frame No.1000 to No.1199 — — (Application) (6) User_Register_Frame_Specification Specify user frames. ( : Applicable protocol) Protocol Reference Setting items...
  • Page 83 7 SETTINGS FOR THE C24 (7) Auto_Refresh Set the device on the CPU module side to refresh the data of the buffer memory. For details, refer to Section 7.5. (a) Transfer to CPU Setting items Reference User's Manual User frame being transmitted User frame being transmitted (Application) SD.WAIT...
  • Page 84 7 SETTINGS FOR THE C24 Setting items Reference MELSEC-Q/L MELSEC MC protocol transmission error code Communication For confirmation of communication result Protocol Reference Manual User's Manual Receive user frame (nth) (Application) Programmable controller CPU monitoring function operation status Programmable controller CPU monitoring function execution result Programmable controller CPU monitoring User's Manual (current)
  • Page 85 7 SETTINGS FOR THE C24 (b) Transfer to the Intelligent Function Module Setting items Reference Transmission area Chapter 10 Chapter 11 For transmission data Transmission area (User free area) Appendix 1 Transmission area (User free area 2) Appendix 1 Predefined protocol function control data Number of continuous executions Appendix 1 specification...
  • Page 86 7 SETTINGS FOR THE C24 7.3 Switch Setting [Setting purpose] Set the transmission specifications and communication protocols for communication with external devices. [Startup procedure] Display the "Switch Setting" screen. Project window [Intelligent Function Module] Module model name [Switch Setting] [Setting screen] POINT •...
  • Page 87: Transmission Setting

    7 SETTINGS FOR THE C24 7.3.1 Transmission Setting Set the transmission specification with external devices. (1) Operation setting The following two types of operations can be set. (a) Independent operation Two interfaces of the C24 perform data communication with external devices independently.
  • Page 88 7 SETTINGS FOR THE C24 (7) Online change This sets whether or not data transmitted using the MC protocol is written to the CPU module from an external device while the CPU module is running, according to the system specifications. When online change is prohibited (disabled), the data is not written and an NAK message is returned if the external device requests the CPU module to write data while it is running.
  • Page 89: Communication Rate Setting

    7 SETTINGS FOR THE C24 7.3.2 Communication rate setting Set the communication rate for the data communication with external devices. The following is the setting value list. Communication rate (unit: bps) 14400 19200 28800 1200 38400 2400 57600 4800 115200 9600 230400 1 Communication rate of 230,400 bps is available for only CH1.
  • Page 90: Communication Protocol Setting

    7 SETTINGS FOR THE C24 7.3.3 Communication protocol setting Set the communication protocol for the data communication with external devices. The following shows the setting value list. Setting items Setting contents For connection to MELSOFT products MELSOFT Connection MELSOFT communication rate and transmission specifications are automatically set.
  • Page 91: Station Number Setting

    7 SETTINGS FOR THE C24 7.3.4 Station number setting This setting is for communication using the MC protocol. When several serial communication modules are connected on the same line with multidrop connection, specify the serial communication module to communicate with external devices by the station number.
  • Page 92: Setting And Data Flow In Linked Operation

    7 SETTINGS FOR THE C24 7.3.5 Setting and data flow in linked operation In linked operation, all data received from one of the two interfaces are transmitted from the other interface. The linked operation is available only for the LJ71C24. It is not available for the LJ71C24-R2.
  • Page 93 7 SETTINGS FOR THE C24 (b) When setting the CH2 side to MC protocol When data communication is performed using the MC protocol, only the C24 having the station number designated in the message performs the process designated by the command. Furthermore, when data communication is performed using QnA compatible 2C/3C/4C frames of the MC protocol, the header information for linked operation is added to messages directed to other stations linked by...
  • Page 94: Precautions

    7 SETTINGS FOR THE C24 7.3.6 Precautions For the interface that is not used for communication (no cable connection), define the switch settings as follows. (1) When not using the CH1 (2) When not using the CH2 7 - 19 7 - 19...
  • Page 95: Various Parameter Settings And Writing To The Flash Rom

    7 SETTINGS FOR THE C24 7.4 Various Parameter Settings and Writing to the Flash ROM Initial values of the buffer memory can be changed by setting and writing various parameters to the flash ROM. Set various parameters according to the system in use. 7 - 20 7 - 20...
  • Page 96: Parameter Setting

    7 SETTINGS FOR THE C24 7.4.1 Parameter setting This section explains the procedures to set each parameter. By setting parameters in a programming tool, parameter settings by sequence programs are not necessary. (1) Displaying each parameter setting screen Select [Intelligent Function Module] Module model name from the Project window, and select either of the parameter setting items.
  • Page 97 7 SETTINGS FOR THE C24 REMARKS Display only the applicable parameters in the setting screen of each parameter for each protocol. The following shows the procedure. 1) Display the setting screen of each parameter. 2) Select a protocol from "Display Filter". Select a protocol.
  • Page 98: Writing To The Flash Rom

    7 SETTINGS FOR THE C24 7.4.2 Writing to the flash ROM This section explains the procedure to write the contents set in Section 7.4.1. to a flash ROM. (1) Displaying the screen for writing to the flash ROM Display the "Flash ROM Operation" screen by the following procedure. [Online] [Write to PLC…] (2) Selecting a module and the parameters to be written...
  • Page 99 7 SETTINGS FOR THE C24 (3) Executing data writing Click the Execute button to write the data. As the following dialog box appears, click the Yes button. IMPORTANT Collectively write data to the flash ROM from GX Works2 before the system is started.
  • Page 100: Auto Refresh

    7 SETTINGS FOR THE C24 7.5 Auto Refresh This section explains the procedures of the auto refresh setting. The auto refresh settings are used to automatically store information stored in the C24's buffer memory into a specified device of the CPU module. By setting the auto refresh, the read and write processing of the buffer memories on the program are not necessary.
  • Page 101: Setting Method For Auto Refresh

    7 SETTINGS FOR THE C24 7.5.1 Setting method for auto refresh (1) Displaying the screen for auto refresh For the method for displaying the screen, refer to Section 7.4.1. Buffer memory and description of the item selected on the screen are displayed. (2) Setting auto refresh Set a CPU module device that stores the information in the setting item field.
  • Page 102: Intelligent Function Module Interrupt Pointer Setting

    7 SETTINGS FOR THE C24 7.6 Intelligent Function Module Interrupt Pointer Setting The following explains the interrupt pointer setting with GX Works2 to receive data using an interrupt program. For the method for receiving data using an interrupt program, refer to the User's Manual (Application).
  • Page 103 7 SETTINGS FOR THE C24 [Setting description] (1) Interrupt Pointer Start No. : PLC Side Set the start number of the interrupt pointer (Ixx) for use in the sequence program. The setting range is from 50 to 255. (2) Interrupt Pointer Count : PLC Side Set the number of units of interrupt pointers (I) for use in the sequence program.
  • Page 104: Monitor/Test

    7 SETTINGS FOR THE C24 7.7 Monitor/Test The "Intelligent Function Module Monitor" screen is used to perform various operations, including the monitoring of the C24's operating status and setting values, and the testing of its output signals. The monitor/test operations can be performed only via online operation. For details, refer to the GX Works2 Version1 Operating Manual (Intelligent Function Module).
  • Page 105 7 SETTINGS FOR THE C24 MEMO 7 - 30 7 - 30...
  • Page 106: Data Communication Using The Mc Protocol

    8 DATA COMMUNICATION USING THE MC PROTOCOL 8 DATA COMMUNICATION USING THE MC PROTOCOL MC protocol is a communication method for the Mitsubishi programmable controller. Using this protocol, the external devices can read or write device data and programs from or to the CPU module.
  • Page 107: Data Communication

    8 DATA COMMUNICATION USING THE MC PROTOCOL 8.1 Data Communication 8.1.1 Formats and applications of the data communication frames The MC protocol uses the following communication frames for data communication. The external device must communicate data in the data format appropriate to the MC protocol.
  • Page 108: Mc Protocol System Setting

    8 DATA COMMUNICATION USING THE MC PROTOCOL 8.1.2 MC protocol system setting Perform the system setting for data communication using the MC protocol by GX Works2. (1) Switch setting Set the transmission specification, the communication protocol with external devices and others. Always perform this setting.
  • Page 109: Support For The Lcpu Remote Password Function

    8 DATA COMMUNICATION USING THE MC PROTOCOL 8.1.3 Support for the LCPU remote password function The remote password function prevents unauthorized access to the LCPU. To enable this function, set the remote password to an LCPU. For details, refer to the User's Manual (Application). 8 - 4 8 - 4...
  • Page 110: Utilizing The Mx Component

    8 DATA COMMUNICATION USING THE MC PROTOCOL 8.2 Utilizing the MX Component MX Component is an ActiveX control library that supports various types of communication paths between IBM PC/AT compatible personal computers and programmable controllers. By using MX Component, the system can be configured for each user. Furthermore, the communication program for the external device can be created without considering the detailed MC protocol (transmission/reception procedures).
  • Page 111: Data Communication Using The Predefined Protocol

    9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL Data can be transferred between the CPU module and an external device with a protocol appropriate to the external device (such as a measuring instrument and a barcode reader).
  • Page 112 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT The following are the maximum numbers of protocols and packets that can be registered. • Protocols: Up to 128 • Packets: Up to 256 However, some packets to be registered may cause capacity shortage. In this case, the maximum numbers of packets above may not be registered.
  • Page 113: Data Communication Procedure

    9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9.1 Data Communication Procedure By the following procedure taken in Predefined protocol function, data can be exchanged with an external device. Step 1: Display the "Predefined Protocol Support Function" screen. Display the "Predefined Protocol Support Function"...
  • Page 114 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (From the previous page) Step 4: Set the items required for the data communication. (a) When selecting "Predefined Protocol Library". Select a protocol from the predefined protocol library. Specify the send or receive data storage area.
  • Page 115 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (From the previous page) Step 5: Write the protocol setting data to the flash ROM. Display the "Module Write" screen in the following procedure. [Module Read/Write] [Write to Module] Select a target module, and write the protocol setting data to the flash ROM.
  • Page 116: Communication Type Of Protocols

    9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9.2 Communication Type of Protocols Send packets to other devices and receive packets from other devices at the time of process execution are registered in a protocol. The following shows an example of a packet configuration. For details of packet elements, refer to Section 9.3.
  • Page 117: Packet Elements

    9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9.3 Packet Elements A packet consists of packet elements. Up to 32 elements can be placed in a packet, and the maximum data length is 2048 bytes per packet. The following shows the details of the packet elements. Also, refer to Appendix 5.3 for an example of packet element data.
  • Page 118 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (2) Static Data Use this element when a specific code/character string such as command exists in a packet. When sending: Sends a specified code and character string. When receiving: Verifies the receive data. Multiple Static Data elements can be placed to desired positions in the data division.
  • Page 119 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (4) Length Use this element when an element indicating the data length is included in a packet. When sending: Calculates the data length of a specified range, and adds the result to a send packet. When receiving: Verifies the data (setting value) corresponds to the length in the receive data as the data length of a specified range.
  • Page 120 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT Only one Length can be placed in a packet. When there is no element other than a Length, an element error occurs. 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).
  • Page 121 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (5) Non-conversion Variable Use this element to send the data in the device memory of a CPU module or buffer memory as a part of a send packet, or store a part of a receive packet to the device memory of a CPU module device or buffer memory.
  • Page 122 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL Item Description When sending: When "Enable" is selected, sends data swapping the upper byte and lower byte by word (2 bytes). When "Unit of Stored Data" is "Lower Byte + Upper Byte" and "Data Length" is an odd number of bytes, sends the upper byte at transmission of the last byte.
  • Page 123 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL The following explains the 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 124 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL When "Fixed Length/Variable Length" is "Variable Length" An area starting from the device number which is specified on the Element Setting screen +1 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 125 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT When receiving variable length data whose length exceeds the "Maximum data length", the C24 stores data as long as the maximum data length and omits the rest. (A protocol completes successfully.) In receive packet data from other devices, the C24 needs to be able to discriminate data corresponding to a Non-conversion variable from those of a Terminator or a Static Data following a Non-conversion variable.
  • Page 126 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (6) Conversion Variable This element converts the numerical data in the device memory of a CPU module or buffer memory to an ASCII string and sends it, or converts the receive data (ASCII string) to the numerical data and stores it to the device memory of a CPU module or buffer memory.
  • Page 127 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL Item Description Remark Set the number of digits per one send and receive data. 1 to 10 When the number of digits of data is less than the specified number of digits, upper digits are filled with blank-padded characters.
  • Page 128 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL The following explains the configuration of the data storage area. When "Fixed Number of Data/Variable Number of Data" is "Fixed Number of Data" An area starting from the device number which is specified on the Element setting screen is considered as the data storage area.
  • Page 129 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL Data storage area configuration The following shows the data storage area configuration per one data. "Conversion Unit": Word, "Number of Decimals": No decimal Point (fixed point) No Decimal Point (fixed point) Data storage area Numeric data "Conversion Unit": Word, "Number of Decimals": Variable point...
  • Page 130 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL "Conversion Unit": Doubleword, "Number of Decimals": Variable Point For 'Variable Point', the decimal point position is set in the data storage area. Data storage area Numeric data Decimal point position In the decimal point position area, the decimal point position is set as follows.
  • Page 131 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT An error may occur in any of the following cases. When "Conversion" is "ASCII Hexadecimal HEX", an ASCII BIN conversion error (7F20 ) may occur if a string except for '0'-'9' 'A'-'F' 'a'-'f' is received. When "Conversion"...
  • Page 132 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT [For the fixed number of data] When "Number of Digits of Data" is "Variable Number of Digits", an invalid number of digits error (7D19 ) may occur if the number of digits of receive data is [For the variable number of data] A too few digits error (7D18 ) may occur if data of which number of digits are...
  • Page 133 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT To place a Conversion variable in a packet, the following requirements need to be met. (1) To place Conversion variable in send packet Multiple Conversion variable elements can be placed in one packet, and they can be placed in desired positions in the data division.
  • Page 134 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (7) Check Code Use this element when an element indicating check code data is included in a packet. The C24 automatically calculates a specified check code at timing of sending/receiving, and adds it to a send packet or detects an error of a receive packet.
  • Page 135 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL Item Description Remark When sending: Sends a calculated check code swapping the upper byte and Not settable when lower byte by word. "Processing Method" When receiving: Manipulates receive data as a is "16-bit CRC (for Data Flow Byte swap (by word) check code swapping the...
  • Page 136 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (8) Non-verified Reception Use this element when receive data include data not needed. The C24 skips characters as many as the specified number if a receive packet includes a Non-verified reception. The following table lists the items. Item Description Remark...
  • Page 137: Executing Condition Of Predefined Protocol Communication

    9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9.4 Executing Condition of Predefined Protocol Communication The predefined protocol communication can be executed when the predefined protocol ready (X1D) is on. Use the signal as an interlock signal when executing the predefined protocol communication in the sequence program.
  • Page 138 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (2) Timing for executing the UINI instruction or mode switching request signal (Y2/Y9) (a) Timing for executing mode switching request signal (Y2/Y9) Communication protocol before change: CH1 and CH2 are other than the predefined protocol mode. Communication protocol after change: CH1 or CH2 is the predefined protocol mode.
  • Page 139 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (b) Timing for executing the UINI instruction Communication protocol before change: CH1 and CH2 are other than the predefined protocol mode. Communication protocol after change: CH1 or CH2 is the predefined protocol mode. processing processing processing...
  • Page 140 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL Communication protocol before change: CH1 or CH2 is the predefined protocol mode. Communication protocol after change: CH1 and CH2 are other than the predefined protocol mode. 9 - 30 9 - 30...
  • Page 141: Programming Example

    This section explains the programming examples and setting examples of the predefined protocol function. GX Works2 is used for the settings. Serial communication module LJ71C24 and Mitsubishi inverter (FREQROL-A700, described as inverter or FR-A700 hereafter) as a connection target device are used in this setting example. 9.5.1 System configuration/wiring example The system configuration and wiring example are as follows.
  • Page 142: Communication Data

    Terminator Header code mode value (D201) Manufacturer Mitsubishi Electric Device name FR-A700 Protocol name H7B:RD Operation Mode (2) Storage devices for send/receive data, buffer memory assignment Specify the device memory of a CPU module and buffer memory as the data storage areas as shown in the table below, and send/receive data.
  • Page 143: Communication Settings

    9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9.5.3 Communication settings (1) Settings on GX Works2 This section explains the settings required for executing the predefined protocol communication on GX Works2. For details, refer to Chapter 7. (a) Addition of new modules and I/O assignment For adding new modules, add an intelligent function module to a project.
  • Page 144 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (b) Switch settings Set the transmission specifications and communication protocols with external devices. 1) Display the "Switch Setting" screen. Project window [Intelligent Function Module] Module model name [Switch Setting] 2) Set items as follows and click the OK button. [Display/Setting screen] [Display/Setting details] Configure the settings for CH2 as the screen above.
  • Page 145 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (2) Settings for the predefined protocol support functions Set the protocol explained in Section 9.5.2. 1) GX Works2 [Tool] [Intelligent Function Module Tool] [Serial Communication Module] [Predefined Protocol Support Function] 2) "Predefined Protocol Support Function" screen [File] [New] 3) Click "Add"...
  • Page 146 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 6) In the "Packet Setting" screen, click the cell under "Element Setting" (displayed in red) of "Element No." 2. Click 7) In the "Element Setting" (Conversion Variable) screen, enter D300 to "Send Data Storage Area" and click the OK button. 8) The packet setting for "Packet Name"...
  • Page 147 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL 9) Configure the packet settings for "Packet Name" NOR:RD Data (4 Digits Data) and ERR:NAK Response with the same procedure as 5) to 8). Set the following values for the data storage area. Packet name Element number Element name...
  • Page 148 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (4) Executing the protocols (program example) Create a program with the dedicated instruction (CPRTCL instruction) using GX Works2. Switch the CPU to RUN, and execute the registered protocol by the dedicated instruction (CPRTCL instruction). The following table shows the devices to be used.
  • Page 149 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL (5) Checking protocol execution result (a) Check on the "Circuit Trace" screen. The send/receive packets and communication control signals can be checked from the displayed trace result. For details, refer to Section 13.1. (b) Check on the "Protocol execution log".
  • Page 150 9 DATA COMMUNICATION USING THE PREDEFINED PROTOCOL POINT The logs displayed in the "Protocol execution log" screen can be selected from the following according to the log registration condition. • Only the failed protocols are displayed. • The execution status and log of all protocols are displayed. For the selecting method of the log registration condition, refer to Section 13.3.
  • Page 151: Data Communication Using The Nonprocedural Protocol

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL Nonprocedural protocol enables to send and receive data between a CPU module and an external device, using the data format and transmission control procedure set by user.
  • Page 152: Data Reception From The External Device

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.1 Data Reception from the External Device This section explains data reception from the external device. 10.1.1 Receiving methods The following shows the methods for receiving data in any format using the nonprocedural protocol. There are two methods for receiving data: the "reception via receive complete code"...
  • Page 153 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (1) Data reception by receive complete code (for variable length reception) (a) This method is used to send data by adding the receive complete code set in the C24 at the completion of setting the message from the external device. (b) When the C24 receives the receive complete code data preset in GX Works2 by the user, it sends a receive data read request to the sequence program.
  • Page 154 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL • If LF is not received within the time set in the non reception monitoring time (timer 0) after CR is received, the C24 stores the received data up to CR to the buffer memory receive data storage area and turns on the following signals to the CPU module.
  • Page 155 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (2) Reception by received data count (For fixed length reception) (a) This method is used to receive messages of the same length (size) from the external device every time. (b) When the C24 receives data of the received data count preset in GX Works2 by the user, it sends a reception data read request to the sequence program.
  • Page 156: The Receive Area And The Received Data List

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.1.2 The receive area and the received data list The following shows the list of the receive area and the receive data for performing data reception using the nonprocedural protocol. (1) Receive area The receive area is a memory area for storing the data received from the external device and the receive data count in order to read the receive data to the CPU module.
  • Page 157 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL POINT (1) The position and size of the receive area in the buffer memory can be changed with the GX Works2 in accordance with the specifications of the external device and the receive data length. (Refer to Section 7.2) (a) When changing the position and size of the receive area in the buffer memory with GX Works2, specify as follows: 1) [Various_Control_Specification] screen...
  • Page 158 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (2) Receive data list The following describes the data list when data received from an external device is stored to the receive area. 1) The receive message is stored to the C24 buffer memory (receive data storage area).
  • Page 159 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL REMARKS (1) Data reception when: Receive data storage area > Receive data length The following control is performed. (Example) When the receive area for the CH1 side interface is at addresses to 7FF (default values) and data of 511 words or less is received by the CH1 side interface.
  • Page 160 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 2) Reception by received data count If a specified receive data count is too large for the receive data storage area, Receive buffer memory length (address: A7 /147 , default: 512 words) minus 1 is used as the receive data count instead. (Receive data storage area) >...
  • Page 161: Sequence Program For Data Reception

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.1.3 Sequence program for data reception This section explains the sequence program for data reception. For details on the INPUT instruction for data reception, refer to Chapter 12. 1 When the completion device is off, execute the INPUT instruction. If the INPUT instruction is executed when the completion device is on, data may not be received properly.
  • Page 162 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 4) The INPUT instruction complete device turns ON when the reading of receive data is completed. When the complete device + 1 (abnormal completion signal) turns ON, the error code is stored in the control data completion status (S1 + 1). (Program example) When the C24 I/O signals are from X/Y00 to X/Y1F: 1) Specify the receive channel.
  • Page 163 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL Address Buffer memory Data reception result For normal completion Interface number Receive data count Reception result Receive data count (10) Allowable receive data count Receive data Receive data Receive data When the receive data count is larger than the allowable receive data count, only the data up to the allowable receive data count will be stored and the excess data will be discarded.
  • Page 164: How To Detect And Check The Reception Errors

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.1.4 How to detect and check the reception errors This section explains how to detect and confirm errors that may occur when receiving data from external devices. The following items are considered as the primary causes of errors that may occur during data reception.
  • Page 165 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (2) Confirmation using GX Works2, display unit, or indicator LED of The following methods are available for confirmation. Item Reference "Module's Detailed Information" Chapter 15 screen "Error History" screen Chapter 15 GX Works2 "Intelligent Function Module GX Works2 Version1 Operating Monitor"...
  • Page 166 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL CPU module Receive area Reception error causing data Reception (buffer memory) abnormal Receive data Receive complete detection Head data count (00H) (03H code Receive data (41H) (02H) STX A H ETX INPUT (02H) (41H) (42H) (43H) (44H)
  • Page 167: Receive Data Clear

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.1.5 Receive data clear For the data reception by a nonprocedural protocol, if the transmission of data from a transmitting device is interrupted due to trouble occurring, it may be necessary for the data received up to the present time are cleared in the receiving device and for the data to be received again from the start.
  • Page 168 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (2) Procedure for clearing the reception data by the dedicated instruction "CSET" This instruction clears the reception data up to the present without interrupting the data transmission processing. (Procedure for clearing) ··· In the case of the CH1 side interface 1) Execute the CSET instruction If the CSET instruction is executed while the reception data read request (X3/XA) or reception abnormal detection signal (X4/XB) is turned on, the...
  • Page 169 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (3) Receive data clear procedure using FROM/TO instruction Write and read Receive data clear request (address: A8 /148 ) using the procedure described below. When resuming data communication with an external device, resume it after completing the receive data clear processing with the C24.
  • Page 170 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (Example) The following is an example program for clearing received data with the FROM/TO instructions while send/receive processing is performed using dedicated instructions (OUTPUT/INPUT). (If the C24 input/output signal is X/Y000 to X/Y01F.) 10 - 20 10 - 20...
  • Page 171 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL Send Receive Receive request data clear data clear acknowl- in progress edgement send processing 10 - 21 10 - 21...
  • Page 172 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (4) Receive data clear command procedure using GX Works2 1) Register C24 to "Intelligent Function Module Monitor". For the operating method of GX Works2, refer to the GX Works2 Version 1 Operating Manual (Intelligent Function Module). 2) Set "CH Receive data clear request"...
  • Page 173: Received Data Count And Receive Complete Code Settings

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.1.6 Received data count and receive complete code settings (1) Setting method before receiving data The following default values have been set for the received data count and receive complete code that are used for data reception with the nonprocedural protocol.
  • Page 174 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL POINT When the reception abnormal detection (X4/XB) turns ON, read the error code from the buffer memory below, and then check the type of error and take corrective action based on the information found in Chapter 15. •...
  • Page 175 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (Program example: I/O signals for the C24 are from X/Y00 to X/Y1F) Read request Reads receive data count. ( 1) Reads the data that is equal to the receive data count. Change the setting value for the received data count as needed.
  • Page 176: Sending Data To The External Device

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.2 Sending Data to the External Device This section explains data transmission from the CPU module to the external device. 10.2.1 Transmission methods The following shows how to send data in any format using the nonprocedural protocol. CPU module Transmission data ) (41...
  • Page 177: Arrangement And Contents Of The Transmission Area And The Transmission Data

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.2.2 Arrangement and contents of the transmission area and the transmission data This section explains the arrangement and contents of the transmission area and the transmission data for performing data transmission using the nonprocedural protocol. (1) Transmission area The transmission area is a memory area for storing the data and the data count that are transmitted from the CPU module to the external device via the C24.
  • Page 178 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL POINT (1) The position and size of the transmission area in the buffer memory can be changed with GX Works2 in accordance with the specifications of the external device and the received data length. (a) When changing the position and size of the transmission area in the buffer memory with GX Works2, specify as follows: 1) [Various_Control_Specification] screen...
  • Page 179: Sequence Program For Transmission Data

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (2) Transmission data arrangement The following example shows an arrangement of the transmission data to be sent to the external device when storing it in the transmission area. (Example) When transmitting "ABCDEFG123" (The transmit area is the default value.) CH1 side address...
  • Page 180 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL C24 ready (X1E) Transmission instruction OUTPUT instruction OUTPUT OUTPUT instruction complete device ON when transmission abnormal completion OUTPUT instruction complete device + 1 (normal completion/abnormal 1 scan completion) Transmission data count designation (address: 400 Transmission data Transmission data designation (address: 401...
  • Page 181 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (Program example) When C24 I/O signals are from X/Y00 to X/Y1F: 1) Transmission command is converted into pulse. 2) Transmission data is stored. 3) Specify the number of the interface (CH ) that sends the data. 4) Clear the transmission result storage device to 0.
  • Page 182 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL Address Buffer memory Data transmission result For normal completion Interface number (0001 Transmission data count designation Transmission result (0000 Transmission data count (0005 Transmission data designation (4241 Transmission data (0A0D For abnormal completion Interface number (0001 Transmission result...
  • Page 183: How To Detect And Confirm Transmission Errors

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.2.4 How to detect and confirm transmission errors This section explains how to detect and confirm errors that may occur when sending data to external devices. The following items are considered as the primary causes of errors that may occur during data transmission.
  • Page 184 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (2) Confirmation using GX Works2, display unit, or indicator LED of The following shows how to confirm the errors. Item Reference "Module's Detailed Information" Chapter 15 screen "Error History" screen Chapter 15 GX Works2 GX Works2 Version 1 Operating "Intelligent Function Module Manual...
  • Page 185: Data Communications Precautions

    10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL 10.3 Data Communications Precautions The following describes the precautions to be taken during nonprocedural protocol data communications. (1) The C24 transmission sequence initialization conditions The initial status indicates the status where transmission has stopped and receive data has been discarded.
  • Page 186 10 DATA COMMUNICATION USING THE NONPROCEDURAL PROTOCOL (4) Retry processing for data reception errors The data when reception error occurred is discarded and only the data for the normal reception is taken into the C24. For this reason, the reception message may be missing data if an error occurs. To assure the correct transmission and reception of data it is recommended that a normal/error response message is received and a response message reception timeout check is conducted for the data transmitted between the CPU module...
  • Page 187: Data Communication Using The Bidirectional Protocol

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL This communication enables data transfer between an external device and a CPU module using the data format and transmission control procedure for the bidirectional protocol. The feature of this data communication is that a response message is sent from the data receiving side to the data sending side, informing if the communication was completed.
  • Page 188: Data Reception From The External Device

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.1 Data Reception from the External Device This section explains the data reception from the external device. 11.1.1 Receiving methods The following shows how to receive data sent from the external device using the bidirectional protocol.
  • Page 189 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 1) When the control code ENQ is received, the C24 starts data reception processing. When the data specified by the data length is received, the C24 ends the reception processing of that data. When sum check is enabled in the switch setting of GX Works2, the C24 checks whether the message is normal or abnormal using the sum check code received immediately after the message and the sum check code calculated by internal...
  • Page 190: Arrangement And Contents Of The Receive Area And The Receive Data

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.1.2 Arrangement and contents of the receive area and the receive data This section shows the arrangement and contents of the receive area and the receive data for performing data reception using the bidirectional protocol. (1) Receive area The receive area is a memory that stores the received data length (receive data count) and data area received from an external device.
  • Page 191 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL POINT (1) The position and size of the receive area in the buffer memory can be changed with GX Works2 in accordance with the specifications of the external device and the received data length. (Refer to Section 7.2.) (a) When changing the position and size of the receive area in the buffer memory with GX Works2, specify as follows: 1) Receive buffer memory head address designation...
  • Page 192 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (2) Arrangement of receive data The following example illustrates the arrangement of data received from the external device when it is stored in the receive area. 1) The receive message is stored to the C24 buffer memory (receive data storage area).
  • Page 193 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (b) Data length This indicates the number of bytes or words for the data portion of the message. The unit of data length (words/bytes) is in accordance with the word/byte units designation in GX Works2. 1) For data communication from the external device to the C24 The C24 checks the length of the data received.
  • Page 194 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (d) Sum check code The sum check code expresses the numeric value for the lower two bytes (16 bits) of the results (sum) from the addition of the data length and the data portion in the message as binary code data. When "Exist"...
  • Page 195 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (e) Error code The error code indicates the definition of the error during NAK response. (For details on the error codes, refer to Chapter 15.) 1) For data communication from the external device to the C24 For error codes from the external device, transmit the codes specified by the user.
  • Page 196: Sequence Program For Data Reception

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.1.3 Sequence program for data reception This section explains the sequence program for data reception. For details on the BIDIN instruction for data reception, refer to Chapter 10. X3 Read request (CH1) Create control data from D0 G.BIDIN Processing for normal completion (stores receive data, etc.)
  • Page 197 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (Program example) When C24 I/O signals are from X/Y00 to X/Y1F: 1) Specify the receive channel. 2) Clear the receive data count storage device to 0. 3) Specify the allowable receive data count. 4) The receive data within the allowable receive data count (user-specified) is read from the receive data storage area in the buffer memory.
  • Page 198 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL Address Buffer memory Data reception result For normal completion Interface number Receive data count Reception result Receive data count Allowable receive data count (10) Receive data Receive data Receive data When the received data count is larger than the allowable received data count, only the data up to the allowable received data count will be stored and the excess data will be discarded.
  • Page 199: How To Detect And Check The Reception Errors

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.1.4 How to detect and check the reception errors This section explains how to detect and confirm errors that may occur when receiving data from external devices. The following items are considered as the primary causes of errors that may occur during data reception.
  • Page 200: Receive Data Clear

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (2) Confirmation using GX Works2, display unit and indicator LED of The following shows how to confirm the errors. Item Reference "Module's Detailed Information" screen Chapter 15 "Error History" screen Chapter 15 GX Works2 GX Works2 Version1 "Intelligent Function Module Monitor"...
  • Page 201: Sending Data To The External Device

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.2 Sending Data to the External Device This section explains the data transmission from the CPU module to an external device. 11.2.1 Transmission methods The following shows the method of sending data to the external device through data communication using the bidirectional protocol.
  • Page 202: Arrangement And Contents Of The Transmission Area And The Transmission Data

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.2.2 Arrangement and contents of the transmission area and the transmission data This section explains the arrangement and contents of the transmission area and the transmission data for performing data transmission using the bidirectional protocol. For details on the contents of transmission data, refer to Section 11.1.2 (3).
  • Page 203 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL POINT (1) The position and size of the transmission area in the buffer memory can be changed with GX Works2 in accordance with the specifications of the external device and the transmission data length. (Refer to Section 7.2.) (a) When changing the position and size of the transmission area in the buffer memory with GX Works2, designate as follows: 1) Transmission buffer memory head address designation...
  • Page 204 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (2) Transmission data arrangement The following example shows an arrangement of the transmission data to be sent to the external device when storing it in the transmission area. (Example) When "ABCDEFG123" is sent: Transmission area Transmission data (buffer memory)
  • Page 205: Sequence Program For Data Transmission

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.2.3 Sequence program for data transmission A sequence program for data transmission is explained below. For details on the BIDOUT instruction for data transmission, refer to Chapter 12. Transmission (In the case of the CH1 side) instruction Create transmission data from D11 Create control data from D0...
  • Page 206 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL C24 ready (X1E) Transmission instruction BIDOUT instruction BIDOUT BIDOUT instruction complete device ON when transmission abnormal completion BIDOUT instruction complete device + 1 (Normal completion/abnormal completion) 1 scan Transmission data count (address: 400 Transmission data (address: 401 Transmission data Data transmission...
  • Page 207 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (Program example) When C24 I/O signals are from X/Y00 to X/Y1F: 1) Transmission command is converted into pulse. 2) Transmission data is stored. 3) Specify the number of the interface (CH ) that sends the data. 4) Clear the transmission result storage device to 0.
  • Page 208 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL Address Buffer memory Data transmission result For normal completion Interface number (0001 Transmission data count designation Transmission result (0000 Transmission data count (0005 Transmission data designation (4241 Transmission data (0A0D For abnormal completion Interface number (0001 Transmission result...
  • Page 209: How To Detect And Confirm Transmission Errors

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.2.4 How to detect and confirm transmission errors This section explains how to detect and confirm errors that may occur when sending data to external devices. The following items are considered as the primary causes of errors that may occur during data transmission.
  • Page 210 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (2) Confirmation using GX Works2, display unit and indicator LED of The following shows how to confirm the errors. Item Reference "Module's Detailed Information" screen Chapter 15 "Error History" screen Chapter 15 GX Works2 GX Works2 Version1 "Intelligent Function Module Monitor"...
  • Page 211: Processing When Simultaneous Transmission Performed During Full-Duplex Communication

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.3 Processing when Simultaneous Transmission Performed During Full-Duplex Communication This section explains the processing when simultaneous transmissions occur in full- duplex communication. 11.3.1 Processing when simultaneous transmissions occur This section explains the processing performed by the C24 when the external device and the C24 transmit at the same time during data communications using the bidirectional protocol.
  • Page 212: Communication Data Processing When Simultaneous Transmissions Occur

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.3.2 Communication data processing when simultaneous transmissions occur Examples of the C24 communication data processing for the "Transmission data" and "Receive data" settings by GX Works2 are explained. (1) Transmission: Valid, Receive: Valid 2)-1 1)-2 Sum check...
  • Page 213 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL (4) Transmission: Invalid, Receive: Invalid 2)-1 Sum check Arbitrary data code Ignores the receive External device data of 1)-1. Generates a simultaneous C24 side transmission error. Sum check Arbitrary data Ignores the receive data of 2)-1. code 1)-1 REMARKS...
  • Page 214: Data Communications Precautions

    11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL 11.4 Data Communications Precautions The following shows the precautions when performing data communications using the bidirectional protocol. (1) When the transmission sequence is in the initial status, it indicates that data transmission and reception processing has not been started. The C24 transmission sequence is initialized in the following cases.
  • Page 215 11 DATA COMMUNICATION USING THE BIDIRECTIONAL PROTOCOL POINT (1) Perform error processing according to the error code received immediately after the NAK message at the device that received NAK as the response message after data transmission. Chapter 15 shows the error codes that are transmitted from the C24. (2) If the C24 receives an NAK response while transmitting data to an external device, it completes data transmission, then reads the NAK, perform abnormal completion.
  • Page 216: Dedicated Instructions

    12 DEDICATED INSTRUCTIONS 12 DEDICATED INSTRUCTIONS Dedicated instructions are used to simplify programming when using intelligent function module functions. This chapter describes the LCPU dedicated instructions used for the C24. 12.1 Dedicated Instruction List and Available Devices (1) Dedicated instruction list The following table lists the dedicated instructions explained in this chapter.
  • Page 217 12 DEDICATED INSTRUCTIONS (2) Available devices The following devices are available for the dedicated instructions: Internal devices File register Constant Word X, Y, M, L, F, V, B T, ST, C, D, W R, ZR K, H 1 Word device bit designation can be used as bit data. Word device bit designation is done by designating Word device .
  • Page 218: G(P).Ondemand

    12 DEDICATED INSTRUCTIONS 12.2 G(P).ONDEMAND Data can be sent using the on-demand function of the MC protocol. Applicable device Setting Internal device Link direct device Intelligent function Index register data (System, user) File register module device Constant Others U \G Word Word (S1)
  • Page 219 12 DEDICATED INSTRUCTIONS Function (1) Data stored in the device designated in (S2) and succeeding devices are sent according to the control data of the device designated in (S1) and succeeding devices, via the on-demand function of the MC protocol of the module designated in LCPU Channel to be used is set by...
  • Page 220 12 DEDICATED INSTRUCTIONS (3) Whether an ONDEMAND instruction was completed or failed can be checked by the completion device ((D)) or status display device at completion ((D)+1). (a) Completion device : Turns on at the END processing of the scan where the ONDEMAND instruction is completed, and turns off at the next END processing.
  • Page 221 12 DEDICATED INSTRUCTIONS Program example A program that sends data stored in D10 to D11 using an on-demand transmission When input/output signals of the C24 are from X/Y00 to X/Y1F 1) On-demand transmission command is converted into pulse. 2) Set the transmission channel to CH1. 3) Set the send data count to 2 words.
  • Page 222: G(P).Cprtcl

    12 DEDICATED INSTRUCTIONS 12.3 G(P).CPRTCL Protocols and functional protocols written to the flash ROM with the predefined protocol support function of GX Works2 can be executed. For details of the functional protocol, refer to Section 12.3.1. Applicable device Setting Internal device Link direct device Intelligent function File...
  • Page 223 12 DEDICATED INSTRUCTIONS Control data Device Item Setting data Setting range Set by The execution result of the G(P). CPRTCL instruction is stored. When executing multiple protocols, the execution result of (S) + 0 Execution result — System the protocol executed at last is stored. 0: Normal Other than 0: Error code The number of executions is stored.
  • Page 224 12 DEDICATED INSTRUCTIONS Function (1) The protocol setting data written to the flash ROM are executed by the module designated in Un. The protocol is executed according to the control data stored in the device designated in (S) and the following devices. The channel designated in n1 is used.
  • Page 225 12 DEDICATED INSTRUCTIONS (4) Whether a CPRTCL instruction was completed normally or abnormally can be checked by the completion device ((D)) or status display device at completion ((D)+1). (a) Completion device: Turns ON at the END processing of the scan where the CPRTCL instruction is completed, and turns OFF at the next END processing.
  • Page 226 12 DEDICATED INSTRUCTIONS Error (1) When a dedicated instruction is failed, the status display device at completion ((D)+1) turns ON and the error code is stored in the execution result ((S)+0). In case of operation errors, Error flag (SM0) turns ON and the error code is stored in SD0.
  • Page 227 12 DEDICATED INSTRUCTIONS Cancellation of protocol execution A protocol can be cancelled during its execution. This function is used to end the protocol execution forcibly when a communication error occurs with the other device. This function is available for the predefined protocol mode only. (1) Execution method for cancellation request Execute a cancellation request from the sequence program.
  • Page 228 12 DEDICATED INSTRUCTIONS (3) Program example The following is a program in which a cancellation is requested to the protocol being executed when the start I/O number of the C24 is 0000. Devices used by user Device Purpose M100 Cancellation request command flag M101 Cancellation request flag M110...
  • Page 229: Functional Protocol

    12 DEDICATED INSTRUCTIONS 12.3.1 Functional protocol The following functions are available by executing functional protocols with the CPRTCL instruction. Receive data clear Send/receive data monitoring start/stop RS/DTR signal condition designation (1) Setting Specify the functional protocol number of the function to be executed in the control data ((S)+2 to (S)+9) of the CPRTCL instruction.
  • Page 230: G(P).Output

    12 DEDICATED INSTRUCTIONS 12.4 G(P).OUTPUT Data can be sent in any user-defined message format using the nonprocedural protocol. Applicable device Setting Internal device Link direct device Intelligent function Index register data (System, user) File register module device Constant Others U \G Word Word (S1)
  • Page 231 12 DEDICATED INSTRUCTIONS Function (1) Data stored in the device designated in (S2) and succeeding devices are sent according to the control data of the device designated in (S1) and succeeding devices, via the nonprocedural protocol of the module specified in Un. LCPU Channel to be used is set by...
  • Page 232 12 DEDICATED INSTRUCTIONS (3) Whether an OUTPUT instruction was completed or failed can be checked by the completion device ((D)) or status display device at completion ((D)+1). (a) Completion device: Turns on at the END processing of the scan where the OUTPUT instruction is completed, and turns off at the next END processing.
  • Page 233 12 DEDICATED INSTRUCTIONS Program example The following example shows a program that sends any data stored in D11 to D15 using the nonprocedural protocol. When input/output signals of the C24 are from X/Y00 to X/Y1F: Transmission command is converted into pulse. Transmission data is stored.
  • Page 234: G.input

    12 DEDICATED INSTRUCTIONS 12.5 G.INPUT Data can be received in any user-defined message format using the nonprocedural protocol. Applicable device Setting Internal device Link direct device Intelligent function Index register data (System, user) File register module device Constant Others U \G Word Word —...
  • Page 235 12 DEDICATED INSTRUCTIONS 1 For error codes relating to abnormal completion, refer to Chapter 15. 2 When setting "Word/byte units designation" by GX Works2, set the number of bytes when bytes are designated and set the number of words when words are designated.
  • Page 236 12 DEDICATED INSTRUCTIONS (4) Whether an INPUT instruction was completed or failed can be checked by the completion device ((D2)) or status display device at completion ((D2)+1). (a) Completion device: Turns on at the END processing of the scan where the INPUT instruction is completed, and turns off at the next END processing.
  • Page 237 12 DEDICATED INSTRUCTIONS Program example The following example shows a program that stores data received via the nonprocedural protocol in D10 and later. When the input/output signals of the C24 are from X/Y00 to X/Y1F: 1 When the completion device is off, execute the INPUT instruction. If the INPUT instruction is executed when the completion device is on, data may not be received properly.
  • Page 238: G(P).Bidout

    12 DEDICATED INSTRUCTIONS 12.6 G(P).BIDOUT Data can be sent using the bidirectional protocol. Applicable device Setting Internal device Link direct device Intelligent function Index register data (System, user) File register module device Constant Others U \G Word Word (S1) — —...
  • Page 239 12 DEDICATED INSTRUCTIONS Function (1) The function sends data stored in the device designated in (S2) and succeeding devices according to the control data of the device designated in (S1) and succeeding devices, via the bidirectional protocol of the module designated in Un. (2) Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the BIDOUT instruction or executing the BIDOUT instruction...
  • Page 240 12 DEDICATED INSTRUCTIONS [Operation during execution of a BIDOUT instruction] Sequence processing processing processing processing program Execution of BIDOUT Completion of transmission by instruction a BIDOUT BIDOUT instruction Completion device Abnormal completion Status display device at completion Normal completion One scan Error (1) When a dedicated instruction is completed, the abnormal completion signal (D)+1, turns on and the error code is stored in the transmission result (S1)+1.
  • Page 241 12 DEDICATED INSTRUCTIONS Transmission command is converted into pulse. Transmission data is stored. Specify the number of the interface (CH ) that sends the data. Clear the transmission result storage device to 0. Specify the transmission data count in word units. (Specify K10 when the unit is bytes.) The transmission data stored in the specified device is sent.
  • Page 242: G(P).Bidin

    12 DEDICATED INSTRUCTIONS 12.7 G(P).BIDIN Data can be received using the bidirectional protocol. Applicable device Setting Internal device Link direct device Intelligent function Index register data (System, user) File register module device Constant Others U \G Word Word — — (D1) —...
  • Page 243 12 DEDICATED INSTRUCTIONS Function (1) The function stores in the device designated in (D1) and succeeding devices the data received via the bidirectional protocol of the module designated in Un, according to the control data of the device designated in (S) and succeeding devices. (2) Simultaneous execution of dedicated instructions The following table shows the handling for when executing another instruction during execution of the BIDIN instruction or executing the BIDIN instruction during...
  • Page 244 12 DEDICATED INSTRUCTIONS (3) Whether a BIDIN instruction was completed normally can be checked by the completion device ((D2)) or status display device at completion ((D2)+1). (a) Completion device: Turns on at the END processing of the scan where the BIDIN instruction is completed normally, and turns off at the next END processing.
  • Page 245 12 DEDICATED INSTRUCTIONS Specify the receive channel. Clear the receive data count storage device to 0. Specify the allowable receive data count. Store the receive data in the specified device. After completed, the receive data within the allowable receive data count (user-specified) is read from the receive data storage area in the buffer memory.
  • Page 246: G(P).Spbusy

    12 DEDICATED INSTRUCTIONS 12.8 G(P).SPBUSY This instruction reads the status of data transmission and reception executed with dedicated instructions. Applicable device Setting Internal device Link direct device Intelligent function Index register data (System, user) File register module device Constant Others U \G Word Word...
  • Page 247 12 DEDICATED INSTRUCTIONS Error (1) In case of operation errors, the error flag (SM0) turns on and the error code is stored in SD0. Refer to the following according to the error code, and check and correct the error. <Error code> 4FFF or less: MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection)
  • Page 248: Zp.cset (Receive Data Clear)

    12 DEDICATED INSTRUCTIONS 12.9 ZP.CSET (Receive data clear) Applicable device Setting Internal device Link direct device Intelligent function Index register Constant data File register Others (System, user) module device K, H U \G Word Word (S1) — — — (S2) —...
  • Page 249 12 DEDICATED INSTRUCTIONS Function (1) This function clears reception data in the OS area. It does not clear the user data reception area in the buffer memory. (2) If the CSET instruction is executed while the reception data read request (X3/XA) or reception abnormal detection signal (X4/XB) is turned on, the CSET instruction is kept waiting until the signal is turned off.
  • Page 250 12 DEDICATED INSTRUCTIONS (4) The status of the CSET instruction, whether it is being executed or completed normally/abnormally, can be checked by the complete device (D2) specified by the setting data. (a) Complete device ((D2) + 0) This device turns on at the End processing of the scan at which the CSET instruction is completed and turns off at the next End processing.
  • Page 251 12 DEDICATED INSTRUCTIONS Program example This is an example of a program that clears reception data on the C24 side. It is assumed that the input/output signals of the C24 are X/Y00 to X/Y1F. Set the execution type. Set the request type (Reception data clear) Execute the reception data clear Normal completion Abnormal completion...
  • Page 252: Debug Support Function

    13 DEBUG SUPPORT FUNCTION 13 DEBUG SUPPORT FUNCTION The debug support functions are designed to support the debugging of communication processing between the C24 and external device. The following functions are available to ease system startup work. • Circuit trace •...
  • Page 253: Procedure For The Circuit Trace

    13 DEBUG SUPPORT FUNCTION 13.1.1 Procedure for the circuit trace The following shows the procedure for the circuit trace. Start of circuit trace Start circuit trace from GX Works2. Communicating with the external device Stop circuit trace in GX Works2. Circuit trace results are displayed.
  • Page 254: Execution Of The Circuit Trace

    13 DEBUG SUPPORT FUNCTION 13.1.2 Execution of the circuit trace The trace data is stored in the monitor buffer to trace the communication data and communication signal status. [Basic operation] 1. GX Works2 [Tool] [Intelligent Function Module Tool] [Serial Communication Module] [Circuit Trace] 2.
  • Page 255 13 DEBUG SUPPORT FUNCTION [Display/Setting screen] [Display/Setting details] Item Display/Setting details Trace Result — Currently Displayed Data Displays the model name, measurement time, and extraction date/time of the module on which the circuit trace is executed. Find Packet Data… button Select the display format of the send/receive packets.
  • Page 256: Circuit Trace Option Setting

    13 DEBUG SUPPORT FUNCTION 13.1.3 Circuit trace option setting In the circuit trace option setting, the following two items can be set. • The monitor buffer area starting address and size of the C24 that stores the circuit trace data (hereinafter referred to as the monitor buffer area) •...
  • Page 257 13 DEBUG SUPPORT FUNCTION 3. In the "Circuit Trace Option" screen, set "Start Address", "Size", and "Stop Setting" of the monitor buffer area, and click the OK button. [Display/Setting details] Item Display/Setting details Circuit Trade Data Storage Area Setting — Start Address Set the starting address of the monitor buffer area.
  • Page 258: State Monitor

    13 DEBUG SUPPORT FUNCTION 13.2 State Monitor The following items are monitored. • Signals of the C24 • Communication error information • Operation setting switches • Protocol execution status during the predefined protocol communication [Basic operation] 1. Display the "Predefined Protocol Support Function" screen. For the method for displaying it, refer to Section 9.1.
  • Page 259 13 DEBUG SUPPORT FUNCTION (1) "Signal" tab [Display/Setting screen] [Display/Setting details] Item Display/Setting details X signal state monitor Displays the ON/OFF status of the X signals. Y signal state monitor Displays the ON/OFF status of the Y signals. RS-232 signal monitor Displays the ON/OFF status of the RS-232 control signals.
  • Page 260 13 DEBUG SUPPORT FUNCTION (2) "Error Information" tab [Display/Setting screen] [Display/Setting details] Item Display/Setting details Communications Error Status Displays the communication error status. Switch Setting, Mode Displays the switch setting and/or mode selection error status. Switching Error Communication Result Displays the error status of the communication result. This button is valid when the CH1 ERR.
  • Page 261 13 DEBUG SUPPORT FUNCTION (3) "Operation Setting Switch" tab [Display/Setting screen] [Display/Setting details] Item Display/Setting details Switch Setting Status for The Displays the operation switch setting status. Operation Mode Switch Displays the predefined protocol setting. Station Switch Displays the station number setting. 13 - 10 13 - 10...
  • Page 262 13 DEBUG SUPPORT FUNCTION (4) "Predefined Protocol Function" tab [Display/Setting screen] [Display/Setting details] Item Display/Setting details Execution Status Displays the protocol execution status. Protocol Cancel Designation Displays the protocol cancel designation status. Predefined Protocol Function Displays the error code of the result from the error completion. Error Code 13 - 11 13 - 11...
  • Page 263: Protocol Execution Log Display Storage Function (For Predefined Protocol Only)

    13 DEBUG SUPPORT FUNCTION 13.3 Protocol Execution Log Display Storage Function (for Predefined Protocol only) This function checks the detailed predefined protocol execution status and results for each channel. Up to 32 protocol execution logs can be checked. If the number of the stored logs exceeds 32, the oldest log will be overwritten. The protocol execution log can be checked in the following method.
  • Page 264: Checking With Gx Works2

    13 DEBUG SUPPORT FUNCTION 13.3.1 Checking with GX Works2 Check the protocol execution logs and protocol execution results in the "Protocol execution log" screen of GX Works2. [Basic operation] 1. Select a module to debug. 1) Display the "Predefined Protocol Support Function" screen. For the method for displaying it, refer to Section 9.1.
  • Page 265 13 DEBUG SUPPORT FUNCTION [Display/Setting screen] POINT The logs displayed in the "Protocol execution logs" screen can be selected from the following two, according to the log registration condition. • Displaying only the failed protocols. • Displaying all execution statuses and execution logs. The log registration condition can be set in "Execution log options"...
  • Page 266: Checking With The Buffer Memory

    13 DEBUG SUPPORT FUNCTION 13.3.2 Checking with the buffer memory Check the protocol execution logs in the execution log storage area. [Basic operation] 1. The log registration condition can be set by the execution log option specification for the buffer memory (address: 40E2 /40F2 Buffer memory address : 40E2...
  • Page 267: Maintenance And Inspection

    14 MAINTENANCE AND INSPECTION 14 MAINTENANCE AND INSPECTION 14.1 Inspection Items This section explains the inspection items of the C24. 1) Check if the terminating resistors and cables are connected securely. 2) Verify that the terminal screws and the terminal block installation screws are securely tightened.
  • Page 268: When Replacing Modules

    14 MAINTENANCE AND INSPECTION 14.2 When Replacing Modules When replacing the C24 and LCPU, it becomes necessary to register the following data again for the module to be replaced. • C24: System setting data in the flash ROM • LCPU: PLC parameters (I/O assignment, switch setting, etc.) Please read the following manual before replacing the module, and make sure to pay attention to safety and handle the module properly during the operation.
  • Page 269 14 MAINTENANCE AND INSPECTION 4) Click the Detail button ((b) in the illustration) and select the target memory to read in the "Target to Read and Write Detail Setting" screen. 5) Select the "Target" check box in the "Memory for Read and Write". ((c) in the illustration) 6) Select the "valid"...
  • Page 270: Troubleshooting

    15 TROUBLESHOOTING 15 TROUBLESHOOTING This chapter explains the corrective actions when an error occurs in the C24and the error codes. For the trouble shooting from the display unit, refer to MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection). 15.1 Checking the Status of the C24 This section explains how to check the status of communication between the C24 and external devices, the transmission status, and the switch setting status.
  • Page 271: Checking The H/W Led Information

    15 TROUBLESHOOTING 15.1.1 Checking the H/W LED information The transmission status and communications error status of the C24 can be checked. (Contents of 201 /202 of the buffer memory are displayed.) When a communication error occurs, take corrective action according to Section 15.3. POINT Each of the communications error status, SIO, PRO., P/S, C/N, CH1 ERR.
  • Page 272 15 TROUBLESHOOTING (2) Screen items (a) SD WAIT Indicates "Transmission wait status". Value Status Description 0001(ON) Waiting for data Data cannot be sent to the external device by the transmission transmission control of the C24 (waiting for data transmission). • The transmission cannot be started. •...
  • Page 273 15 TROUBLESHOOTING (c) PRO. Indicates "Character error status". Value Status Description 0001(ON) Error occurred. Character error occurred. Keeps its on-status even after the communication returns to normal. Initialize the error information as necessary. For details, refer to Section 15.1.2. 0000(OFF) Normal (d) P/S Indicates "Status of parity error or sum check error".
  • Page 274 15 TROUBLESHOOTING (g) ACK. Indicates "Normal completion status". Value Status Description 0001(ON) Normal When the C24 could receive data normally, the C24 completion sent a response message (ACK message) to the transmission external device to notice the normal completion. 0000(OFF) Abnormal When the C24 could not receive data normally, the completion...
  • Page 275: Checking The H/W Switch Information

    15 TROUBLESHOOTING 15.1.2 Checking the H/W switch information The details of switch information can be monitored. (1) Method for displaying Select [Diagnostics] [System Monitor…] and click the H/W Information button in GX Works2. H/W switch Information (2) Screen items Item Description Reference 1 CONFIG...
  • Page 276 15 TROUBLESHOOTING (a) 1 CONFIG, 2 CONFIG The following shows the communication rate setting and transmission setting of the CH1 side (1 CONFIG) and CH2 side (2 CONFIG). Item Description OFF (0): Independent Operation setting ON (1): Linked OFF (0): 7 Data Bit ON (1): 8 OFF (0): None...
  • Page 277 15 TROUBLESHOOTING (b) CH1 MODE, CH2 MODE The following shows the communication protocol setting of CH1 side (CH1 MODE) and CH2 side (CH2 MODE). Setting Description number Communication with MELSOFT Connection Format 1 Format 2 Communication Format 3 with MC protocol Format 4 Format 5 Communication with nonprocedural protocol...
  • Page 278: Reading The Rs-232 Control Signal Status

    15 TROUBLESHOOTING 15.1.3 Reading the RS-232 control signal status This section explains how to read the control signal status stored in the buffer memory during communication using RS-232 interface. When using GX Works2, check in the "Intelligent Function Module Monitor" screen. (Refer to the GX Works2 Version1 Operating Manual (Intelligent Function Module).) When a transmission problem occurs, read operation is executed to check the signal on/off status of the RS-232 interface.
  • Page 279: Reading The Data Communication Status (Transmission Sequence Status)

    15 TROUBLESHOOTING 15.1.4 Reading the data communication status (Transmission sequence status) This section explains how to read the current status of the data communication using the MC protocol stored in the buffer memory. When using GX Works2, check in the "Intelligent Function Module Monitor" screen. (Refer to the GX Works2 Version1 Operating Manual (Intelligent Function Module).) When a transmission problem occurs, read operation is executed to check the status of the data communication using the MC protocol.
  • Page 280: Reading The Switch Setting Status

    15 TROUBLESHOOTING 15.1.5 Reading the switch setting status This section explains how to read the switch setting status of the C24. When using GX Works2, check in the "Intelligent Function Module Monitor" screen. (Refer to the GX Works2 Version1 Operating Manual (Intelligent Function Module).) REMARKS (1) The switch settings can be changed when the mode is switched or when the UINI instruction is executed.
  • Page 281 15 TROUBLESHOOTING (2) Example of a program that reads from the setting status storage area The following shows an example of a program that reads the setting of various switches of the C24 from the setting status. For details on ERR. occurrence (XE/XF) of the input/output signals used in the program, refer to Section 15.4 (3).
  • Page 282: How To Read The Current Operation Status

    15 TROUBLESHOOTING 15.1.6 How to read the current operation status This section explains how to read the current operation status of the C24. When using GX Works2, check in the "Intelligent Function Module Monitor" screen. (Refer to the GX Works2 Version1 Operating Manual (Intelligent Function Module).) REMARKS •...
  • Page 283 15 TROUBLESHOOTING (2) Example of a program that reads from the current setting status storage area The following shows an example of a program that reads from the switch setting status for current operation of the C24. For details regarding ERR. occurrence (XE/XF) used in the program, refer to Section 15.4 (3).
  • Page 284: Error Code

    15 TROUBLESHOOTING 15.2 Error Code When a trouble such as external device communication failure has occurred, the error cause can be identified by an error code. 15.2.1 How to check the error codes Error codes can be checked on GX Works2. (Refer to (1) in this section.) REMARKS By using GX Works2, error history of the entire system can be checked even after errors were cleared by turning the power off to on, or by resetting the CPU module...
  • Page 285 15 TROUBLESHOOTING (b) Checking on the "Error History" screen On this screen, errors including those occurred in other modules are displayed in chronological order, and the data can be output in a CSV file. Error code and date and time of error occurrence can be checked even after powering OFF and then ON the CPU module or after resetting the CPU module or head module.
  • Page 286 15 TROUBLESHOOTING • Intelligent Module Information The status of the C24 when the error, which is currently selected under "Error History List", had occurred is displayed. For the C24, the following will be displayed. Item Description Channel where error occurs Channel on which an error has occurred.
  • Page 287 15 TROUBLESHOOTING Create CSV File… button Click this button to output the module error history in a CSV file. POINT (1) If errors have frequently occurred in the C24, "*HST.LOSS*" may be displayed instead of error codes in the Error Code column. (Example) If too many "*HST.LOSS*"...
  • Page 288: Error Code List

    15 TROUBLESHOOTING 15.2.2 Error code list The following shows the error codes, error contents, and corrective actions for errors that are generated during data communication. (" " in the table is the error code when the target CPU module is not a Q/L/QnACPU.) The signal name in the following table indicates the CH side LED on status or communication error status that is stored into buffer memory address 201...
  • Page 289 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- defined decimal) dural tional • Monitoring was requested before the • Write the device to be monitored before Monitor data write 7144 PRO. error device to be monitored was written.
  • Page 290 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • Check the transmission • Either the request or the device message/request from the external ⎯ 7164 Request error designation method is wrong. device, make the necessary corrections, and send again.
  • Page 291 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • Check if the specified protocol No. is correct. • The protocol No. specified in control • Check the Protocol registration area data for the CPRTCL instruction is not Protocol (buffer memory: 4091H to 4098H) to...
  • Page 292 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • When data are received by the protocol • Correct the data sent from the device. including a packet that contains a •...
  • Page 293 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • Modify the setting of the transmit message from the external device so that the request will not exceed the limit •...
  • Page 294 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional ⎯ • Re-execute the write operation. • Writing to the flash ROM failed. Flash ROM write • If the error occurs after rewriting, 7E57 error •...
  • Page 295 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • The OS of the C24 detected some ⎯ 7E6E System error error. • Correct the setting of the destination •...
  • Page 296 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • There is an error in the command • Check and correct the external device Receive header (frame) part. transmit message and restart data 7F21 PRO.
  • Page 297 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional • Decrease the data transmission rate and restart data communications. • Check whether a temporary stop has occurred in the station to which the C24 •...
  • Page 298 15 TROUBLESHOOTING Protocol Error code Signal Non- Error (Hexa- Description Corrective action Pre- name proce- direc- decimal) defined dural tional 7F91 7F96 7F98 7F9A 7F9D 7F9E 7FA0 7FA3 7FA8 7FAA • The OS of the C24 detected some ⎯ System error error.
  • Page 299 4) Check whether the hardware of the C24 and CPU module are normal according to the manuals of the corresponding modules. If any module is faulty, please consult your local Mitsubishi service center or representative. 5) If the problem cannot be solved through the above steps, please consult your local Mitsubishi service center or representative, explaining a detailed description of the problem.
  • Page 300: A Compatible 1C Frame Communications Error Code List

    15 TROUBLESHOOTING 15.2.3 A compatible 1C frame communications error code list The following table lists the error code, error contents, and corrective action for errors generated during A compatible 1C frame communications. Protocol Error code Signal Non- Error Error Contents Corrective action (Hexa- Pre-...
  • Page 301: Error Code List While Modem Function Is Used

    15 TROUBLESHOOTING 15.2.4 Error code list while modem function is used The following describes the error codes, contents and corrective actions for errors (including errors at the abnormal completion) that may occur while the C24 modem function is used. The error codes for the modem function are stored in the modem function error code (address : 221 (545)).
  • Page 302 4) Check whether the hardware of the C24 and CPU module are normal according to the manuals of the corresponding modules. If any module is faulty, please consult your local Mitsubishi service center or representative. 5) If the problem cannot be solved through the above steps, please consult your local Mitsubishi service center or representative, explaining a detailed description of the problem.
  • Page 303: Troubleshooting By Symptom

    15 TROUBLESHOOTING 15.3 Troubleshooting by Symptom This following shows troubleshooting of trouble generated during communications between the C24 and external device according to the trouble symptom. When trouble occurs, first confirm the status of the C24 and check the relevant item in the table below.
  • Page 304 15 TROUBLESHOOTING REMARKS The following are precautionary notes when exchanging data with an external device via one of the C24 interfaces. (1) When the power supply to the C24 or external device is started, the remote device that is connected may generate a reception error. (2) If the remote device that is connected starts up while data is being transmitted, the remote device side will generate a reception error.
  • Page 305: The "Run" Led Is Turned Off

    15 TROUBLESHOOTING 15.3.1 The "RUN" LED is turned OFF Symptom Cause Corrective action • A transmission setting • Set the switch by GX Works2 correctly and switch is set to an after writing to the CPU module reset the unusable position. CPU.
  • Page 306: The "Rd" Led Does Not Blink Even After Message Transmission From The External Device

    15 TROUBLESHOOTING 15.3.2 The "RD" LED does not blink even after message transmission from the external device Symptom Cause Corrective action • Check if the C24 and external RD(RXD) and SD(TXD) signal lines are cross connected. • Signal lines are not •...
  • Page 307: No Response Message Is Returned Even Though The External Device Transmitted A Message And The "Rd" Led Blinked

    15 TROUBLESHOOTING 15.3.3 No response message is returned even though the external device transmitted a message and the "RD" LED blinked Symptom Cause Corrective action • Check if the communication protocol is set correctly. • Check if the mode was switched without using the buffer memory mode switching area.
  • Page 308: Transmission Request Does Not Make The "Sd" Led Blink

    15 TROUBLESHOOTING 15.3.4 Transmission request does not make the "SD" LED blink Symptom Cause Corrective action • Due to the OFF status of • While the CS(CTS) signal is OFF, the C24 does not the CS(CTS) signal, the transmit data to the external device. C24 cannot transmit data It must be ON when the external device is ready to •...
  • Page 309: Read Request Signal Does Not Turn On Even Though The External Device Transmitted A Message And The "Rd" Led Was Blinking

    15 TROUBLESHOOTING 15.3.5 Read request signal does not turn ON even though the external device transmitted a message and the "RD" LED was blinking Symptom Cause Corrective action • Check if the communication protocol is set correctly. • Check if the mode was switched without using the buffer memory mode switching area.
  • Page 310: The Cprtcl Instruction Execution Is Not Completed Although The "Rd" Led Blinked

    15 TROUBLESHOOTING 15.3.6 The CPRTCL instruction execution is not completed although the "RD" LED blinked Symptom Cause Corrective action • Incorrect protocol No. is • Check the protocol No. specified in the control data for the specified in the control CPRTCL instruction for an error.
  • Page 311: Communication Error "Nak

    15 TROUBLESHOOTING 15.3.7 Communication error "NAK" Symptom Cause Corrective action • Refer to section that describes the communication error signal ("C/N", "P/S", • Take corrective action corresponding to the "PRO", "SIO") that are contents of the error. turned on simultaneously when the "NAK"...
  • Page 312: Communication Error "P/S

    15 TROUBLESHOOTING Symptom Cause Corrective action • An error was generated on • Check the error contents from the state of the CC-Link IE Controller SB and SW related to the CC-Link IE Network. Controller Network with the GX Works2 monitor, etc.
  • Page 313: Communication Error "Pro

    15 TROUBLESHOOTING 15.3.10 Communication error "PRO." Symptom Cause Corrective action • Communications were • Check the C24 communication protocol setting and performed with a control the message from the external device and match the procedure different from the settings, or correct the message and restart data C24 communication protocol communications.
  • Page 314: Communication Error "Sio

    15 TROUBLESHOOTING 15.3.11 Communication error "SIO" Symptom Cause Corrective action • Data does not match the • Check if the C24 and external device settings stop bit setting. are the same. • Transmission rate is too • Decrease the transmission rate and restart fast and the next data is data communications.
  • Page 315: Communication Error "Ch1 Err." Or "Ch2 Err

    15 TROUBLESHOOTING 15.3.12 Communication error "CH1 ERR." or "CH2 ERR." Symptom Cause Corrective action • There is an error in the • Read the error code from the buffer memory communication protocol or and check the error contents and change transmission setting.
  • Page 316 15 TROUBLESHOOTING Symptom Cause Corrective action • The user-edited protocol • Check the packet format of the external setting in the predefined device, and correct the protocol setting. protocol support function (1) When a conversion variable exists in the of GX Works2 is receive packet, check for an error in the inconsistent with the setting of Conversion, Sign character,...
  • Page 317: Communication Is Intermittent

    15 TROUBLESHOOTING 15.3.13 Communication is intermittent Symptom Cause Corrective action • With a multidrop link, two or • Connect the external devices and the C24 in a 1:1 more devices transmitted configuration and perform a communications test. data at the same time. Since data is transmitted simultaneously from two or more devices with a multidrop link when normal communications among all the devices is possible,...
  • Page 318 15 TROUBLESHOOTING 2) When the following problem occurs at the time of access to other station CPU module, clear the programmable controller CPU information and retry. (Refer to Section 15.5.) • Accessible device range is narrowed. (Error code: 7140 • Some of commands and/or devices cannot be used. (Error code: 7142 , 714D (b) When response messages cannot be received...
  • Page 319: Undecodable Data Are Transmitted Or Received

    15 TROUBLESHOOTING 15.3.14 Undecodable data are transmitted or received Symptom Cause Corrective action • With a multidrop link, • Connect the external devices and the C24 in a two or more devices 1:1 configuration and perform a transmitted data at the communications test.
  • Page 320: Whether The Communication Error Is Caused On The C24 Or External Device Is Unclear

    15 TROUBLESHOOTING 15.3.15 Whether the communication error is caused on the C24 or external device is unclear Symptom Cause Corrective action • Test the C24 as described below to check where the cause is. 1) Check the hardware. • The C24 must be installed firmly. •...
  • Page 321: Communication Is Not Available Via The Modem

    15 TROUBLESHOOTING 15.3.16 Communication is not available via the modem Non- Bidirectional Symptom Cause Corrective action procedural Predefined protocol protocol • Check the error code and execute • A modem initialization error occurs. processing accordingly. • Modem connection channel designation •...
  • Page 322: Constant Cycle Transmission Is Not Performed Normally

    15 TROUBLESHOOTING 15.3.18 Constant cycle transmission is not performed normally Non- Bidirectional Pre- Symptom Cause Corrective action procedural protocol defined protocol • Does not operate in the • The setting value of the constant cycle • Review the constant cycle transmission cycle time designated in transmission is incorrect.
  • Page 323: Troubleshooting On The Protocol Setting Data Reading/Writing

    15 TROUBLESHOOTING 15.3.22 Troubleshooting on the protocol setting data reading/writing Non- Bidirectional Symptom Cause Corrective action procedural Predefined protocol protocol • In Protocol setting data error information (buffer memory: 4086 to 4089 ), locate the error part (protocol No, packet No, or element No.) and correct it.
  • Page 324: Initializing Error Information Of The Serial Communication Module

    15 TROUBLESHOOTING 15.4 Initializing Error Information of the Serial Communication Module This section explains the ERR. LED ON factors and the error code initialization (clear) for the C24. (1) ERR. LED ON factors When any of the following errors occurs, its error code is stored in the buffer memory corresponding to the interface (CH) where the error occurred, and the ERR.
  • Page 325 15 TROUBLESHOOTING (b) Initializing communication error information by writing Communication error information can be initialized by writing "1" to the corresponding bit in the communication error clear request and to turn LED off (address: 0 The indicator LED and communication error information may be turned on/off in the following cases: •...
  • Page 326 15 TROUBLESHOOTING (c) Examples of programs that initialize indicator LED and communication error information The following shows examples of a program that reads error codes when errors described in (1) above occur in an interface on the CH1 side and initializes the indicator LED and communication error information.
  • Page 327 15 TROUBLESHOOTING REMARKS When data is communicated using the MC protocol, the ERR. LED may not be turned on if the C24 sends an NAK message to the external device in response to the command message. Error codes corresponding to the error content when the NAK message is sent back to the external device are stored in the following areas.
  • Page 328: Clearing The Programmable Controller Cpu Information

    15 TROUBLESHOOTING 15.5 Clearing the Programmable Controller CPU Information This section explains how to clear the programmable controller CPU information. (1) Programmable controller CPU information This is the information about the access target CPU module type used in MC protocol communications. The C24 obtains this information from the access target CPU module at the time of initial access, and stores it inside the C24.
  • Page 329 15 TROUBLESHOOTING (4) Executing the programmable controller CPU information clear request Executing from GX Works2 1) In the "Intelligent Function Module Monitor" screen, set "4C43 " to buffer memory address 80 2) In the Buffer Memory Batch monitor screen, check that the value in buffer memory address 80 is "0000 ".
  • Page 330: Appendixes

    APPENDIXES APPENDIXES Appendix 1 Buffer Memory The buffer memory is the memory of the C24 used for storing data sent to or received from the CPU module. (Setting values, monitor values, etc.) Initial values are set to the buffer memory. When changing the initial values, set the parameters in GX Works2 and write them to the flash ROM.
  • Page 331 APPENDIXES (3) Procedure for writing the buffer memory to the flash ROM Displaying the screen for writing to the flash ROM Open the "Flash ROM Operation" screen by the following procedure. Parameter setting screen [Tool] [Flash ROM Operation] Executing the write operation to the flash ROM Select "Request of Flash ROM Write"...
  • Page 332 APPENDIXES IMPORTANT Do not write data in the "System area" of the buffer memory. If data is written to any of the system areas, the programmable controller system may malfunction. Some of the user areas are partially system areas. Care must be taken when performing read/write to the buffer memory.
  • Page 333 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Communication error clear request for CH1 and to turn LED off 0: ON, No initialization request 1: OFF, Initialization requested SD WAIT (b0) C/N (b4) — SIO (b1)) NAK (b5) PRO.
  • Page 334 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non 57 to 127 — Use prohibited System area to 7F programmable Programmable controller CPU information clear request — controller CPU 0000 : No request Not allowed Section 15.5 information 4C43 : Requested...
  • Page 335 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi For designation Communication system designation (for RS-232) of communication (138 0: Full duplex communication 1: Half-duplex communication control Simultaneous transmission priority/non-priority designation For half- duplex communications 0: Priority Chapter 11 (139...
  • Page 336 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Pd Last frame No. designation (1st to 4th) 1: 0D 178 to 338 to For designation 2: 0A : No designation or more: Last frame No. of receive user Allowed (152...
  • Page 337 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Switch setting error and mode switching error status 0: No error Other than 0: Switch setting error and mode switching error CH1 Communication protocol setting No. (b0) 0: Normal 1: Error CH1 Communication rate setting (b1)
  • Page 338 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Depen For confirmation Station No. (instruction setting) Section 7.3 ds on of station No. Not allowed Section 15.1.6 (24F (0 to 31) module setting status status Communication protocol status (switch setting) 0: MELSOFT Connection 5: MC protocol (Format 5)
  • Page 339 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Pd MC protocol transmission error code — — (excludes A compatible 1C frame communication) (25A (26A For confirmation 0: No error 1 or more: Transmission error code of communication Not allowed Receive user frame (nth)
  • Page 340 APPENDIXES Address Protocol Initial Decimal (Hex) Registration Reference Application Name value MC Non Bi Pd 7814 to 7854 For registration No. 8017 (1E86 to 1EAE The user registration area has the following combined uses, with 7855 to 7895 data written by the user according to the purpose of use by the For registration No.
  • Page 341 APPENDIXES Address Protocol Initial Decimal (Hex) Registration Reference Application Name value MC Non Bi Pd Transmission control start free area designation 8210 8466 User’s Manual 64 to 4,095: transmission control start free area (2012 (2112 (Application) Transmission control end free area designation 8211 8467 For transmission...
  • Page 342 APPENDIXES Address Initial Protocol Name Registration Reference Decimal (Hex) Application value MC Non Bi Pd Transmission pointer designation (For fixed cycle transmission and data transmission) 0: No designation 8260 8516 1 to 100: Output head point (send from the nth) (2044 (2144 Send the user frames designated in the following transmission...
  • Page 343 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Pd Transmission pointer designation (for condition agreement transmission and nonprocedural data transmission) 0: No designation 1 to 100: Output head point (send from nth) 8422 8678 Send the user frames designated in the following (20E6 (21E6...
  • Page 344 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Pd Callback permit accumulated count 8944 (22F0 0 or more: Accumulated count Callback denial accumulated count 8945 (22F1 0 or more: Accumulated count For callback User's Manual Auto (callback) connection permit accumulated count —...
  • Page 345 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Pd Matched receive packet No. 1 16396 16428 0: No matched receive packet (400C (402C 1 to 16: Matched receive packet No. 16397 16429 Matched receive packet No. 2 (400D (402D 16398...
  • Page 346 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi 16522 to 16527 — Use prohibited System area (408A to 408F Number of registered protocols 16528 0: No registration — Chapter 9 (4090 1 to 128: Number of registrations Protocol registration 0: Not registered 1: Registered...
  • Page 347 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi Execution status Unexecuted Waiting for transmission 16677 18469 Sending — (4125 (4825 Waiting for reception Not allowed Receiving Completed Execution result Chapter 9 16678 18470 Normal —...
  • Page 348 APPENDIXES Address Initial Protocol Application Name Registration Reference Decimal (Hex) value MC Non Bi 16690 to 18482 to Checking Execution 18177 19969 Same as Execution log 1 — Not allowed Section 13.3 protocol (4132 (4832 log 2 to 32 execution log 4701 4E01 18178 to...
  • Page 349 APPENDIXES (a) [CH1 side buffer memory address: decimal (hexadecimal)] N-th block monitoring device Name 8272 8281 8290 8299 8308 8317 8326 8335 8344 8353 Monitoring device designation (2050 (2059 (2062 (206B (2074 (207D (2086 (208F (2098 (20A1 8273 to 8282 to 8291 to 8300 to 8309 to...
  • Page 350: Appendix 2 How To Confirm The Serial No. And Function Version

    APPENDIXES Appendix 2 How to Confirm the Serial No. and Function Version For how to check the serial No. and function version, refer to the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection). MELSEC-L CC-Link IE Field Network Head Module User's Manual App.
  • Page 351: Appendix 3 Differences Between L Series C24 And Q Series C24

    APPENDIXES Appendix 3 Differences between L Series C24 and Q Series C24 Appendix 3.1 Specification comparisons The following shows the specification comparisons between the L series C24 and Q series C24. For the function comparisons between LCPU and QnUCPU, refer to the following. MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) Difference...
  • Page 352: Appendix 4 When Using Gx Developer Or Gx Configurator-Sc

    APPENDIXES Appendix 4 When Using GX Developer or GX Configurator-SC Appendix 4.1 Compatible software packages Refer to the following manual. MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) Appendix 4.2 Specification comparisons The following shows the specification comparisons between GX Works2 and GX Developer, GX Configurator-SC.
  • Page 353: Appendix 4.3 Operation Comparison

    APPENDIXES Appendix 4.3 Operation comparison Appendix 4.3.1 Operation of GX Developer When using GX Developer, the setting and confirmation can be configured in the following screens. Screen name Application Reference Set the type and I/O signal range of each I/O Assignment This section (1) module to be connected.
  • Page 354 APPENDIXES (2) Switch setting GX Developer [PLC Parameter] [I/O Assignment] Switch Setting button [Setting details] Set the transmission specifications and communication protocols of each interface. Switch number Description Reference Transmission speed setting and transmission setting on CH1 Switch 1 side Switch 2 Communication protocol setting on CH1 side Transmission speed setting and transmission setting on CH2...
  • Page 355 APPENDIXES (a) Switch 1, Switch 3 The following shows the communication rate setting and transmission setting of the CH1 side (Switch 1) and CH2 side (Switch 3). Item Description OFF (0): Independent Operation setting ON (1): Linked OFF (0): 7 Data Bit ON (1): 8 OFF (0): None...
  • Page 356 APPENDIXES (b) Switch 2, Switch 4 The following shows the communication protocol setting of CH1 side (Switch 2) and CH2 side (Switch 4). Setting Description number Communication with MELSOFT Connection Format 1 Format 2 Communication with Format 3 MC protocol Format 4 Format 5 Communication with nonprocedural protocol...
  • Page 357: Appendix 4.3.2 Operation Of Gx Configurator-Sc

    APPENDIXES Appendix 4.3.2 Operation of GX Configurator-SC When using GX Configurator-SC to set C24 parameters, display methods such as setting screens vary from those of GX Works2. In this section, the screen displaying methods of GX Configurator-SC are explained. Also, since the setting contents are the same as GX Works2, refer to Chapter 7. When using GX Configurator-SC, configure the settings in the following screens.
  • Page 358 APPENDIXES GX Developer screen [Tools] – [Intelligent function utility] – [Start] When used via online operation Select a target intelligent function 1) To the next page module screen When auto refresh is set 2) To the next page Flash ROM settings screen When used via offline operation Select [Tools] –...
  • Page 359 APPENDIXES 1) When using online operation 2) When setting auto refresh Auto refresh Select [Online] – [Monitor/Test] from the menu bar. Enter "Start I/O No.", and select "Module type" and "Module model name". Select monitor/test module screen Auto refresh setting screen Monitor/Test Select a module to be monitored/tested.
  • Page 360: Appendix 5 Operation Image And Data Structure Of Predefined Protocol

    APPENDIXES Appendix 5 Operation Image and Data Structure of Predefined Protocol Appendix 5.1 Operation image of each communication type of protocol In the predefined protocol function, communication with other devices is performed through the communication type 'Send only', 'Receive only', or 'Send & receive'. This section describes the respective operation images.
  • Page 361 APPENDIXES (2) Error completion (transmission monitoring timeout error) Example of setting) Standby time: 0, Retry interval: 0, Monitoring time: other than 0 Error occurs LCPU Execute dedicated instruction (G(P).CPRTCL) Completion device ON at error completion Status display device at completion t : Transmission monitoring time Cannot send a packet Other device...
  • Page 362: Appendix 5.1.2 When Communication Type Is "Receive Only

    APPENDIXES Appendix 5.1.2 When communication type is "Receive only" When data are received from other devices, the process completes when the receive data matches the receive packet and the receiving process is performed. The operation image of "Receive only" is as follows. (1) Normal completion Store verification-matched receive packet number...
  • Page 363 APPENDIXES (2) Error completion (receive wait timeout error) Error occurs LCPU Execute dedicated instruction (G(P).CPRTCL) Completion device ON at error completion Status display device at completion (Receive buffer clear) * Only if it is specified t: Receive waiting time Verification mismatch Receive packet Receive packet...
  • Page 364: Appendix 5.1.3 When Communication Type Is "Send & Receive

    APPENDIXES Appendix 5.1.3 When communication type is "Send & receive" The specified packet is sent, and the execution status changes to Waiting for receive data status after the sending process completes normally. Then data are received from other devices, and the process completes when the receive data matches the receive packet and the receiving process is performed.
  • Page 365 APPENDIXES (2) Error completion (receive wait timeout error) Error occurs Execute dedicated LCPU instruction (G(P).CPRTCL Completion device ON at error completion Status display device at completion (Receive buffer clear) t: Receive waiting time * Only if it is specified Send packet Verification mismatch Receive...
  • Page 366: Appendix 5.2 Verification Operation Of Receive Packet

    APPENDIXES Appendix 5.2 Verification operation of receive packet The following shows the C24 operation when data that are different from the specified receive packet are received. Receive data prior to the different data are discarded. Data are compared again from the start of the receive packet, and once the data are matched with the receive packet, the data receiving operation is processed.
  • Page 367: Appendix 5.3 Data Examples Of Packet Elements

    APPENDIXES Appendix 5.3 Data examples of packet elements This section describes the processing procedures and practical data examples of elements that can be placed in a packet. Appendix 5.3.1 Length (1) Processing procedure The C24 processes Length according to the following procedure. (Data flow) (Code type) (Data length)
  • Page 368 APPENDIXES (b) Data flow is 'Reverse direction' Data length 1 byte 2 bytes 3 bytes 4 bytes Code type "20" "201" "2010" ASCII hexadecimal "85" "852" "8520" ASCII decimal (38H 35H 32H) 0201 020100 02010000 (c) Data flow is 'Byte swap' Data length 1 byte 2 bytes...
  • Page 369: Appendix 5.3.2 Non-Conversion Variable

    APPENDIXES Appendix 5.3.2 Non-conversion variable (1) Processing procedure The C24 processes Non-conversion variable according to the following procedure. (Byte swap) (Fixed length/Variable length) (Data length/Maximum data length) (Unit of stored data) When "Byte swap" is ’Disable’ Unit of Lower bytes only Lower byte + Upper byte stored data ’B’...
  • Page 370 APPENDIXES (2) Data example The following table shows data to be stored in the data storage area when the string of send data is 'ABCD' (Reference: A=41 , B=42 , C=43 , and D=44 in ASCII code) Item Description Fixed length/Variable length Fixed length Data length 4 bytes...
  • Page 371: Appendix 5.3.3 Conversion Variable

    APPENDIXES Appendix 5.3.3 Conversion variable (1) Processing procedure The C24 processes Conversion variable according to the following procedure. When "Conversion" is 'HEX ASCII hexadecimal' or 'ASCII hexadecimal HEX' (Delimiter) (Number of digits) (Conversion) (Fixed number of data/ (Blank-padded character) Variable number of data) (Conversion unit) Digits are filled No delimiter...
  • Page 372 APPENDIXES When "Conversion" is 'HEX ASCII decimal' or 'ASCII decimal HEX' (Delimiter) (Number of digits) (Number of decimals) (Sign) (Fixed number of data/ Variable number of data) (Blank-padded character) (Sign character) (Conversion unit) (Conversion) ASCII decimal Digits are filled ASCII (Unsigned) No delimiter No decimal point...
  • Page 373 APPENDIXES (2) 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 (0345 ), D1=18 (0012 (Reference: 120345 =1180485 in decimal form) Item Setting Details Fixed number of data/Variable number...
  • Page 374: Appendix 5.3.4 Check Code

    APPENDIXES Appendix 5.3.4 Check code (1) Processing procedure The C24 processes Check code according to the following procedure. 1) Calculates value according to the selection of "Processing method". 2) When "Complement calculation" is 'One's complement' or 'Two's complement', performs a 2-word-wise complement operation on the value calculated in 1).
  • Page 375 APPENDIXES (a) Data flow: Forward direction 1) "Complement calculation" is 'No complement calculation' in hexadecimal is 21 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII "5" "15" "015" "0015" hexadecimal "1" "21" "021" "0021"...
  • Page 376 APPENDIXES Data flow: Reverse direction "Complement calculation" is 'No complement calculation' in hexadecimal is 21 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII "51" "510" "5100" hexadecimal "12" "120" "1200" ASCII decimal 1500 150000 15000000 "Complement calculation"...
  • Page 377 APPENDIXES (c) Data flow: Byte swap "Complement calculation" is 'No complement calculation' in hexadecimal is 21 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII "0051" hexadecimal "0012" ASCII decimal 00001500 "Complement calculation" is 'One's complement' (One's complement of 0000 0015 is FFFF FFEA When "Code type"...
  • Page 378 APPENDIXES (3) Procedure for calculating sum check The following show procedures for calculating sum check codes using the following sample data. "Q" "J" "7" "1" "C" "2" "4" "N" check Calculating range (For the data shown above) Sum check = 51 + 4A + 37 + 31...
  • Page 379 APPENDIXES (b) Data flow: Reverse direction "Complement calculation" is 'No complement calculation' (1FD in hexadecimal is 509 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII "DF" "DF1" "DF10" hexadecimal "90" "905" "9050" ASCII decimal FD01 FD0100 FD010000...
  • Page 380 APPENDIXES (c) Data flow: Byte swap "Complement calculation" is 'No complement calculation' (1FD in hexadecimal is 509 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII "10DF" hexadecimal "5090" ASCII decimal 0000FD01 "Complement calculation" is 'One's complement' (One's complement of 0000 01FD is FFFF FE02 When "Code type"...
  • Page 381 APPENDIXES (4) Procedure for calculating 16-bit CRC (for MODBUS) This is a check system that is used only when data are sent/received in the RTU mode of the MODBUS protocol. The data length of CRC is fixed to 2 bytes (16 bits), and the CRC is calculated every 1 byte (8 bits) from the start of the calculating range according to the following procedure.
  • Page 382 APPENDIXES The following show the example of 16-bit CRC (for MODBUS) calculation. Packet example: Station No. Function code 16-bit CRC Procedure example of 16-bit CRC (for MODBUS) of a packet example above: Calculating CRC error checking procedure 16-bit register (MSB) Flag procedure (Load a 16-bit register whose bits are all '1')
  • Page 383: Appendix 5.3.5 Non-Verified Reception

    APPENDIXES (5) Calculating range of Check code The following shows specification examples of the calculating range of Check code. Packet Packet Packet Packet Packet element 1 element 2 element n-2 element n-1 element n Non-conversion Packet Header Static data Terminator Check code format variable...
  • Page 384: Appendix 6 Communication Example When The C24 Is Used Installed To The Head Module

    APPENDIXES Appendix 6 Communication Example when the C24 Is Used Installed to the Head Module This section explains the parameter setting and programming using system configuration examples. For the parameter setting of the head module and details on cyclic transmission, refer to the following manual.
  • Page 385: Appendix 6.2 System Configuration Example

    APPENDIXES Appendix 6.2 System configuration example (1) System configuration The following is a system configuration for the program examples in this section. App. - 56 App. - 56...
  • Page 386 APPENDIXES (2) Data communication procedure when the C24 is connected to the head module The control is performed using the network parameter setting (refresh parameter setting) of the master station and the C24 auto refresh setting of the intelligent device station (head module). When the C24 is connected to the head module, dedicated instructions cannot be used.
  • Page 387 APPENDIXES (a) Data communication using the predefined protocol Set send or receive data storage area on the "Predefined Protocol Support Function" screen of the predefined protocol support function in advance. Then, communicate the data in the following procedures. Write the send data to the link register W of the CPU module to store the send data in the head module device.
  • Page 388 APPENDIXES (b) Data communication using the nonprocedural or bidirectional protocol • Sending procedure Write the send data to the link register W of the CPU module to write the send data to the C24 buffer memory. Issue a send request by receiving the send request (Y0/Y7). After execution of the send request is completed, the transmission normal completion (X0/X7) turns on.
  • Page 389 APPENDIXES • Receiving procedure Using the auto refresh function, results of execution of the nonprocedural or bidirectional protocol are transferred from the C24 buffer memory to the head module device and then to the link register W of the CPU module. When the data from the external device is received, the reception data read request (X3/XA) turns on.
  • Page 390: Appendix 6.3 Parameter Setting

    APPENDIXES Appendix 6.3 Parameter setting Appendix 6.3.1 Master station setting (1) Network parameter setting Set the network parameters using GX Works2 as shown below. For the network configuration setting, refer to (2) in this section. For the refresh parameters, refer to (3) in this section. [Operation procedure] Project window [Parameter]...
  • Page 391 APPENDIXES (3) Refresh parameter setting In "Refresh Parameter", set the following network parameters. App. - 62 App. - 62...
  • Page 392: Appendix 6.3.2 Head Module Setting

    APPENDIXES Appendix 6.3.2 Head module setting (1) PLC parameter setting Set the PLC parameters using GX Works2 as shown below. For details on the PLC parameters of the head module and network parameters, refer to the MELSEC-L CC-Link IE Field Network Head Module User's Manual. [Operation procedure] Project window [Parameter]...
  • Page 393: Appendix 6.4 Execution Program Example Of The Predefined Protocol

    APPENDIXES Appendix 6.4 Execution program example of the predefined protocol The following shows a program example when connecting an external device (temperature control module) to CH2 of the C24 and executing the pre-defined protocol using the auto refresh function and X/Y signal. (1) Setting for the C24 installed to the head module Configure the switch settings and predefined protocol settings of the C24 to the head module.
  • Page 394 APPENDIXES Various Control Specification On the "Various_Control_Specification" screen, set "1: Prohibited" in "Echo back allow/prohibit designation". For details on the echo back allow/prohibit, refer to Section 6.3.5. [Operation procedure] Project window [Intelligent Function Module] [LJ71C24] [Various_Control_Specification] [Setting screen] App. - 65 App.
  • Page 395 APPENDIXES Auto refresh setting Set the auto refresh to transfer the information stored in the C24 buffer memory to the specified device of the head module automatically. [Operation procedure] Project window [Intelligent Function Module] [LJ71C24] [Auto_Refresh] [Setting screen] App. - 66 App.
  • Page 396 APPENDIXES Predefined protocol setting Set the predefined protocol as shown below. (When using the EJ1 0601H:RD Controller Status in the MELSEC predefined protocol library) For details on predefined protocol support function, refer to Section 9.1. [Operation procedure] [Tool] [Intelligent Function Module Tool] [Serial Communication Module] [Predefined Protocol Support Function]...
  • Page 397 APPENDIXES (2) Program example The following shows the program that executes the predefined protocol from CH2 of the C24 when M1000 is turned ON. [I/O signals of the C24] Device Purpose Device Purpose CH2 protocol execution CH2 protocol execution X100C Y100A completion request...
  • Page 398: Appendix 6.5 Sending/Receiving Data Using The Nonprocedural Or Bidirectional Protocol

    APPENDIXES Appendix 6.5 Sending/receiving data using the nonprocedural or bidirectional protocol Appendix 6.5.1 Receiving data using the nonprocedural or bidirectional protocol The following shows a program example of connecting an external device (personal computer) to CH1 of the C24 and receiving data by nonprocedural and bidirectional protocols, using auto refresh and X/Y signals.
  • Page 399 APPENDIXES Auto refresh setting Configure the auto refresh settings to transfer the information stored in the C24 buffer memory to the specified device in the head module automatically. For details on the transmission/receive area, refer to Chapter 10 or 11. [Operation procedure] Project window [Intelligent Function Module]...
  • Page 400 APPENDIXES (2) Program example The following shows the program example of receiving data using the nonprocedural protocol. [I/O signals of the C24] Device Purpose Device Purpose CH1 Reception data read CH1 Reception data read X1003 Y1001 request completion CH1 Reception error X1004 —...
  • Page 401: Appendix 6.5.2 Sending Data Using The Nonprocedural Or Bidirectional Protocol

    APPENDIXES Appendix 6.5.2 Sending data using the nonprocedural or bidirectional protocol The following shows a program example of connecting an external device (personal computer) to CH1 of the C24 and sending data by nonprocedural and bidirectional protocols, using auto refresh and X/Y signals. (1) Setting of the C24 installed to the head module Perform the switch setting and auto refresh setting for the C24 on the head module.
  • Page 402 APPENDIXES Auto refresh setting Configure the auto refresh settings to transfer the information stored in the C24 buffer memory to the specified device by the head module automatically. For details on the transmission/receive area, refer to Chapter 10 or 11. [Operation procedure] Project window [Intelligent Function Module]...
  • Page 403 APPENDIXES (2) Program example The following shows a data transmission image and a program example when sending data using the nonprocedural protocol. [I/O signals of the C24] Device Purpose Device Purpose CH1 Transmission X1000 Y1000 CH1 Transmission request completion X1001 CH1 Transmission error —...
  • Page 404 APPENDIXES By transferring the send data count to W0 and transferring the send data for the send data count from W1 in the master station CPU module, the data is stored in the C24 device installed to the following head module. Device Content Send data count...
  • Page 405: Appendix 7 Processing Time

    APPENDIXES Appendix 7 Processing Time (1) Time required to process communication using the nonprocedural protocol (guideline) The processing time for the Output and Input instructions can be estimated by the following formula. Note, however, that the processing time may become longer depending on other communication functions (e.g., communication using the MC protocol) and special functions (e.g., ASCII-binary conversion, transmission control) that are used at the same time.
  • Page 406 APPENDIXES (b) Input instruction Tp = Sr + 0.09 Dr + T2 Tp ( 1) : Time from the start of execution of the Input instruction to the End processing of the sequence scan at the completion of the Input instruction execution (ms) : Scan time : Number of bytes of reception data : C24...
  • Page 407 APPENDIXES (2) Processing time of dedicated instructions The following table shows the operation processing time (rough standard) of each dedicated instruction. The operation processing time differs slightly depending on the system configuration and communication protocol. Processing time (unit: ms) Instruction execution condition Instruction Transmission/receive name...
  • Page 408: Appendix 8 Ascii-Code List

    APPENDIXES Appendix 8 ASCII-Code List The ASCII-code list is shown below. (7-bit codes) The codes marked are used as C24 control codes. (DC codes 11 to 14 can be changed by the user.) 0000 ‚ 0001 0010 " 0011 0100 0101 0110 &...
  • Page 409: Appendix 9 Usage Example Of Mx Component

    APPENDIXES Appendix 9 Usage Example of MX Component This section explains the procedure for creating programs and sample programs using MX Component. (1) Procedure for creating programs The procedure for creating programs is outlined below. The usage procedure below uses Visual Basic .NET 2003 as an example.
  • Page 410 APPENDIXES (2) Sample program The following sample program reads D0 to D4 (five points) of the target programmable controller using the logical station number. When Visual Basic is used Screen example (Form1) Text1 ' Enter the logical station number. Command1 or Button1 ' Connect to the communication line.
  • Page 411 APPENDIXES Private Sub Command2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Command2.Click '*********************************** ' Read '*********************************** Dim rtn As Integer Dim idata(5) As Short 'D0-D4 are read rtn = AxActEasyIF1.ReadDeviceBlock2("D0", 5, idata(0)) If rtn = 0 Then MsgBox("D0-D4 = " & idata(0) & "," & idata(1) & "," & idata(2) & "," & idata(3) & "," & idata(4)) Else MsgBox("Read Error :"...
  • Page 412 APPENDIXES //************************** Read //************************** private: System::Void button2_Click(System::Object * sender, System::EventArgs * e) int iRet; short sData[5]; String* szMessage= ""; String* lpszarrData[]; int iNumber; String* szReadData; // D0-D4 are read iRet = axActEasyIF1->ReadDeviceBlock2( "D0", 5, sData ); if( iRet == 0 ){ lpszarrData = new String * [ 5 ];...
  • Page 413 APPENDIXES ® When Visual Basic 6.0 is used Private Sub Command1_Click() '*********************************** ' Connection '*********************************** Dim rtn As Long 'Get LogicalstationNumber ActEasyIF1.ActLogicalStationNumber = Val(Text1.Text) 'Connection rtn = ActEasyIF1.Open() If rtn = 0 Then MsgBox "The connection was successful" Else MsgBox "Connection Error :" & Hex(rtn) End If End Sub Private Sub Command2_Click()
  • Page 414 APPENDIXES ® When Visual C++ 6.0 is used //************************** Connection //************************** void CVCDlg::OnOpen() long lRet; CString szMessage; // Reflects the logical station No. set in the text box to variables. UpdateData(); // Get LogicalstationNumber m_actEasyIf.SetActLogicalStationNumber( m_lLogicalStationNumber ); // Connection lRet = m_actEasyIf.Open(); if( lRet == 0 ){ MessageBox( "The connection was successful"...
  • Page 415 APPENDIXES //************************** Disconnection //************************** void CVCDlg::OnClose() long lRet; CString szMessage; // Disconnection lRet = m_actEasyIf.Close(); if( lRet == 0 ){ MessageBox( "The disconnection was successful" ); } else { szMessage.Format( "Disconnection Error : %x", lRet ); MessageBox( szMessage ); App. - 86 App.
  • Page 416: Appendix 10 Setting Value Recording Sheet

    APPENDIXES Appendix 10 Setting Value Recording Sheet The following sheet is for recording parameter setting values set by GX Works2. Use as many copies as needed. In order to review the setting values of parameters, print them out using the parameter printing function of GX Works2 to use it as the setting value recording sheet.
  • Page 417 APPENDIXES Recording sheet 3 (Switch setting) GX Works2 setting Set data Data item name Setting value screen CH1 side CH2 side Operation setting Independent Linked Independent Data Bit Parity Bit None Exist Trans- Even/odd parity Even mission Stop bit Setting Sum check code None Exist...
  • Page 418: Appendix 11 External Dimensions

    APPENDIXES Appendix 11 External Dimensions (1) LJ71C24 Outside cable diameter ( 2) DIN rail center ( 1) ( 3) 28.5 (Unit: mm) 1 R1 (bend radius near the terminal) : Cable outside diameter 2 R2 (bend radius near the connector) : Cable outside diameter 3 r1 (bend radius near the crimp-on terminal) : Connectable without bending excessively (2) LJ71C24-R2...
  • Page 419 INDEX A compatible 1C frame....... 8- 2 Echo back...........6-19 Additional functions of the C24 ....3- 5 ER signal .............6- 3 Applicable systems........5- 3 ERR. LED..........15-55 ASCII-code list ........App-79 Error code list ...........15-19 Auto refresh ..........7-25 Even/odd parity ..........7-12 Execution log options (buffer memory) ...13-15 Execution log options (GX Works2) ..13-14 BIDIN............
  • Page 420 Multidrop link..........5- 2 Receive data clear (nonprocedural) ..10-17 MX Component........App-80 (bidirectional) ....11-14 Received data count ........10-23 Receive data (nonprocedural) ....10- 8 n:1 system configuration ......5- 4 (bidirectional).......11- 6 NAK............15- 4 Receiving methods (nonprocedural) ..10- 2 Non-conversion variable ......9-11 (bidirectional) ....11- 2 Nonprocedural protocol......
  • Page 421 Troubleshooting........15- 1 TXD signal ..........6- 2 User register frame specification ....7- 7 Various control specification ...... 7- 3 Writing to the flash ROM ......7-23 1:1 system configuration ......5- 4 1:n system configuration ......5- 5 Index - 3 Index - 3...
  • Page 422 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 423 6. Failure caused by reasons unpredictable by scientific technology standards at time of shipment from Mitsubishi. 7. Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user. 2. Onerous repair term after discontinuation of production (1) Mitsubishi shall accept onerous product repairs for seven (7) years after production of the product is discontinued.
  • Page 424 Microsoft, Windows, Windows NT, and Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries. Pentium is a trademark of Intel Corporation in the United States and other countries. Ethernet is a trademark of Xerox Corporation. Other company names and product names used in this document are trademarks or registered trademarks of respective companies.
  • Page 428 Phone: +380 (0)44 / 490 92 29 Fax: +380 (0)44 / 248 88 68 Mitsubishi Electric Europe B.V. /// FA - European Business Group /// Gothaer Straße 8 /// D-40880 Ratingen /// Germany Tel.: +49(0)2102-4860 /// Fax: +49(0)2102-4861120 /// info@mitsubishi-automation.com /// www.mitsubishi-automation.com...

This manual is also suitable for:

Lj71c24Lj71c24-r2

Table of Contents