MELSEC-Q/L Serial Communication Module User's Manual (Application) -QJ71C24N -QJ71C24N-R2 -QJ71C24N-R4 -QJ71C24 -QJ71C24-R2 -LJ71C24 -LJ71C24-R2
SAFETY PRECAUTIONS (Read these precautions before using this product.) Before using this product, please read this manual and the relevant manuals carefully and pay full attention to safety to handle the product correctly. The precautions given in this manual are concerned with this product only. For the safety precautions of the programmable controller system, refer to the user's manual for the CPU module used.
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. Incorrect output or malfunction due to a communication failure may result in an accident. ● When using the notification function, the pager receiver may not be contacted due to the frequency transmission status from the system setup environment and error on the receiver side.
[Design Precautions] CAUTION ● Do not install the control lines or communication cables together with the main circuit lines or power cables. Keep a distance of 100mm or more between them. Failure to do so may result in malfunction due to noise. ● When using the module while values, such as buffer memory set values, are registered in the Flash ROM, do not turn off the power supply for the module loading station nor reset the programmable controller CPU.
[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. ● Perform correct pressure-displacement, crimp-contact or soldering for external wire connections using the tools specified by the manufactures. Incomplete connections may cause short circuit, fire, or malfunction.
[Startup 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. Failure to do so may cause the module to fail or malfunction. ● After the first use of the product, do not mount/remove the module to/from the base unit, and the terminal block to/from the module more than 50 times (IEC 61131-2 compliant) respectively.
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. Incorrect output or malfunction due to a communication failure may result in an accident.
[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. ● To interconnect modules, engage the respective connectors and securely lock the module joint levers. Incorrect interconnection may cause malfunction, failure, or drop of the 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 terminal block screw comes loose, resulting in failure. ● Connectors for external devices must be crimped or pressed with the tool specified by the manufacturer, or must be correctly soldered. Incomplete connections may cause short circuit, fire, or malfunction. ● Securely connect the connector to the module.
[Startup and Maintenance Precautions] WARNING ● Do not touch any terminal while power is on. Doing so will cause electric shock or malfunction. ● Shut off the external power supply (all phases) used in the system before cleaning the module or retightening the terminal block screws. Failure to do so may result in electric shock. [Startup and Maintenance Precautions] CAUTION ● Do not disassemble or modify the modules. Doing so may cause failure, malfunction, injury, or a fire.
[Operating Precautions] CAUTION ● When changing data and operating status, and modifying program of the running programmable controller from an external device such as a personal computer connected to an intelligent function module, read relevant manuals carefully and ensure the safety before operation. Incorrect data change, program modification, and status control may cause malfunction of the system, mechanical damage, or accidents.
CONDITIONS OF USE FOR THE PRODUCT (1) Mitsubishi programmable controller ("the PRODUCT") shall be used in conditions; i) where any problem, fault or failure occurring in the PRODUCT, if any, shall not lead to any major or serious accident; and ii) where the backup and fail-safe function are systematically or automatically provided outside of the PRODUCT for the case of any problem, fault or failure occurring in the PRODUCT.
INTRODUCTION Thank you for purchasing the Mitsubishi MELSEC-Q or -L series programmable controllers. This manual explains the functions and programming required to use the serial communication module. Before using this product, please read this manual and the relevant manuals carefully and develop familiarity with the functions and performance of the MELSEC-Q or -L series programmable controller to handle the product correctly.
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. • QCPU User's Manual (Hardware Design, Maintenance and Inspection) • Safety Guidelines (This manual is included with the CPU module or base unit.
CONTENTS CONTENTS SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 COMPLIANCE WITH EMC AND LOW VOLTAGE DIRECTIVES . . . . . . . . . . . . . .
3.4 Start-up of the Modem Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 3.4.1 3.5 Start-up procedures when communicating data with external devices . . . . . . . . . . . . . . . . .126 3.4.2 Initial settings of the serial communication module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .131 3.4.3 Register/read/delete of the initialization data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .134 3.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.1 220 User Frame Types and Contents During Communication . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 9.1.1 User frames to be registered and used by the user . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .221 9.1.2 Default registration frame (read only). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .230 9.
12.3 Handling Transparent Codes and Additional Codes during Non Procedure Protocol Data Communication. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 299 12.4 Example of Data Communication Using the Non Procedure Protocol . . . . . . . . . . . . . . . . . . 304 12.4.1 Example of data reception . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .305 12.4.2 Example of data transmission .
15.5 Switching the Mode from an External Device . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 356 15.5.1 Mode switching procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .356 15.5.2 Mode switching sample program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .357 CHAPTER 16 USING COMMUNICATION DATA MONITORING FUNCTION 16.1 358 Communication Data Monitoring Function . . . . .
17.7.2 Control data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .398 17.7.3 Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .399 17.7.4 Errors . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .401 17.7.5 Program example. . . . . . . . . . . . . . . . . . . . . .
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'S USE AND STRUCTURE (1) How to use this manual This manual describes the use of special functions for the Q series C24 (QJ71C24N, QJ71C24N-R2, QJ71C24NR4, QJ71C24, QJ71C24-R2), with each chapter covering a specific function. Please read this manual and use the contents below as a reference. (a) To read an overview of special functions An overview of the major special functions is described in Chapter 1.
(h) 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. (i) To use dedicated instructions Chapter 17 describes the dedicated instructions that are used to execute the functions explained in this manual.
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 Term Q series C24 (C24) Description Generic term for QJ71C24N, QJ71C24N-R2, QJ71C24N-R4, QJ71C24 and QJ71C24-R2 serial communication modules.
(2) Abbreviations for dedicated instructions Term BIDIN Description 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. ONDEMAND Abbreviation for G.ONDEMAND or GP.ONDEMAND. OUTPUT Abbreviation for G.OUTPUT or GP.OUTPUT. PRR Abbreviation for G.PRR or GP.PRR.
TERMS The following table lists the definitions and descriptions of terminology used in this manual. Term Description A compatible 1C frame (Formats 1 to 4) One of the message formats for the serial communication modules, which is used to perform ASCII data communication by MC protocol. This is the same message format as the one used when communicating using the protocol for the A series computer link modules.
Term QnA compatible 4C frame (Format 5) Description One of the message formats for the serial communication modules, which is used to perform ASCII data communication by MC protocol. This is the same message format as the communication frame using the protocol for the QnA series serial communication modules.
CHAPTER 1 OVERVIEW CHAPTER 1 1.1 OVERVIEW 1 Overview This manual explains special functions of the MELSEC-Q/L series C24. When applying the following program examples to the actual system, make sure to examine the applicability and confirm that it will not cause system control problems. This chapter provides an overview of these special functions. The primary special functions of the Q series C24 and a functional overview are indicated below.
(b) The programmable controller CPU monitoring function can be used in communication using MC protocol or non procedure protocol. (c) Using the programmable controller CPU monitoring function makes it possible to do the following: • Sends device data without using a sequence program • Simplifies the device monitor procedure • Sends the programmable controller CPU error information Q25HCPU MELSEC POWER MODE QJ71C24 CH1. External device CH2. RUN ERR. CH1. USER BAT.
CHAPTER 1 OVERVIEW (c) When a remote password is set in the QCPU with the GX Developer, the following access from the external device to QCPU using the Q series C24 modem function 1 can be performed by executing the unlock processing to the remote password. *1 • Data communication using the MC protocol • Accessing the programmable controller using the GX Developer *1 The remote password function is a QCPU function designed to prevent improper access to the QCPU by users.
(4) Controlling data communication in accordance with the external device ( Page 203, CHAPTER 7) (a) The Q series C24 controls data communication with the external device by turning ON/OFF the DTR/DSR signal and sending/receiving the DC code. (b) DTR/DSR signal control Using the ER (DTR) and DR (DSR) signals, the external device is notified of whether or not data communication can be performed.
CHAPTER 1 OVERVIEW 1 (6) Sending/receiving data in a message format tailored to the external device ( Page 220, CHAPTER 9 to Page 252, CHAPTER 11) (a) By preregistering the data arrangement (user frames) of the messages to be sent and received by the external device, to the Q series C24, the following data communications can be performed using registered frames.
The following table lists which special functions are available for the main data communication functions of the Q series C24.
CHAPTER 1 OVERVIEW 1.2 Functions Added/Changed for the QJ71C24N (-R2/R4) and QJ71C24 (-R2) 1 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.
CHAPTER 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. 2.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (2) Simplifying the device monitoring procedure When device monitoring is performed by communication using the MC protocol, the external device must repeatedly perform monitor request transmission and monitor data reception processing after it executes monitor registration.
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.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2.2 Programmable controller CPU monitoring information This section explains the monitoring target information used to execute the programmable controller CPU monitoring 2 function. (1) The following information can be registered as the target of the programmable controller CPU monitoring function.
(4) The word and bit devices that can be designated as the monitoring targets and the device codes that are used to register the monitoring devices are listed in the table below. Register the devices using the device ranges existing in the programmable controller CPU.
CHAPTER 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 2 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. (2) Values from 1 to 65535 (unit: 100ms/s/min) can be registered as the cycle time.
(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. ● Since the Q series C24 reads the monitoring information (device data, programmable controller CPU status) at the time of the next programmable controller CPU END process after the cycle time elapses, make the cycle time as long as possible.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2.4 Timings of transmission and notification of monitoring results to the external device The following explains the timings for the transmission and notification of the programmable controller CPU monitoring 2 results. There are two transmission methods for transmitting and notifying the monitoring results of the local station programmable controller CPU to the external device.
(b) Two transmission methods of the monitoring results are available for the condition agreement transmission for device monitoring. These include edge triggered transmission and level triggered transmission. • Edge triggered transmission 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.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (d) In device monitoring, register the monitoring condition value or status when the Q series C24 judges that the numeric value/status of the monitoring device for condition agreement transmission (head device of each block) agrees with the 2 condition using the registration values listed below.
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.
CHAPTER 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 2 error. The header and footer are added to each clock, and then the monitoring result data is transmitted.
(2) Data transmission to the external device while performing communication using the non procedure protocol (a) The device information and CPU information are sent by the word/byte unit designations. When the communication data ASCII-BIN conversion is designated, it is converted to ASCII code data and sent. (Examples are shown in Page 48, Section 2.2.5 (2) (f)). • When the word/byte unit designation is word The device information and CPU information are each sent in one-word segments in a (H) (L) sequence.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION (d) The user frame numbers that can be designated for data transmission of programmable controller CPU monitoring results are listed below. • 1H to 3E7H (Default registration frame numbers) 2 • 3E8H to 4AFH (Frame numbers registered by the user in the flash ROM) • 8001H to 801FH (Frame numbers registered by the user in the buffer memory) • B001H to B01FH (Dedicated frame numbers for this function listed in Page 47, Section 2.2.
(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 121H/1C1H. 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. It will be sent as binary data. ( Page 321, Section 13.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION H L H W * 0 0 0 1 0 L H 0 0 0 0 2 Device data Device code Monitoring head device Number of registered points When the word/byte unit designation is word L H 4 0 0 0 L H 0 0 0 0 L H 1 0 0 0 L H 2 0 L 0 0 3 57H 2AH 30H 30H 30H 31H 30H 30H 30H 30H 30H 34H 30H 30H 30H 30H 30H 30H 30H 31H 30H 30H 30H 32H 30H 30H 30H 33H W100 W101 W102 W103 • When data for bit device (M16 to M175, (10 point)) is
(When ASCII-BIN conversion is not performed) The total number of bytes for the device data section is the number of device points 2.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION • When user frame No.
• When user frame No. B081H 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.
CHAPTER 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 4.
(When ASCII-BIN conversion is not performed) The total number of bytes for the device data section is the number of device points 2.
CHAPTER 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 4.
(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. The device information and the CPU status information read from the programmable controller CPU are not sent to the external device in the notification message.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.2.6 Execution sequence for using the programmable controller CPU monitoring function 2 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.
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.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION Constant cycle transmission Setting item Data transmission Notification*1 Condition agreement transmission Data transmission Reference section Notification*1 Number of registered word blocks Page 61, Section 2.3.1 (3) (e) Number of registered bit blocks PLC CPU abnormal monitoring Monitoring device 2 Page 61, Section 2.3.1 (3) (f) Head device No. Page 62, Section 2.3.1 (3) (g) Read point Monitoring condition No.
(2) Setting items and requirement when performing communication using the non procedure protocol Constant cycle transmission Setting item Data transmission Notification Condition agreement transmission Data transmission Reference section Notification Cycle time units Page 61, Section 2.3.1 (3) (a) Cycle time Page 61, Section 2.3.1 (3) (b) (1H: Constant cycle) (2H: Condition agreement) Page 61, Section 2.3.1 (3) (c) (Notification) Page 61, Section 2.3.
CHAPTER 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. 2 (a) Cycle time units • Designates the unit for cycle time ( Page 61, Section 2.3.1 (3) (b)) for reading information from the programmable controller CPU 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 number of registered word blocks and number of registered bit blocks ( Page 61, Section 2.3.1 (3) (e)).*1 *1 The target of device data monitoring for condition agreement transmission is the head device for each block.
CHAPTER 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 2 protocol. 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.
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. ● For details on the method for registering and canceling the programmable controller CPU monitoring function with GX Configurator-SC, refer to the Q Corresponding Serial Communication Module User's Manual (Basic).
CHAPTER 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 2 constant cycle transmission (cycle time is 3 min).
(b) Example of a program for executing programmable controller CPU monitoring cancellation This example shows a program that cancels programmable controller CPU monitoring for the CH1 side interface.
CHAPTER 2 USING THE PROGRAMMABLE CONTROLLER CPU MONITORING FUNCTION 2.4 Precautionary Notes for Using the Programmable Controller CPU Monitoring Function 2 (1) The cycle time will be affected by the following factors. Keep these in mind when setting the cycle time. (a) When the programmable controller CPU is accessed by a module other than the Q series C24. (b) When a data communication function other than the programmable controller CPU monitoring function is used.
(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. (This is the same as when using the on-demand function of the MC protocol.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION CHAPTER 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.
3.1.1 Features The following explains the features of the modem function. (1) Interface that can use the modem function (a) The modem function can be used with the Q series C24 using an RS-232 interface. (b) For the QJ71C24(N)-R2 and LJ71C24-R2, the modem function can be used for only one of the two RS-232 interfaces.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Communication between a remote external device and programmable controller CPU (a) Data communication can be performed via full-duplex communication. (b) From the external device to the programmable controller CPU, communication using the MC protocol, non procedure protocol and bidirectional protocol can be 3 performed.
(4) Notification to the pager receiver (a) 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.
CHAPTER 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. The following is an overview of the QCPU remote password function. For more details, see Page 86, Section 3.3.3.
3.1.2 Function list The following lists the overview of the modem function: Function Overview Modem/TA initialization Initializes the modem/TA using the user-designated initialization data (AT command). (Auto initialization of the modem / TA is possible.) Line connection (dialing) Dials the partner telephone number according to the user-designated connection data and enables data communication after establishing the line connection. When the modem/TA is not initialized, performs initialization.
CHAPTER 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.
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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Connection example with a Q series C24 via cellular phone*1 MODE RUN CH1. MODE RUN CH2. CH2. USER BAT. USER BAT. BOOT BOOT Public line Modem CH1. RS-232 cable RS-232 CH1. ERR. ERR. USB QJ71C24-R2 Q25HCPU QJ71C24-R2 Q25HCPU CH1. 3 Cellular Phone USB CH2. CH2. RS-232 Cellular phone connection adapter *1 *2 The public line is compatible with the office telephone system as well. The digital line (ISDN) can replace the public line.
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.*1 QJ71C24-R2 Q25HCPU MODE RUN CH1. CH2. ERR. USER BAT. BOOT Public line Modem CH1. RS-232 cable USB CH2. RS-232 *1 78 The public line is compatible with the office telephone system as well.
CHAPTER 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.*1*2 GX Developer QJ71C24-R2 Q25HCPU MODE RUN CH1. 3 CH2. ERR. USER BAT. BOOT Public line Modem CH1. RS-232 cable USB RS-232 *1 *2 CH2. Modem RS-232 cable The public line is compatible with the office telephone system as well.
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. (1) Usable Q series C24 interface (a) The modem function can be used for the RS-232 interface only.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (6) Connectable lines (a) 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 • Digital line (ISDN) 3 (b) It is not possible to connect to call-waiting lines, in order to avoid data errors or automatic line disconnection due to the call-waiting interrupt tone.
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.
CHAPTER 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.
(b) Precautions for selecting a modem • When using a cellular phone A modem with the error correction function of MNP class-10 is recommended. However, note that communication may not be established depending on the line condition.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Specification and precautions for the connectable TA's (terminal adapters) (a) TA specification Item TA-to-TA communication specification Q series C24-to-TA communication specification *1 Specifications Remarks Connection line ISDN (INS net 64) equivalent, High-speed digital dedicated line DSU and TA are required Initialization Hayes AT command compatible Page 134, Section 3.4.3 Communication standard B-channel line exchange (V.
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 Page 70, Section 3.1.1 for an overview of the Q series C24 check function for the QCPU remote password. ● The remote password function is a function that has been added to the QCPU as a means of preventing improper access (such as destroying a program or data) from an external device.
CHAPTER 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 2) Access Modem 3) Lock processing (*2) Remote password Remote password (Local station) check QCPU Modem 3) Lock processing (*2) Remote password Q series C24 Remote password check QCPU Q series C24 (*3) 3 (Local station) Ethernet module Ethernet *1 Unlock and lock processing for the l
(2) Remote password check processing performed by the Q series C24 (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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (c) Stations that can be accessed when the remote password check is performed • 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.
(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.
CHAPTER 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. See Page 105, Section 3.3.6 for an explanation of each area.
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 (a) 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 Series C24.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (2) Data communications procedure Here, the procedure for data communications when using the callback function is shown. (a) Q series C24 side procedure Carry out procedure of starting the modem function and data communications in accordance with Page 126, Section 3.4.1. 3 • Set the callback function by GX Configurator-SC. ( Page 96, Section 3.3.4 (4)) • Initialize the Q Series C24 side modem. ( Page 126, Section 3.
(c) If you are making a line connection to the GX Developer by the following connection system, select "callback reception waiting" as the connection system for GX Developer that the Q Series C24 is reconnecting to (callback) and make the connection. • Callback request (during fixed/during designated number) In the case of line connections with "Callback request (during designated number)" as the connection system.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (e) Set the settings related to the callback function in the following areas of GX Developer. [Starting procedure] GX Developer [Tools] [Options] [TEL] • Line callback cancel wait time (Setting range: 1 to 180 s. (Default: 90 s.)) This specifies the waiting time after sending a response to a callback request from the Q Series C24, until the 3 line is disconnected from GX Developer.
(4) Setting and monitoring by GX Configurator-SC for use of the callback function (a) 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" screen This shows the callback function setting items. See Page 105, Section 3.3.6 for the modem function setting items, including the following items.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) 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. Setting values for "Callback function designation" items.
3) If it is being made possible to change the callback destination GX Developer (Setting 2 (BH) or Setting 5 (3H)) • 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. • The Q Series C24 calls back GX Developer with the callback destination telephone No. received from the GX Developer side. At this time, the external line dialing, line types and the connection data set in the following callback data No.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION 4) If the maximum number of callback destination GX Developer is limited to 10 modules (Setting 3 (FH) or Setting 6 (7H)) • Select GX Developer to be called back if the Q Series C24 limits the callback destination to a maximum of 10 modules. • Specify the callback destination telephone No. when making line connection from the initial GX Developer side. • If the Q Series C24 checks the callback destination telephone No.
5) If line connections from GX Developer are made with "Auto (Callback: during fixed/Callback: during designated number)" as the connection system (Setting 1 (9H) to Setting 3 (FH)) • 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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Remark 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" setting items and the GX Developer connection system setting items is listed.
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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Device number *1 *2 *3 Signal description Device number X1C System setting default completion, ON: Completed Y1C X1D Pre-defined protocol ready, ON: Ready Y1D X1E Q series C24 ready, ON: Accessible Y1E X1F Watchdog timer error (WDT error) ON: Module error occurred OFF: Module being normally operated Y1F Signal description System setting default request, ON: Requesting (Use prohibited) Cannot be used for the QJ71C24N-R4.
(2) Function and description of each I/O signal I/O signal Signal name Function/description X10 Modem initialization completion Indicates normal completion of the Q series C24's initialization of the modem/TA connected to itself according to the initialization data designated. X11 Dial in progress Indicates that the Q series C24 is dialing (connection processing) the partner side according to the data for connection designated. Reference Page 144, Section 3.4.5 Page 148, Section 3.4.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION 3.3.6 Buffer memory The buffer memory 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. The writing and reading of setting values to and from the buffer memory are performed using the special utility package ("GX Configurator-SC") of the Q series C24.
Address Dec. (Hex.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Address Dec. (Hex.) CH1 Application Name CH2 Number of notification executions 0: Not executed, 1 or more: Number of executions 553 (229H) 554 (22AH) 555 to 557 (22BH to 22DH) : Notification status confirmation*2*3 Data storage area 1 (Use prohibited) 3072 to 6911 (C00H to 1AFFH) For user 6912 to 6952 (1B00H to 1B28H) (For registration No.
Address Dec. (Hex.) CH1 Application Name CH2 Default value 8199 (2007H) Auto modem initialization designation 0: No auto initialization, 1: Auto initialization 0 8200 (2008H) Modem initialization time DR (DSR) signal valid/invalid designation 0: DR signal is not ignored., 1: DR signal is ignored.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Do not write data in the system area of the buffer memory. If data is written in the system area, the programmable controller system may operate abnormally. There is also a partial system area in the user's area. Be careful when reading and writing from and to the buffer memory. 3 3.
(2) Details of the buffer memory (for modern function) (a) Modem connection channel designation area (address 46 (2EH)) The interface on the Q series C24 side to which a modem/TA is connected is designated. (b) Notification execution designation area (address 47 (2FH)) Whether or not to perform notification (message transmission) to the pager receiver during the fall of the notification-issued request signal Y14 is designated.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (g) Data number for initialization designation area (address 52 (34H)) • 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. • For details on the designation using GX Configurator-SC, refer to Q Corresponding Serial Communication Module User's Manual (Basic).
Remark The overview of the RS/CS controls are described. 1) When transmitting data ● The Q series C24 detects the modem/TA data reception capability from on/off of the CS (CTS) signal. ● When the CS (CTS) signal is on, data transmission from the Q series C24 starts or continues. When the CS (CTS) signal is off, data transmission from the Q series C24 is interrupted. 2) When receiving data ● The Q series C24 side reception capability is notified to the modem/TA by the on/off of the RS (RTS) signal.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (o) Data registration status for connection storage area (address 548 to 549 (224H to 225H)) • Stores in Flash ROM registration status of data for connection used by the Q series C24 in the connection processing with the partner device in order to perform data communication/notification. • The registration status of each data for connection with registration numbers of No.
(r) Number of notification execution storage area (address 553 (229H)) • Stores the number of execution of the Q series C24 notification (message transmission) processing for the pager receiver. • The storage value when the number of notification execution exceeds 32767 remains at 32767. • The value for this area can be changed by the user in the range of 0 to 32767. When the storage value is changed by the user, the number of execution is stored according to the changed value.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (u) For user frame registration: User frame designation area (address 6913 to 6952, 6954 to 6993... (1B01H to 1B28H, 1B2AH to 1B51H...)) • When registering the initialization data or data for connection to the buffer memory, the number of registration data bytes (for 1 data) is designated. • The registration of data for initialization is described in Page 134, Section 3.4.3. The registration of data for connection is described in Page 139, Section 3.4.4.
(3) Details of buffer memory (for the remote password function) Each of the areas described below is valid when the Q series C24 performs the remote password check. (a) Remote password mismatch notification count designation area (address 8204 (200CH)) • Use 0 to FFFFH to designate the count that will be the notification timing to the QCPU when a remote password mismatch occurs during the user/external device unlock processing after the modem line has been connected.
CHAPTER 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 (2001H)) • If communications are done by connecting to the GX Developer via a modem, specify whether the callback function is to be used or not. Also specify the callback operation in the case that the callback function is used.
(c) Data No. for Callback designation area (Addresses 8449 to 8458 (2101H to 210AH)) • This specifies the connection data registration No. where the callback destination GX Developer side's telephone No. is registered. Connection data are data that have been registered in the Q Series C24's flash ROM or buffer memory. See Page 139, Section 3.4.4 for connection data registration. • In the following case, the connection data telephone No. specified in callback data No. 1 becomes the callback destination.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (h) Accumulated count of callback receive procedure cancel storage area (Address 8948 (22F4H)) The accumulated count value for the number of callback procedures that were terminated from the initial GX Developer by the Q Series C24 when a line connection request by another GX Developer was executed during temporary line disconnect from the GX Developer side through callback specification is stored here.
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.
CHAPTER 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. • If registered using GX Configurator-SC • Comments can be set to a maximum of 254 bytes. (These are not used for control.) • Telephone numbers can be set to a maximum of 62 bytes. 3 • Messages can be set to a maximum of 254 bytes.
(c) When the number of times remote password mismatch occurs is large • When the number of times notification of a remote password mismatch is received exceeds the number of times specified in buffer memory address 8204 (200CH), the Q Series C24 disconnects the line automatically. (The connection signal (X12) turns OFF.) After confirming the remote password registered in the QCPU and the remote password specified in the external device execute line connection again.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (9) Number of modules for which the remote password check can be set A maximum of eight modules can be registered with remote passwords in the QCPU.*1 To set the remote password in a module, use the GX Developer remote password setting screen.
(12)An example of what to do on the programmable controller CPU side for improper access from the external device The following is an example of performing, on the programmable controller CPU side, the line disconnect processing with respect to the opposite device and prohibiting receive via a modem when the number of "remote password mismatch" detected by the Q series C24 remote password check function exceeds the number set by the user.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION 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.
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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION *1 *2 *3 *4 *5 *6 Page 76, Section 3.2, Page 82, Section 3.3, User's manual (Basic) User's Manual (Basic) Page 131, Section 3.4.2, User's Manual (Basic) for settings of the modem function. Page 134, Section 3.4.3, User's Manual (Basic) Page 139, Section 3.4.4, User's Manual (Basic) Page 144, Section 3.4.5, User's Manual (Basic) 3 3.
(2) Procedure when executing data communications indicates processing performed by the user. Line connection waiting side Line connection side Q Series C24 Perform the processing up to the modem/TA initialization by the procedure in (1). Modem Modem Q Series C24 or External device Perform the processing up to the modem/TA initialization by the procedure in (1).
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) If notification is made Pager receiver Modem indicates processing performed by the user. Q Series C24 (Line connection side) 0 1 (1) Perform the processing up to the point where the modem/TA is initialized by the procedure in (1). 3 Modem initialization 2 3 Line connection normally completed. Notification data reception. Line connection Modem initialization completed signal (X10)=ON. Make notification Notification-issued request signal (Y14)=OFF.
(4) If accessing the QCPU from GX Developer Q Series C24 Perform the processing up to the point where the modem/TA is initialized by the procedure in (1). Modem Modem 0 indicates processing performed by the user. GX Developer (Line connection side) Initialize the personal computer side modem. 1 Registration of the modem connected to the personal computer Registration complete Modem initialization 2 Line connection wait state Modem initialization completed signal (X10) = ON Execute line connection.
CHAPTER 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.
(2) Initial settings by GX Configurator-SC (set in the setting screen for modem function system) (a) Perform initial settings on the interface side that use the modem function as described in Page 105, Section 3.3.6: The following table shows the default settings in the "Modem function system setting" screen and whether setting is possible or impossible in each type of communications.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) All transmissions using the modem function are transmitted in full-duplex. Leave the following initial settings for the interface side that uses the modem function as default. (Default value) • CD terminal check: Not checked • Communication method: full-duplex communication (c) The processes that correspond to the following output signals may not be aborted.
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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (5) Registration contents at shipment • The data for initialization registered in the Flash ROM of the Q series C24 are listed below: Registration number Hexadecimal Initialization command Decimal 7D0H 2000 ATQ0V1E1X1\J0\Q2\V2\N3S0=1 7D1H 2001 ATQ0V1E1X1\Q2\V2\N3S0=1 7D2H 2002 ATQ0V1E1X1&K3\N3S0=1 7D3H 2003 ATQ0V1E1X1&H1&R2&A3&D2S0=1 7D4H 2004 ATQ0V1E1X1\J0\Q2\N3S0=1 7D5H 2005 ATE1Q0V1&C1&D2&H1&I0&R2&S0S0=1 7D6H 2006 ATE1Q0V1&C1&D2&K3&S0
(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.*1 *1 The factory setting of initialization data stored in the Flash ROM of the Q series C24 cannot be deleted. (Registration example) Remark Use \\ code to specify a field to register "\" if GX Configurator-SC is used for data for modem initialization.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) For the buffer memory of the Q series C24 • The initialization data write (registration) and read operations are performed by designating an applicable area that corresponds to registration numbers 8001H to 801FH for the user frame registration area (addresses: 1B00H to 1FF6H). When deleting the initialization data, write "0" to the number of registration data bytes designation area.
• The following shows an example of a sequence program used to write the initialization data (registration).
CHAPTER 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.
(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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) For the buffer memory of the Q series C24 • The connection data write (registration) and read operations are performed by designating an applicable area that corresponds to registration numbers 8001H to 801FH for the user frame registration area (addresses: 1B00H to 1FF6H). When deleting the connection data, write "0" to the number of registration data bytes designation area.
(Data for connection area): 44 bytes Designated/stored value and contents Number of bytes Data type Whether or not notification is performed, and the notification target module are designated. 0: No notification 3: Notification performed • In the case of 3 above, the wait time for message transmission in the notification message must be designated. 2 Binary • The other party's phone number used to establish line connection when communicating data or performing notification is designated.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION • An example of a sequence program used for writing (registering) of data for connection is shown below.
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: • The initial settings for the Q series C24 as shown in Page 134, Section 3.4.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION 2) Output count designation area (address: 185/345 (B9H/159H)): 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.
(5) If the modem/TA is initialized by a sequence program (a) I/O signals used in initialization The initialization request signal (Y10), initialization complete signal (X10) and initialization/connection abnormal complete signal (X13) are used.
CHAPTER 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.*1 *1 When the initialization data has been registered from GX Configurator-SC or from the programmable controller CPU.
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. The connection processing such as a connection request (Y11) to I/O signal is, therefore, unnecessary.
CHAPTER 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.
When performing the initialization and the line connection from the Q series C24 side simultaneously Buffer memory for initialization *1 Buffer memory for connection Address: 35H (53) 0 3000 Normal completion Connection request Y11 Initialization completion X10 Dial in progress X11 Connection in progress X12 RS-232 CD terminal * Set "Display a result code using the AT command" in the local station side modem.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION When initiating the line connection from the partner device after the completion of initialization Buffer memory for connection Address: 35H (53) 0 Connection request Y11 Initialization completion X10 Dial in progress X11 3 (OFF) (ON) (OFF) (Normal connection) Connection in progress X12 (Normal connection) RS-232 CD terminal Reception * Set "Display a result code using the AT command" in the local station side modem.
(5) Line connection program example An example of a line connection program is shown below. (a) Example of initiating line connection from the Q series C24 side following the initialization completion When the data for connection has been registered from GX Configurator-SC or from the programmable controller CPU.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) 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 M0: Accessible flag M1: Data registration complete flag for initialization M2: Data registration complete flag for connection*1 M3: Initialization complete
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 the Q series C24 side.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Remark 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 MODE RUN CH1. 3 Station B QJ71C24-R2 Q25HCPU QJ71C24-R2 Q25HCPU MODE RUN CH2. ERR. ERR. USER BAT. USER BAT. CH1. CH2. BOOT BOOT Public line Modem CH1. RS-232 cable USB CH1.
Station A (connection request side) Connection request Y11 Initialization completion X10 Connection in progress X12 Disconnection request Y12 Disconnection completion X14 Connection Communication Disconnection RS-232 CD terminal Station B (connection reception side) Initialization completion X10 Connection in progress X12 Disconnection request Y12 (OFF) Disconnection completion X14 (OFF) (ON) RS-232 CD terminal * It is possible to disconnect line from Station B, as well.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (b) When notifying to pager receiver • Initial setting by GX Configurator-SC Register the data number registration area for connection below in the "Modem function system setting" screen.
When abnormal completion Buffer memory for Q series C24 initial setting Notification execution designation area 0 (Address: 2FH (47)) …… 1 Buffer memory for notification Data number designation area for connection (Address: 35H (53)) 0 3000 Modem function error code storage area (Address: 221H (545)) 0 (Error code) Notification execution data storage area (Address: 22AH (554)) …… 0 Initialization completion X10 (ON) Connection in progress X12 (OFF) Notification X15 normal completion (OFF)
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Precautions for performing data communication and notification (a) When communicating data with the external device • 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.
(4) Program for notification example An example of program for notification is shown below.
CHAPTER 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.
● Line disconnection processing can be conducted from either device as long as the connection is in progress. ● The line disconnection processing disconnects the line connection with the external device as well as the connection with the Q series C24 modem. ● Even when an error occurs during the line disconnection, the disconnection processing will be forced.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION (3) Program example for line disconnection A program example for line disconnection is shown below.
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. Modify the data for initialization and data for connection to match each system environment. When adding errorhandling procedures, add them separately by seeing the explanation in this chapter.
CHAPTER 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.
Access possible Modem initialization, line connection possible Data communications possible Data transmission possible Line disconnect possible Conversion of modem initialization, line connection commands to pulses Modem initialization, line connection processing to sub routine Conversion of data communications (transmission) commands to pulses
CHAPTER 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 3 [Data transmission processing] Set the transmission data Set the transmission channel on CH1 Set the transmission data count Execute the transmission request
[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 168
CHAPTER 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. (a) GX Developer switch settings ( Page 131, Section 3.4.2) Switch No.
Access possible Data transmission possible Set the transmission data Set the transmission channel on CH1 Set the transmission data count Execute transmission request Transmission normally completed Transmission abnormally completed Set the data reception channel on CH1 Execute reading of receive data Reading of receive data normally completed Reading of receive data abnorm
CHAPTER 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.
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 To the data registration processing for initialization subroutine To the data registration processing for connection subroutine Convert the initialization command into pulse Various compl
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Convert the reset command of various request signal into pulse To the various request signal and the complete signal OFF subroutine Output the various complete flag status (LED display) P1 3 Data registration processing for initialization subroutine • Set the number of bytes of the registration data • Set the user control data (control number) • Set the initialization command • Write the data for initialization (Data No.
P4 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 • When the initialization/connection abnormal complete signal ON, the error code is read and request signal is reset P51 Data communication processing subroutine (Non procedure protocol, transmission) • Set the transmission data • Sets the transmission channel to CH1 • Set t
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION · Received data read normally completed · Received data read abnormally completed 3 Line disconnection processing subroutine (Line disconnection from local station) · 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 Subroutine resetting various request s
(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" screen and register them in the Q series C24. (Settings other than the items shown below are not required.
CHAPTER 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 3 Convert the initialization command into pulse Various complete flags after the modem initialization processing is reset To the modem initialization processing subroutine Convert the data communicat
P1 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.
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Data reception processing subroutine • Sets the data reception channel to CH1 • Sets the data setting completion flag for reading the receive data • Executes the receive data reading • Receive data read execution flag is set 3 • Receive data normal completion • Receive data abnormal completion Resets subroutine of various request signal and complete signal • Various request signal is reset • When any complete signal ON, the modem disconnection request sig
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 ConfiguratorSC's "Modem function system setting" screen and register them in the Q series C24. (Settings other than the items shown below are not required.
CHAPTER 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 3 Various complete flags after the modem initialization processing is reset To the modem initialization processing subroutine Converts the notification
P2 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 • Set the space to the remainder of the telephone number designation area • Set the external line dialing number (0) • Set the line type (tone) • Set the waiting time for the message transmission • Set the message • Set the message length • Write the data for
CHAPTER 3 COMMUNICATIONS BY THE MODEM FUNCTION Memo 3 3.
CHAPTER 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. • Data reception during communication using the non procedure protocol • Data reception during communication using the bidirectional protocol This chapter explains a case in which data reception using the following data communication functions is performed with an interrupt program.
CHAPTER 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. of module screen.
4.2 Interrupt Program Startup Timing The following explains the startup timing for interrupt program when performing data reception with an interrupt program during communication using the non procedure protocol or bidirectional protocol. (1) The startup timing is the same for communication using either the non procedure protocol or bidirectional protocol. (2) Receive data from the external device is stored in the reception area of the buffer memory.
CHAPTER 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. FEND 4 SM400 I50 Z.
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) • Interrupt pointer setting with GX Developer • PLC side: Interrupt pointer Start No. = 50, Interrupt pointer No.
CHAPTER 4 RECEIVING DATA WITH AN INTERRUPT PROGRAM Data register Buffer memory D200 D201 Reception area No. of receive data Receive data D2nn 4 ● 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. For more details on the BUFRCVS instruction, see Page 371, Section 17.2.
4.4.2 Precautions when receiving data with an interrupt program The following shows the precautionary notes when receiving data with an interrupt program. (1) Create an interrupt program for data reception for each interface. (2) Use GX Configurator-SC to set whether or not the interrupt program is started. Whether or not the interrupt program is started can also be set with direct writing to the buffer memory. However, if it is specified during data reception, the interrupt program will not start.
CHAPTER 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.
CHAPTER 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. This chapter explains how to change the units (word to byte, byte to word) of the data length (count) sent/received with the following data communication functions.
CHAPTER 5 CHANGING SEND AND RECEIVE DATA LENGTH UNITS TO BYTE UNITS (WORD/BYTES UNITS SETTING) Memo 5 193
CHAPTER 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. The monitoring times can be set for each interface. The Q series C24 uses the monitoring time set by the user to control data transmission to and reception from the external device.
CHAPTER 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. The Q series C24 monitors the reception interval in byte units at the start of data reception from the external device and ends monitoring when the preset last data is received and repeats this operation.
CR External device Timer 0 Set time (*1) Q series C24 Abnormal reception detection signal (X4/XB) *1 CR is treated as 1 byte of data included in the message. • Data communications using user frames • When designating the last frame, an arbitrary part of data in the area starting from the start of the reception of the current message until time-out is read into the Q series C24, and the data in the last frame area is ignored (deleted).
CHAPTER 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES (2) Changing the no-reception monitoring time (timer 0) (a) 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" screen.
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. When the Q series C24 receives a message from the external device, it monitors the programmable controller CPU processing time up to the start of transmission of the response message to the external device.
CHAPTER 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES (2) Changing the response monitoring time (timer 1) The response monitoring time (timer 1) is registered on the GX Configurator-SC's "Transmission control and others system setting" screen. For data communication using the MC protocol, set the response monitoring time so that it is longer than the message wait time.*1 *1 The message wait time is designated at the following locations.
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. When the Q series C24 transmits a message, it monitors the wait time up to the end of transmission of the message.
CHAPTER 6 CHANGING THE DATA COMMUNICATIONS MONITORING TIMES • 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 257H, 267H) for the target interface and performs transmission processing abnormal completion. If message transmission was terminated midway, the Q series C24 does not transmit the remaining data.
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. When the Q series C24 transmits a response message in reply to a command message received from the external device, transmission of the response message is delayed by the message wait time, or longer.
CHAPTER 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL CHAPTER 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.
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. (Terminate) External device (Restart)...
CHAPTER 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL (b) 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.
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. The four kinds of Q series C24 DC code control shown below are available. These control functions can be used simultaneously.
CHAPTER 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL (a) Q Series C24 DC1/DC3 transmission control and free OS area specification The control is performed in the same as those described in Page 204, Section 7.1 (1), DTR control. The free OS area specification are the same as those described in Page 205, Section 7.1 (1) (b). The Q series C24 transmits DC1 or DC3 to the external device instead of turning the ER (DTR) signal on/off.
(2) DC2/DC4 transmission control, DC2/DC4 reception control The Q series C24 encloses the send data from the local station in the DC2 and DC4 codes and transmits it to the external device and processes the data received from an external device enclosed in the DC2 and DC4 codes as valid data.
CHAPTER 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL (3) The transmission control method and changing the DC code Switching between DC code control method and DTR/DSR control as well as changing of the DC code are registered on the GX Configurator-SC's "Transmission control and others system setting" screen. 7 7.
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 CPU The external device and programmable controller CPU must agree to the following. • Whether or not a transmission control function is to be used. If a control function is used, which control is to be used for data communications. • Control timing.
CHAPTER 7 DATA COMMUNICATIONS USING DC CODE TRANSMISSION CONTROL (6) Handling of ER (DTR) and DR (DSR) signals when DTR/DSR control is not used When the DTR/DSR control function is not used, the Q series C24 handles the ER (DTR) and DR (DSR) signals as described below. • Leaves the ER (DTR) signal ON. • Ignores the DR (DSR) signal ON/OFF state. 7 7.
CHAPTER 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. The QJ71C24 (N)-R2 can be set for each interface. When the Q series C24 is started, full-duplex communications is set. The user can change the communications method to match the specifications of the external device.
CHAPTER 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. • RS (RTS) signal: The Q series C24 turns ON/OFF this signal as shown below.
(b) When Q series C24 is designated "non-priority" Continue data transmission. Data B Data A External device Programmable controller CPU Data C-1 SD(TXD) (Send Data) RS(RTS) (Send Request) Data C-2 Data C-1 Since the Q series C24 does not have priority, when the CD(DCD) signal is turned ON, it terminates transmission. Retransmission *1 Data C-2 4) 1) CS(CTS) (Send Possible) CD(DCD) (Data Carrier Detect) RD(RXD) (Receive Data) 5) 2) The Q series C24 stores the receive data.
CHAPTER 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.
(b) When Q series C24 is designated "non-priority" Continue data transmission. Data C External device Programmable controller CPU Send request SD(TXD) (Send Data) Data B Data A Send request Time for transmitting 2 characters Data A 1) Data B Since the Q series C24 does not have priority, when the CD(DCD) signal is turned ON it terminates transmission.
CHAPTER 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.
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 halfduplex 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 halfduplex communications signals (CS (CTS), DR (DSR), or CD (DCD) signal).
CHAPTER 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.
CHAPTER 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. The following functions can use Q series C24 user frames to transmit and receive data. • MC protocol on-demand function. ( Page 243, CHAPTER 10) • Non procedure protocol data transmit and receive functions.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.1.1 User frames to be registered and used by the user 9 The following explains the registered data, data contents that are transmitted and received, and how the Q series C24 handles user frames registered the Q series C24 Flash ROM or buffer memory by the user. (1) General description User frames registered by the user are frames that contain arbitrary data that matches the specifications of the external device.
(4) Variable data "Variable data" is the generic term for the following data. These variable data can be handled as part of a user frame. • Sum check code whose objective is an arbitrary range in the transmit and receive messages. • Horizontal parity code whose objective is a determined range in the transmit and receive messages. • Two's complement sum check code whose objective is a determined range in the transmit and receive messages. • Q series C24 station No.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION (b) Variable data designation contents, data contents transmitted and received, and handling by the Q series C24 9 The table below shows the register codes (FFH+00H) to (FFH + FFH) combinations for handling variable data, the data contents that are transmitted and received, and how the Q series C24 handles the data. Combinations other than those listed in the table cannot be registered.
(Calculation range when transmitting data) Range 4 Range 3 User frame (1st) User frame (2nd) User frame ("n-1"th) User frame ("n"th) Register code FFH H Range 1 Range 2 (Calculation range when transmitting data) (Calculation range when receiving data) Range 4 Range 3 User frame (First frame) Arbitrary data User frame (Last frame) Register code FFH H Range 1 Range 2 (Calculation range when receiving data) [Range 1] • When transmitting: Calculation includes everything from the data following the
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION [Range 3] • When transmitting: Calculation includes everything from the data following the first frame (user frame (1st) when multiple frames have been specified) to the frame preceding the last one (user frame ("n"th) when 9 there are multiple frames specified).
1) Q series C24 processing corresponding to register codes FFH and 00H 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 FFH and 00H. Assume that a user frame containing the data codes 02H, FFH, 00H, and 3BH was set as receive user frame No. 3EAH. • When the Q series C24 receives the 3 bytes of data "STX, arbitrary data (1 byte), ; ", it processes them as if user frame No. 3EAH was received.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 For register code FFH + 05H User frame register code Transmission/ reception data code 02H FFH+01H 3BH S Station T No.
• How to calculate the two's complement sum check code The lower 1 byte of the value obtained by adding the subject data as binary data is converted to a two's complement, then converted to a hexadecimal ASCII code.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION (In the case of the example [Range 2]) (H) (L) 9 02H + 00H + 3BH + 41H + 31H + ABH + 12H + 03H = 016FH Register code Data contents transmitted and received (arrangement) FFH, F4H 01H and 6FH are transmitted and received, beginning from 6FH. FFH, F6H 6FH is transmitted and received. FFH, F7H "6" and "F" are transmitted and received, beginning from "6". FFH, F9H "F" is transmitted and received.
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. The following table lists one-byte data (codes: 01H to FEH) to a maximum of five-byte data, which is registered in the frames and can be used for read-only (frame numbers: 1H to 3E7H). Each of these frames is treated as an user frame.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.2 Transmission/Reception Processing Using User Frame Register Data 9 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.
Remark 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 S L T 1 A ; A B C 1 2 3 ; C R F X When message transmitted from the station No.1 Q series C24 Arbitrary data "ABC123" … Data designated to the station No.1 Q series C24 send data designation area.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9 (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. If the last frame is set, when the Q series C24 receives data with the same contents as the designated last frame, it sends a reception data read request to the programmable controller CPU.
Remark 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. External device Data used by the external device to indicate the transmission destination S Arbitrary C L T 5 A ; data area ; R F X CPU C24 (0) CPU C24 (1) Received by the station No.5 Q series C24.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.3 Precautions when Registering, Reading, Deleting and Using User Frames 9 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. (1) Precautions when registering, reading or deleting user frames (a) User frames can be registered using one of the following methods.
(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). The user frame number to be used can be set from the programmable controller CPU. However, please try to register frames using the utility package (GX Configurator-SC) of the Q series C24.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.4 Register/Read/Delete User Frames 9 The following explains registering, reading, and deleting user frames in the Q series C24 flash ROM or buffer memory. 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. This section explains how to register, read, or delete user frames from the programmable controller CPU.
(3) Buffer memory to use Processing Address (Hexadecimal (decimal)) Name Stored value 2H (2) Register/read/delete direction 0: No request 1: Register request 2: Read request 3: Delete request 3H (3) Frame No. direction 0: No frame No. 1000 to 1199 (3E8H to 4AFH) : Register/read/delete frame No. 4H (4) Register/read/delete result storage 0: Normal completion One or higher: Abnormal completion (error code) Write data byte count designation ( Page 238, Section 9.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION (b) User frame storage area (Addresses: 6H to 2DH, 1B01H to 1B28H, 1B2AH to 9 1B51H,...1FCFH to 1FF6H) • During the register operation, the user sequentially stores the register data of the user frame to be registered in (L) (H) order, beginning from the head area of the given area range. • During the read operation, the register data of the registered user frame is stored with the same contents as when registering.
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 Page 398, Section 17.7. (When the Q series C24 I/O signals are X/Y80 to X/Y9F) Data set for the program example are as follows: Setting item User frame No.
CHAPTER 9 CONTENTS AND REGISTRATION OF THE USER FRAMES FOR DATA COMMUNICATION 9.4.2 Reading user frames 9 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 Page 389, Section 17.5. (When the Q series C24 I/O signals are X/Y80 to X/Y9F) Read request Sets the frame No.
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 Page 398, Section 17.7. (When the Q series C24 I/O signals are X/Y80 to X/Y9F) Deletes request Sets the delete request Sets the No. of the user frame to be deleted Sets a dummy number for the allowable number of deletions Set the flash ROM write allow.
CHAPTER 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES CHAPTER 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES 10 During communications between external device and programmable controller CPU using the MC protocol, ondemand data can be transmitted from the programmable controller CPU to the external device by on-demand function 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. Page 220, CHAPTER 9 explains the types of user frames and the data that can be used. To register a user frame from the programmable controller CPU, refer to Page 220, CHAPTER 9. To register a user frame from an external device, first refer to Page 220, CHAPTER 9 and check the precautions, etc.
CHAPTER 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES • 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 10 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. Transmitted when first frame (2nd) designated. First frame (1st).
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. 10.4.1 Data communication using the ASCII code The following shows the control procedure when performing switch settings via GX Developer and registration via GX Configurator-SC.
CHAPTER 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES [Control procedure] Added by Q series C24 10 First frame (1st) External device First frame (2nd) Last frame (1st) User frame User frame Send data (Data name) S T X F9H F 9 00H 0 00H 0 0 FFH,FFH 0 F F 00H 0 03H FFH,F1H 0 1 2 3 4 5 6 7 8 E T X Sum check Code 02H Programmable controller CPU H (Example) User frame registration code Send data corresponding to registration code L 02H 46H 39H 30H 30H 30H 30H 46H 46
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 by GX Developer • Set the "Communication protocol setting" to "MC protocol (format 5)". • Set the "Station number" to "0". (2) Registration via GX Configurator-SC Register as follows when transmitting a user frame, user selected transmission data*1 or a combination of user frames.
CHAPTER 10 ON-DEMAND DATA COMMUNICATIONS USING USER FRAMES [Control procedure] Added by Q series C24 External device First frame (1st) 10 Last frame (1st) User frame Send data User frame (Data name) S T X Programmable controller CPU 03H FFH,F0H 0DH 0AH E T X Sum check code Station No.
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. (The Q series C24 I/O signals are X/Y00 to X/Y1F and are sent from the CH1 side interface.) (1) Switch settings by GX Developer Set the following setting values on the "Intelligent functional module switch setting" screen.
CHAPTER 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. 10 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. that was registered with GX Configurator-SC.
CHAPTER 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.
CHAPTER 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 11 Switch setting by GX Developer. Initial setting by GX Configurator-SC (When only default registration frame used) (When registering user frames) • Register to the Q series C24 Flash ROM. • Register to the Q series C24 buffer memory.
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.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES *1 *2 *3 *4 *5 *6 User frames for reception • The user frame for data reception can set up to a maximum of four combinations of the first frame and the last frame, regardless of whether there is a specification. • For a combination that specifies the first frame (with the first frame), it is necessary to specify the first frame even in other combinations.
(1) Reception with the first frame (combination 1-A to C) (reception using Format0) (a) Reception of combination (1-A) • 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. • Any reception data prior to the first frame will be ignored. • The Q series C24 will begin reception processing when data of the same arrangement as the first frame is received.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES (c) Reception of combination (1-C) • 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. • Any reception data prior to the first frame will be ignored. After the first frame is received, all later reception data is treated as arbitrary data.
By specifying a user frame, in which only NAK (15H) 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.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES (3) Reception without the first frame (combination 2-A, 2-B) (reception using Format-0) (a) Reception of combination (2-A) • In this method, a user frame is used as the last frame in place of the non procedure protocol data receive complete code and is transmitted from the external device together with arbitrary data. 11 • Any reception data prior to the last frame are all treated as arbitrary data.
(b) Reception of combination (2-B) • 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. • Any reception data prior to the last frame are all treated as arbitrary data. • When data of the same arrangement as the last frame is received, the Q series C24 performs a read request to the programmable controller CPU.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES Remark 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). ● When data is received using Format-0 (combination (1-C)) • The Q series C24 regards all arbitrary data after the first frame as valid data and stores it sequentially in the reception area.
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. (1) Timing for start/completion of data reception The following describes the timing for start/completion of the data reception processing with the Q series C24.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES [Combination without the first frame] Timing pattern number Reception data Combination Amount of reception data of arbitrary data Reception data prior to the reception of the first frame When receiving the first frame Reception data count < Received data count 2-A (*2) 2-B (*2) Reception data count Received data count Reception data count = 0 *1 *2 When receiving arbitrary data in the reception message When receiving the last frame Rece
[Combination with the first frame] Timing patterns for reception start and receive complete (read) (For data reception with format-0) Arbitrary data Equaling the received data count Programmable controller CPU side Last frame First frame Arbitrary data Pattern No. 1-A 2) Last frame External device side First frame Pattern No. 1-A 1) Equaling the received data count External device side Last frame First frame Pattern No. 1-B Programmable controller CPU side Pattern No.
CHAPTER 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) Arbitrary data Programmable controller CPU side 11 Equaling the received data count Programmable controller CPU side Arbitrary data Equaling the received data count Last frame Arbitrary data Complete code Last frame Arbitrary data Pattern No. 2-A 4) Complete code Pattern No.
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.
CHAPTER 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" screen. The setting items are listed below.
(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.) (a) User frame use enable/disable designation (addresses: ADH/14DH) Designate "Enable" when using user frames to receive data. b15 Buffer memory address to b0 ADH/14DH (Default 0H) Write 1H 0: Do not use. 1: Use.
CHAPTER 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. • 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. (If the external device does not transmit either one of the frames, the unsent frame No. is set to "0" (no setting)).
(c) User frame receive format designation (address: 2020H to 2023H/2120H to 2123H) 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 Page 268, Section 11.2.4 (2) (b) when it is set using a combination that specifies a user frame.
CHAPTER 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.
(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 1st combination (Last frame only) 2nd combination (Last frame only) 3rd combination (Last frame only) User frame receive format designation Exclusive format-1 received data count Format-0 Remarks The received data count becomes valid.
CHAPTER 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.
Address Dec. (Hex.) Name CH1 *1 8227 (2023H) User frame receive format designation, 4th 1H: Format 1 8229 (2025H) Exclusive format-1 received data count, 2nd 12 words 8230 (2026H) Exclusive format-1 received data count, 3rd 0 word 8231 (2027H) Exclusive format-1 received data count, 4th 2 words Indicates the settings of the user frame No. to which the first and last frame Nos. are specified in the programs. User frame No.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES (1) Example of a sequence program when setting is done using the GX Configurator-SC For details on the INPUT instruction, refer to the User's Manual (Basic). Reads combinations of user frames received. 11 Sets the reception channel to CH1. Sets the allowable number of reception data to 20. Executes reception. Sets the normal completion flag. Sets the abnormal completion flag.
(2) Example of a sequence program when setting is not done using the GX Configurator-SC For details on the INPUT instruction, refer to the User's Manual (Basic). <> \ \ \ \ \
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES \ \ \ \ 11 \ \ \ \ \ \ User frame setting for reception *2 \ \ \ \ 11.
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 signals The Q series C24 is installed at QCPU I/O signal addresses X/Y80 to X/Y9F. (2) Q series C24 interface used in data communications with the external device The Q series C24 CH1 side RS-232 interface is used.
CHAPTER 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) Additional code (Removed by Q series C24.) Transparent code D S L T E X When STX handled as transparent code. 11 10H 02H External device 02H51H 20H 0AH 0 1 2 C A B C R L E T F X (1234H) The figure shown below is for word units. 3BH 30H31H 32H33H 02H 41H 42H 43H 34H12H 0DH0AH03H First frame (corresponds to register No.
(b) When receiving with a combination of the first frame and arbitrary data (reception using Format-0) Additional code (Removed by Q series C24.) Transparent code D L E When STX handled as transparent code. S T X Receive data count Word units Receive byte count excluding frame and additional code (12)/2=6 Byte units Receive byte count excluding frame and additional code (12) 10H 02H Head data S T X External device A ; 0 1 2 S 3 T X C L R F A B C The figure shown below is for word units.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES (c) When receiving with user frame only (reception using Format-0) Head data External device 02H51H 20H 0AH ; E T X 3BH 03H Sum check code S T Q X External device station No. (For reception using first frame and last frame combination) Since there is no arbitrary data area, the receive data count is [0]. The illustration below is for reception using first frame and last frame combination.
(d) When receiving with first frame only (reception using Format-1) Head data A C K Since it is designated to system 1 received data count "0", the receive data count is [0]. The illustration below is for byte unit. External device 06H ADH Programmable controller CPU First frame (Correspond to register No.
CHAPTER 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) Receive data count Word units Receive byte count excluding frame and additional code (2)/2=1 Byte units Receive byte count excluding frame and additional code (2) Head data N A K (0022) External device 15H Programmable controller CPU The illustration below is for byte unit.
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 signals The Q series C24 is installed at QCPU I/O signal addresses X/Y80 to X/Y9F. (2) Q series C24 interface used in data communications with the external device The Q series C24 CH1 side RS-232 interface is used.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES (a) When receiving using arbitrary data and last frame combination. (reception using Format-0) Additional code (Removed by the Q series C24.) Transparent code D S L T E X When STX is handled as transparent code.
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. (1) Send data list Only the data list combinations shown below are allowed during user frame data transmission.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES Handling of the Q series C24 send data ● 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. ● For the user frame section and arbitrary data section, the data can be sent as ASCII code using the ASCII-BIN conversion. For more details on the ASCII-BIN conversion, see Page 319, CHAPTER 13.
11.4.2 Transmission procedure The following describes the transmission procedure when a message containing user frames is transmitted to the external device.
CHAPTER 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. (1) Settings via GX Configurator-SC 11 Perform settings on the following screen to send data using user frames. • "Non procedure system setting" screen • "Transmission user frame No.
Sending data in the following sequence Sending sequence Transmission data type User frame No. 1 User frame 2H (2) 2 User frame 3E82H (1000) 3 Arbitrary data 4 02H (STX) 8000H (-32768) User frame 400H (1024) Address Buffer memory B6H 0 or the following frame designation No To the external device Contents of sent/registered data 00H, 3BH (station No.
CHAPTER 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. • User frame being transmitted storage area (addresses: B6H/156H) What number of the transmission frame number designation area is being sent is stored in the data transmission via user frames.
• Output count designation area (addresses: B9H/159H) Write the output count of the user frames to be sent from the position designate in the output head pointer designation area. b15 Buffer memory address to b0 B9H 0 to 100 (CH1 side) 159H 0 to 100 (CH2 side) 0 : No designation 1 : Transmit 1 frame to to 100 : Transmit 100 frames Remark The operation is completed normally without data transmission if the value for the output count designation area is "0." • Transmission frame No.
CHAPTER 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 11 conditions case: • The Q series C24 I/O signals: The Q series C24 installed at QCPU I/O signal addresses X/Y80 to X/Y9F.
(1) Sequence program example when setting is done with GX Configurator-SC For further details on the PRR instruction, see Page 369, CHAPTER 17. Programmable controller CPU side 02H 51H Registration No.
CHAPTER 11 DATA COMMUNICATIONS USING USER FRAMES (2) Sequence program example when setting is not done with 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 Page 369, CHAPTER 17. 11 Sets arbitrary transmission data. Sets the number of transmitted data. Sets the transmission user frames in D5 to D9. Sets output frame No. in the buffer memory.
CHAPTER 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. • Transparent code: One-byte data for transmission control.
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES (3) During data communication using the ASCII-BIN conversion The handling of transparent codes and additional codes is done for data after ASCII-BIN conversion during transmission and data immediately before the conversion during reception.
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. The following explains the registration of transparent and additional codes. (1) For each interface, 10 combinations and one combination of transparent codes and additional codes can be set for transmission and reception, respectively.
CHAPTER 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.
(b) When transparent code/additional code data set for transmission is detected during data transmission, the additional code designation data is added immediately before, and is then transmitted. During data transmission using user frames, even if a transparent code or additional code has been specified in the send transparent code designation area, it is possible to transmit data without adding the additional code data to the user frame portion or arbitrary data.
CHAPTER 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 • Receiving • If a receive transparent code is designated, the additional code designation data is deleted (removed). • The arbitrary data section is stored in the reception area of the buffer memory.
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) D L E Receive 12H 10H 02H 3AH BCH (For 02H) (H) Delete Additional Addition code Send Arbitrary data section (L) (0002H) 00H , 02H (0212H) 02H , 12H (BC3AH) BCH , 3AH Transmission data count/Receive data count Transmission data/ receive data (The data count is in word units) Transparent code Additional code (For 10H) When AS
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES (b) Communication using user frames • 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. • If a sum check code is designated in a user frame (last frame), the sum check code is calculated. • The arbitrary data section is stored in the reception area of the buffer memory.
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 function module switch setting" screen.
CHAPTER 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.
(2) Receiving based on the completed data count Additional code: 10H (DLE), transparent code: 02H (STX), Completed data count: Six words or 12 bytes Additional code (Q series C24 deletes) Transparent code Head data 0 External device side 1 2 D S N 3 L T U E X L L C L A For word unit: Received byte count excluding additional code (12)/2=6 For byte unit: Received byte count excluding additional code (12) B R F (1234H) 30H 31H 32H 33H 10H 02H 00H 41H 42H 34H12H 0DH0AH Programmable controller CPU side
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES 12.4.2 Example of data transmission The following shows an example of data transmission.
• Additional code: 10H (DLE), transparent code: 02H (STX) (1st group), Additional code: 10H (DLE), transparent code: 03H (ETX) (2nd group) External device side Head data Additional code (1st group) Additional code (2nd group) Transparent code (1st group) Transparent code (1st group) D S N D E N C L 0 1 2 3 L T U A B L T U E X L E X L R F L L Programmable controller CPU side For word unit: Received byte count excluding additional code (12)/2=6 For byte unit: Received byte count excluding additional
CHAPTER 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.
(c) Data having an additional code that is added or deleted cannot be included in the data length, nor will it be used for the sum check code.
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES (b) Sending • The transmission control code data is added to the transmission data designated by the programmable controller CPU (arbitrary data section of the transmission message), and that transmission data is transmitted. If ASCII-BIN conversion is designated, the transmission data is sent after it is converted to ASCII code data.
The following example shows the data arrangement when data is sent and received. (The communication section of the response message is omitted.
CHAPTER 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 Switch 1 Switch 2 Switch 3 CH1 Transmission setting CH1 Communication rate setting Setting value Remarks Set according to the external device.
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 ASCIIBIN conversion is set to Disable Additional code: 10H (DLE), transparent code: 02H (STX) Additional code (the Q series C24 deletes.
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES ● When the receive transparent code designation is set to Enable and ASCII-BIN conversion is set to Disable, the codes for receivable arbitrary data sections and those for receive data that is stored in the buffer memory's reception area are as follows: Item Receive transparent code designation section Data length, data section Additional code Transparent code Receivable codes Codes stored in the reception area 01H to FFH (Delete) 00H to FFH 00H to
(2) When the receive transparent code designation is set to Enable and the ASCIIBIN conversion is set to Enable Additional code: 10H (DLE), transparent code: 02H (STX) E N Q External device side Data length Data section Sum check code (0004H) L H L H 0 4 0 0 0 2 1 1 4 1 4 2 3 4 1 2 0 D 0 A 05H 30H 34H 30H 30H 30H 32H 31H 31H 34H 31H 34H 32H 33H 34H 31H 32H 30H 44H 30H 41H 02H 04H Programmable controller CPU side A C K Exclude the additional code and set to an even byte.
CHAPTER 12 TRANSPARENT CODES AND ADDITIONAL CODES 12.6.2 Example of data transmission The following shows an example of data transmission.
(2) When the send transparent code designation is set to Enabled and the ASCIIBIN conversion is set to Enabled Additional code: 10H (DLE), transparent code: 02H (STX) (1st group) Additional code: 10H (DLE), transparent code: 03H (ETX) (2nd group) A C K External device side 06H E N Q Programmable controller CPU side Transmission command Programmable controller CPU Data length (0004H) Data section Sum check code L H L H 0 4 0 0 0 2 1 1 4 1 4 2 0 3 0 0 0 D 0 A 05H 30H 34H 30H 30H 30H 32H 31H 31H 34H 31H
CHAPTER 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) CHAPTER 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.
13.2 Settings for ASCII-BIN Conversion In order to convert data to be sent/received via the non procedure protocol and bidirectional protocol from binary code to ASCII code, it is necessary to make specific settings for the Q series C24 before performing data communication. The following describes the settings for the ASCII-BIN conversion: (1) The ASCII-BIN conversion settings can be designated for each interface.
CHAPTER 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 transmission/reception data for which ASCIIBIN conversion can be performed.
• 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. • Specify the number obtained by adding 4000H to the registered user frame No.
CHAPTER 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" screen.
13.4.1 Example of data reception The following shows an example of data reception: (1) Reception using the receive complete code Complete code: 9H (the code after ASCII-BIN conversion) Data corresponding to complete code Head data 0 1 2 3 4 5 A B C D E 9 External device side Number of bytes after ASCII-BIN conversion: ((6)/2=3) when word units are used, (6) when byte units are used * ⋅ Two bytes of receive data is read to the programmable controller CPU as one-byte data.
CHAPTER 13 COMMUNICATING WITH ASCII CODE (ASCII-BIN CONVERSION) (2) Reception based on the received data count Head data 0 1 2 3 4 5 A B C D E Number of bytes after ASCII-BIN conversion: ((6)/2=3) when word units are used, (6) when byte units are used 9 External device side * Two bytes of reception data is read to the programmable controller CPU as one-byte data.
(3) Example of reception using user frames Programmable controller CPU side 02H 51H 00H 0AH 3BH 30H 31H 32H46H 35H 41H 42H 43H 44H 45H 46H 39H 03H ; 0 1 2 First frame (corresponds to register number 3E8H) F 5 A B C D E F Arbitrary data section 9 E T X Sum check code Station No. of external device External device side S T Q X Station No.
CHAPTER 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 Programmable controller CPU side Data transmission area (arbitrary data section) 3 4 1 2 A B 5 * Eight characters of data in the transmission area are sent in two characters per byte through ASCII-BIN conversion.
(2) Example of transmission by user frame Programmable controller CPU side 02H 51H T O T A L ; (012 DH) 2DH E T X Data in transmission area (arbitrary data section) (Total number) 3 4 1 2 A B 5 6 01H 33H 34H 31H 32H 41H 42H 35H 36H 03H Corresponds to 3F3H Corresponds to 8001H (for second designated (for third designated frame) frame) 8000H (for fourth designated frame) B7H PRR ON B8H M0 ON Status display device M1 at completion One scan B9H Abnormal completion Normal completion
CHAPTER 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 ASCIIBIN conversion can be performed.
(d) Conversion of error code • At transmission: The Q series C24 converts an error code for a detected error to 4-digit ASCII code data (hexadecimal), then sends it beginning with the lowest byte (L). (For 3412H, it is converted to "3412" and sent beginning with "12".) • At reception: The Q series C24 converts the first 2 digits of a received error code (4-digit ASCII code data (hexadecimal)) to 2-byte binary code data as the lower byte, and stores it in the transmission result storage area.
CHAPTER 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" screen.
13.6.1 Example of data reception The following shows an example of data reception when ASCII-BIN conversion is enabled.
CHAPTER 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.
CHAPTER 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. You do not have to read this chapter when using a system configuration other than m: n to communicate data.
CHAPTER 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION (3) The data transmitted by one external device is received by all the other external devices, including the external device that transmitted the data. The send data from a programmable controller CPU is also received by all the external devices. Therefore, it may be necessary for devices that received data not addressed to them (judged by station No. in the message) to ignore the receive data.
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.
CHAPTER 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.
(2) When message structure different from that of control procedure format frames can be used (a) Change the head data of each message to other arbitrary data. • When selecting ASCII code format 1, format 2, or format 4, change ENQ (05H). (b) Arbitrarily list the data following the head data of each message according to the user specifications. Command Message wait Sum check code (;) Transmission source station No. External device 1 (station No. 1BH) Transmission destination station No.
CHAPTER 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 CPU The following uses examples to describe the procedure when communicating data with a programmable controller CPU by interlocking the external devices. 14.3.
1. When the system starts, the external device with the lowest station No. (1BH) is given the line usage right. 2. The external device that obtained the line usage right, a) When communicating data with the programmable controller CPU, begins processing from step 4 after communicating data with the programmable controller CPU within the maximum data communications time from among all the external devices.
CHAPTER 14 DATA COMMUNICATIONS USING EXTERNAL DEVICE AND PROGRAMMABLE CONTROLLER CPU M : N CONFIGURATION 5. The external device that accepts the line usage right transmits a response message to the external device that passed it the line usage right. Message of 4 above (;) (1C) (1B) (ZZ) (2) Sum check code Message wait External device that transfers line usage right (1BH) Command Transmission destination station No. Transmission source station No.
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.
CHAPTER 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. A message structure example is shown in step 2. 2. The master station transmits a permission granted response to the slave station that issued the communications request. Massage of 1 Transmission source station No.
6. The master station that received the communications complete report transmits a response to the slave station that transmitted the communications complete report. (1B) (1C) (ZY) (2) Sum check code Message wait Transmission destination station No. Transmission source station No. (;) Command *1 Massage of 5 External device of slave station to perform the communications complete report (1CH) *1 Command "ZY" is a communications complete report command for description purpose.
CHAPTER 15 SWITCHING THE MODE AFTER STARTING CHAPTER 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.
(2) Mode switching from programmable controller CPU (a) Regardless of the current communication protocol of the connected interface, the external device can perform mode switching from the sequence program. (b) The communication protocol can be changed from the sequence program as shown below.
CHAPTER 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. (1) Switching the communication protocol (a) The communication protocol setting of each interface can be switched.
15.1.2 Operation for mode switching The following describes the Q series C24 operation for mode switching. (1) Processing currently in execution (a) If there is a mode switching request, mode switching immediately starts. (b) If one of the following processing was being performed when a mode switching request was issued, that processing is terminated.
CHAPTER 15 SWITCHING THE MODE AFTER STARTING 15.2 Mode Switching Precautions (1) Set-up between the external device and the programmable controller CPU Make the following setting for the external device and the programmable controller CPU so that mode switching is not performed during data communications. (a) Which side is to switch the mode, the programmable controller CPU or external device (b) Timing for each mode switching pattern (For mode switching patterns, Page 345, CHAPTER 15.
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.
CHAPTER 15 SWITCHING THE MODE AFTER STARTING (a) Switching mode No. designation area (addresses: 90H, 130H) Write the desired mode No. (0001H to 0007H, 00FFH).
[For the Q series C24] b 15 to b8 b7 b6 b5 b4 b3 b2 b1 b0 0 80H to 8FH CH1 side *1 CH2 side *1 80H to 8FH Description Bit b0 *1 *2 Operation setting OFF(0) ON(1) Independent Link Remarks Be sure to set the CH1 side to OFF(0). b1 Data bit 7 8 b2 Parity bit NO Yes Vertical parity b3 Even/odd parity Odd Even Valid only when parity bit is set to Yes. Parity bit is not included.
CHAPTER 15 SWITCHING THE MODE AFTER STARTING Remark The programmable controller CPU must also be aware of the following I/O signals for handshake and buffer memories when the mode is switched from an external device. • Mode switching in progress signal (X6/XD) • Switch setting error, mode switching error storage area (address: 203H) 15 15.
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. *1 Mode switching request Y2/Y9 Mode switching in progress X6/XD Approx. 400 ms CH ERR.
CHAPTER 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.
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. *1 External device Mode switching command message *5 Mode switching response message Programmable controller CPU (Normal end) Approx. 400 ms Mode switching in progress X6/XD *2 CH ERR.
CHAPTER 15 SWITCHING THE MODE AFTER STARTING 15.5.2 Mode switching sample program The following shows a programmable controller CPU sample sequence program that switches the CH1 interface mode from an external device. (The Q series C24 I/O signals X/Y00 to X/Y1F) Reads the mode switching error contents. Mode switching complete. Remodification of setting value of buffer memory special applications area Changes the setting value of the communication protocol according to the communication specification.
CHAPTER 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.
CHAPTER 16 USING COMMUNICATION DATA MONITORING FUNCTION 16.1.2 Communication data monitoring operation The following describes the communication data monitoring operation. ● 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 0H to 9H.
(2) During monitoring (a) After monitoring starts, data of reception, transmission, receiving error, and signal change are stored from the head address of the monitor data area in the order of occurrence. (b) When the monitoring data exceeds the capacity of the monitor data area, monitoring is continued by writing new data over the oldest data. However, monitoring may automatically stop according to the settings of the monitor option area (Address: 2019H/2119H). ( Page 363, Section 16.
CHAPTER 16 USING COMMUNICATION DATA MONITORING FUNCTION (3) Monitor stop Monitoring stops if any of the following conditions is satisfied. (a) Monitor stop by user instructions Monitoring stops if "0000H" is written in the communication data monitoring specification area of the buffer memory. (Set by the user) (b) Monitor stop by the system when the monitor data area is full • The full stop specification (bit 0) of the monitor option specification area of the buffer memory is set to "ON".
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. See Page 363, Section 16.2 (2) in this section for setting details.
CHAPTER 16 USING COMMUNICATION DATA MONITORING FUNCTION (2) Buffer memory for communication data monitoring function (a) Communication data monitoring specification area (Address: 2018H/2118H) Set start/stop of the communication data monitoring. See Page 359, Section 16.1.2 for communication data monitoring setting operation. to b15 b0 (Default: 0000H) Buffer memory address 2018H/2118H Set the monitor start/stop.
(e) Monitor data pointer storage area (Address: according to monitor buffer head address setting (Default: 2600H/3300H)) • The oldest data position of the monitor data area is stored using the offset value from the head address of the monitor data area. • 0 to (monitor buffer size specification (Default: 0D00H) -3): oldest data position • When the monitoring data exceeds the monitor buffer size, the new data is written over the oldest data.
CHAPTER 16 USING COMMUNICATION DATA MONITORING FUNCTION (g) The monitor data area (Default addresses: 2602H to 32FFH /3302H to 3FFFH) The monitor data are stored in one-word units as shown in the configuration below. See Page 366, Section 16.3 for an example of the communication data monitoring.
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 QJ71C24N-R2 (2) Program condition This is a program to monitor transmitted data from CH1 of the QJ71C24N-R2 with user instructions.
CHAPTER 16 USING COMMUNICATION DATA MONITORING FUNCTION (c) Sample program Monitor data area is cleared to 0 Monitor start being instructed Monitoring (0002H) Monitor setting error (100FH) During monitor stop (1002H) Monitor stop being instructed 16 Monitor stop (0000H) 16.
(3) Confirming monitor data by GX Developer The monitor data area for CH1 (Address: 2602H to 32FFH) is monitored on the buffer memory batch monitoring screen of GX Developer. See Page 365, Section 16.2 (2) (g) for the data configuration of the monitor data area. The following data are sent from CH1 using non procedure protocol.
CHAPTER 17 DEDICATED INSTRUCTIONS CHAPTER 17 DEDICATED INSTRUCTIONS 17 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. There are restrictions on the function version and the serial number of the QJ71C24N(-R2/R4) and QJ71C24(-R2) that can use the dedicated instructions.
(2) Available devices The following devices are available for the dedicated instructions: Internal devices *1 Word Bit X, Y, M, L, F, V, B *1 *2 370 T, ST, C, D, W File register Constant*2 R, ZR K, H Word device bit designation can be used as bit data. Word device bit designation is done by designating [Word device.Bit No.] (Designation of bit numbers is done in hexadecimal.) For example, bit 10 of D0 is designated as [D0.A].
CHAPTER 17 DEDICATED INSTRUCTIONS 17.2 Z.BUFRCVS 17 This instruction is used to receive data by an interrupt program through non procedure or bidirectional protocol communication. Applicable device Setting data Internal device Bit Word File register (S) (D) Bit Word Intelligent function module device U\G Index register Zn Constant K, H Others [Executing condition] [Instruction code] Link direct device J\ [Instruction format] Z.BUFRCVS Z.
17.2.3 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.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.2.5 Precaution when using the BUFRCVS instruction 17 (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.
17.2.6 Program example An interrupt program that reads receive data. (Setting) • Interrupt pointer setting with GX Developer Item Description 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. module side: Start I/O No. = 0, Start SI No.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.3 ZP.CSET (Programmable Controller CPU Monitoring Register/Cancel) 17 With this instruction, monitoring of the programmable controller CPU can be registered or cancelled.
17.3.2 Control data (1) Registering the programmable controller CPU monitoring Device Setting range Set by (S2)+0 Execution type Item Designate 0. 0 User (S2)+1 Completion status Stores the result of execution upon completion of an instruction. 0: Normal Other than 0: Error code System (S2)+2 Request type Designate the request content. 2: Registers programmable controller CPU monitoring. 2 (S2)+3 Cycle time units Designate the unit of cycle time.
CHAPTER 17 DEDICATED INSTRUCTIONS Device Item (S2)+14 (S2)+15 (S2)+16 Setting data Setting range Monitoring head device Designate the head number of the monitoring device in this block. 0 or more Registration points Designate the registration points (read points) for this block. 0: Do not monitor device. 0: Do not monitor device. • For a bit device, designate the points in word units. (S2)+17 Monitoring condition Designate the monitoring condition for this block.
(2) Canceling the programmable controller CPU monitoring Device (S2)+0 Item Setting data Setting range Set by Execution type Designate 0H. 0 User (S2)+1 Completion status Stores the result of execution upon completion of an instruction. 0: Normal Other than 0: Error code System (S2)+2 Request type Designate the request content. 3: Cancels the programmable controller CPU monitoring.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.3.3 Functions 17 (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.
(7) When the programmable controller CPU monitoring registration is performed, the corresponding interface data communication protocol setting is only designated when non procedure protocol is used for the following data for designation in the control data. • User frame output head pointer for constant cycle sending/ batch conditions sending. • User frame transmission count for constant cycle sending/ batch conditions sending.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.3.4 Errors 17 (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.
17.3.5 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.*1 *1 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).
CHAPTER 17 DEDICATED INSTRUCTIONS 17 (2) A program that cancels the programmable controller CPU monitoring This following example shows how to cancel the programmable controller CPU monitoring for the interface on CH1 side. When the input/output signals of the Q series C24 are X/Y00 to X/Y1F Instruction pulse set Execute canceling the programmable controller CPU monitoring Normal completion Abnormal completion 17.3 ZP.
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 Setting data Internal device Bit File register Word Link direct device J\ Bit Word Intelligent function module device U\G (S1) (S2) (D1) (D2) [Instruction code] [Executing condition] Index register Zn Constan t K, H Others [Instruction format] ZP.CSET ZP.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.4.2 Control data Device 17 Setting range Set by Execution type Designate 0. 0 User (S2)+1 Completion status Stores the result of execution upon completion of an instruction. 0: Normal Other than 0: Error code System (S2)+2 Request type Designate the request content. 1: Setting of word/byte units and buffer memory assignment change 1 (S2)+3 Word/byte units designation Designate the units of transmission/reception data count.
17.4.
CHAPTER 17 DEDICATED INSTRUCTIONS 17 (4) Whether the CSET instruction is being executed or has been completed normally/abnormally can be checked by the completion device (D2) designated as a 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. (b) Completion device ((D2) + 1) Turns on and off depending on the completion status of the CSET instruction.
17.4.4 Errors 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. 4FFFH or less: User's manual (hardware design, maintenance and inspection) for the CPU module used 7000H or higher: User's Manual (Basic) 17.4.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.5 G(P).GETE 17 This instruction reads out a user frame. Applicable device Setting data Internal device Bit File register Word Link direct device J\ Bit Word Intelligent function module device U\G Index register Zn (S1) (S2) (D) [Instruction code] Constant Others [Executing condition] Command G.GETE G.GETE Un (S1) (S2) (D) GP.GETE Un (S1) (S2) (D) Command GP.GETE 17.5.
17.5.2 Control data Device (S1)+0 (S1)+1 (S1)+2 Item Setting data Setting range Set by 0 System Dummy Read result The result of reading via the GETE instruction is stored. 0: Normal Other than 0: Error code Directed frame No. Designate the user frame No. 1000 to 1199 User Allowable number of read bytes Designate the maximum bytes of the user frame's registered data that can be stored in (S2).
CHAPTER 17 DEDICATED INSTRUCTIONS 17 (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.
17.5.4 Errors When the dedicated instruction is completed with an error, the complete status display device at completion ((D)+1), turns on and the error code is stored in the control data read result ((S1)+1). See the following manuals regarding the error code, and check the errors and take corrective actions. 4FFFH or less: User's manual (hardware design, maintenance and inspection) for the CPU module used 7000H or higher: User's Manual (Basic) 17.5.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.6 G(P).PRR 17 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 Setting data Internal device Bit File register Word Link direct device J\ Bit Word Intelligent function module device U\G Index register Zn (S) (D) [Instruction code] Constant Others [Executing condition] Command G.PRR G.
17.6.2 Control data Device Item Setting data Setting range Set by 1, 2 User Transmission channel Designate the transmission channel. 1: Channel 1 (CH1 side) 2: Channel 2 (CH2 side) Transmission result The transmission completion result by the PRR instruction is stored. 0: Normal Other than 0: Error code System (S)+2 CR/LF addition designation Designate whether or not to add CR/LF to the transmission data. 0: Do not add CR/LF. 1: Add CR/LF.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.6.3 Functions 17 (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.
(b) Status display device at completion Turns on and off depending on the completion status of the PRR instruction. • Normal completion: Stays off and does not change. • Abnormal completion: Turns on at the END processing of the scan where the PRR instruction is completed, and turns off at the next END processing.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.6.5 Program example 17 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. Sets the transmission user frames in D5 to D9. Sets transmission frame No. in the buffer memory. Sets CH1 to the transmission channel. 17.6 G(P).
17.7 G(P).PUTE This instruction registers a user frame. Applicable device Setting data Internal device Bit File register Word Link direct device J\ Bit Intelligent function module device U\G Word Index register Zn (S1) (S2) (D) [Instruction code] Constant Others [Executing condition] Command G.PUTE G.PUTE Un (S1) (S2) (D) GP.PUTE Un (S1) (S2) (D) Command GP.PUTE 17.7.
CHAPTER 17 DEDICATED INSTRUCTIONS 17 Remark ● For information about errors caused by incorrect data designated by the user, see the description in "Errors". ● The "Set by" column indicates the following: • User: Data set by the user before executing the dedicated instruction. • System: The programmable controller CPU stores execution results of the dedicated instruction. 17.7.3 Functions (1) This instruction registers or deletes the user frame for the Q series C24 as designated by Un.
(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. Instruction Availability of simultaneous execution Handling of simultaneous execution ONDEMAND OUTPUT PRR INPUT BIDOUT BIDIN CSET PUTE • The next instruction will be ignored until the active instruction has been completed.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.7.4 Errors 17 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.
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 Setting data Internal device Bit File register Word Link direct device J\ Bit Word Intelligent function module device U\G Index register Zn (S) (D) Constant Others [Executing condition] [Instruction code] Command ZP.UINI ZP.UINI "Un" (S) (D) *1 *1 17.8.
CHAPTER 17 DEDICATED INSTRUCTIONS (1) (S)+3 (CH1 transmission specifications setting) and (S)+5 (CH2 transmission specifications setting) b15 to b8 b7 b6 b5 b4 b3 b2 b1 00H to 0FH b0 0 CH1 side*1 CH2 side*1 00H to 0FH Description Bit b0 Communication speed (Unit: bps) ON(1) Independent Remarks Be sure to set the CH1 side to OFF(0). Link Data bit 7 8 b2 Parity bit NO Yes Vertical parity b3 Even/odd parity Odd Even Valid only when parity bit is set to Yes.
(2) (S)+4 (CH1 communication protocol setting) and (S)+6 (CH2 communication protocol setting) Setting No. Description 0H GX Developer connection (For connection to MELSOFT products) Remarks 1H Format 1 2H Format 2 MC protocol 3H 4H Format 3 GX Developer communication rate and transmission specifications are automatically set.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.8.3 Functions 17 (1) This instruction changes the transmission specifications, communication protocol and host station No. of each channel of the Q series C24 specified by Un. (2) Execution of the UINI instruction changes the following buffer memory settings to enable communication with the new settings. Address Dec. (Hex.) CH1 Application CH2 When module is started up When UINI instruction is executed 512 (200H) Station No.
[Operation when the UINI instruction is executed] Sequence program END processing END processing END processing END processing UINI instruction execution UINI instruction ON Completion device OFF Error ON completion Status indication OFF device at completion Normal completion One scan ON Mode switching signal (X6/XD) OFF Q series C24 Setting processing Communication disabled 17.8.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.8.5 Program example 17 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.
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 specifications Sets the CH2 communication protocol Sets the host station No.
CHAPTER 17 DEDICATED INSTRUCTIONS 17.8.6 Precautions 17 (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.
(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. Address Dec. (Hex.) CH1 591 (24FH) 410 Application CH2 Station No.
APPENDIX APPENDIX Appendix 1 A 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.
Memo 412
INDEX Full-duplex communications. . . . . . . . . . . . . . . . . 212 A Action for buffer full . . . . . . . . . . . . . . . . . . . . . . . 363 Additional codes . . . . . . . . . . . . . . . . . . . . . . . . . 296 ASCII-BIN conversion . . . . . . . . . . . . . . . . . . . . . 319 Auto modem initialization designation . . . . . . . . . . 115 I G GETE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 389 GX Developer connection . . . . . . . . . . . . . . .
On-demand data list . . . . . . . . . . . . . . . . . . . . . . 244 On-demand function control procedure (ASCII code) Timings of transmission of monitoring results . . . . . 41 Transmission control . . . . . . . . . . . . . . . . . . . . . 203 Transmission control end free area specification . . 205 Transmission control start free area specification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 246 On-demand function control procedure (binary code) . . . . . . . . . . . . . . .
REVISIONS *The manual number is given on the bottom left of the back cover. Print date Dec., 1999 *Manual number Revision SH (NA)-080007-A First edition 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).
Print date Jan., 2010 Aug., 2012 Dec., 2014 *Manual number Revision SH(NA)-080007-M [Additional model] LJ71C24, LJ71C24-R2 [Partial correction] SAFETY PRECAUTIONS, INTRODUCTION, Related Manuals, The Manual's Use and Structure, About The Generic Terms and Abbreviations, Definitions and Descriptions of Terminology, Section 1.2, 2.3.1, 2.3.2, 3.1.1, 3.1.3, 3.2.4, 3.3.1, 3.3.5, 3.3.6, 3.3.7, 8.3, 9.1.2, 9.4.1, 15.3, 15.4.1, 15.5.1, 16.1.1, 17.2, 17.3, 17.4, 17.7, 17.
WARRANTY Please confirm the following product warranty details before using this product. 1. Gratis Warranty Term and Gratis Warranty Range If any faults or defects (hereinafter "Failure") found to be the responsibility of Mitsubishi occurs during use of the product within the gratis warranty term, the product shall be repaired at no cost via the sales representative or Mitsubishi Service Company.
TRADEMARKS Microsoft, Windows, Windows Vista, Windows NT, Windows XP, Windows Server, Visio, Excel, PowerPoint, Visual Basic, Visual C++, and Access are either registered trademarks or trademarks of Microsoft Corporation in the United States, Japan, and other countries. Intel, Pentium, and Celeron are either registered trademarks or trademarks of Intel Corporation in the United States and other countries. Ethernet is a trademark of Xerox Corp.
SH(NA)-080007-O(1412)MEE MODEL: QJ71C24-U-OU-E MODEL CODE: 13JL87 HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN When exported from Japan, this manual does not require application to the Ministry of Economy, Trade and Industry for service transaction permission. Specifications subject to change without notice.