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 When using the MELSEC-Q series serial communication module When using the MELSEC-Q series serial communication module [Design Precautions] WARNING • For the operation status of each station at communication error in each station, refer to the respective manual for each station. The communication error may result in an accident due to incorrect output or malfunction.
  • Page 5 When using the MELSEC-Q series serial communication module [Design Precautions] WARNING • Do not write any data to the "system area" of the buffer memory in the intelligent function module. Also, do not use any "use prohibited" signals as an output signal from the programmable controller CPU to the intelligent function module.
  • Page 6 When using the MELSEC-Q series serial communication module [Wiring Precautions] CAUTION • When turning on the power and operating the module after installation and wiring are completed, always attach the terminal cover that comes with the product. There is a risk of electric shock if the terminal cover is not attached. •...
  • Page 7 When using the MELSEC-Q series serial communication module [Starting and Maintenance Precautions] CAUTION • Do not disassemble or modify the modules. Doing so may cause failure, malfunction, injury, or a fire. • Shut off the external power supply (all phases) used in the system before mounting or removing a module.
  • Page 8 When using the MELSEC-L series serial communication module When using the MELSEC-L series serial communication module [Design Precautions] WARNING • For the operation status of each station at communication error in each station, refer to the respective manual for each station. The communication error may result in an accident due to incorrect output or malfunction.
  • Page 9 When using the MELSEC-L series serial communication module [Installation Precautions] CAUTION • Use the programmable controller in an environment that meets the general specifications in the MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection). Failure to do so may result in electric shock, fire, malfunction, or damage to or deterioration of the product.
  • Page 10 When using the MELSEC-L series serial communication module [Wiring Precautions] CAUTION • Use applicable solderless terminals and tighten them within the specified torque range. If any spade solderless terminal is used, it may be disconnected when a screw on the terminal block comes loose, resulting in failure.
  • Page 11 When using the MELSEC-L series serial communication module [Startup/Maintenance Precautions] CAUTION • Do not disassemble or modify the modules. Doing so may cause failure, malfunction, injury, or a fire. • Shut off the external power supply (all phases) used in the system before mounting or removing a module.
  • Page 12: 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 13: Revisions

    Oct., 2000 SH (NA)-080007-B Add the contents of the function version B. Put Windows base software products together from Mitsubishi Programmable Controller MELSEC series to Mitsubishi integrated FA software MELSOFT series. Standardize the name from software package (GPP function) to product name (GX Developer).
  • Page 14 The manual number is given on the bottom left of the back cover. Print Date Manual Number Revision Sep., 2004 SH(NA)-080007-G Correction Section 1.2, Section 6.1, Section 9.1.1 Addition Section 17.8 Feb., 2005 SH(NA)-080007-H Correction Section 3.4.2, 3.4.4, Chapter 17 (Simultaneous execution of dedicated instructions) Mar., 2006 SH(NA)-080007-I...
  • Page 15 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 16: Introduction

    INTRODUCTION Thank you for purchasing the MELSEC-Q/L series programmable controller. This manual explains the functions and programming required to use the serial communication module. Before using this product, please read this manual and the related manuals carefully to develop full familiarity with the functions and performance of the MELSEC-Q/L series programmable controller to handle the product correctly.
  • Page 17: Table Of Contents

    CONTENTS SAFETY PRECAUTIONS..........................A- 1 CONDITIONS OF USE FOR THE PRODUCT .....................A-10 REVISIONS ..............................A-11 INTRODUCTION............................A-14 CONTENTS..............................A-15 COMPLIANCE WITH EMC AND LOW VOLTAGE DIRECTIVES ...............A-20 RELEVANT MANUALS ..........................A-21 The Manual's Use and Structure ........................A-22 Generic Terms and Abbreviations .........................A-24 TERMS ................................A-26 1 OVERVIEW 1- 1 to 1- 6 1.1 Overview..............................
  • Page 18 3.4 Start-up of the Modem Function ......................3-52 3.4.1 Start-up procedures when communicating data with external devices .......... 3-52 3.4.2 Initial settings of the serial communication module................. 3-55 3.4.3 Register/read/delete of the initialization data .................. 3-58 3.4.4 Register/read/delete of the data for connection ................3-63 3.4.5 Initialization of modem/TA (terminal adapter) .................
  • Page 19: Contents

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9- 1 to 9-22 9.1 User Frame Types and Contents During Communication ..............9- 1 9.1.1 User frames to be registered and used by the user................ 9- 1 9.1.2 Default registration frame (read only) ....................9- 9 9.2 Transmission/Reception Processing Using User Frame Register Data ..........
  • Page 20 12.5 Handling Transparent Codes and Additional Codes During Bidirectional Protocol Data Communication ........................... 12-13 12.6 Example of Data Communication Using the Bidirectional Protocol ..........12-16 12.6.1 Example of data reception ......................12-17 12.6.2 Example of data transmission...................... 12-19 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13- 1 to 13-14 13.1 ASCII-BIN Conversion ........................
  • Page 21 17 DEDICATED INSTRUCTIONS 17- 1 to 17-40 17.1 Dedicated Instruction List and Available Devices ................17- 1 17.2 Z.BUFRCVS............................17- 3 17.3 ZP.CSET (Programmable Controller CPU Monitoring Register/Cancel).......... 17- 7 17.4 ZP.CSET (Initial Settings)........................17-16 17.5 G(P).GETE ............................17-21 17.6 G(P).PRR ............................17-24 17.7 G(P).PUTE ............................
  • Page 22: Compliance With Emc And Low Voltage Directives

    COMPLIANCE WITH 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 one of the following manuals.
  • Page 23: Relevant Manuals

    RELEVANT MANUALS The specifications and usage of special functions can be checked in this manual. In addition, use the following manuals according to their intended use. Manual number Manual name (Model code) Q Corresponding Serial Communication Module User's Manual (Basic) SH-080006 Overview of the module, applicable system configuration, specifications, procedures prior to operations, (13JL86)
  • Page 24: The Manual's Use And Structure

    The Manual's Use and Structure How to use this manual This manual describes the use of special functions for the Q series C24 (QJ71C24N, QJ71C24N-R2, QJ71C24N-R4, QJ71C24, QJ71C24-R2), with each chapter covering a specific function. Please read this manual and use the contents below as a reference.
  • Page 25 (8) To use the function that performs the data communication in ASCII code with the external device • Chapter 13 describes the handling of binary code on the programmable controller CPU and ASCII-BIN conversion function for communicating ASCII code data for an external device. (9) To use dedicated instructions •...
  • Page 26: Generic Terms And Abbreviations

    Generic Terms and Abbreviations In this manual, the following generic terms and abbreviations are used to explain the serial communication module and data communication devices, unless otherwise specified. Specific names or model names are provided when it is necessary to explicitly identify the model being discussed. (1) Generic terms and abbreviations for modules Generic Description...
  • Page 27 (2) Abbreviations for dedicated instructions Abbreviation Description BIDIN Abbreviation for G.BIDIN or GP.BIDIN. BIDOUT Abbreviation for G.BIDOUT or GP.BIDOUT. BUFRCVS Abbreviation for Z.BUFRCVS. CPRTCL Abbreviation for G.CPRTCL or GP.CPRTCL CSET Abbreviation for ZP.CSET. GETE Abbreviation for G.GETE or GP.GETE. INPUT Abbreviation for G.INPUT.
  • Page 28: Terms

    TERMS The following table lists the definitions and descriptions of terminology used in this manual. Terminology Description One of the message formats for the serial communication modules, which is used to perform ASCII data communication by MC protocol. A compatible 1C frame This is the same message format as the one used when communicating using the protocol for the A series (Formats 1 to 4) computer link modules.
  • Page 29 Terminology Description One of the message formats for the serial communication modules, which is used to perform ASCII data communication by MC protocol. QnA compatible 2C frame This is the same message format as the communication frame using the protocol for the QnA series serial (Formats 1 to 4) communication modules.
  • Page 30 MEMO A - 28 A - 28...
  • Page 31: Overview

    • Sends the programmable controller CPU error information QJ71C24 Q25HCPU MELSEC External device POWER MODE CH1. CH2. ERR. CH1. USER BAT. BOOT Monitoring CPU error RS-232 device information information CH.2 PULL (FG) Abnormal detection (FG) RS-232 RS-422 MITSUBISHI /485 Error occurrence 1 - 1 1 - 1...
  • Page 32 1 OVERVIEW (2) Communicating with the external device at a remote location via a modem (detailed explanation in Chapter 3) 1) Connecting a modem or TA (terminal adapter) to the RS-232 interface facilitates communication via a public line/private line/digital line (ISDN), such as data communication with a device at a remote location (listed below) and calling a pager device.
  • Page 33 1 OVERVIEW (3) Receiving data with an interrupt program (detailed explanation in Chapter 4) 1) In data communication between the Q series C24 and the external device, data can be received using an interrupt program with the following data communication functions. •...
  • Page 34 1 OVERVIEW (5) Converting binary code data to ASCII code data to communicate with the external device specification (detailed explanation in Chapter 13) 1) Binary code data that is processed by the programmable controller CPU can be converted to ASCII code data for communication. 2) ASCII-BIN conversion is performed by the Q series C24 according to user settings.
  • Page 35 1 OVERVIEW The following table lists which special functions are available for the main data communication functions of the Q series C24. Main data communication functions Pre- Bidirectional Reference Special functions procedure defined protocol protocol section protocol protocol programmable controller Monitoring of the CPU using Chapter 2...
  • Page 36: Functions Added/Changed For The Qj71C24N (-R2/R4) And Qj71C24 (-R2)

    1 OVERVIEW 1.2 Functions Added/Changed for the QJ71C24N (-R2/R4) and QJ71C24 (-R2) For the function versions, serial numbers, and software versions of the QJ71C24N (-R2/R4) or QJ71C24(-R2) with the added or changed functions, refer to the following. Q Corresponding Serial Communication Module User's Manual (Basic) 1 - 6 1 - 6...
  • Page 37: Using The Programmable Controller Cpu Monitoring Function

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION This chapter explains the programmable controller CPU monitoring function with which the Q series C24 monitors the programmable controller CPU based on the monitoring information reregistered by the user.
  • Page 38 CPU error occurs. QJ71C24 Q25HCPU External device MELSEC POWER MODE CH2. CH1. ERR. CH1. USER BAT. BOOT CPU error Monitoring device RS-232 information information CH.2 PULL (FG) Abnormal detection (FG) RS-232 RS-422 MITSUBISHI /485 Error occurrence 2 - 2 2 - 2...
  • Page 39: About The Programmable Controller Cpu Monitoring Function

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2 About the Programmable Controller CPU Monitoring Function This section explains the programmable controller CPU monitoring function. 2.2.1 Data registration for using the programmable controller CPU monitoring function The following explains the data registration by the user to use the programmable controller CPU monitoring function.
  • Page 40 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (Example1) For a block in which 10 points of word devices from D100 to D109 are registered Monitoring target: Numeric value stored in D100 Data transmitted: Numeric values stored in D100 to D109 (Example2) For a block in which two points of bit devices from M100 to M131 are registered Monitoring target: ON/OFF status of M100...
  • Page 41: Timing For Programmable Controller Cpu Monitoring

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2.3 Timing for programmable controller CPU monitoring The following explains the timing for programmable controller CPU monitoring when the programmable controller CPU monitoring function is executed. (1) Programmable controller CPU monitoring using the Q series C24 is performed continuously at cycle time intervals registered by the user.
  • Page 42: Timings Of Transmission And Notification Of Monitoring Results To The External Device

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (3) To monitor the programmable controller CPU, the Q series C24 reads monitoring information (device information, programmable controller CPU status information) from the programmable controller CPU at time intervals set by the user. POINT (1) Since the Q series C24 reads the monitoring information (device data, programmable controller CPU status) at the time of the next programmable...
  • Page 43 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (2) Condition agreement transmission (a) For device monitoring, the monitoring conditions registered by the user (conditions for sending monitoring results), the monitoring condition values and the monitoring information read from the programmable controller CPU are compared.
  • Page 44 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (c) In the condition agreement transmission for device monitoring, the head device for each block is the monitoring target for condition monitoring of each block device. For the condition agreement transmission, the monitoring conditions that can be designated for the device to be registered by the user and the registration values when designating the monitoring condition are listed in the table below.
  • Page 45: Transmission Methods Of Monitoring Results And Transmission Data To The External Device

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2.5 Transmission methods of monitoring results and transmission data to the external device The following explain the method of transmitting the programmable controller CPU monitoring results and data to the external device. (1) Data transmission to the external device while performing communication using the MC protocol (a) The same format as for the messages sent with the on-demand function is...
  • Page 46 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (d) When sending the monitoring results as data during condition agreement transmission, head data (header) and end data (footer) for the on-demand function are added to the device information for a block with matched monitoring conditions and the programmable controller CPU status information upon the occurrence of an error.
  • Page 47 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (c) When sending the monitoring results as data during condition agreement transmission, the device information of two or more user frame No. and programmable controller CPU status information that have been currently designated by the Q series C24 for the condition agreement transmission of the block where the monitoring conditions match are transmitted in batch mode.
  • Page 48 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (f) Device information and programmable controller CPU status information are sent using the data arrangement shown below. The ASCII-BIN conversion designation is designated in buffer memory address 121 /1C1 . Note that when the user frame has been designated by setting to on the value for bit 14, which indicates the user frame No., there will be ASCII-BIN conversion of corresponding send data.
  • Page 49 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION • When data for bit device (M16 to M175, (10 point)) is sent When the word/device unit designation is word unit, the device data will be sent in a (H) (L) sequence. The number of registered points is the number of points in word units.
  • Page 50 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2) When user frame No. B061 is designated Programmable controller CPU status information (for one block) is sent as the following data: when communicating when communicating Remarks with ASCII code with binary code Device code "01"...
  • Page 51 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 4) When user frame No. B081 is designated Information on monitoring results for all blocks are sent as follows: Results are sent in the following order: the device information registered in the word block, the device information registered in the bit block and then programmable controller CPU status information.
  • Page 52 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (When ASCII-BIN conversion is performed) The total number of bytes for the device data section is the number of device points When the word/byte unit designation is byte W100 W101 W102 W103 0 0 0 When the word/byte unit designation is word W100...
  • Page 53 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 5) When user frame No. B082 is designated Information on the monitoring results for the condition agreement blocks are sent for each block. Results are sent in the following order: The programmable controller CPU status information, the device information registered in the word block and then the device information registered in the bit block.
  • Page 54 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (When ASCII-BIN conversion is performed) The total number of bytes for the device data section is the number of device points When the word/byte unit designation is byte For W100 to W103 block data For M0 to M15 block data W100 W101...
  • Page 55 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (3) Notification to the interface side using the modem function (a) The notification message (text string data) contained in the user registered data for connecting the modem function is conveyed using the modem function.
  • Page 56: Execution Sequence For Using The Programmable Controller Cpu Monitoring Function

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2.6 Execution sequence for using the programmable controller CPU monitoring function The following explains the execution sequence for using the programmable controller CPU monitoring function. (1) When transmitting the monitoring results through data transmission/notification messages using the modem function, perform the following settings in order to use the modem function.
  • Page 57: Settings For Using The Programmable Controller Cpu Monitoring Function

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.3 Settings for Using the Programmable Controller CPU Monitoring Function This section describes system settings required for constant cycle transmission and condition agreement transmission. 2.3.1 System setting items for the programmable controller CPU monitoring function The following explains system setting items for the programmable controller CPU monitoring function.
  • Page 58 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (2) Setting items and requirement when performing communication using the non procedure protocol Condition agreement Constant cycle transmission transmission Setting item Reference section Data Data Notification Notification transmission transmission Cycle time units (3) (a) of this section Cycle time (3) (b) of this section...
  • Page 59 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (3) Contents of setting items The data items to be set using GX Configurator-SC to use the programmable controller CPU monitoring function and the setting contents are explained below. (a) Cycle time units •...
  • Page 60 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (g) Monitoring device, head device No., read point (Number of registered points) When performing device data monitoring or transmission, designate the device range for each block for the number of blocks designated by setting item (e), number of registered word blocks and number of registered bit blocks.
  • Page 61 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (4) Setting items for sending monitoring results The following is an example of setting items and data transmission when sending the monitoring results of the programmable controller CPU monitoring function execution to the external device using the non procedure protocol. (Example) This example shows a case in which the D0 to D3 device information and user frame data are sent by the edge trigger method using a condition of D0 = 0.
  • Page 62: How To Register And Cancel The Programmable Controller Cpu Monitoring Function

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.3.2 How to register and cancel the programmable controller CPU monitoring function The following describes the method for registering and canceling the programmable controller CPU monitoring function from the programmable controller CPU. POINT (1) For details on the method for registering and canceling the programmable controller CPU monitoring function with GX Configurator-SC, refer to the Q...
  • Page 63 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (a) Example of a program for performing programmable controller CPU monitoring registration This example shows a program that registers programmable controller CPU monitoring for the CH1 side interface. This registration is for transmitting the contents of M0 to M15 and D100 to D109 to the external device using constant cycle transmission (cycle time is 3 min).
  • Page 64: Precautionary Notes For Using The Programmable Controller Cpu Monitoring Function

    2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.4 Precautionary Notes for Using the Programmable Controller CPU Monitoring Function (1) The cycle time will be affected by the following factors. Keep these in mind when setting the cycle time. 1) When the programmable controller CPU is accessed by a module other than the Q series C24.
  • Page 65 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (7) The following describes how the Q series C24 operates when the programmable controller CPU monitoring result information cannot be sent to the external device due to line disconnection or other reasons. Even if an error occurs while the programmable controller CPU monitoring function is in operation, the ERR LED does not light up.
  • Page 66: Communications By The Modem Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3 COMMUNICATIONS BY THE MODEM FUNCTION This chapter explains the overview and how to use the modem function, which can be used for data communication with remote external devices and paging pager terminals. 3.1 Overview The overview of the modem function is described below: (1) The modem function easily performs data transmission/reception to remote devices via public lines/office telephone systems/digital lines (ISDN) by connecting...
  • Page 67: Features

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.1.1 Features The following explains the features of the modem function. (1) Interface that can use the modem function 1) The modem function can be used with the Q series C24 using an RS-232 interface.
  • Page 68 3 COMMUNICATIONS BY THE MODEM FUNCTION (4) Notification to the pager receiver 1) In order to notify to the pager receiver of the programmable controller system maintenance information, the Q series C24 performs calling and message transmission according to the user-designated connection data when the output signal from programmable controller CPU is turned from ON to OFF.
  • Page 69 3 COMMUNICATIONS BY THE MODEM FUNCTION (6) Remote password check If the remote password check has been set for the Q series C24 installed in the QCPU, the Q series C24 executes a remote password check when the programmable controller is accessed from an external device using the Q series C24 modem function.
  • Page 70: Function List

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.1.2 Function list The following lists the overview of the modem function: Function Overview Initializes the modem/TA using the user-designated initialization data (AT command). (Auto Modem/TA initialization initialization of the modem / TA is possible.) Dials the partner telephone number according to the user-designated connection data and Line connection (dialing) enables data communication after establishing the line connection.
  • Page 71: Comparisons With Related Devices

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.1.3 Comparisons with related devices The following lists the comparison with the related products which supports data communication with the programmable controller using the modem and public line, etc., similarly to the communication performed via the modem function. QJ71C24N(-R2/R4), QC24N Q6TEL...
  • Page 72: System Configuration

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.2 System Configuration This section describes system configurations when the modem function is used to call a pager receiver or to perform data communication with an external device via public lines. 3.2.1 System configuration when performing data communication with an external device The following describes the system configuration examples used when performing data communication between the external device and programmable controller using the Q series C24's MC protocol/non procedure protocol/bidirectional protocol.
  • Page 73: System Configuration When Using The Notification Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.2.2 System configuration when using the notification function The following describes the system configuration example when calling the pager receiver by the notification function. QJ71C24-R2 Q25HCPU MODE CH1. CH2. ERR. USER BAT. BOOT Public line Modem CH1.
  • Page 74: System Configuration When Connecting Gx Developer

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.2.3 System configuration when connecting GX Developer The following describes the system configuration when GX Developer performs data communication with a remote station programmable controller via Q series C24. GX Developer QJ71C24-R2 Q25HCPU MODE CH1.
  • Page 75: Precautions For System Configurations

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.2.4 Precautions for system configurations The following describes the precautionary items when configuring the system to perform data communication with an external device or call a pager receiver via public line, an office telephone system or digital line (ISDN) using the Q series C24 modem function.
  • Page 76 3 COMMUNICATIONS BY THE MODEM FUNCTION (6) Connectable lines 1) The connections can be made with the following lines. Perform connection tests beforehand and confirm that connection is possible. • Public line or office telephone system of analog two-line method •...
  • Page 77: Specifications

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3 Specifications This section explains the transmission specification on the Q series C24 side, connectable modems/TA's (terminal adapter), I/O signals related to the modem function, and buffer memory for the usage of the modem function. 3.3.1 Transmission specifications The transmission specifications on the Q series C24 side for use of the modem function are as listed below.
  • Page 78: Specification Of Connectable Modems/Tas (Terminal Adapters)

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.2 Specification of connectable modems/TAs (terminal adapters) The following table lists the specification of modems/TAs that can be connected to the Q series C24 side when the modem function is used. (1) Specification and precautions for the connectable modems (a) Modem specification Specification Item...
  • Page 79 3 COMMUNICATIONS BY THE MODEM FUNCTION 1) The modem transmits data to the partner by storing the data from the terminal in the modem buffer. 2) When the buffer in the modem becomes almost full, the modem outputs a data-transmission temporary stop request (CS (CTS) signal = OFF) to the terminal.
  • Page 80 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Specification and precautions for the connectable TA's (terminal adapters) (a) TA specification Item Specification Remarks ISDN (INS net 64) equivalent Connection line DSU and TA are required High-speed digital dedicated line TA-to-TA Initialization Hayes AT command compatible See Section 3.4.3 communication...
  • Page 81: Compatibility With The Qcpu Remote Password Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.3 Compatibility with the QCPU remote password function This section explains the Q series C24 data communication for the QCPU remote password function. Refer to Section 3.1.1 for an overview of the Q series C24 check function for the QCPU remote password.
  • Page 82 3 COMMUNICATIONS BY THE MODEM FUNCTION (When accessing other station QCPU) (When accessing the local station QCPU) A station A station ( 1) ( 1) 1) Unlock processing 1) Unlock processing Modem Modem Modem Modem 2) Access 3) Lock processing ( 2) 3) Lock processing ( 2) Remote Remote password...
  • Page 83 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Remote password check processing performed by the Q series (a) Communication in which a remote password check is performed 1) When the following parameters are set for the Q series C24 installed in the QCPU station, the Q series C24 performs a remote password check for communication requests listed below.
  • Page 84 3 COMMUNICATIONS BY THE MODEM FUNCTION (c) Stations that can be accessed when the remote password check is performed 1) If the external device performs the remote password unlock processing with respect to the Q series C24 of the directly connected station (local station) after line connection for the modem function, it can access the local station QCPU.
  • Page 85 3 COMMUNICATIONS BY THE MODEM FUNCTION (4) How to set the remote password On the screen below for setting parameters (remote password) using GX Developer, set the remote password in the QCPU and specify the Q series C24 that performs the check. Set the remote password as the following instructions.
  • Page 86 3 COMMUNICATIONS BY THE MODEM FUNCTION (5) Setting from GX Configurator-SC When the Q series C24 performs a remote password check for the remote password set in the QCPU, the remote password check setting as well as the present check results can be monitored with respect to the screen items listed in the table below.
  • Page 87: Compatibility With The Callback Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.4 Compatibility with the callback function The following describes the Q Series C24 callback function that can be used when accessing the QCPU from GX Developer connected to the Q Series C24. (1) About the Callback function What is the Callback function The callback function is a function that makes it possible to access the QCPU from GX Developer by reconnection (callback) of the line from the Q...
  • Page 88 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Data communications procedure Here, the procedure for data communications when using the callback function is shown. Q series C24 side procedure Carry out procedure of starting the modem function and data communications in accordance with Section 3.4.1. Set the callback function by GX Configurator-SC.
  • Page 89 3 COMMUNICATIONS BY THE MODEM FUNCTION If callback processing was not executed normally, an error message screen is displayed on the GX Developer side. Perform the processing operation (reconnection operation, etc.) corresponding to the displayed message. The operating state on the Q Series C24 side can be confirmed by the following items in the GX Configurator-SC monitor/test screen.
  • Page 90 3 COMMUNICATIONS BY THE MODEM FUNCTION (4) Setting and monitoring by GX Configurator-SC for use of the callback function Setting, monitoring / test items Carry out setting, monitoring and testing of the callback function using the following GX Configurator-SC screen. Setting items through the "Modem function system setting"...
  • Page 91 3 COMMUNICATIONS BY THE MODEM FUNCTION Callback function designation and callback operation outline Here the setting values for "Callback function designation" items in the "Modem function system setting" screen and an outline of the corresponding Q Series C24 callback operation are explained. Values in parentheses are values when the set values are stored in buffer memory (Address: 2001 If the connection system is set on "Auto (Callback: during fixed/Callback :...
  • Page 92 3 COMMUNICATIONS BY THE MODEM FUNCTION If it is being made possible to change the callback destination GX Developer (Setting 2 (B ) or Setting 5 (3 • Select the callback destination telephone No. if it is being specified at the time when line connections are being made from the initial GX Developer side.
  • Page 93 3 COMMUNICATIONS BY THE MODEM FUNCTION If the maximum number of callback destination GX Developer is limited to 10 modules. (Setting 3 (F ) or Setting 6 (7 • Select GX Developer to be called back if the Q Series C24 limits the callback destination to a maximum of 10 modules.
  • Page 94 3 COMMUNICATIONS BY THE MODEM FUNCTION If line connections from GX Developer are made with "Auto (Callback: during fixed/Callback: during designated number)" as the connection system (Setting 1 (9 ) to Setting 3 (F • When accessing the QCPU from GX Developer, select whether to use the callback function to make line connections or to make line connections without using the callback function.
  • Page 95 3 COMMUNICATIONS BY THE MODEM FUNCTION REMARKS I If the GX Configurator-SC's "Callback function designation" setting is performed in the Q Series C24, line connections to GX Developer are possible by the connection system listed below. The correspondence between the GX Configurator-SC "Callback function designation"...
  • Page 96: List Of I/O Signals For The Modem Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.5 List of I/O signals for the modem function The I/O signals with the programmable controller CPU for the modem function are described. Refer to the User's Manual (Basic) for the other I/O signals. (1) I/O signal list Device Device...
  • Page 97 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Function and description of each I/O signal I/O signal Signal name Function/description Description Modem initialization Indicates normal completion of the Q series C24's initialization of the modem/TA Section 3.4.5 completion connected to itself according to the initialization data designated. Indicates that the Q series C24 is dialing (connection processing) the partner side Dial in progress according to the data for connection designated.
  • Page 98: Buffer Memory

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.6 Buffer memory The buffer memory (area shown with ) that can be used with the modem function is described. Refer to the User's Manual (Basic) for the buffer memory not related to the modem function.
  • Page 99 3 COMMUNICATIONS BY THE MODEM FUNCTION Correspondence Address Dec. (Hex.) Default Application Name protocol value 57 to 127 (39 to 7F Use prohibited System area For programmable Programmable controller CPU information clear request controller CPU 128(80 0000 : No request —...
  • Page 100 3 COMMUNICATIONS BY THE MODEM FUNCTION Default Address Dec. (Hex.) Correspondence protocol Application Name value 574 to 590 Use prohibited System area (23E to 24E 3072 to 6911 User free area (3840 words) For user (C00 to 1AFF Application is determined by the user. 6912 to 6952 User registration area (Registration No.
  • Page 101 3 COMMUNICATIONS BY THE MODEM FUNCTION Default Address Dec. (Hex.) Correspondence protocol Application Name value 8207 (200F Use prohibited System area 8449 to 8458 For callback Data No. for callback designation 1 to 10 — (2101 to 210A Function 0BB8 to 0BD5 , 8001 to 801F...
  • Page 102 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Details of the buffer memory (for modern function) (a) Modem connection channel designation area (address 46 (2E The interface on the Q series C24 side to which a modem/TA is connected is designated. (b) Notification execution designation area (address 47 (2F Whether or not to perform notification (message transmission) to the pager receiver during the fall of the notification-issued request signal Y14 is designated.
  • Page 103 3 COMMUNICATIONS BY THE MODEM FUNCTION (g) Data number for initialization designation area (address 52 (34 1) The registration number for the initialization data transmitted with the initialization request to the modem on the Q series C24 side is designated. The registration number for the Q series C24 is used.
  • Page 104 3 COMMUNICATIONS BY THE MODEM FUNCTION REMARKS The overview of the RS · CS controls are described. (1) When transmission data 1) The Q series C24 detects the modem/TA data reception capability from on/off of the CS (CTS) signal. 2) When the CS (CTS) signal is on, data transmission from the Q series C24 starts or continues.
  • Page 105 3 COMMUNICATIONS BY THE MODEM FUNCTION (n) Number of data registrations for connection storage area (address 547 (223 1) Stores in Flash ROM the number of registered data for connection used by the Q series C24 for the connection processing with the partner device in order to perform data communication/notification.
  • Page 106 3 COMMUNICATIONS BY THE MODEM FUNCTION (r) Number of notification execution storage area (address 553 (229 1) Stores the number of execution of the Q series C24 notification (message transmission) processing for the pager receiver. 2) The storage value when the number of notification execution exceeds 32767 remains at 32767.
  • Page 107 3 COMMUNICATIONS BY THE MODEM FUNCTION 2) In this area, the number of bytes for the initialization data or data for connection (for 1 data) to be registered to the buffer memory is designated. 3) The registration of data for initialization is described in Section 3.4.3. The registration of data for connection is described in Section 3.4.4.
  • Page 108 3 COMMUNICATIONS BY THE MODEM FUNCTION (z) Circuit disconnect wait time designation area (programmable controller CPU watch use) (address 8206 (200E 1) When sending data using the programmable controller CPU monitoring function, designates the time it takes to complete data transmission from the local station side modem to the external device after data transmission from the Q series C24 (wait time until the circuit is disconnected).
  • Page 109 3 COMMUNICATIONS BY THE MODEM FUNCTION (4) Details of buffer memory (for the callback function) The areas shown below are valid if the Q Series C24 uses the callback function. (a) Callback function designation area (Address 8193 (2001 1) If communications are done by connecting to the GX Developer via a modem, specify whether the callback function is to be used or not.
  • Page 110 3 COMMUNICATIONS BY THE MODEM FUNCTION 4) If the callback destination GX Developer is limited to a maximum of 10 modules, specify the connection data registration No. that specify the callback destination telephone No. for a maximum of 10 modules. •...
  • Page 111: Precautions When Using The Modem Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.7 Precautions when using the modem function Precautions when using the modem function to perform data communication with an external device via public line or call to the pager receiver are described. (1) Line connection and disconnection When performing data communication with an external device, it must be predetermined which station is to perform the line connection (dialing) and disconnection processing with the partner device as well as the timings.
  • Page 112 3 COMMUNICATIONS BY THE MODEM FUNCTION (6) Initial Settings The connection data used for modem functions can be registered as follows using setting procedures. Set the telephone number and message within the permissible number of registration characters for modem/TA. 1) If registered using GX Configurator-SC •...
  • Page 113 3 COMMUNICATIONS BY THE MODEM FUNCTION (c) When the number of times remote password mismatch occurs is large 1) When the number of times notification of a remote password mismatch is received exceeds the number of times specified in buffer memory address 8204 (200C ), the Q Series C24 disconnects the line automatically.
  • Page 114 3 COMMUNICATIONS BY THE MODEM FUNCTION (9) Number of modules for which the remote password check can be A maximum of eight modules can be registered with remote passwords in the QCPU. To set the remote password in a module, use the GX Developer remote password setting screen.
  • Page 115 3 COMMUNICATIONS BY THE MODEM FUNCTION (11) Preventing a line disconnect when GX Developer is connected Perform the following settings and operations to prevent a line to the modem from disconnecting even if communication between GX Developer and programmable controller is interrupted. (a) Initial setting using GX Configurator-SC 1) Setting screen: Modem function system setting screen 2) Setting item: No-communication interval time designation...
  • Page 116 3 COMMUNICATIONS BY THE MODEM FUNCTION (Example) When the number of times a remote password mismatch occurred exceeds the notification accumulated count setting value during the remote password unlock processing in communication using MC protocol with the Q series C24 CH1 side interface used. Access enabled flag is turned ON Register initialization data for "No automatic receive"...
  • Page 117: Start-Up Of The Modem Function

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4 Start-up of the Modem Function This section explains the start-up procedures, processing methods and programming when the modem function of the Q series C24 is to be used. 3.4.1 Start-up procedures when communicating data with external devices This section shows the procedure for starting the modem function and up to the point when data communications is started.
  • Page 118 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Procedure when executing data communications indicates processing performed by the user. Line Connection Waiting side Line Connection Side Q Series C24 Q Series C24 Modem Modem External Device Perform the processing up to the Perform the processing up to the modem/TA initialization by the modem/TA initialization by the...
  • Page 119 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) If notification is made indicates processing performed by the user. Pager receiver Modem Q Series C24 (Line connection side) (1) Perform the processing up to the point where the modem/TA is initialized by the procedure in (1). Modem initialization Modem initialization completion signal (X10)=ON.
  • Page 120: Initial Settings Of The Serial Communication Module

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.2 Initial settings of the serial communication module This section explains the initial settings of the Q series C24 when data communicating with external device, remotely notifying a pager receiver and accessing from GX Developer using the modem function.
  • Page 121 3 COMMUNICATIONS BY THE MODEM FUNCTION Switch number Description Setting value Position Specified value Operation setting Independent Data bit 8 bits Parity bit CH1 transmission Odd/even parity Switch 1 setting 07E2 Stop bit 1 bit Sum check code Write during RUN Allowed Setting modification Enable...
  • Page 122 3 COMMUNICATIONS BY THE MODEM FUNCTION 1) When the programmable controller CPU is stopped when the connected signal (X12) is at the ON status. This occurs because the program write after remote stop is enabled. 2) When the programmable controller CPU performs an error stop during self-diagnosis, etc.
  • Page 123: Register/Read/Delete Of The Initialization Data

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.3 Register/read/delete of the initialization data The section explains the register/read/delete of the data for initialization such as initialization commands for the modem/TA connected to the Q series C24 side for data communication with the external device, pager receiver notification and accessing from GX Developer using the modem functions.
  • Page 124 3 COMMUNICATIONS BY THE MODEM FUNCTION When designating a registration number that has already been registered, first delete the registration data in the preoccupied registration number prior to registration. 4) When connecting the Q series C24 to an external device using a cellular phone and a modem, set the transmission rate supported by the cellular communication module on the modem side.
  • Page 125 3 COMMUNICATIONS BY THE MODEM FUNCTION (6) Procedures for register/read/delete of the initialization data (a) For the Flash ROM in the Q series C24 Register/read/delete operations are executed on the GX Configurator-SC's "Data registration for modem initialization" screen. The factory setting of initialization data stored in the Flash ROM of the Q series C24 cannot be deleted.
  • Page 126 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) For the buffer memory of the Q series C24 1) The initialization data write (registration) and read operations are performed by designating an applicable area that corresponds to registration numbers 8001 to 801F for the user frame registration area (addresses: 1B00 to 1FF6...
  • Page 127 3 COMMUNICATIONS BY THE MODEM FUNCTION 4) The following shows an example of a sequence program used to write the initialization data (registration). • Example of writing the initialization data to the area having registration number 8001 X1E: Q series C24 ready signal X1F: WDT error signal Turns the ready flag ON Data registration for...
  • Page 128: Register/Read/Delete Of The Data For Connection

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.4 Register/read/delete of the data for connection This section explains the registration/reading/deletion of data for connection such as the telephone number of the partner device and notification messages that are used for communicating data with external devices, notify pager receivers and accessing from GX Developer using the modem functions.
  • Page 129 3 COMMUNICATIONS BY THE MODEM FUNCTION (5) Procedures for register/read/delete of the data for connection (a) For the flash ROM in the Q series C24 Register/read/delete operations are executed on the GX Configurator-SC's "Data for modem connection" screen. Set the required items with the table below. GX Developer Data communication "Data for modem connection"...
  • Page 130 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) For the buffer memory of the Q series C24 1) The connection data write (registration) and read operations are performed by designating an applicable area that corresponds to registration numbers 8001 to 801F for the user frame registration area (addresses: 1B00 to 1FF6...
  • Page 131 3 COMMUNICATIONS BY THE MODEM FUNCTION (Data for connection area) … 44 bytes Data name Designated/stored value and contents Number of bytes Data type Whether or not notification is performed, and the notification target module are designated. Pager receiver 0 : No notification Binary designation 3 : Notification performed...
  • Page 132 3 COMMUNICATIONS BY THE MODEM FUNCTION (4) An example of a sequence program used for writing (registering) of data for connection is shown below. • Example of writing data for connection to the registration number 8002 area X1E: ready signal X1F: WDT error signal Turns the ready flag ON Connection data registration...
  • Page 133: Initialization Of Modem/Ta (Terminal Adapter)

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.5 Initialization of modem/TA (terminal adapter) This section explains the initialization of the modem/TA connected to the Q series C24, used for communicating data with the external device, performing notifications to pager receivers and accessing from GX Developer using the modem function. (1) Requirements for initialization Perform the following setting and registration: 1) The Q series C24 initial settings as shown in Section 3.4.2.
  • Page 134 3 COMMUNICATIONS BY THE MODEM FUNCTION 2) Output count designation area (address: 185/345 (B9 /159 The number of data for initialization units to be transmitted starting from the location set by the output head pointer designation area is designated here. : 1 data will be transmitted 100: 100 data will be transmitted (3) Precautions during modem/TA initialization...
  • Page 135 3 COMMUNICATIONS BY THE MODEM FUNCTION 2) When the line is disconnected from the Q Series C24 side (using Y12), the initialization completion signal (X10) goes off together with the connection in progress signal (X12). When connecting to the line again, do so after first initializing the modem. POINT When the line to the Q Series C24 is disconnected from the external device side, the Q Series C24's initialization completion signal (X10) does not go OFF.
  • Page 136 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) Modem/TA initialization program example An example of the modem/TA initialization program on the Q series C24 side by the programmable controller CPU is shown below. When the initialization data has been registered from GX Configurator-SC or from the programmable controller CPU.
  • Page 137: Line Connection

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.6 Line connection This section explains the connection (dialing) with the partner devices for the purpose of data communication with external devices using the modem functions. In case of notification to a pager receiver, the line is connected while the notification is being processed.
  • Page 138 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) I/O signals used in line connection Connection request signal (Y11), dial in progress signal (X11), connection in progress signal (X12) and initialization/connection abnormal completion signal (X13) are used. (Example1) When performing the line connection from the Q series C24 side only following the completion of initialization Buffer memory for connection...
  • Page 139 3 COMMUNICATIONS BY THE MODEM FUNCTION (Example2) When performing the initialization and the line connection from the Q series C24 side simultaneously Buffer memory for (See Section 3.4.5) initialization Buffer memory for connection 3000 Address: 35 (53) Normal completion Connection request Initialization completion...
  • Page 140 3 COMMUNICATIONS BY THE MODEM FUNCTION (Example) When initiating the line connection from the partner device after the completion of initialization Buffer memory for connection Address: 35 (53) Connection (OFF) request Initialization (ON) completion (OFF) Dial in progress (Normal connection) Connection in progress (Normal connection)
  • Page 141 3 COMMUNICATIONS BY THE MODEM FUNCTION 3) When reconnecting the line after disconnection, allow several seconds for the modem before turning on the Connection request (Y11). If it (Y11) is turned on immediately after line disconnection, the modem may not accept the first connection request, resulting in connection failure, and the user may be forced to wait for the retry time to elapse.
  • Page 142 3 COMMUNICATIONS BY THE MODEM FUNCTION • Example of simultaneous execution of initialization and line connection from the Q series C24 side When the initialization and connection data have been registered from GX Configurator-SC or from the programmable controller CPU X10 : Initialization complete signal X1E : Ready signal X1F : WDT error signal...
  • Page 143: Data Communication And Notification

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.7 Data communication and notification This section explains the cautions for data communication with the partner device using modem function and procedures for notification to pager receivers. (1) Requirements for data communication and notification a) When communicating data with external devices Perform the appropriate processing up to line connection or modem/TA initialization, depending on whether or not the line connection is initiated from...
  • Page 144 3 COMMUNICATIONS BY THE MODEM FUNCTION REMARKS This section explains the general procedure for non procedure protocol/bidirectional protocol (executed in full-duplex communication) data communication using the modem function between the programmable controller CPU with Q series C24 installed. Station A Station B QJ71C24-R2 QJ71C24-R2...
  • Page 145 3 COMMUNICATIONS BY THE MODEM FUNCTION b) When notifying to pager receiver 1) Initial setting by GX Configurator-SC Register the data number registration area for connection below in the "Modem function system setting" screen. to BD5 (3000 to 3029) : Data registered to the Flash ROM by the user 8001 to 801F...
  • Page 146 3 COMMUNICATIONS BY THE MODEM FUNCTION (Example 2) When abnormal completion Buffer memory for Q series C24 initial setting Notification execution designation area (Address: 2F (47)) Buffer memory for notification Data number designation 3000 area for connection (Address: 35 (53)) Modem function error code storage area (Error code)
  • Page 147 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Precautions for performing data communication and notification a) When communicating data with the external device 1) When setting the no-communication interval time to infinite wait (set value=0) in the initial setting of Q series C24, be sure to perform line disconnection after the completion of data communication.
  • Page 148 3 COMMUNICATIONS BY THE MODEM FUNCTION (4) Program for notification example An example of program for notification is shown below. When the initialization and connection data have been registered from GX Configurator-SC or from the programmable controller CPU X10: Initialization complete signal X1E: Ready signal X1F: WDT error signal M0 : Accessible flag...
  • Page 149: Line Disconnection

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.4.8 Line disconnection This section explains the line disconnection upon communication completion when communicating data with the external device using the modem functions. In case of notification to pager receivers, since the line will be disconnected at the end of the notification processing, the disconnection processing such as I/O signal disconnection request (Y12) is unnecessary.
  • Page 150 3 COMMUNICATIONS BY THE MODEM FUNCTION POINT (1) Line disconnection processing can be conducted from either device as long as the connection is in progress. (2) The line disconnection processing disconnects the line connection with the external device as well as the connection with the Q series C24 modem. (3) Even when an error occurs during the line disconnection, the disconnection processing will be forced.
  • Page 151 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Program example for line disconnection A program example for line disconnection is shown below. 3 - 86 3 - 86...
  • Page 152: Sample Programs

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.5 Sample Programs This section shows sample programs to test the connection with the remote station's programmable controller CPU to which Q series C24 is installed. Each program contains a minimum set of processing necessary for performing a exchange test.
  • Page 153: Sample Program For Data Communication-1

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.5.1 Sample program for data communication-1 (1) Sample program system configuration The configuration of a system using this sample program is shown below. 1) Line connection 2) Communications by the non-procedure protocol 3) Line disconnection Modem Modem QJ71C24-R2 2)
  • Page 154 3 COMMUNICATIONS BY THE MODEM FUNCTION <Status confirmation> Access possible Modem initialization, line connection possible Data communications possible Data transmission possible Line disconnect possible <Modem initialization, line connection processing> Conversion of modem initialization, line connection commands to pulses Modem initialization, line connection processing to sub routine <Data transmission processing (non procedure protocol)>...
  • Page 155 3 COMMUNICATIONS BY THE MODEM FUNCTION [Modem initialization, line connection processing] Set the connection request signal With the initialization completed signal ON and the connected signal ON, reset the request signal With the initialization/connection abnormally completed signal ON, read the error code and reset the request signal [Data transmission processing] Set the transmission data...
  • Page 156 3 COMMUNICATIONS BY THE MODEM FUNCTION [Line disconnection processing] Modem disconnection request signal is set When the modem disconnection completion signal is ON, the error code is read When the normal completion signal is ON, the line disconnection completion flag is set Modem disconnection request signal is reset 3 - 91...
  • Page 157 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Sample program for a connection receiving station side (QJ71C24- R2 2)) After the connection in progress signal (x12) = ON, data communications are carried out by the non procedure protocol through a command from the user. Perform the following settings before running this program.
  • Page 158 3 COMMUNICATIONS BY THE MODEM FUNCTION <Status confirmation> Access possible Data transmission possible <Data transmission processing (non procedure protocol)> Set the transmission data Set the transmission channel on CH1 Set the transmission data count Execute transmission request Transmission normally completed Transmission abnormally completed <Data reception processing (non procedure protocol)>...
  • Page 159: Sample Program For Data Communication-2

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.5.2 Sample program for data communication-2 (1) Sample program on the connection request station side Initialization for the modem connected to CH1 interface, line connection, data communication by the non procedure protocol and line disconnection are executed by commands from the user.
  • Page 160 3 COMMUNICATIONS BY THE MODEM FUNCTION Accessible flag is turned ON Modem initialization enabled flag is turned ON Line connectable flag with the remote station is turned ON Exchangeable flag with the partner station is turned ON Data transmission enabled flag to the partner station turned ON Line disconnection enabled flag with the partner station is turned ON...
  • Page 161 3 COMMUNICATIONS BY THE MODEM FUNCTION Convert the reset command of various requestb signal into pulse To the various request signal and the complete signal OFF subroutine Output the various complete flag status (LED display) Data registration processing for initialization subroutine •...
  • Page 162 3 COMMUNICATIONS BY THE MODEM FUNCTION Line connection processing subroutine • Connection request signal is set • Connection request execution flag is set • When the connection in progress signal ON, the connection complete flag is set and the request signal is reset •...
  • Page 163 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 - 98 3 - 98...
  • Page 164 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Sample program on the connection reception station side The modem initialization and data communication by the non procedure protocol are executed by commands from the user. Before executing this program, perform the following settings (changing the default values) on the GX Configurator-SC's "Modem function system setting"...
  • Page 165 3 COMMUNICATIONS BY THE MODEM FUNCTION Accessible flag is turned ON Modem initialization enabled flag is turned ON Exchangeable flag with the partner station is turned ON Data transmission enabled flag to the partner station turned ON To the data registration processing for initialization subroutine Convert the initialization command into pulse...
  • Page 166 3 COMMUNICATIONS BY THE MODEM FUNCTION Data registration processing for initialization subroutine • Sets the number of bytes of the registration data • Sets the user control data (control number) • Sets the initialization command • Write the data for initialization (Data No.
  • Page 167 3 COMMUNICATIONS BY THE MODEM FUNCTION 3 - 102 3 - 102...
  • Page 168: Sample Program For Notification

    3 COMMUNICATIONS BY THE MODEM FUNCTION 3.5.3 Sample program for notification Modem initialization and notification are executed by commands from the user. Before executing this program, perform the following settings (changing the default values) on the GX Configurator-SC's "Modem function system setting" screen and register them in the Q series C24.
  • Page 169 3 COMMUNICATIONS BY THE MODEM FUNCTION Accessible flag is turned ON Modem initialization enabled flag is turned ON Line connectable flag with the remote station is turned ON To the data registration processing for initialization subroutine To the data registration processing for connection subroutine Converts the initialization command into pulse Various complete flags after the modem...
  • Page 170 3 COMMUNICATIONS BY THE MODEM FUNCTION Data registration processing for connection subroutine • Set the number of bytes of the registration data • Clear the data storage device for connection • Set the pager receiver designation (Notification is executed) • Set the telephone number •...
  • Page 171: Receiving Data With An Interrupt Program

    4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM In data communication between the Q series C24 and the external device, an interrupt program can be used to receive data for the following data communication functions. •...
  • Page 172: Settings For Receiving Data Using An Interrupt Program

    4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4.1 Settings for Receiving Data Using an Interrupt Program The following explains the settings for performing data reception with an interrupt program during communication using the non procedure protocol or bidirectional protocol. (1) Setting by GX Developer The following settings are performed with the interrupt pointer No.
  • Page 173: Reception Control Method Using An Interrupt Program

    4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4.3 Reception Control Method Using an Interrupt Program The following explains the reception control method when receiving data with an interrupt program during communication using the non procedure protocol or bidirectional protocol. <Data reception using the dedicated instruction, BUFRCVS instruction (interrupt program)>...
  • Page 174: Programming

    4 RECEIVING DATA WITH AN INTERRUPT PROGRAM 4.4 Programming This section explains the programming when data reception is performed with an interrupt program during communication using the non procedure protocol or bidirectional protocol. 4.4.1 Program example The following shows a program example for receiving data using an interrupt program. (Program condition) •...
  • Page 175: Precautions When Receiving Data With An Interrupt Program

    4 RECEIVING DATA WITH AN INTERRUPT PROGRAM Data register Buffer memory D200 D201 Reception area No. of receive data Receive data D2nn POINT (1) When data reception is performed with an interrupt program, the dedicated BUFRCVS instruction is used regardless of whether the communication uses the non procedure protocol or bidirectional protocol.
  • Page 176 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM (6) After the power supply turns from OFF to ON or the programmable controller CPU is reset, data cannot be received because the interrupt program is invalidated during the initial processing of the programmable controller CPU. For asynchronous data communication with the Q series C24 from the external device without communication procedure setting, read the data as shown in the following program.
  • Page 177: Changing Send And Receive Data Length Units To (Word/Bytes Units (Word/(Word/Bytess Units Setting)

    5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS (WORD/BYTES UNITS SETTING) 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS (WORD/BYTES UNITS SETTING) The word units are used for the data length (count) of the amount of data sent/received using the following data communication functions in data communication between the Q series C24 and the external device.
  • Page 178 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS (WORD/BYTES UNITS SETTING) MEMO 5 - 2 5 - 2...
  • Page 179: Changing The Data Communications Monitoring Times

    6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES The monitoring times are timers used by the Q series C24 to monitor the receiving interval time between each byte when receiving data from the external device, the programmable controller CPU processing time, and the time it takes to transmit to the external device.
  • Page 180: No-Reception Monitoring Time (Timer 0) Setting

    6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6.1 No-reception Monitoring Time (timer 0) Setting The no-reception monitoring time (timer 0) is the time for clearing the Q series C24 state when the Q series C24 is placed into the data receive wait state by trouble in the external device.
  • Page 181 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES (b) Data communications using non procedure protocol (Format 0) 1) Data communications not using user frames • Passes the receive data up to time-out to the Q series C24. • Stores the error code to the data receive result storage area (buffer memory addresses 258 , 268 ) for the target interface and turns on...
  • Page 182 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES (c) Data communication using non procedure protocol (Format 1) The reception monitoring format 1 of the no-reception monitoring time (timer 0) is used for receiving a message for which the receive complete code and receive data count has not been preset.
  • Page 183 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES (2) Changing the no-reception monitoring time (timer 0) Changing the no-reception monitoring time (timer 0) The no-reception monitoring time (timer 0) is designated by the number of transmitted characters (byte count) corresponding to the data communication rate set in the interface, and then it is registered on the GX Configurator-SC's "Transmission control and others system setting"...
  • Page 184 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2) When exchanging data with the external device through the Q series C24 RS- 422/485 interface and changing the no-reception monitoring time (timer 0) (Td + T1) Vbps No-reception monitoring time (timer 0) = 1 + 12000 (Round up fractions below decimal point.) Td : Maximum delay time for external device output processing (ms)
  • Page 185: Response Monitoring Time (Timer 1) Setting

    6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6.2 Response Monitoring Time (timer 1) Setting The response monitoring time (timer 1) clears the receive wait state of the device that receives the response message when trouble in the device that received the message does not return a response message (result) to the external device.
  • Page 186 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2) Data communications using bidirectional protocol • Stores the error code to the data transmission result storage area (buffer memory addresses 257 , 267 ) for the target interface and performs transmission processing abnormal completion. •...
  • Page 187 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES POINT (2) Data communications using bidirectional protocol Set the default value to the following time, or longer. (Sequence scan time 2) + 100 ms 6 - 9 6 - 9...
  • Page 188: Transmission Monitoring Time (Timer 2) Setting

    6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6.3 Transmission Monitoring Time (timer 2) Setting The transmission monitoring time (timer 2) clears the wait state when the Q series C24 that is to transmit a message or response message (result) has entered the transmission end wait state due to trouble in the external device.
  • Page 189 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 2) Data communications using non procedure protocol or bidirectional protocol • While waiting for the end of transmission of a message, the Q series C24 stores the error code to the data transmission result storage area (buffer memory addresses 257 , 267 ) for the target interface and...
  • Page 190 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES REMARKS Criteria when changing the transmission monitoring time (time 2) setting Find the transmission monitoring time (timer 2) time from the maximum delay time of external device message receive processing or response message transmission processing and the transmission time/byte (t) and change the set value.
  • Page 191: Message Wait Time Setting

    6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES 6.4 Message Wait Time Setting The message wait time is used during data communications using a MC protocol. It is the time for an external device that cannot receive the data immediately after it has been transmitted.
  • Page 192: Data Communications Using Dc Code Transmission Control

    7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL The transmission control function controls (termination, restart) the transmission and reception of data between the Q series C24 and external device by turning transmission control signals on and off, or by transmitting and receiving DC codes (DC1, DC2, DC3, DC4), or informs the range of validity for the data to the external device.
  • Page 193: Control Contents Of Dtr/Dsr (Er/Dr) Signal Control

    7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7.1 Control Contents of DTR/DSR (ER/DR) Signal Control This control uses the RS-232 interface DTR/DSR signals to inform the external device whether or not the local station is ready to receive data. The Q series C24 uses the ER (DTR) signal to inform the external device whether or not the local station is ready to receive data and uses the DR (DSR) signal to check if the external device is ready to receive data.
  • Page 194 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL Specification of free OS area The limit of free OS area for data reception under the DTR/DSR (ER/DR) signal control is specified in GX Configurator-SC's "Transmission control and others system setting". When it reaches the limit, this status is notified to disable data reception. The set values must satisfy the following condition.
  • Page 195: Control Contents Of Dc Code Control

    7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7.2 Control Contents of DC Code Control This control uses the Q series C24 transmission control data to inform the external device whether or not local station is ready to receive data and the valid range of the send and receive data.
  • Page 196 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL REMARKS • "Receive data clear" described in the User's Manual (Basic) clears the data stored in the OS area. • If more data is received when the vacant OS area mentioned above is 0 bytes, an SIO error is generated and the data received until the OS area becomes vacant is ignored.
  • Page 197 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL (a) Q series C24 DC2/DC4 transmission control contents When transmitting data to an external device, the Q series C24 adds the DC2 code to the head of the send data and the DC4 code to the end of the send data.
  • Page 198: Precautions When Using The Transmission Control Functions

    7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL 7.3 Precautions when Using the Transmission Control Functions The following describes the precautions to be observed when using the Q series C24 transmission control functions. (1) Agreement between external device and programmable controller The external device and programmable controller CPU must agree to the following.
  • Page 199 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL POINT If the user data received from the external device includes the relevant DC code when DC1/DC3 reception control and DC2/DC4 reception control are used, the Q series C24 uses the corresponding DC code control. If the user data transmitted from the programmable controller CPU includes a DC code, it is sent unchanged.
  • Page 200: Data Communications Using Half-Duplex Communications

    8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS 8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS For data communications between the Q series C24 and an external device using the RS-232 interface, it is set so that the Q series C24 and the external device do not transmit data at the same time.
  • Page 201: Data Transmission And Reception Timing

    8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS 8.2 Data Transmission and Reception Timing Half-duplex communications uses the Q series C24 RS-232 interface CD (DCD) and RS (RTS) signals to control communications. If the external device can transmit and receive data according to ON/OFF of the Q series C24 RS (RTS) and CD (DCD) signals as shown below, half-duplex communications is possible.
  • Page 202 8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS (b) When Q series C24 is designated "non-priority" The contents of steps 4 and 5 below are different from those of item (a). 1) When transmitting data, check the RS (RTS) signal. If the RS (RTS) signal is OFF, turn ON the CD (DCD) signal.
  • Page 203 8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS (2) Timing when data is transmitted from the Q series C24 The Q series C24 RS (RTS) signal is controlled and data is transmitted according to the "simultaneous transmission priority/non-priority" value registered in "Transmission control and others system setting" screen of GX Configurator-SC. (a) When Q series C24 is designated "priority"...
  • Page 204 8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS (b) When Q series C24 is designated "non-priority" The contents of steps 4 and 5 below are different from those of item (a). 1) When transmitting data, check the Q series C24 CD (DCD) signal. If the CD (DCD) signal is off, turn on the Q series C24 RS (RTS) signal.
  • Page 205: Changing The Communication System

    8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS 8.3 Changing the Communication System To change the data communication mode from full-duplex communication to half- duplex communication, registration on the GX Configurator-SC's "Transmission control and others system setting" screen is required. The following explains setting items for changing the communication system. (1) RS-232 communication system designation Designate either full-duplex or half-duplex communication.
  • Page 206: Connector Connections For Half-Duplex Communications

    8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS 8.4 Connector Connections for Half-duplex Communications The following explains the functions of the connector that connects the Q series C24 and external device when half-duplex communications are used. Connect the Q series C24 and external device based on (1) and (2) below. (1) Connect the Q series C24 RS (RTS) signal to one of the external device half- duplex communications signals (CS (CTS), DR (DSR), or CD (DCD) signal).
  • Page 207: Half-Duplex Communications Precautions

    8 DATA COMMUNICATIONS USING HALF-DUPLEX COMMUNICATIONS 8.5 Half-duplex Communications Precautions The following describes the precautions to be observed when using half-duplex communications. (1) Half-duplex communications system configuration and functions Half-duplex communications is possible only with a system that connects the programmable controller CPU and external device in a 1: 1 configuration.
  • Page 208: Contents And Registration Of The User Frames For Data Communication

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION User frames are used to register some, or all, of the messages exchanged between an external device and the Q series C24 in advance and use them to check the send data or receive data.
  • Page 209 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION (d) User frames can be overwritten to the Q series C24 buffer memory. (The old contents are destroyed.) (e) The registration destination for the user frame can be divided into the following usage.
  • Page 210 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION Changeable data Calculation Detailed Data contents transmitted and received/Q series C24 handling register code range ( explanation 1st byte 2nd byte Transmission: Transmits the data code 00 (NUL) data (1 byte). Reception: Skips the given part (1 byte) of the receive user frame.
  • Page 211 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 3 Calculation ranges for the register codes Range 4 Range 4 Range 3 Range 3 User frame User frame User frame User frame User frame User frame Arbitrary data (1st) (2nd) ("n-1"th)
  • Page 212 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 1) Q series C24 processing corresponding to register codes FF and 00 The following uses an example to describe the processing performed by the Q series C24 when it receives a user frame part corresponding to register codes FF and 00 Assume that a user frame containing the data codes 02...
  • Page 213 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION • How to calculate the horizontal parity code This is a numeric value obtained by calculating the XOR for the subject data and then converting it to ASCII code. (In the case of the example) "1"...
  • Page 214 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 5) Transmission/reception data corresponding to register codes FF to FF The sum check code that calculates the subject range for transmission/reception data (message) is expressed as the binary code/ ASCII code data listed below, then transmitted and received. Register code Data contents transmitted and received The lower 2 bytes of the calculated sum check code are transmitted...
  • Page 215 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 6) Transmission/reception data corresponding to register code FF The sum check code resulted from the calculation of the transmission/reception data (message) codes except the first one frame and last one frame is expressed as the ASCII code data and transmitted or received.
  • Page 216: Default Registration Frame (Read Only)

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.1.2 Default registration frame (read only) This frame is registered to the Q series C24 in advance and can be used in the same way as the other user frames. (1) Overview The default registration frame is registered in the OS ROM of the Q series C24.
  • Page 217 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 1 The combination of FF in the register code is used to handle variable data (sum check code, Q series C24 station No., etc.) as part of the user frame.
  • Page 218: Transmission/Reception Processing Using User Frame Register Data

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.2 Transmission/Reception Processing Using User Frame Register Data The following explains how the Q series C24 transmits and receives using user frame register data. The Q series C24 checks the transmission/reception of following data, using registered data. (1) Transmission (a) If user frame transmission is designated, the user frame is converted, or not converted, from ASCII to BIN data and transmitted, depending on the data...
  • Page 219 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION REMARKS With a multidrop link, the user frame includes data that identifies which station transmitted the message to the external device to facilitate generation of arbitrary send data. External device Data that identifies the transmitting station to the external device...
  • Page 220 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION (2) Reception (a) When setting for reception by user frame is performed, and the first frame is set, the Q series C24 receives the message when it receives data with the same contents as the designated first frame.
  • Page 221 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION REMARKS With a multidrop link, if the receive user frame inherent to each Q series C24 is connected to the link in advance, the Q series C24 of a given station will store only the arbitrary data area of the message transmitted by the external device to the receive data storage area.
  • Page 222: Precautions When Registering, Reading, Deleting And Using User Frames

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.3 Precautions when Registering, Reading, Deleting and Using User Frames The following shows the precautions which should be observed when registering user frames and using registered user frames to transmit data to and receive data correctly from the external device.
  • Page 223 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION (2) Precautions when using user frames (a) To send/receive data using the user frames, it is necessary to set the user frame number to be used in the buffer memory prior to data transmission/reception (receive user frames must be set at the startup of the Q series C24).
  • Page 224: Register/Read/Delete User Frames

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.4 Register/Read/Delete User Frames The following explains registering, reading, and deleting user frames in the Q series C24 flash ROM or buffer memory. POINT When registering, reading and deleting the user frames in the flash ROM, try to register them using the utility package (GX Configurator-SC) of the Q series C24.
  • Page 225 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION POINT Conduct registering, reading, and deletion of the user frame from the sequence program when data communication is not being conducted with external device. (3) Buffer memory to use Address (Hexadecimal Processing Name...
  • Page 226 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 1) Registration data byte count designation area (Addresses: 5 , 1B00 1B29 ,..., 1FCE • Indicates the total number of bytes of register data of the user frame to be registered/read. •...
  • Page 227: Registering User Frames

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.4.1 Registering user frames The following shows an example of a sequence program when registering user frames in the Q series C24 flash ROM. For details on the PUTE instruction, see Section 17.7. Data set for the program example are as follows: Setting item Setting data...
  • Page 228: Reading User Frames

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.4.2 Reading user frames The following shows an example of a sequence program when reading user frames registered in the Q series C24 flash ROM. For details on the GETE instruction, see Section 17.5. (When the Q series C24 I/O signals are X/Y80 to X/Y9F) Read request Sets the frame No.
  • Page 229: Deleting User Frames

    9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.4.3 Deleting user frames The following shows an example of a sequence program when deleting user frames registered in the Q series C24 flash ROM. For details on the PUTE instruction, see Section 17.7. (When the Q series C24 I/O signals are X/Y80 to X/Y9F) Deletes request Sets the delete request...
  • Page 230: On-Demand Data Communications Using User Frames

    10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES During communications between external device and programmable controller CPU using the MC protocol, on-demand data can be transmitted from the programmable controller CPU to the external device by on-demand function using user frames. This chapter explains the transmission of the data specified by the programmable controller CPU using a message format other than the message formats (A compatible 1C frame formats 1 to 4, QnA compatible 4C frame format 5) described in the...
  • Page 231: User Frame Types And Registration

    10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 10.2 User Frame Types and Registration Data communications using user frames can be performed by registering the user frames to the Q series C24 from an external device and the programmable controller CPU. Chapter 9 explains the types of user frames and the data that can be used.
  • Page 232 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 2) On-demand data list The following shows the user frame designation on-demand data list. On-demand data User frame User frame Send data User frame User frame Transmitted when last frame (2nd) designated. Transmitted when last frame (1st) designated. On-demand instruction/transmitted when send data designated in buffer memory.
  • Page 233: On-Demand Function Control Procedure During User Frame Use

    10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 10.4 On-Demand Function Control Procedure During User Frame Use The following uses examples to explain the control procedure when using the on- demand function to frame to transmit on-demand data to an external device by user frame.
  • Page 234 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES [Control procedure] Added by Q series C24 First frame (1st) External device First frame (2nd) Last frame (1st) User User frame Send data frame (Data name) User frame registration code , FF FFH,F1H Programmable controller CPU Send data corresponding to 0 0 1 2 3 4 5 6 7 8...
  • Page 235: Data Communications Using The Binary Code

    10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 10.4.2 Data communications using the binary code The following shows the control procedure when performing switch settings via GX Developer and registration via GX Configurator-SC. (1) Switch settings via GX Developer 1) Set the "Communication protocol setting" to "MC protocol (format 5)". 2) Set the "Station number"...
  • Page 236 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES [Control procedure] Added by Q series C24 External device First frame (1st) Last frame (1st) User frame Send data User frame (Data name) User frame registration code Programmable controller CPU Send data corresponding to registration code (Example) Send data code...
  • Page 237: Example Of An On-Demand Data Transmission Program Using User Frames

    10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 10.5 Example of an On-Demand Data Transmission Program Using User Frames The following shows an example of a sequence program when sending on-demand data including user frames. Perform the following settings via GX Developer and registration using GX Configurator-SC in advance.
  • Page 238 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES (3) Program example The following program example shows the transmission of on-demand data using the on-demand function. Designate two words of transmission data with the ONDEMAND instruction. The data for the user frame section of on-demand data to be sent is the registered data for the user frame No.
  • Page 239: Data Communications Using User Frames

    11 DATA COMMUNICATIONS USING USER FRAMES 11 DATA COMMUNICATIONS USING USER FRAMES Registering the fixed format portion of the message transmitted/received by the opposite device and the Q series C24 as a user frame beforehand allows data transmission/reception using a user frame. The use of the user frame to perform data transmission/reception facilitates the creation of transmission data on the programmable controller CPU side and a simplified sequence program for checking the reception data.
  • Page 240: Overview Of Data Communication Procedure

    11 DATA COMMUNICATIONS USING USER FRAMES 11.1 Overview of Data Communication Procedure The following is an overview of the procedure when performing data communication between the opposite device and programmable controller CPU using a user frame. Start Switch setting by GX Developer. •...
  • Page 241: Data Reception

    11 DATA COMMUNICATIONS USING USER FRAMES 11.2 Data Reception In data reception using the user frame, the reception method on the Q series C24 side includes format 0 and format 1. This section explains data reception for each format. 11.2.1 About reception data In reception using the user frame, data arranged as indicated below can be received.
  • Page 242 11 DATA COMMUNICATIONS USING USER FRAMES 2 If data of other than 30 to 39 and 41 to 46 are received as the data code of the arbitrary data area (including the transparent code data), the Q series C24 ASCII-BIN conversion will generate an error. 3 Receive data arbitrary data area 1) When the arbitrary data area is stored to the receive area, and the storage byte count is an odd number of bytes, the receive data count...
  • Page 243 11 DATA COMMUNICATIONS USING USER FRAMES (1) Reception with the first frame (combination 1-A to C) (reception using Format-0) (a) Reception of combination (1-A) 1) In this method, any data section of the reception message that can be handled by the programmable controller CPU side is enclosed by the first frame and the last frame and transmitted from the external device.
  • Page 244 11 DATA COMMUNICATIONS USING USER FRAMES (c) Reception of combination (1-C) 1) In this method, start of data transmission from the external device to the programmable controller CPU side is notified by the first frame, after which arbitrary data of a fixed length is repeatedly transmitted from the external device.
  • Page 245 11 DATA COMMUNICATIONS USING USER FRAMES (Example 2) By specifying a user frame, in which only NAK (15 ) is registered, as the first frame and also specifying exclusive format-1 received data count for arbitrary data as 2 bytes, a read request will be performed to the programmable controller CPU upon the reception of NAK + 2-byte data.
  • Page 246 11 DATA COMMUNICATIONS USING USER FRAMES (b) Reception of combination (2-B) 1) In this method, a user frame is used as the last frame in place of the non procedure protocol data receive complete code, and fixed format data is transmitted from the external device.
  • Page 247 11 DATA COMMUNICATIONS USING USER FRAMES REMARKS The following shows the difference in how reception data for each reception method (Format-0 and Format-1) is treated when data is received using the combination of (first frame + arbitrary data). (1) When data is received using Format-0 (combination (1-C)) 1) The Q series C24 regards all arbitrary data after the first frame as valid data and stores it sequentially in the reception area.
  • Page 248: Timing For Start/Completion Of Data Reception

    11 DATA COMMUNICATIONS USING USER FRAMES 11.2.2 Timing for start/completion of data reception This section explains the reading of reception data based on the user frame and other factors (such as the receive complete code and received data count) during data reception using a user frame.
  • Page 249 11 DATA COMMUNICATIONS USING USER FRAMES (2) Timing chart for reception processing using the Q series C24 The following is a timing chart for the reception processing when data reception is performed using the user frame, which includes the reception processing using the received data count.
  • Page 250 11 DATA COMMUNICATIONS USING USER FRAMES [Combination with the first frame] Timing patterns for reception start and receive complete (read) (For data reception with format-0) Pattern No. 1-A 1) Pattern No. 1-A 2) External device Arbitrary data Arbitrary data side Equaling the Equaling the Programmable...
  • Page 251 11 DATA COMMUNICATIONS USING USER FRAMES [Combination without the first frame] Timing patterns for reception start and receive complete (read) Pattern No. 2-A 1) Pattern No. 2-A 2) Arbitrary data Arbitrary data External device side Programmable Equaling the received controller CPU data count side Pattern No.
  • Page 252: Receive Procedure

    11 DATA COMMUNICATIONS USING USER FRAMES 11.2.3 Receive procedure The following shows the receive procedure when a message, including data with the same arrangement as the specified user frame, is received and the arbitrary data is read to the programmable controller CPU. Procedure (When the CH1 side interface of the Q series C24 receives data) 1 See Sections 11.2.1 and 11.2.2 regarding the reading of reception data using a...
  • Page 253: User Frame Setting For Reception

    11 DATA COMMUNICATIONS USING USER FRAMES 11.2.4 User frame setting for reception (1) About user frame setting for reception This setting is to receive data from the opposite device using non procedure protocol through the use of a user frame. Everything is set on the GX Configurator-SC "Non procedure system setting"...
  • Page 254 11 DATA COMMUNICATIONS USING USER FRAMES (2) Initial settings via GX Configurator-SC ("Non procedure system setting" screen) This section explains the buffer memory when setting various setting data for data reception using a user frame in a sequence program. (Numbers in the parentheses indicate the buffer memory address.) User frame use enable/disable designation (addresses: AD /14D...
  • Page 255 11 DATA COMMUNICATIONS USING USER FRAMES [How to specify the first frame No. and the last frame No.] Set the frame numbers using the following setting method. (1) For the receive user frames, the first frame and last frame are set as a pair, regardless of whether the external device transmits these frames.
  • Page 256 11 DATA COMMUNICATIONS USING USER FRAMES (c) User frame receive format designation (address: 2020 to 2023 /2120 2123 In data reception using a user frame, specify the reception method for each combination of receive user frames. This setting is valid in a setting shown in (2) (b) when it is set using a combination that specifies a user frame.
  • Page 257 11 DATA COMMUNICATIONS USING USER FRAMES (3) Examples of registering a receive user frame The following are examples of pre-registering a receive user frame on the CH1 side with the GX Configurator-SC. (a) When the first frame is specified In the example, the following three combinations are registered for the receive user frame.
  • Page 258 11 DATA COMMUNICATIONS USING USER FRAMES (b) When the first frame is not specified In the example, the following three combinations are registered for the receive user frame. [Setting conditions] User frame receive Exclusive format-1 User frame Remarks format designation received data count (Last frame only) combination...
  • Page 259: Receive Program

    11 DATA COMMUNICATIONS USING USER FRAMES 11.3 Receive Program This section shows examples of the sequence program to read the reception data stored in the Q series C24 buffer memory to the programmable controller CPU, when data including the user frame is received. 11.3.1 Sequence program example In the program examples provided in this section, data reception by the user frame is indicated based on the following:...
  • Page 260 11 DATA COMMUNICATIONS USING USER FRAMES Address in DEC (HEX) Name Set value 8224 (2020 User frame receive format designation, 1 : Format 0 8225 (2021 User frame receive format designation, 2 : Format 1 8226 (2022 User frame receive format designation, 3 : Format 1 8227 (2023 User frame receive format designation, 4...
  • Page 261 11 DATA COMMUNICATIONS USING USER FRAMES (1) Sequence program example when using GX Configurator-SC For details on the INPUT instruction, refer to the User's Manual (Basic). Q series C24 Address Buffer memory User frame use control designation (Sequence program) (1st) Sets the receive user frame First frame 1st set...
  • Page 262 11 DATA COMMUNICATIONS USING USER FRAMES (2) Sequence program example when not using GX Configurator-SC For details on the INPUT instruction, refer to the User's Manual (Basic). <<User frame reception setting>> <Frame No. 8001H setting > <Frame No. 8002H setting >...
  • Page 263 11 DATA COMMUNICATIONS USING USER FRAMES <First frame No. (for reception) designation, 1st to 4th> <Last frame No. (for reception) designation, 1st to 4th> <Reception format designation 2 to 3, format-1 specified> User frame setting for reception (See Section 11.2.4.) <Format-1 received data count designation 2 to 3>...
  • Page 264: Application Example For Data Reception Using A Combination That Specifies The First Frame

    11 DATA COMMUNICATIONS USING USER FRAMES 11.3.2 Application example for data reception using a combination that specifies the first frame In the description of this program example, conditions for data reception using a user frame are as follows. (1) The Q series C24 I/O signal The Q series C24 is installed at QCPU I/O signal addresses X/Y80 to X/Y9F.
  • Page 265 11 DATA COMMUNICATIONS USING USER FRAMES (a) When receiving with a combination of the first frame, arbitrary data and last frame (reception using Format-0) 11 - 27 11 - 27...
  • Page 266 11 DATA COMMUNICATIONS USING USER FRAMES (b) When receiving with a combination of the first frame and arbitrary data (reception using Format-0) 11 - 28 11 - 28...
  • Page 267 11 DATA COMMUNICATIONS USING USER FRAMES (c) When receiving with user frame only (reception using Format-0) 11 - 29 11 - 29...
  • Page 268 11 DATA COMMUNICATIONS USING USER FRAMES (d) When receiving with first frame only (reception using Format-1) 11 - 30 11 - 30...
  • Page 269 11 DATA COMMUNICATIONS USING USER FRAMES (e) When receiving with a combination of the first frame and arbitrary data (Exclusive format-1 dedicated received data count) (reception using Format-1) 11 - 31 11 - 31...
  • Page 270: Application Example For Data Reception Using A Combination That Does Not Specify The First Frame

    11 DATA COMMUNICATIONS USING USER FRAMES 11.3.3 Application example for data reception using a combination that does not specify the first frame In the description of this program example, conditions for data reception using a user frame are as follows. (1) The Q series C24 I/O signal The Q series C24 is installed at QCPU I/O signal addresses X/Y80 to X/Y9F.
  • Page 271 11 DATA COMMUNICATIONS USING USER FRAMES When receiving using arbitrary data and last frame combination. (reception using Format-0) 11 - 33 11 - 33...
  • Page 272: Data Transmission

    11 DATA COMMUNICATIONS USING USER FRAMES 11.4 Data Transmission This section explains the arrangement of the transmission data and transmission procedure when transmitting data using a user frame. 11.4.1 Send data The following describes the data list, codes, and handling of the Q series C24 send data during user frame data transmission.
  • Page 273 11 DATA COMMUNICATIONS USING USER FRAMES POINT Handling of the Q series C24 send data (1) The data of the user frame and the data of the transmission area designated from the programmable controller CPU are transmitted in the contents and order set in the buffer memory send user frame designation area.
  • Page 274: Transmission Procedure

    11 DATA COMMUNICATIONS USING USER FRAMES 11.4.2 Transmission procedure The following describes the transmission procedure when a message containing user frames is transmitted to the external device. Procedure External device Arbitrary User frame User frame User frame User frame data area Programmable [Transmission controller CPU ( 1)
  • Page 275: Settings For Transmission User Frames

    11 DATA COMMUNICATIONS USING USER FRAMES 11.4.3 Settings for transmission user frames These settings are required for sending data to an external device via user frames and the non procedure protocol. These settings are made from the GX Configurator-SC or the programmable controller CPU.
  • Page 276 11 DATA COMMUNICATIONS USING USER FRAMES (Example) Sending data in the following sequence Sending Contents of sent/registered Transmission data type User frame No. sequence data User frame (STX) User frame 3E82 1000) , 3B (station No., ":") Arbitrary data 8000 (—32768) , 42 , 43...
  • Page 277 11 DATA COMMUNICATIONS USING USER FRAMES (b) Transmission user frame designation The following explains application of the buffer memory to be used when sending data using user frames, along with the designated and stored values. 1) User frame being transmitted storage area (addresses: B6 /156 What number of the transmission frame number designation area is being sent is stored in the data transmission via user frames.
  • Page 278 11 DATA COMMUNICATIONS USING USER FRAMES 4) Output count designation area (addresses: B9 /159 Write the output count of the user frames to be sent from the position designate in the output head pointer designation area. Buffer memory address 0 to 100 (CH1 side) (CH2 side) 0 to 100...
  • Page 279: Transmission Program

    11 DATA COMMUNICATIONS USING USER FRAMES 11.5 Transmission Program The following are examples of a sequence program when the user frame (four) and transmission area data are transmitted. In the description of the sample programs, data transmission using user frames is described for the following conditions case: 1) The Q series C24 I/O signals The Q series C24 installed at QCPU I/O signal addresses X/Y80 to X/Y9F.
  • Page 280 11 DATA COMMUNICATIONS USING USER FRAMES (1) Example of a sequence program when setting is done using the GX Configurator-SC See Chapter 17 of this manual for details on the PRR command. External device side (Total number) Transmission area data Four bytes of data in the O T A L (arbitrary data section)
  • Page 281 11 DATA COMMUNICATIONS USING USER FRAMES (2) Example of a sequence program when setting is not done using the GX Configurator-SC The following is the method of data transmission without performing the transmission frame No. designation using the GX Configurator-SC. For further details on the PRR instruction, see Chapter 17 of this manual.
  • Page 282: Transparent Codes And Additional Codes

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12 TRANSPARENT CODES AND ADDITIONAL CODES Transparent codes and additional codes are used during data communication with an external device to send/receive one-byte data for transmission control on the external device side as user data. Transparent codes and additional codes are handled in data communication using the non procedure or bidirectional protocol.
  • Page 283: Registering Transparent Codes And Additional Codes

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.2 Registering Transparent Codes and Additional Codes To control transparent codes and additional codes for data to be sent/received with the non procedure or bidirectional protocol, it is necessary to perform settings in the Q series C24 prior to data communication.
  • Page 284: Handling Transparent Codes And Additional Codes During Non Procedure Protocol Data Communication

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.3 Handling Transparent Codes and Additional Codes during Non Procedure Protocol Data Communication The following explains the handling of transparent codes and additional codes during non procedure protocol data communication. (1) The data designated by the additional code will be added to or deleted from the data to be transmitted or received.
  • Page 285 12 TRANSPARENT CODES AND ADDITIONAL CODES When sending the data for the section designated by 4001 to 44AF C000 to C01F , data will be sent without conversion even if "Enable" has been specified in the ASCII-BIN conversion designation area. (See Section 13.3.) Designation No.
  • Page 286 12 TRANSPARENT CODES AND ADDITIONAL CODES (3) The following describes the processing steps taken by the Q series C24 when performing communication with the transparent code designation and the ASCII- BIN conversion enabled. (a) Communication using arbitrary format 1) Receiving •...
  • Page 287 12 TRANSPARENT CODES AND ADDITIONAL CODES (Example) When ASCII-BIN conversion is not performed External device Q series C24 (Communicating in an arbitrary format) Head data Buffer memory (transmission area/reception area) Transmission data Send count/Receive data (0002 Arbitrary data section count , 02 (0212 Transmission data/...
  • Page 288 12 TRANSPARENT CODES AND ADDITIONAL CODES (b) Communication using user frames 1) Receiving • Reception check of user frames (first frame, last frame) is performed. • If a receive transparent code is designated, the additional code designation data is deleted (removed) from the arbitrary data section. •...
  • Page 289: Example Of Data Communication Using The Non Procedure Protocol

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.4 Example of Data Communication Using the Non Procedure Protocol This section shows examples of data communication using the non procedure protocol when the following settings and registrations are made. (1) Settings via GX Developer Perform the following settings on the "Intelligent functional module switch setting"...
  • Page 290: Example Of Data Reception

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.4.1 Example of data reception The following shows an example of storing receive data in the data register. (1) Receiving based on the receive complete code Additional code: 10 (DLE), transparent code: 02 (STX), complete code: 0D0A (CR + LF) POINT When the receive transparent code designation is set to Enable and the ASCII-BIN...
  • Page 291 12 TRANSPARENT CODES AND ADDITIONAL CODES (2) Receiving based on the completed data count Additional code: 10 (DLE), transparent code: 02 (STX), Completed data count: Six words or 12 bytes POINT When the receive transparent code designation is set to Enable and the ASCII-BIN conversion is set to Disable, the codes for receivable data and those for receive data that is stored in the buffer memory's reception area are as follows: Codes stored in the...
  • Page 292: Example Of Data Transmission

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.4.2 Example of data transmission The following shows an example of data transmission. 1) Additional code: 10 (DLE), transparent code: 02 (STX) External device side Additional code (Q series C24 deletes) Head data Transparent code For word unit: Programmable Received byte count excluding additional code (12)/2=6...
  • Page 293 12 TRANSPARENT CODES AND ADDITIONAL CODES 2) Additional code: 10 (DLE), transparent code: 02 (STX) (1st group) Additional code: 10 (DLE), transparent code: 03 (ETX) (2nd group) Additional Additional code code (1st group) (2nd group) External device side Transparent Transparent Head data code code...
  • Page 294: Handling Transparent Codes And Additional Codes During Bidirectional Protocol Data Communication

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.5 Handling Transparent Codes and Additional Codes During Bidirectional Protocol Data Communication The following explains the handling of transparent codes and additional codes during data communication using the bidirectional protocol. (1) The additional code designation data will be added to or deleted from the data that is sent or received.
  • Page 295 12 TRANSPARENT CODES AND ADDITIONAL CODES (3) The following are the processing steps taken by the Q series C24 when performing communication with the transparent code designation and ASCII-BIN conversion enabled. POINT Explained above is how the Q series C24 processes communication data, when enabling and disabling the ASCII-BIN conversion function and/or transparent code designation communication function.
  • Page 296 12 TRANSPARENT CODES AND ADDITIONAL CODES 3) If a send transparent code is designated, additional code data is added preceding the transparent code/additional code data for the arbitrary data section, and is then sent. External Q series C24 device (Transparent code designation) (Sum check code setting) (ASCII-BIN conversion designation) (Arbitrary data section only)
  • Page 297: Example Of Data Communication Using The Bidirectional Protocol

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.6 Example of Data Communication Using the Bidirectional Protocol This section shows examples of the bidirectional protocol data communication when the following settings and registrations are made. (1) Settings via GX Developer Perform the following settings on the "Switch setting" screen. Setting item Setting value Remarks...
  • Page 298: Example Of Data Reception

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.6.1 Example of data reception The following shows an example of storing receive data in the data register. (1) When the receive transparent code designation is set to Enable and the ASCII-BIN conversion is set to Disable Additional code: 10 (DLE), transparent code: 02 (STX)
  • Page 299 12 TRANSPARENT CODES AND ADDITIONAL CODES (2) When the receive transparent code designation is set to Enable and the ASCII-BIN conversion is set to Enable Additional code: 10 (DLE), transparent code: 02 (STX) Data length Data section check (0004 code External device side Programmable Exclude the additional code and set to an even byte.
  • Page 300: Example Of Data Transmission

    12 TRANSPARENT CODES AND ADDITIONAL CODES 12.6.2 Example of data transmission The following shows an example of data transmission. (1) When the send transparent code designation is set to Enable and the ASCII-BIN conversion is set to Disable Additional code: 10 (DLE), transparent code: 02 (STX) (1st group) Additional code: 10...
  • Page 301 12 TRANSPARENT CODES AND ADDITIONAL CODES (2) When the send transparent code designation is set to Enabled and the ASCII-BIN conversion is set to Enabled Additional code: 10 (DLE), transparent code: 02 (STX) (1st group) Additional cede: 10 (DLE), transparent code: 03 (ETX) (2nd group) External device side Data length...
  • Page 302: Communicating With Ascii Code (Ascii-Bin Conversion)

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) This chapter explains the binary-to-ASCII conversion (called ASCII-BIN conversion) in order to send/receive data in ASCII format to/from an external device. 13.1 ASCII-BIN Conversion ASCII-BIN conversion is a data conversion function that converts all data communicated between the Q series C24 and an external device to ASCII code data.
  • Page 303: Performing Ascii-Bin Conversion For Data Communicated Via Non Procedure Protocol

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.3 Performing ASCII-BIN Conversion for Data Communicated via Non Procedure Protocol This section explains the ASCII-BIN conversion of data to be communicated using the non procedure protocol. (1) The following shows the range of send/receive data for which ASCII-BIN conversion can be performed: Applicable data range at transmission Message at transmission/...
  • Page 304 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) Even if ASCII-BIN conversion is "enabled," it is possible to transmit data without converting the data in any user frame portion or buffer memory transmission area. When sending data without ASCII-BIN conversion, specify the user frame No. using the following method. •...
  • Page 305: Example Of Data Communication Using The Non Procedure Protocol

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.4 Example of Data Communication Using the Non Procedure Protocol This section shows examples of data communication using the non procedure protocol when the following settings/registrations are made. (1) Settings via GX Developer Perform the following settings on the "Intelligent function module switch setting"...
  • Page 306: Example Of Data Reception

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.4.1 Example of data reception The following shows an example of data reception: (1) Reception using the receive complete code Complete code: 9 ..(the code after ASCII-BIN conversion) POINT (1) When ASCII-BIN conversion is enabled, the codes of receivable data and the codes of receive data that is stored in the reception area of the buffer memory are as follows: Receivable codes...
  • Page 307 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) (2) Reception based on the received data count POINT When the receive transparent code designation is set to Disable and ASCII-BIN conversion is enabled, the codes of receivable data and the codes of receive data that is stored in the reception area of the buffer memory are as follows: Receivable codes Codes stored in the reception area...
  • Page 308 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) (3) Example of reception using user frames 13 - 7 13 - 7...
  • Page 309: Example Of Data Transmission

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.4.2 Example of data transmission The following shows an example of data transmission: (1) Example of arbitrary data transmission External device side Eight characters of data Data transmission area Programmable in the transmission area (arbitrary data section) controller CPU side are sent in two characters...
  • Page 310 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) (2) Example of transmission by user frame External device side Eight characters of data Data in transmission area (Total number) O T A (arbitrary data section) in the transmission area Programmable are sent in two characters controller CPU side (012D per byte through...
  • Page 311: Performing Ascii-Bin Conversion For Data Communicated Via The Bidirectional Protocol

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.5 Performing ASCII-BIN Conversion for Data Communicated via the Bidirectional Protocol This section explains the ASCII-BIN conversion of data to be communicated using the bidirectional protocol. (1) The following shows the range of transmission/reception data for which ASCII-BIN conversion can be performed.
  • Page 312 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 5) Treatment of sum check code The data length and the data section after ASCII-BIN conversion are added together and the lowest two bytes of the resulting binary code data are treated as a sum check code. •...
  • Page 313: Example Of Data Communication Using The Bidirectional Protocol

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.6 Example of Data Communication Using the Bidirectional Protocol This section shows examples of data communication using the bidirectional protocol when the following settings and registrations are made. (1) Settings via GX Developer Perform the following settings on the "Intelligent function module switch setting"...
  • Page 314: Example Of Data Reception

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.6.1 Example of data reception The following shows an example of data reception when ASCII-BIN conversion is enabled. • When the receive transparent code designation is set to Enable and ASCII-BIN conversion is set to Enable Additional code: 10 (DLE), transparent code: 04 (E0T)
  • Page 315: Example Of Data Transmission

    13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) 13.6.2 Example of data transmission The following shows an example of data transmission when ASCII-BIN conversion is enabled. • When the send transparent code designation is set to Enable and ASCII-BIN conversion is set to Enable Additional code: 10 (DLE), transparent code: 04 (E0T)
  • Page 316: Data Communications Using External Device And Programmable Controller Cpu M : N Configuration

    14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION Always read this chapter when communicating data by using a multidrop link to connect the external devices and programmable controller CPU in an m: n system configuration.
  • Page 317 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION (5) When communicating data by using an m: n system configuration, designate the following station number at the [Station No.] and [Local station No.] items in the command message to be transmitted from an external device.
  • Page 318: External Devices Interlock Conditions

    14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 14.2 External Devices Interlock Conditions When using a multidrop line to communicate data between external devices and the programmable controller CPU in an m: n configuration, interlocks must be provided between the external devices so that multiple external devices cannot communicate data with the programmable controller CPU at the same time.
  • Page 319: Message Structure When Communicating Data Between External Devices

    14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 14.2.2 Message structure when communicating data between external devices The message structure when communicating data between external devices is determined by any of the following. This condition is determined to provide interlocks between the external devices so that each of them can exchange data with the programmable controller CPU in a 1:1 configuration.
  • Page 320 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION (2) When message structure different from that of control procedure format frames can be used 1) Change the head data of each message to other arbitrary data. •...
  • Page 321: Examples Of Procedure For Data Communications With The Programmable Controller Cpu

    14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 14.3 Examples of Procedure for Data Communications with the Programmable Controller The following uses examples to describe the procedure when communicating data with a programmable controller CPU by interlocking the external devices. 14.3.1 Sequential data communications between external devices and the programmable controller CPU The external devices sequentially obtain the line usage right and communicate data...
  • Page 322 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION : External device that obtained the line usage right (Before 5)) (Before 5)) External device External device External device External device (Station No.:1B (Station No.:1C (Station No.:1D (Station No.:1E Data communica- tions with arbitrary...
  • Page 323 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 7) When line usage time of the external device that currently has the line usage right exceeds the maximum data communications time. a) The external device of the next station No. transmits all external devices general report data and obtains the line usage right and performs step 2).
  • Page 324: Data Communications Between Programmable Controller Cpu And External Devices By Designating A Master Station And Slave Stations

    14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 14.3.2 Data communications between programmable controller CPU and external devices by designating a master station and slave stations One of the external devices is made the master station and the other external devices communicate data with the programmable controller CPU after obtaining permission from the master station.
  • Page 325 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 1) A slave station that wants to communicate data with the programmable controller CPU sends a communications request to the master station to obtain the line usage right.
  • Page 326 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 6) The master station that received the communications complete report transmits a response to the slave station that transmitted the communications complete report. (Example) Massage of 5) External device of Command "ZY"...
  • Page 327: Switching The Mode After Starting

    15 SWITCHING THE MODE AFTER STARTING 15 SWITCHING THE MODE AFTER STARTING This function forcefully switches the current communication protocol and transmission specifications of the designated interface from an external device and the programmable controller CPU after the Q series C24 starts. When the Q series C24 starts, it begins operation with the setting values of the GX Developer switch setting.
  • Page 328: Mode Switching Operation And Contents That Can Be Changed

    15 SWITCHING THE MODE AFTER STARTING 15.1 Mode Switching Operation and Contents that can be Changed This section describes the set contents that can be changed with mode switching and the operation of Q series C24 after mode switching. 15.1.1 Settings that can be changed with mode switching The following describes the settings that can be changed with mode switching.
  • Page 329: Mode Switching Precautions

    15 SWITCHING THE MODE AFTER STARTING 2) Data communications using non procedure, bidirectional, or pre-defined protocol • Data and response message transmit and receive processing are all terminated. • All the input signals from the programmable controller CPU related to transmit and receive processing are turned off.
  • Page 330 15 SWITCHING THE MODE AFTER STARTING (2) Mode switching from external device Once the mode has been changed to a mode other than MC protocol (Formats 1 to 5), it cannot be changed from the external device. In this case, change the mode on the programmable controller CPU. Only the Q series C24 (including multidrop link stations) connected to an external device is available for mode switching from the external device (Refer to the MELSEC-Q/L MELSEC Communication Protocol Reference...
  • Page 331: I/O Signals For Handshake With Programmable Controller Cpu And Buffer Memory

    15 SWITCHING THE MODE AFTER STARTING 15.3 I/O Signals for Handshake with Programmable Controller CPU and Buffer Memory This section describes the I/O signals for handshake and the buffer memories used when mode switching is performed. (1) I/O signals for handshake with programmable controller CPU I/O signal Device turned ON/OFF Signal name...
  • Page 332 15 SWITCHING THE MODE AFTER STARTING (b) Switching transmission specifications designation area (address: 91 , 131 1) Designates the transmission specifications after mode switching. 2) When the transmission specifications are returned to the contents set in GX Developer, [0000 ] is written to this area. 3) When setting arbitrary transmission specifications (other than the contents set in GX Developer), the value corresponding to ON/OFF of the relevant bit in the table listed below is written.
  • Page 333 15 SWITCHING THE MODE AFTER STARTING The setting value of the communication speed. Bit position Bit position Communication speed Communication speed Remarks b15 to b8 b15 to b8 14400bps 50bps Slow down the 19200bps 300bps communication speed when 28800bps 600bps data cannot be 38400bps communicated normally due...
  • Page 334: Switching The Mode From The Programmable Controller Cpu

    15 SWITCHING THE MODE AFTER STARTING 15.4 Switching the Mode from the Programmable Controller CPU This section shows how the Q series C24 mode is switched from the programmable controller CPU. 15.4.1 Mode switching procedure The following explains the procedure for switching the Q series C24 mode from the programmable controller CPU.
  • Page 335: Mode Switching Sample Program

    15 SWITCHING THE MODE AFTER STARTING 15.4.2 Mode switching sample program The following shows a sample sequence program that switches the CH1 interface mode. (The Q series C24 I/O signals X/Y00 to X/Y1F) Changes the operation mode to MC protocol format 1 Reception Mode Reception...
  • Page 336: Switching The Mode From An External Device

    15 SWITCHING THE MODE AFTER STARTING 15.5 Switching the Mode from an External Device This section shows how the Q series C24 mode is switched from an external device. 15.5.1 Mode switching procedure The following explains the procedure for switching the Q series C24 mode from an external device.
  • Page 337: Mode Switching Sample Program

    15 SWITCHING THE MODE AFTER STARTING REMARKS To check the Q series C24 mode (communication protocol, transmission specifications) after switching, read the buffer memory (addresses: 252 to 253 to 263 ) described in User's Manual (Basic). (To check the external device, read the buffer memory with the MC protocol buffer memory read function.) 15.5.2 Mode switching sample program The following shows a programmable controller CPU sample sequence program that...
  • Page 338: Using Communication Data Monitoring Function

    16 USING COMMUNICATION DATA MONITORING FUNCTION 16 USING COMMUNICATION DATA MONITORING FUNCTION The following describes the QJ71C24N (-R2/R4) and LJ71C24(-R2) communication data monitoring functions. 16.1 Communication Data Monitoring Function 16.1.1 Overview Communication data monitoring function is a function to monitor communication data between the QJ71C24N (-R2/R4) or LJ71C24(-R2) and an external device on communication lines.
  • Page 339: Communication Data Monitoring Operation

    16 USING COMMUNICATION DATA MONITORING FUNCTION 16.1.2 Communication data monitoring operation The following describes the communication data monitoring operation. POINT When using the communication data monitoring function, the total transmission speed of the two interfaces should not exceed 115200 bps. The communication data monitoring function is effective when the communication protocol is assigned to 0 to 9...
  • Page 340 16 USING COMMUNICATION DATA MONITORING FUNCTION Each data is stored in the monitor data area using the following timing. Data classification Data storage timing Received data When receiving data Transmitted data When transmitting data Receiving error data When detecting receiving errors RS (RTS), ER (DTR) When changing the RS (RTS), ER (DTR) signals...
  • Page 341: Communication Data Monitoring Function Settings

    16 USING COMMUNICATION DATA MONITORING FUNCTION 16.2 Communication Data Monitoring Function Settings Settings for the communication data monitoring function can be configured on the "Transmission control and other system setting" screen of GX Configurator-SC or in the sequence program. (1) GX Configurator-SC setting for the communication data monitoring function The setting items for the communication data monitoring function are listed below.
  • Page 342 16 USING COMMUNICATION DATA MONITORING FUNCTION (2) Buffer memory for communication data monitoring function Communication data monitoring specification area (Address: 2018 /2118 Set start/stop of the communication data monitoring. See Section 16.1.2 for communication data monitoring setting operation. Buffer memory address 2018 /2118 (Default: 0000...
  • Page 343 16 USING COMMUNICATION DATA MONITORING FUNCTION Monitor buffer size specification area (Address: 201B /211B Set the size of the monitor data area. Setting range: 0003 to 1A00 (Default: 0D00 Monitor data pointer storage area (Address: according to monitor buffer head address setting (Default: 2600 /3300 The oldest data position of the monitor data area is stored using the offset value from the head address of the monitor data area.
  • Page 344 16 USING COMMUNICATION DATA MONITORING FUNCTION The monitor data area (Default addresses: 2602 to 32FF /3302 3FFF The monitor data are stored in one-word units as shown in the configuration below. See Section 16.3 for an example of the communication data monitoring. b13 b12 b11 b10 Received data...
  • Page 345: Communication Data Monitoring Example

    16 USING COMMUNICATION DATA MONITORING FUNCTION 16.3 Communication Data Monitoring Example The following is an example of the data monitoring of nonprocedural protocol communication. (1) System configuration The system configuration for the sample program is as shown below. The CH used for operation of this sample program is CH1 only. CH1: Transmission channel CH2: Reception channel GX Developer...
  • Page 346 16 USING COMMUNICATION DATA MONITORING FUNCTION Sample program <Monitor start (X20 is ON)> Monitor data area is cleared to 0 Monitor start being instructed Monitoring (0002 Monitor setting error (100F <Monitor option (X21 is ON)> During monitor stop (1002 <Monitor stop (X22 is ON)> Monitor stop being instructed Monitor stop (0000 16 - 9...
  • Page 347 16 USING COMMUNICATION DATA MONITORING FUNCTION (3) Confirming monitor data by GX Developer The monitor data area for CH1 (Address: 2602 to 32FF ) is monitored on the buffer memory batch monitoring screen of GX Developer. See Section 16.2 (2) (g) for the data configuration of the monitor data area. (Example) The following data are sent from CH1 using non procedure protocol.
  • Page 348: Dedicated Instructions

    17 DEDICATED INSTRUCTIONS 17 DEDICATED INSTRUCTIONS Dedicated instructions are used to simplify programming when using the intelligent functional module functions. Among the dedicated instructions for the QJ71C24N(-R2/R4) and QJ71C24(-R2) explained in this manual, this chapter focuses on the instructions that can be used for QCPU.
  • Page 349 17 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 350: Z.bufrcvs

    17 DEDICATED INSTRUCTIONS 17.2 Z.BUFRCVS This instruction is used to receive data by an interrupt program through non procedure or bidirectional protocol communication. Applicable device Link direct device Intelligent function Setting data Internal device File Index register Constant module device Others register K, H...
  • Page 351 17 DEDICATED INSTRUCTIONS Functions (1) This instruction stores data received from an external device to a designated device. (2) This instruction can identify the address of the reception area in the buffer memory and read relevant receive data. (3) When this instruction is executed, reception is completed and the reception data read request signal (X3/XA) or the reception abnormal detection signal (X4/XB) is turned off automatically.
  • Page 352 17 DEDICATED INSTRUCTIONS Precaution when using the BUFRCVS instruction (1) Use the BUFRCVS instruction when receiving data via an interrupt program. (2) Simultaneous execution of dedicated instructions The following table lists the handling for when executing another instruction during execution of the BUFRCVS instruction or executing the BUFRCVS instruction during execution of another instruction in the same channel.
  • Page 353 17 DEDICATED INSTRUCTIONS Program example An interrupt program that reads receive data. (Setting) • Interrupt pointer setting with GX Developer PLC side: Interrupt pointer Start No. = 50, Interrupt pointer No. of module = 2 (fixed) CH1 side interrupt pointer = I50, CH2 side interrupt pointer = I51 Intelli.
  • Page 354: Zp.cset (Programmable Controller Cpu Monitoring Register/Cancel)

    17 DEDICATED INSTRUCTIONS 17.3 ZP.CSET (Programmable Controller CPU Monitoring Register/Cancel) With this instruction, monitoring of the programmable controller CPU can be registered or cancelled. Applicable device Link direct device Intelligent function Index Setting data Internal device File Constant module device register Others register...
  • Page 355 17 DEDICATED INSTRUCTIONS Device Item Setting data Setting range Set by Designate the transmission measure. Programmable controller CPU 0: Data transmission (device data, CPU abnormal (S2)+6 0, 1 monitoring transmission measure information) 1: Notification Designate the head pointer of the table setting the user frame numbers for constant cycle transmission.
  • Page 356 17 DEDICATED INSTRUCTIONS Device Item Setting data Setting range Set by Programm Designate the code of a device to be monitored. -able 0: Do not monitor device. Other than 0: Device code. See Section controller (S2)+13 Device code 2.2.2 (4). monitoring setting (S2)+14...
  • Page 357 17 DEDICATED INSTRUCTIONS Device Item Setting data Setting range Set by Programmable controller CPU (S2)+22 monitoring setting The same arrangement as the first programmable controller — CPU monitoring setting item. 2nd to 10th (S2)+102 * 2nd to 10th block (S2)+103 (S2)+104 (S2)+105 Designate the fixed value when the CPU status monitoring...
  • Page 358 17 DEDICATED INSTRUCTIONS (2) Canceling the programmable controller CPU monitoring Set by Device Item Setting data Setting range (S2)+0 Execution type Designate 0 User Stores the result of execution upon completion of an instruction. (S2)+1 Completion status — System : Normal Other than 0: Error code Designate the request content.
  • Page 359 17 DEDICATED INSTRUCTIONS Functions (1) To register the programmable controller CPU monitoring, this instruction registers data necessary for the Q series C24 to execute the programmable controller CPU monitoring function. When the data registration to execute the programmable controller CPU monitoring function is completed normally, the Q series C24 begins monitoring the programmable controller CPU and transmitting monitoring results to an external device.
  • Page 360 17 DEDICATED INSTRUCTIONS (8) Simultaneous execution of dedicated instructions The following table lists the handling for when executing another instruction during execution of the CSET instruction or executing the CSET instruction during execution of another instruction in the same channel. Availability of Instruction Handling of simultaneous execution...
  • Page 361 17 DEDICATED INSTRUCTIONS Errors (1) When the dedicated instruction is completed abnormally, the error flag (SM0) turns on and the error code is stored in SD0. See the following manuals regarding the error code, and check the errors and take corrective actions. <Error codes>...
  • Page 362 17 DEDICATED INSTRUCTIONS Program example (1) A program that registers the programmable controller CPU monitoring The following example shows how to register the programmable controller CPU monitoring and send the monitoring results from the interface on the CH1 side. The following registration is done to send the contents of M0 to M15 and D100 to D109 to the external device on a constant cycle (cycle time is 3 min).
  • Page 363: Zp.cset (Initial Settings)

    17 DEDICATED INSTRUCTIONS 17.4 ZP.CSET (Initial Settings) With this instruction, the unit of transmission/reception data (word/byte) and data communication areas can be set. Applicable device Link direct device Intelligent function Index Setting data Internal device File Constant module device register Others register K, H...
  • Page 364 17 DEDICATED INSTRUCTIONS Device Item Setting data Setting range Set by Designate the head address of the buffer memory used with On-demand function buffer the on-demand function. (S2)+4 to 1AFF memory head address : Use the current setting value 2600 to 3FFF to 1AFF , 2600...
  • Page 365 17 DEDICATED INSTRUCTIONS Functions (1) This instruction changes the current values of the settings below to transmit/receive data using the following communication protocols: • Data count unit (word/byte) of the data to be transmitted/received • Transmission area in the buffer memory used by the on-demand function of the MC protocol •...
  • Page 366 17 DEDICATED INSTRUCTIONS (4) Whether the CSET instruction is being executed or has been completed normally/ abnormally can be checked with the completion device (D2) designated by the setting data. (a) Completion device ((D2) + 0) Turns on at the END processing of the scan where the CSET instruction is completed, and turns off at the next END processing.
  • Page 367 17 DEDICATED INSTRUCTIONS Program example A program that changes the transmission buffer area for interface on CH1 side • Set the transmission buffer to C00 to FFF • Set the reception buffer to 600 to 7FF When the input/output signals of the Q series C24 are X/Y00 to X/Y1F Clears D0 to D111 Sets the execution type Sets the request type...
  • Page 368: G(P).Gete

    17 DEDICATED INSTRUCTIONS 17.5 G(P).GETE This instruction reads out a user frame. Applicable device Link direct device Intelligent function Index Setting data Internal device File module device register Constant Others register U \G Word Word (S1) — — (S2) — —...
  • Page 369 17 DEDICATED INSTRUCTIONS Functions (1) This instruction reads data from the user frame in the Q series C24 as designated by Un. QCPU Q series C24 User frame b8 b7 (S2) +0 Read Read byte length (2) Simultaneous execution of dedicated instructions The following table lists the handling for when executing another instruction during execution of the GETE instruction or executing the GETE instruction during execution of another instruction in the same channel.
  • Page 370 17 DEDICATED INSTRUCTIONS [Operation when the GETE instruction is being executed] processing processing processing processing Sequence program Completion of reading user GETE instruction execution frames by the GETE instruction GETE instruction Completion Abnormal device completion Status display device at completion Normal completion One scan Errors...
  • Page 371: G(P).Prr

    17 DEDICATED INSTRUCTIONS 17.6 G(P).PRR In non procedure protocol communication, this instruction transmits data using a user frame according to the data specified in the transmission user frame designation area. Applicable device Link direct device Intelligent function Index Setting data Internal device File module device...
  • Page 372 17 DEDICATED INSTRUCTIONS Functions (1) This instruction transmits the user frame data using the non procedure protocol of the Q series C24 as designated by Un, according to the control data stored in the device designated by (S) and succeeding devices, as well as the transmission user frame designation area of the Q series C24.
  • Page 373 17 DEDICATED INSTRUCTIONS [Operation when the PRR instruction is being executed] processing processing processing processing Sequence program Completion of transmission PRR instruction execution by the PRR instruction PRR instruction Completion Abnormal device completion Status display device at completion Normal completion One scan Errors When the dedicated instruction is completed with an error, the status display device at...
  • Page 374 17 DEDICATED INSTRUCTIONS Program example A program that sends arbitrary data and the first to fifth user frames registered in the transmission frame setting When the input/output signals of the Q series C24 are X/Y80 to X/Y9F Transmission instruction Sets arbitrary transmission data. Sets the number of transmitted data.
  • Page 375: G(P).Pute

    17 DEDICATED INSTRUCTIONS 17.7 G(P).PUTE This instruction registers a user frame. Applicable device Link direct device Intelligent function Index Setting data Internal device File module device register Constant Others register U \G Word Word (S1) — — (S2) — — —...
  • Page 376 17 DEDICATED INSTRUCTIONS Functions (1) This instruction registers or deletes the user frame for the Q series C24 as designated by Un. (2) When registering a user frame (a) When registering a user frame, set 1 to the device for (S1)+0. Data in the device designated by (S2) and after will be registered according to the control data.
  • Page 377 17 DEDICATED INSTRUCTIONS (4) Simultaneous execution of dedicated instructions The following table lists the handling for when executing another instruction during execution of the PUTE instruction or executing the PUTE instruction during execution of another instruction in the same channel. Availability of Instruction simultaneous...
  • Page 378 17 DEDICATED INSTRUCTIONS Errors When the dedicated instruction is completed with an error, the status display device at completion ((D)+1), turns on and the error code is stored in the control data registration/deletion result ((S1)+1). See the following manuals regarding the error code, and check the errors and take corrective actions.
  • Page 379: Zp.uini

    17 DEDICATED INSTRUCTIONS 17.8 ZP.UINI This instruction can change the mode, transmission specifications and station number of the Q series C24. It is applicable to the QJ71C24N (-R2/R4), and LJ71C24 (-R2). Applicable device Link direct device Intelligent function Index Setting data Internal device File module device...
  • Page 380 17 DEDICATED INSTRUCTIONS (1) (S)+3 (CH1 transmission specifications setting) and (S)+5 (CH2 transmission specifications setting) 1 All items in the table should be set to OFF for the interfaces which "GX Developer connection" is in the communication protocol setting. The Q series C24 operates with the values set in GX Developer. (See below.) Transmission setting GX Developer side setting Operation setting...
  • Page 381 17 DEDICATED INSTRUCTIONS (2) (S)+4 (CH1 communication protocol setting) and (S)+6 (CH2 communication protocol setting) Setting No. Description Remarks GX Developer connection GX Developer communication rate and (For connection to MELSOFT products) transmission specifications are automatically set. Format 1 For communication with ASCII code in the Format 2 specified form of an A compatible 1C frame or Format 3...
  • Page 382 17 DEDICATED INSTRUCTIONS REMARKS (1) For information about errors caused by incorrect data designated by the user, see the description in "Errors" on the next page. (2) The "Set by" column indicates the following: • User : Data set by the user before executing the dedicated instruction. •...
  • Page 383 17 DEDICATED INSTRUCTIONS [Operation when the UINI instruction is executed] processing processing processing processing Sequence program UINI instruction execution UINI instruction Completion Error device completion Status indication device at Normal completion completion One scan Mode switching signal (X6/XD) Q series C24 Setting processing Communication disabled Errors...
  • Page 384 17 DEDICATED INSTRUCTIONS Program example The settings of the Q series C24 installed in the position of I/O No. X/Y00 to X/Y1F are changed as indicated below when X20 is turned on. Device Description Set value Position Specified value Operation setting Independent Data bit 8 bits...
  • Page 385 17 DEDICATED INSTRUCTIONS Clears the control data UINI CH1 mode CH2 mode CH1 mode CH2 mode instruction switching switching switching switching command request request Always sets 0 Clears the execution result to 0 Sets the execution type to 0 Sets the CH1 transmission specifications Sets the CH1 communication protocol Sets the CH2 transmission...
  • Page 386 17 DEDICATED INSTRUCTIONS Precautions (1) Execute the UINI instruction after stopping all data communications with the other device. Otherwise, the following will occur. (a) When the UINI instruction is executed during receive processing The receive processing is stopped and the reception data accumulated until then are all discarded.
  • Page 387 17 DEDICATED INSTRUCTIONS (6) Do not use the UINI instruction and mode switching request signal (Y2/Y9) together to execute mode switching. (7) To use the current communication protocol, transmission specifications and host station No. obtain the values from the following status storage areas (current) of the buffer memory and set them to the control data.
  • Page 388: Appendix

    APPENDIX APPENDIX Appendix 1 Specification Comparison between the Q Series C24 and L series C24 The functions of the L series C24 correspond to those of the Q series C24, whose first five digits of the serial number is 11062 and the function version is B or later. The following table lists the specification comparison between the Q series C24 and L series C24.
  • Page 389 APPENDIX MEMO App. App - 2 App - 2...
  • Page 390 INDEX Data registration for modem initialization ..3-58 Action for buffer full........16-5 DC code transmission control......7-1 Additional codes ........12-1 DC1/DC3 ............7-4 ASCII-BIN conversion ....... 13-1 DC2/DC4 ............7-5 Auto modem initialization designation ..3-42 Dedicated instruction list ......17-1 Default registration frame ......9-9 DTR/DSR (ER/DR) signal control....7-2 Block monitoring device ......
  • Page 391 Modem connection channel designation ..............3-56 Receive format designation .....11-18 Modem function list........3-5 Receive interrupt-issued designation ..4-2 Modem initialization time DR signal valid/invalid Receive procedure (user frame)....11-14 designation ..........3-57 Receiving data with an interrupt program ...4-1 Modern function system setting ....3-56 Reception control method (interrupt program) Monitor buffer head address specification area ..............4-3...
  • Page 392 Transmission data arrangement On-demand data ........10-3 Programmable controller CPU monitoring .............. 2-12 Non procedure protocol ..... 11-34 Transmission frame No. designation area ..............11-40 Transmission monitoring time (timer 2) ..6-10 Transmission procedure (User frames) .. 11-36 Transmission program (user frames) ..11-41 Transmission specification ......
  • Page 393 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 394 Microsoft, Windows, Windows NT, and Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries. Pentium is a trademark of Intel Corporation in the United States and other countries. Ethernet is a trademark of Xerox Corporation. All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies.

This manual is also suitable for:

Melsec q seriesQj71c24Qj71c24-r2Lj71c24-r2Lj71c24Qj71c24n ... Show all

Table of Contents