• SAFETY PRECAUTIONS • (Always read these instructions before using this equipment.) Before using this product, please read this manual and the relevant manuals introduced in this manual carefully and pay full attention to safety to handle the product correctly. The instructions given in this manual are concerned with this product. For the safety instructions of the programmable controller system, please read the CPU module user's manual.
• 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.
REVISIONS * The manual number is given on the bottom left of the back cover. Print Date * Manual Number Revision Jun., 2009 SH (NA)-080850ENG-A First printing Jan., 2010 SH (NA)-080850ENG-B Model Addition L02CPU, L26CPU-BT Partial corrections About Manuals, Generic Terms and Abbreviations Used in This Manual, Chapter 1, Section 1.1, Section 3.2, Section 4.1, Section 4.2, Section 8.3.3, Section 8.3.6, Section 9.1, Section 9.3.3, Section 10.1 to 10.3, Chapter 11, Section 11.1 to 11.3, Section 11.3.
INTRODUCTION Thank you for choosing the Mitsubishi MELSOFT series Integrated FA software. Read this manual and make sure you understand the functions and performance of MELSEC series programmable controller thoroughly in advance to ensure correct use. Please make this manual available to the end user. CONTENTS SAFETY PRECAUTIONS..............................................................................................................................ACONDITIONS OF USE FOR THE PRODUCT .....................
8. PROTOCOL SETTING FUNCTION 8- 1 to 8- 14 8.1 File Operation........................................................................................................................................... 8- 1 8.1.1 Creating new files.............................................................................................................................. 8- 1 8.1.2 Opening files.................................................................................................................................
12. PRINT 12- 1 to 12- 5 12.1 Start ...................................................................................................................................................... 12- 1 12.2 Print Examples ..................................................................................................................................... 12- 2 13. SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE 13- 1 to 13- 36 13.1 I/O Signals of Programmable Controller CPU ......................................
About Manuals The following lists the manuals relevant to this software package. These manuals are separately available if necessary. Related Manuals Manual Number (Model Code) Manual Name Q Corresponding Serial Communication Module User's Manual (Basic) Explains the outline, applicable system configuration, specifications, pre-operation procedure, basic data communication method with the other device, maintenance, inspection, and troubleshooting for use of SH-080006 (13JL86) the module.
How to Use This Manual The symbols used in this manual and their definitions and examples will be explained. Symbol [ ] Description Example Menu name of the menu bar [File] << >> Tab name of the dialog box <> " " Item name of the dialog box "Name" Command button of the dialog box Setting Button PURPOSE Purpose of the operation that is explained in the corresponding chapter, section or item.
Generic Terms and Abbreviations Used in This Manual In this manual, the following generic terms and abbreviations are used to represent the GX Configurator-SC software package and PLC CPU modules. The module/package name is given when the target model name must be pointed out explicitly. Generic Term/Abbreviation GX Configurator-SC Pre-defined protocol support function Description Generic product name of the model names SWnD5C-QSCU-E and SWnD5C-QSCUEA. (n means Version 2 or later.
MEMO A - 10 A - 10
1 OVERVIEW MELSOFT 1 OVERVIEW GX Configurator-SC Version 2 (hereafter abbreviated to GX Configurator-SC) is the software added into GX Developer for use. Conventionally, to perform the protocol communication with other devices such as a bar-code reader using a non procedural protocol of Q/L series serial communication modules, communication processing programs used to have to be created in ladder language.
1 OVERVIEW 1 MELSOFT STEP 1 : Select a manufacturer, type, and protocol name of a device to be connected. STEP 2 : Write the selected protocols to a module. STEP 3 : Create a startup ladder program Debugging support functions In the pre-defined protocol support function, ‘protocol’ means the procedure to communicate with other devices and consists of the following information.
1 OVERVIEW MELSOFT 1.
1 OVERVIEW MELSOFT (2) Easy to create and edit protocols New send/receive protocols can be created easily!! Protocols for the communication with other devices can easily be created and edited. This enables data communication with other devices for which standard protocols are not provided. In addition, the list of the packet format and data of protocols can be displayed on the screen and confirmed in a comparison with protocols described in the manual of other devices.
1 OVERVIEW MELSOFT (3) Incorporation of CPU devices and buffer memory in packets Devices to be incorporated in a packet can be registered using variables!! When sending data, a user stores system-dependent variable elements, such as the channel number, as variables in CPU devices and buffer memory. The Q series C24N / L series C24 module automatically adds them to the specified positions in a send packet and sends it.
1 OVERVIEW MELSOFT (4) Communication debugging support Reduced debugging work for system construction!! The following communication debugging functions which are necessary for system construction are available. Packet data on the line can be confirmed without any other tools. (a) Protocol execution log display The protocol name, start time and date, end time and date, and result etc. of protocols executed by Q series C24N / L series C24 modules can be monitored.
2 OPERATING ENVIRONMENT MELSOFT 2 OPERATING ENVIRONMENT This chapter explains the operating environment of the personal computer that uses GX Configurator-CS (the pre-defined protocol support function). Item Peripheral device *1*2 Installation (add-in) target GX Developer Version 8.78G (English version) or later Computer Windows -based personal computer R CPU Hard disk space Required memory Refer to the following table "Operating system and performance required for personal computer".
2 OPERATING ENVIRONMENT MELSOFT Operating system and performance required for personal computer Performance required for personal computer Operating system CPU Required memory Windows 95 (Service Pack 1 or later) Pentium 300MHz or more 64MB or more Windows 98 Pentium 300MHz or more 64MB or more Windows Me Pentium 300MHz or more 64MB or more Windows NT 4.
3 FUNCTION LIST MELSOFT 3 FUNCTION LIST This chapter explains the functions and menu of the pre-defined protocol support function. 3.1 Function List The functions of the pre-defined protocol support function are listed below. (1) Pre-defined protocol support function Function Function outline Reference Section Protocol setting Sets protocols of a module used in the pre-defined protocol support function.
3 FUNCTION LIST MELSOFT 3.2 Applicable CPUs and Modules CPUs and modules applicable to the pre-defined protocol support function are shown below. (1) Applicable CPU QCPU (Q mode) excluding Redundant CPU, and LCPU (2) Applicable modules The following table shows the modules to which the pre-defined protocol support function can be applied and their function range.
3 FUNCTION LIST MELSOFT 3.3 Applicable versions of relevant products The following table shows versions of modules and software applicable to the functions.
3 FUNCTION LIST MELSOFT MEMO 3-4 3-4
4 PRE-DEFINED PROTOCOL SUPPORT FUNCTION OPERATING PROCEDURE MELSOFT 4 PRE-DEFINED PROTOCOL SUPPORT FUNCTION OPERATING PROCEDURE 4.1 Procedure from Setting through Writing This section explains the operating procedure for writing protocols to a module with the pre-defined protocol support function, using the actual screen as an example. (1) Open the Protocol setting screen. Operation: [File] [New] or [File] [Open] (Refer to Section 8.1.1.) (Refer to Section 8.1.2.) 4 (2) Add a protocol to be used.
4 PRE-DEFINED PROTOCOL SUPPORT FUNCTION OPERATING PROCEDURE MELSOFT 4.2 Procedure for Debugging The following chart shows the procedure for the operation check with other devices (the procedure for debugging). Start debugging 4 Start the circuit trace with GX Configurator-SC Refer to section 11.3.1 Execute protocols, whose operation is to be checked, using the dedicated instruction (CPRTCL instruction) Refer to section 13.4.
4 PRE-DEFINED PROTOCOL SUPPORT FUNCTION OPERATING PROCEDURE MELSOFT MEMO 4-3 4-3
5 SCREEN DISPLAY MELSOFT 5 SCREEN DISPLAY This chapter explains the screen display and names of the pre-defined protocol support function. 5.1 Screen Display The basic screen display of the pre-defined protocol support function is shown below. Main menu Toolbar 5 Edit screen Status bar The following table indicates the names and functions. Name 5-1 Function Main menu Select the menu item. Toolbar Click the selected button to execute the function.
5 SCREEN DISPLAY MELSOFT 5.2 Menu List The following table indicates a menu list of the pre-defined protocol support function. Shortcut Keys Menu File New Ctrl + N Section 8.1.1 Open Ctrl + O Section 8.1.2 Close — Section 8.1.3 Save Ctrl + S Section 8.1.4 — Section 8.1.4 Ctrl + P Chapter 12 Save as Print Edit Reference Exit — Chapter 7 Add protocol — Section 8.3.1 Change to editable protocol — Section 8.3.2 Protocol detailed setting — Section 8.3.
5 SCREEN DISPLAY MELSOFT 5.3 Toolbar When the cursor is moved over any of the buttons, the tool tip is displayed. The following table lists the tool buttons. Tool Button Tool Tip New Open Save Copy Paste Print Write to module Read from module 5.4 Status Bar The status bar displays status information. DISPLAY/SETTING SCREEN 2) 1) DISPLAY/SETTING DETAILS No. 1) Display/Setting Details Displays the percentage of each setting to its higher limit on the Protocol setting screen.
6 STARTING PRE-DEFINED PROTOCOL SUPPORT FUNCTION MELSOFT 6 STARTING PRE-DEFINED PROTOCOL SUPPORT FUNCTION PURPOSE To start the pre-defined protocol support function from GX Developer. BASIC OPERATION 1. Select the [Tools] [Pre-defined protocol support function] menu. 2. The pre-defined protocol support function starts.
6 STARTING PRE-DEFINED PROTOCOL SUPPORT FUNCTION MELSOFT MEMO 6 6-2 6-2
7 ENDING OF PRE-DEFINED PROTOCOL SUPPORT FUNCTION MELSOFT 7 ENDING OF PRE-DEFINED PROTOCOL SUPPORT FUNCTION PURPOSE To end the pre-defined protocol support function. BASIC OPERATION Select the [File] [Exit] menu.
7 ENDING OF PRE-DEFINED PROTOCOL SUPPORT FUNCTION MELSOFT MEMO 7 7-2 7-2
8 PROTOCOL SETTING FUNCTION MELSOFT 8 PROTOCOL SETTING FUNCTION The following lists File/Edit operations. Function Function outline Reference Creating new files Creates a new protocol setting file. Section 8.1.1 Opening files Opens an existing protocol setting file. Section 8.1.2 Closing files Closes a protocol setting file being open. Section 8.1.3 Saving files "Saves" or "Saves as" a protocol setting file being edited. Section 8.1.4 Adding protocols Adds a protocol. Section 8.3.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.1.2 Opening files PURPOSE To read an existing protocol setting file. BASIC OPERATION 1. Select the [File] [Open] menu ( ). 2. Select a protocol setting file (*.pcf). 3. Click the Open button. 4. The Protocol setting screen is displayed.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.1.3 Closing files PURPOSE To close a protocol setting file being open. BASIC OPERATION 1. Select the [File] [Close] menu. 2. If the setting has been changed, the confirmation message for saving a protocol setting file is displayed. y Click the Yes button to save and close the protocol setting file. y Click the No button to close the protocol setting file without saving it. 8.1.4 Saving files PURPOSE Save a protocol setting file being edited.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.2 Communication Type of Protocols Send packets to other devices and receive packets from other devices at the time of process execution are registered in a protocol. The following shows an example of the packet configuration. For details of packet elements, refer to Chapter 9. Data division Header Station No.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3 Protocol Edit Operation PURPOSE To set protocols to be defined to modules on the Protocol setting screen. DISPLAY/SETTING SCREEN 1) 2) 3) 4) 5) 6) 7) 8) 10) 11) 12) 9) 13) 14) 15) DISPLAY/SETTING DETAILS No. 1) Item Protocol No. Display/Setting Details Set a protocol number to be used in a pre-defined protocol dedicated instruction for ladder programs. The assignable number is 1 to 128.
8 PROTOCOL SETTING FUNCTION MELSOFT No. Item Display/Setting Details 6) -> Send/<- Receive Displays the packet direction. Send : -> 7) Packet name Displays the packet name. 8) Packet setting Displays the existence or non-existence of variables in an element, and set or unset of Receive : <-(1) to <-(16) A receive packet number is displayed in (). variables. With ‘Variable unset’, ‘Element unset’ or ‘Element error’, the setting cannot be written to the module.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3.1 Adding protocols PURPOSE To add a protocol. BASIC OPERATION 1. Display the Protocol setting screen, and click the cell for adding protocol or press the Enter key. 2. The Add protocol screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Select from pre-defined Select this item to select a protocol from the pre-defined protocol protocol library library and add it, specifying “Protocol No.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3.2 Changing to editable protocols PURPOSE To change a protocol selected from the pre-defined protocol library to an editable one. BASIC OPERATION 1. Display the Protocol setting screen, and select a line of a protocol to be changed. 2. Select the [Edit] [Change to editable protocol] menu. 3. The confirmation message is displayed. Click the Yes button. Once a protocol has been changed to an editable protocol, it cannot be restored.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3.3 Protocol detailed setting PURPOSE To configure the number of retries of a protocol and whether to clear OS area (receive data area) before protocol execution etc. BASIC OPERATION 1. Display the Protocol setting screen, and select a line of a protocol to be set. 2. Select the [Edit] [Protocol detailed setting] menu. 3. The Protocol detailed setting screen is displayed.
8 PROTOCOL SETTING FUNCTION MELSOFT DISPLAY/SETTING DETAILS Item Display/Setting Details Connected Manufacturer Set a manufacturer’s name of the protocol. device Type Set a device type of the protocol. Model Set a model of the protocol. Version Set a device version of the protocol. Explanation Set a description for a device of the protocol. Protocol No. Displays a protocol number of the selected protocol.
8 PROTOCOL SETTING FUNCTION MELSOFT Item Display/Setting Details Communication parameter batch setting button Displays the Communication parameter batch setting screen. For details, refer to Section 8.3.4. OK button Fixes the setting and closes the screen. Cancel button Cancels the setting and closes the screen. (Example) When the setting value of “Number of retries” is 2, the Q series C24N / L series C24 module determines an error at the following timing if it cannot send the data.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3.4 Setting send/receive parameters in a batch PURPOSE To configure parameters used for sending/receiving a protocol. BASIC OPERATION 1. Display the Protocol detailed setting screen, and click the Communication parameter batch setting button. 2. The Communication parameter batch setting screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Setting protocol No.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3.5 Deleting protocols/packets PURPOSE To delete a protocol/packet. BASIC OPERATION 1. Display the Protocol setting screen, and select a line of a protocol/packet to be deleted. 2. Select the [Edit] [Delete] menu, or press the Delete key. 3. The line of the protocol/packet is deleted. y To delete multiple protocols at once, select [Edit] [Delete multiple protocols] and specify the range. y A send packet cannot be deleted.
8 PROTOCOL SETTING FUNCTION MELSOFT 8.3.6 Copying and pasting protocols/packets PURPOSE To copy and paste a protocol/packet. BASIC OPERATION (1) Copying one by one 1. Display the Protocol setting screen and select a line of a protocol/packet to be copied. 2. Select the [Edit] [Copy] menu, or press the Ctrl + C key. 3. The line of the protocol/packet is copied. 4. Display the destination Protocol setting screen/Packet setting screen, and select the destination line of a protocol/packet. 5.
9 PACKET SETTING FUNCTION MELSOFT 9 PACKET SETTING FUNCTION PURPOSE To display an element list of a registered packet according to a set protocol. BASIC OPERATION 1. Display the Protocol setting screen, select a send packet/receive packet, and click it. 2. The Packet setting screen is displayed.
9 PACKET SETTING FUNCTION MELSOFT DISPLAY/SETTING DETAILS Item Display/Setting Details Protocol No. Displays the protocol number of the specified protocol. Protocol name Displays the protocol name of the specified protocol. Packet type Displays ‘Send packet’ or ‘Receive packet’ as the type of the specified packet. Packet name Set the packet name of the specified packet. Packet No. Displays the packet number of the receive packet. *1 (Receive packet only) Element list Element No.
9 PACKET SETTING FUNCTION MELSOFT [Element display example] (For details of elements, refer to Section 9.1) Element type Header Static Data Terminator Display content Code type is Displays the setting value (ASCII ASCII string string) with “ ”, and data length Display example “TEXT”(4byte) with ( ). Code type is Displays the setting value (ASCII ASCII control control code) with [ ], and data code length with ( ). Code type is HEX Displays a setting value (HEX), and data length with ( ).
9 PACKET SETTING FUNCTION Element type MELSOFT Display content Display example For ‘Fixed number of data’, displays the address range of a device or buffer to be specified as a variable with [ ]. For ‘Variable number of data’, additionally displays the starting address of a device or buffer memory which Fixed number of data: [D1-D2] Variable number of data: [D1] [D2-D11] specifies the data length with another [ ]. Displays “Conversion” using elliptical expressions.
9 PACKET SETTING FUNCTION Element type MELSOFT Display content Display example Range for calculation of a check code Object element2-7 Displays the processing method using elliptical expressions. Horizontal parity : Parity Sum check : Sum check 16-bit CRC (for MODBUS) : CRC MOD Parity Displays “Code type” using elliptical expressions. ASCII hexadecimal : Hexadecimal ASCII decimal : Decimal HEX : HEX Hexadecimal Displays the complement calculation using elliptical Check code expressions.
9 PACKET SETTING FUNCTION MELSOFT 9.1 Packet elements A packet consists of packet elements. Up to 32 elements can be placed in a packet, and the maximum data length is 2048 bytes per a packet. This section shows details of packet elements. For data examples of packet elements, refer to Appendix 4. (1) Header Use this element when a specific code/character string exists at the beginning of a packet. • At sending : Sends a specified code and character string.
9 PACKET SETTING FUNCTION MELSOFT (3) Terminator This element indicates the end of a packet. Use this element when a code/character string indicating the end of the packet is included. The following table lists the items. Item Element name Code type Description Remark Set a name of the element. - Set a data type of the setting value. - ASCII string/ASCII control code/HEX Set data within 1 to 50 bytes.
9 PACKET SETTING FUNCTION MELSOFT (4) Length Use this element when an element indicating the data length is included in a packet. y At sending : Calculates the data length of a specified range, and adds the result to a send packet. y At receiving : Verifies the data (setting value) corresponds to the length in the receive data as the data length of a specified range. The following table lists the items. Item Description Element name Remark Set a name of the element.
9 PACKET SETTING FUNCTION MELSOFT y Only one Length can be placed in a packet. y When there is no element other than a Length, an element error occurs. y When the number of digits of calculation result is greater than that specified in “Data length”, digits greater than the specified digit are omitted (ignored). Example) When ‘2 bytes’ is specified in “Data length” and the calculation result is ‘123 bytes’, the data length is considered as ‘23’.
9 PACKET SETTING FUNCTION MELSOFT (5) Non-conversion variable Use this element to send the data of a CPU device or buffer memory as a part of a send packet, or store a part of a receive packet to a CPU device or buffer memory. The following lists the items. Item Element name Description Set a name of the element. Fixed length Fixed length/Variable Sends and receives the data whose length is fixed.
9 PACKET SETTING FUNCTION MELSOFT The following explains the configuration of the data storage area. (a) When “Fixed length/Variable length” is ‘Fixed length’ An area starting from the device number which is specified on the Element setting screen is considered as the ‘data storage area’. * The data storage area to be occupied varies depending on the setting of “Unit of stored data”. y When ‘Lower byte + Upper byte’ is selected, the same size as the data length is occupied.
9 PACKET SETTING FUNCTION MELSOFT (b) When “Fixed length/Variable length” is ‘Variable length’ An area starting from the device number which is specified on the Element setting screen +1 is considered as the ‘data storage area’. * The data storage area to be occupied varies depending on the setting of “Unit of stored data”. y When ‘Lower byte + Upper byte’ is selected, the same size as the data length + one word (length for the data length storage area) are occupied.
9 PACKET SETTING FUNCTION MELSOFT y When receiving variable length data whose length exceeds the “Maximum data length”, the Q series C24N / L series C24 module stores data as long as the maximum data length and omits the rest. (A protocol completes successfully.) y In receive packet data from other devices, the Q series C24N / L series C24 module needs to be able to discriminate data corresponding to a Non-conversion variable from those of a Terminator or a Static Data following a Non-conversion variable.
9 PACKET SETTING FUNCTION MELSOFT (6) Conversion variable This element converts the numerical data of a CPU device or buffer memory to an ASCII string and sends it, or converts the receive data (ASCII string) to the numerical data and stores it to a CPU device or buffer memory. The following lists the items. Item Set a name of the element. Conversion At receiving At sending Element name Description Converts numeric value stored in the data storage decimal area to ASCII decimal.
9 PACKET SETTING FUNCTION Item MELSOFT Description Remark Select whether to add signs to date in the data Sign Unsigned/Signed storage area. This item can be set when “Conversion” is ‘HEX -> ASCII decimal’ or ‘ASCII - decimal -> HEX’. Select the sign character for positive value on line. This item can be set when “Conversion” is ‘HEX -> Sign character None/+/0/Space ASCII decimal’ or ‘ASCII decimal -> HEX’, and - “Sign” is ‘Signed’. The sign character for negative value is fixed to ‘-‘.
9 PACKET SETTING FUNCTION MELSOFT The following explains the configuration of the data storage area. (a) When “Fixed number of data/Variable number of data” is ‘Fixed number of data’ An area starting from the device number which is specified on the Element setting screen is considered as the ‘data storage area’.
9 PACKET SETTING FUNCTION MELSOFT (c) Occupied size in data storage area The size occupied in the data storage area varies depending on the settings of “Conversion unit” and “Number of digits”.
9 PACKET SETTING FUNCTION MELSOFT 4) “Conversion unit”: Doubleword, “Number of decimals”: Variable point For ‘Variable point’, the decimal point position is set in the data storage area. Data storage area 0h Numeric data 1h 2h 3h Decimal point position (L) (H) (L) (H) In the decimal point position area, the decimal point position is set as follows. Send/receive data Numeric data (number of digits is 10) Decimal point position 1234567890 1234567890(499602D2H) 1(1H) 123456789.
9 PACKET SETTING FUNCTION MELSOFT In the Q series C24N / L series C24 module, an error may occur in any of the following cases. y When “Conversion” is ‘ASCII hexadecimal -> HEX’, an ASCII -> BIN conversion error (7F20H) may occur if a string except for ‘0’-‘9’ ‘A’-‘F’ ‘a’-‘f’ is received. y When “Conversion” is ‘ASCII decimal -> HEX’, an ASCII -> BIN conversion error (7F20H) may occur if a string except for ‘0’-‘9’ is received. However, the following are exempt from the ASCII -> BIN conversion error.
9 PACKET SETTING FUNCTION MELSOFT [For the fixed number of data] y When “Number of digits” is ‘Variable number of digits’, an invalid number of digits error (7D19H) may occur if the number of digits of receive data is 0. [For the variable number of data] y A too few digits error (7D18H) may occur if data of which number of digits are fewer than the digits specified in “Number of digits” are received.
9 PACKET SETTING FUNCTION MELSOFT To place a Conversion variable in a packet, the following requirements need to be met. (1) To place Conversion variable in send packet Multiple Conversion variable elements can be placed in one packet, and they can be placed in desired positions in the data division. (2) To place Conversion variable in receive packet Multiple Conversion variable elements can be placed in one packet in cases other than [Variable number of data] and (a) - 1) of [Fixed number of data].
9 PACKET SETTING FUNCTION MELSOFT (7) Check code Use this element when an element indicating check code data is included in a packet. The Q series C24N / L series C24 module automatically calculates a specified check code at timing of sending/receiving, and adds it to a send packet or detects an error of a receive packet. The following table lists the items. Item Description Remark Element name Set a name of the element. - Processing method Select a calculating method.
9 PACKET SETTING FUNCTION MELSOFT y When “Code type” is ‘ASCII hexadecimal’, an ASCII -> BIN conversion error (7F20H) may occur if a string except for ‘0’-‘9’ ‘A’-‘F’ ‘a’-‘f’ is received. y When “Code type” is ‘ASCII decimal’, an ASCII -> BIN conversion error (7F20H) may occur if a string except for ‘0’-‘9’ is received. y Only one Check code can be placed in a packet. y Packet elements placed behind a Check code cannot be included in the calculating range.
9 PACKET SETTING FUNCTION MELSOFT (8) Non-verified reception Use this element when receive data include data not needed. The Q series C24N / L series C24 module skips characters as many as the specified number if a receive packet includes a Non-verified reception. The following table lists the items. Item Element name Data length Description Set a name of the element.
9 PACKET SETTING FUNCTION MELSOFT 9.2 Packet Edit Operation 9.2.1 Adding new elements PURPOSE To add an element. BASIC OPERATION 1. Display the Packet setting screen, and click the Add new button. 2. The Add new screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Element type Display/Setting Details Select an element to be added. OK button Fixes the setting and closes the screen. Cancel button Cancels the setting and closes the screen.
9 PACKET SETTING FUNCTION MELSOFT 9.2.2 Changing element types PURPOSE To change a type of an element to another. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of an element to be changed. 2. Click the Change type button. 3. The Change type screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Element type 9 - 26 Display/Setting Details Select a new element type. OK button Fixes the setting and closes the screen.
9 PACKET SETTING FUNCTION MELSOFT 9.3 Element Setting 9.3.1 Setting of Header/Static Data/Terminator PURPOSE To configure a Header/Static Data/Terminator setting. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of Header/Static data/Terminator in “Element setting” column or press the Enter key. 2. The Element setting screen is displayed.
9 PACKET SETTING FUNCTION MELSOFT (2) ASCII Code input screen DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item ASCII Code input 9 - 28 Display/Setting Details Select an ASCII code to be input. Insert button Inserts a selected ASCII code to the cursor position. Delete button Deletes data at the cursor position. OK button Fixes the setting and returns to the Element setting screen. Cancel button Cancels the setting and returns to the Element setting screen.
9 PACKET SETTING FUNCTION MELSOFT 9.3.2 Setting of Length PURPOSE To configure a Length setting. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of Length in “Element setting” column or press the Enter key. 2. The Element setting screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details *1 Element name Set a name of an element. *1 Code type Select a send/receive format of the data length.
9 PACKET SETTING FUNCTION MELSOFT 9.3.3 Setting of Non-conversion variable PURPOSE To configure a Non-conversion variable setting. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of Non-conversion variable in “Element setting” column or press the Enter key. 2. The Element setting screen is displayed.
9 PACKET SETTING FUNCTION MELSOFT DISPLAY/SETTING DETAILS Item Display/Setting Details *1 Element name Set a name of an element whose data storage area is to be set. Fixed length/Variable Select ’Fixed length’/‘Variable length’. *1 length Data length/ Set the data length. *1 Maximum data length For ‘Variable length’, set the maximum data length that can be specified to the data storage area. *1 Unit of stored data *1 Byte swap Select ‘Lower byte + Upper byte’/’ Lower bytes only’.
9 PACKET SETTING FUNCTION MELSOFT Category Internal user*1, *2 Device type Symbol Device range L02CPU L26CPU-BT Input X 0 to 1FFFH Output Y 0 to 1FFFH Internal relay M 0 to 61439 Latch relay L 0 to 32767 Link relay B 0 to EFFFH Data register D 0 to 94207 0 to 421877 Link register W 0 to 16FFH 0 to 66FFFH File register File register Buffer memory Intelligent function module devices R*2 ZR G 0 to 32767 0 to 65535 0 to 393215 1024 to 6911, 9728 to 16383, 204
9 PACKET SETTING FUNCTION MELSOFT 9.3.4 Setting of Conversion variable PURPOSE To configure a Conversion variable setting. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of Conversion variable in “Element setting” column or press the Enter key. 2. The Element setting screen is displayed.
9 PACKET SETTING FUNCTION MELSOFT DISPLAY/SETTING DETAILS Item Display/Setting Details *1 Element name Set a name of an element whose data storage area is to be set. *1 Conversion At sending : ‘HEX -> ASCII hexadecimal’ ‘HEX -> ASCII decimal’ At receiving : ‘ASCII hexadecimal -> HEX’ ‘ASCII decimal -> HEX’ Select ‘Fixed number of data’/’Variable number of data’. Fixed number of data/Variable number of *1 data Number of send Set the number of the data (1 to 256).
9 PACKET SETTING FUNCTION MELSOFT 9.3.5 Setting of Check code PURPOSE To configure a Check code setting. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of Check code in “Element setting” column or press the Enter key. 2. The Element setting screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details *1 Element name Set a name of an element. *1 Processing method *1*2 Code type Select a calculating method.
9 PACKET SETTING FUNCTION MELSOFT 9.3.6 Setting of Non-verified reception PURPOSE To configure a Non-verified reception setting. BASIC OPERATION 1. Display the Packet setting screen, and click a cell of Non-verified reception in “Element setting” column or press the Enter key. 2. The Element setting screen is displayed. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details *1 Element name *1 Data length Set a name of an element.
9 PACKET SETTING FUNCTION MELSOFT 9.4 Device Batch Setting PURPOSE To configure devices used in protocols at once. BASIC OPERATION 1. Select the [Edit] [Device batch setting] menu. 2. The Device batch setting screen is displayed. (1) Element setting screen DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Setting protocol No. Select a starting number and ending number of protocols to be range configured at once. Start device No.
9 PACKET SETTING FUNCTION MELSOFT The following table shows an example when “Setting protocol No. range” is ‘2 to 5’ and “Start device No.” is ‘D4’. Protocol No. Packet No. Element No.
9 PACKET SETTING FUNCTION MELSOFT 9.5 Setting Device List PURPOSE To display a list of devices used in protocols in list view. BASIC OPERATION 1. Select the [Tool] [Setting device list] menu. 2. The Setting device list screen is displayed. (1) Element setting screen DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Device list Display/Setting Details Displays a list of devices being used. Displays information of device, protocol, packet, and element. Close button 9 - 39 Closes the screen.
10 WRITING/READING DATA TO/FROM MODULE MELSOFT 10 WRITING/READING DATA TO/FROM MODULE 10.1 Writing Data to Module PURPOSE To write data of registered protocol settings to a selected module. BASIC OPERATION 1. Select the [Module read/write] [Write to module] menu. 2. The Module write screen is displayed. 3. Select a module to which data to be written and click the Execute button.
10 WRITING/READING DATA TO/FROM MODULE MELSOFT y A protocol setting data error may occur when any of the following data are set and written to the Q series C24N with the serial number of which the first five digits are ‘10122’.
10 WRITING/READING DATA TO/FROM MODULE MELSOFT 10.2 Reading Data from Module PURPOSE To read data of protocol settings written to the selected module, and display data on the Protocol setting screen. BASIC OPERATION 1. Select the [Module read/write] [Read from module] menu. 2. The Module read screen is displayed. 3. Select a module from which data to be read and click the Execute button.
10 WRITING/READING DATA TO/FROM MODULE MELSOFT 10.3 Verifying Data with Module PURPOSE To compare the protocol setting being opened with that written to a selected module. BASIC OPERATION 1. Select the [Module read/write] [Module verification] menu. 2. The Verification target selection screen is displayed. 3. Select a verification target module and click the Execute button. 4. The Verification result screen is displayed.
10 WRITING/READING DATA TO/FROM MODULE MELSOFT (2) Verification result screen DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Result list Display/Setting Details Displays target items and verification result ‘Match’/’Mismatch’ of each item. Copy to clipboard button Copies all contents being displayed on the screen to the clip board in text format. Close button Closes the screen.
10 WRITING/READING DATA TO/FROM MODULE MELSOFT The following table shows contents of the result list. Target item Result *1 Number of protocols Displays ‘Mismatch’ when the total of registered protocols is unmatched. Performs verification of the following target item for each protocol (1) to (5) with a *1 Protocol No. (: 1 to 128) corresponding protocol, and displays ‘Mismatch’ when any of the verification results are unmatched.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11 DEBUGGING SUPPORT FUNCTIONS 11 The debugging support functions are designed to support the debugging of communication processing with device controllers. The following functions are available to ease system startup work. y Protocol execution log display y Circuit trace y State monitor The following outlines the debugging support functions.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11.1 Selecting Module for Debugging 11 PURPOSE To select a module to be debugged. Protocol execution log display, circuit trace, and state monitor functions are executed for the selected module. BASIC OPERATION 1. Click the [Debugging support function] [Module selection] menu. 2. Select the I/O address and channel of the module to be debugged, and click the Setting button. 3. Clicking the OK button sets the module information.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11.2 Protocol Execution Log Display PURPOSE To display the protocol execution logs and the protocol execution results when protocol settings are made. BASIC OPERATION 1. Select a module to be debugged. (Refer to Section 11.1) 2. Click the [Debugging support function] [Protocol execution log] menu. 3. The Protocol execution log screen is displayed.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT DISPLAY/SETTING DETAILS Item Object module Display/Setting Details Displays the target module (I/O address and module type) and channel of displayed protocol execution logs. No. Displays the execution logs in the order from the latest. Displays up to 32 logs. Start time and date Displays the start date of the protocol execution. End time and date Displays the end date of the protocol execution. Model Displays the external device name. Protocol No.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT The registration condition of log can be specified by the execution log option specification for buffer memory (buffer memory address: 40E2H, 40F2H) and intelligent function module utility. The following are the registration conditions. th 0 bit is OFF (0): Stores the execution log for the protocols with the error completion only. th 0 bit is ON (1) : Stores the execution logs and the execution condition of all protocols.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11.3 Circuit Trace PURPOSE To trace the communication data and communication control signals with device controller. REMARK The circuit trace function displays the data accumulated in the monitor buffer of a module. 11.3.1 Starting the circuit trace PURPOSE To trace the communication data and communication control signal status, store the trace data in the monitor buffer. BASIC OPERATION 1. Select a module to be debugged. (Refer to Section 11.1) 2.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT y When the circuit trace or communication data monitoring function has already been executed, the following confirmation message is displayed. For details of the communication data monitoring function, refer to the "MELSEC-Q/L Serial Communication Module User's Manual (Application)". Item Display/Setting Yes button The circuit trace is stopped and the data already accumulated are read and displayed. No button The message closes.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Object module Send / receive packets Display/Setting Details Displays the information of the module on which the circuit trace is performed. Displays send data and receive data respectively. For the data display format, the ASCII code or hexadecimal can be selected. The RS, ER, DR, CS and CD signal status and receive error are displayed as described below.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11.3.2 Circuit trace option PURPOSE To set the monitor buffer area starting address and size of a module that stores the circuit trace data. BASIC OPERATION 1. Select the [Debugging support function] [Circuit trace] [Circuit trace] menu to display the Circuit trace screen. 2. Select the [Debugging support function] [Circuit trace] [Circuit trace option] menu to display the Circuit trace option screen. 3.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Set the starting address of the monitor buffer area that stores the trace data. Monitor buffer starting address Input the setting in hexadecimal. setting Input range CH1/CH2: 2600H to 3FFDH (C00H to 1AFDH for the user-specified area) Set the size of the monitor buffer area that stores the trace data. Input the setting in hexadecimal.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11.3.3 Opening the circuit trace file PURPOSE To read and display the trace data saved in the personal computer. BASIC OPERATION Select the [Debugging support function] menu. [Circuit trace] [Open circuit trace file] 11.3.4 Saving the circuit trace file PURPOSE To save the trace data obtained by the circuit trace to the personal computer. BASIC OPERATION Select the [Debugging support function] menu.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT 11.4 State Monitor PURPOSE To monitor signals, communication error information, operation setting switches, and protocol execution status. BASIC OPERATION 1. Select a module to be debugged. (Refer to Section 11.1) 2. Select the [Debugging support function] [State monitor] menu. 3. Click the Monitor start button. 4. Click the <> tab and confirm the signal status. 5. Click the <> tab and confirm the error information. 6.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT DISPLAY/SETTING DETAILS Item Display/Setting Details X signal state monitor Displays the ON/OFF status of the X signals. Y signal state monitor Displays the ON/OFF status of the Y signals. RS-232 signal monitor Displays the ON/OFF status of the RS-232 control signals. Protocols can be executed while the Pre-defined protocol ready (X1D) is ON. For details, refer to the user's manual of a target module.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT (3) <> tab DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Switch setting status for the Display/Setting Details Displays the operation switch setting status. operation Mode switch Displays the communication protocol setting. Station switch Displays the station number setting. For details, refer to the user's manual of a target module.
11 DEBUGGING SUPPORT FUNCTIONS MELSOFT (4) <> tab DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Execution status Displays the protocol execution status. Protocol cancel designation Displays the protocol cancel designation status. Pre-defined protocol function Displays the error code of the result from the error completion. error code For details, refer to the user's manual of a target module.
12 PRINT MELSOFT 12 PRINT 12.1 Start PURPOSE To print protocol settings, packet settings, setting device list, and trace data. BASIC OPERATION Click the [File] [Print] menu ( ). DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Print item Protocol setting Display/Setting Details Select items to be printed. The data set in the protocol setting are printed. Select a protocol number of a packet to be printed.
12 PRINT MELSOFT 12.
12 PRINT MELSOFT (2) Packet setting File name of protocol setting file is printed Print date is printed Page number is printed 12 - 3 12 - 3
12 PRINT MELSOFT (3) Setting device list Print date is printed File name of protocol setting file is printed Page number is printed 12 - 4 12 - 4
12 PRINT MELSOFT (4) Trace data File name of trace data is printed Print date is printed Page number is printed 12 - 5 12 - 5
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE This chapter explains the specification overview of Q series C24N / L series C24 modules required when using the pre-defined protocol function. For the terms described in this chapter, refer to the "Q Corresponding Serial Communication Module User's Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". 13.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.2 Pre-defined Protocol Ready (X1D) This is a signal that turns ON when the pre-defined protocol communication is ready to be executed. The CPRTCL instruction can be executed when this signal is ON. Use this signal as an interlock signal when executing the CPRTCL instruction in the sequence program. This signal turns ON only when the communication protocol setting is set as predefined protocol.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (2) Timing for executing the UINI instruction or mode switching request signal (Y2/Y9)*1 (a) Timing for executing mode switching request signal (Y2/Y9) Communication protocol before change: CH1 and CH2 are other than the pre-defined protocol mode. Communication protocol after change : CH1 or CH2 is the pre-defined protocol mode.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT Communication protocol before change: CH1 or CH2 is the pre-defined protocol mode. Communication protocol after change : CH1 and CH2 are other than the pre-defined protocol mode.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (b) Timing for executing the UINI instruction Communication protocol before change: CH1 and CH2 are other than the pre-defined protocol mode. Communication protocol after change : CH1 or CH2 is the pre-defined protocol mode.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT Communication protocol before change: CH1 or CH2 is the pre-defined protocol mode. Communication protocol after change : CH1 and CH2 are other than the pre-defined protocol mode.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.3 List of Applications and Assignments of Buffer Memory This section explains the buffer memory (masked areas in the table) used for the predefined protocol function. For the buffer memory that does not relate to the pre-defined protocol function, refer to the "Q Corresponding Serial Communication Module User's Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)".
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT IMPORTANT Do not write data in the "System area" of the buffer memory. If data are written to any of the system areas, the programmable controller system may malfunction. Some of the user areas are partially system areas. Care must be taken when reading/writing data from/to the buffer memory.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 0 (0H) Application Initial value Name Applicable protocol MC Non Bi Pre Registration allowed/not allowed Communication error clear request for CH1 and to turn LED off 0: ON, No initialization request 1: OFF, Initialization requested SD WAIT (b0) C/N (b4) — For LED and communication error clear — MELSOFT 1 (1H) SIO (b1)) NAK (b5) PRO. (b2) ACK. (b6) P/S (b3) NEU.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 Application MELSOFT Initial value Name Applicable protocol MC Non Bi Pre Registration allowed/not allowed DC2/DC4 code designation 149 (95H) 309 (135H) For designation of transmission control 150 (96H) 310 (136H) For designation of communication Word/byte units designation control 151 (97H) 311 (137H) 152 (98H) 312 (138H) 153 (99H) 313 (139H) 154 (9AH) 314 (13AH) 155 (9BH) 315 (13BH) 156 (9CH) 316 (1
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 Application Name CH2 515 (203H) For confirmation of switch setting and mode switching Switch setting error and mode switching error status 0: No error Other than 0: Switch setting error and mode switching error CH1 Communication protocol setting No.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 Application Name RS-232 control signal status 0: OFF status 1: ON status RS (b0) DTR (b2) CS (b4) DSR (b1) CD (b3) RI (b5) Not used (b6 to b15) All 0 Transmission sequence status (For confirmation of MC protocol communication status) 596 (254H) 612 (264H) Control signal status 597 (255H) 598 (256H) 613 (265H) 614 (266H) For confirmation of communication result On-demand execution result 599 (257H) 615 (267H) 600 (
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 Application Name 9217 (2401H) For flash ROM write count housing Flash ROM write count 0 to 1000: Write count 9218 to 9727 (2402H to 25FFH) Use prohibited System area 9728 to 16383 (2600H to 3FFFH) For user (*1) User free area 2 (6656 words) (Transmission/receiving data monitoring function default buffer) * Usage is determined by the user.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 Application Name MELSOFT Initial value Applicable protocol MC Non Bi Pre Registration allowed/not allowed Number of protocol registration 16528 (4090H) 0 : No registration 1 to 128: Number of registered protocols 0 — R Protocol registration 16529 to 16536 (4091H to 4098H) For confirmation of protocol execution data 16537 to 16607 Use prohibited (4099H to 40DFH) 16608 16624 to to16609 16625 (40E0H to (40F0H t
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 16640 (4100H) 18432 (4800H) 16641 (4101H) 18433 (4801H) 16642 (4102H) 18434 (4802H) Application Name MELSOFT Initial value Applicable protocol MC Non Bi Pre Registration allowed/not allowed Number of stored protocol execution logs 0 : No log 1 to 32: Number of stored logs 0 — R Not allowed Protocol execution log write pointer 0 : No history 1 to 32: Protocol execution log number of latest log 0 — R — Sys
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 16682 (412AH) Application Initial value Name 0: No log Upper 8 bits: Month Lower 8 bits: Last 2 digits of year 18474 (482AH) b15 to b8 b7 Month (01H to 12H) 16683 (412BH) b15 Execution start date 16684 (412CH) 18476 (482CH) to b8 b7 b15 For confirmation of protocol execution log to b8 b7 b8 b7 Execution completion date b15 R 0 — R 0 — R 0 — R 0 — R 0 — R 0 — R 0 — R 0 — R b0 to
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.4 Dedicated Instruction This section explains the dedicated instructions used for pre-defined protocol communication. 13.4.1 Dedicated instructions and available devices The following dedicated instruction is explained in this section.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.4.2 G(P). CPRTCL This instruction executes the protocols and functional protocols written to the flash ROM by GX Configurator-SC (pre-defined protocol support function). For details of functional protocols, refer to Section 13.4.3.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT Control data Device Item Set data Setting range Set by *1 y The execution result of the G(P). CPRTCL instruction is stored. (S) + 0 Execution result When executing multiple protocols, the execution result of — System 1 to 8 System *2 the protocol executed at last is stored. 0: Normal *3 Other than 0: Abnormal (error code) y The number of executions is stored.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT Function (1) The protocol setting data written to the flash ROM are executed by the module designated in Un. The protocol is executed according to the control data stored in the device designated in (S) and the following devices. (2) Protocols are executed consecutively for the number of times designated in n2 (maximum: 8) in one instruction execution.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (4) Whether a CPRTCL instruction was completed normally or abnormally can be checked by the completion device ((D)) or status display device at completion ((D)+1). (a) Completion device : Turns ON at the END processing of the scan where the CPRTCL instruction is completed, and turns OFF at the next END processing. (b) Status display device : Turns ON and off depending on the completion at completion status of the CPRTCL instruction.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT Error (1) When a dedicated instruction is completed abnormally, the status display device at completion ((D)+1) turns ON and the error code is stored in the execution result ((S)+0). In case of operation errors, the error flag (SM0) turns ON and the error code is stored in the SD0. Refer to the following manuals according to the error code, and check and correct the error.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT Cancellation of protocol execution A protocol can be cancelled during its execution. This function is used to end the protocol execution forcibly when a communication error occurs with the other device. This function is available for the pre-defined protocol mode only. (1) Execution method for cancellation request Execute a cancellation request from the sequence program. The corresponding buffer memories are shown in the following table.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (3) Program example The following is a program in which a cancellation is requested to the protocol being executed when the start I/O number of the Q series C24N / L series C24 module is 0000. Devices used by user Device Purpose M100 Cancellation request command flag M101 Cancellation request flag M110 Turns ON during execution of the CPRTCL instruction.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.4.3 Functional protocol The following functions are available by executing functional protocols with the CPRTCL instruction. y Receive data clear y Send/receive data monitoring start/stop y RS/DTR signal condition designation (1) Setting Specify the functional protocol number of the function to be executed in the control data ((S)+2 to (S)+9) of the CPRTCL instruction. For details of the CPRTCL instruction, refer to Section 13.4.2.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (c) RS/DTR signal status specification ON/OFF status of the RS/DTR signal is specified. When the functional protocol (204 to 207) is executed, corresponding bits of the RS/DTR signal status specification (address: 92H/132H) are turned ON/OFF in the Q series C24N / L series C24 module.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.5 Programming example This section explains the programming examples and setting examples of the predefined protocol function. GX Developer and pre-defined protocol support function of GX Configurator-SC are used for settings. Serial communication module QJ71C24N and Mitsubishi inverter (FREQROL-A700, described as inverter or FR-A700 hereafter) as a connection target device are used in this setting example. 13.5.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.5.2 Communication data In the program example, the pre-defined protocol communication described below is executed between QJ71C24N and the other device. (1) Other device and protocols Connect Q71C24N and the inverter and read out the operation mode values of the inverter. Set the inverter station number in the CPU device (D300) and send it, and store the operation mode value in the CPU device (D201).
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 13.5.3 Communication settings (1) Settings on the GX Developer This section explains the settings required for executing the pre-defined protocol communication on GX Developer. For details, refer to the "GX Developer Version 8 Operating Manual". (a) I/O assignment setting Type and I/O signal range of each module mounted on the base unit are set in the I/O assignment setting. 1. Double click "PLC parameter" in the project window of GX Developer.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (b) Switch setting for intelligent function module Transmission specifications and communication protocols to communicate with the other device are set. 1. Set the following items and click the End button. DISPLAY/SETTING DETAILS Item Input format Setting value Display/Setting Details Hexadecimal Set "HEX.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (2) Settings on GX Configurator-SC Protocols described in Section 13.5.2 are set. 1. Click the [File] [New] menu. 2. The Add protocol screen is displayed. Select the following protocol and click the OK button. 3. The Protocol setting screen is displayed. Click the "Packet setting" cell (displayed in red) of "Packet name" H7B:RD Operation Mode. Click 4. The Packet setting screen is displayed.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT 5. The Element setting (Conversion variable) screen is displayed. Set D300 to "Send data storage area", and click the OK button. 6. The Packet setting screen is displayed. The packet setting for "Packet name" H7B:RD Operation Mode is completed. Click the Close button. 7. The Protocol setting screen is displayed. Set the packet settings for "Packet name" NOR:RD Data (4 Digits Data) and ERR:NAK Response by the same procedure as 3 to 6.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (3) Writing data to module 1. Click the [Module read/write] [Write to module] menu. Select the following module and click the Execute button. 2. The following confirmation message is displayed when writing the protocol setting data to the module is completed.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (4) Executing the protocols (program example) Create a program with the dedicated instruction (CPRTCL instruction) using GX Developer. Switch the CPU to RUN, and execute the registered protocol by the dedicated instruction (CPRTCL instruction). The following table shows the devices to be used.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT (5) Checking protocol execution result 1. Select the [Debugging support function] [Protocol execution log] menu. The protocol execution result can be checked on the Protocol execution log screen. The registration condition of log can be specified by the execution log option specification for buffer memory (buffer memory address: 40E2H, 40F2H) and intelligent function module utility. The followings are the registration conditions.
13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE MELSOFT MEMO 13 - 36 13 - 36
APPENDICES MELSOFT APPENDIX Appendix 1 Help Function The help function displays the product information. BASIC OPERATION Select the [Help] [Product information] menu. 1) App 2) 3) No. App - 1 Name Description 1) Version Displays the version of the GX Configurator-SC function. 2) Name Displays the name set at the time of installation. 3) Company name Displays the company name set at the time of installation.
APPENDICES MELSOFT Appendix 2 Operation Image of Each Communication Type of Protocol In the pre-defined protocol function, communication with other devices is performed through the communication type ‘Send only’, ‘Receive only’, or ‘Send & receive’. This section describes the respective operation images. Appendix 2.1 In case where communication type is ‘Send only’ A module sends the specified packet once. Q series C24N / L series C24 Send data Terminator Data Command Station No.
APPENDICES MELSOFT Appendix 2.2 In case where communication type is ‘Receive only’ When a module receives data from other devices, the process completes when the receive data matches the receive packet and the receiving process is performed. Q series C24N / L series C24 Receive data 1 Header Pre-defined receive packet Header Station No. 2 Up to 16 receive packets can be specified Station No. 1 Receive data 2 Receiving process Header Station No.
APPENDICES MELSOFT (2) Error completion (receive wait timeout error) Error occurs QCPU/ LCPU Execute dedicated instruction (G(P).CPRTCL) Completion device ON at error completion Status display device at completion (Receive buffer clear) Q series C24N / L series C24 * Only if it is specified t: Receive waiting time Verification mismatch Other device Receive packet Receive packet y When variables are included in receive packet elements, variable parts are not verified.
APPENDICES MELSOFT Appendix 2.3 In case where communication type is ‘Send & receive’ A module sends the specified packet once, and the execution status changes to Waiting for receive data status after the sending process completes normally. Then the module receives data from other devices, and the process completes when the receive data matches the receive packet and the receiving process is performed. Q series C24N / L series C24 Send data Terminator Station No.
APPENDICES MELSOFT (2) Error completion (receive wait timeout error) Error occurs QCPU/ Execute dedicated LCPU instruction (G(P).CPRTCL Completion device ON at error completion Status display device at completion (Receive buffer clear) Q series C24N / L series C24 * Only if it is specified t: Receive waiting time Send packet Verification mismatch Other device Send packet Receive packet Receive packet y When variables are included in receive packet elements, variable parts are not verified.
APPENDICES MELSOFT Appendix 3 Verification Operation of Receive Packet The following shows the Q series C24N / L series C24 module operation when data that are different from the specified receive packet are received. Receive data prior to the different data are discarded. Data are compared again from the start of the receive packet, and once the data are matched with the receive packet, the data receiving operation is processed.
APPENDICES MELSOFT Appendix 4 Data Examples of Packet Elements This section describes the processing procedures and practical data examples of elements that can be placed in a packet. Appendix 4.1 Length (1) Processing procedure The Q series C24N / L series C24 module processes Length according to the following procedure.
APPENDICES MELSOFT (b) Data flow is ‘Reverse direction’ Data length Code type 1 byte 2 bytes ASCII hexadecimal ASCII decimal “20” (32H 30H) “85” (38H 35H) 0201H HEX 3 bytes “201” (32H 30H 31H) “852” (38H 35H 32H) 020100H 4 bytes “2010” (32H 30H 31H 30H) “8520” (38H 35H 32H 30H) 02010000H (c) Data flow is ‘Byte swap’ Data length Code type 1 byte 2 bytes 3 bytes ASCII hexadecimal ASCII decimal 4 bytes “1020” (31H 30H 32H 30H) “2085” (32H 30H 38H 35H) 00000201H HEX (3) Calculating range The fo
APPENDICES MELSOFT Appendix 4.2 Non-conversion variable (1) Processing procedure The Q series C24N / L series C24 module processes Non-conversion variable according to the following procedure.
APPENDICES MELSOFT (2) Data example (a) The following table shows data to be stored in the data storage area in case where the string of send data is ‘ABCD’ (Reference: A=41H, B=42H, C=43H, and D=44H in ASCII code) Item Description Fixed length/Variable length Fixed length Data length 4 bytes Start address of data storage area D0 Unit of stored data Lower byte + Upper byte Lower bytes only Byte swap Disable Data to be stored in data storage area Enable Disable Enable D0 = 4241H D0 = 4142H D
APPENDICES MELSOFT Appendix 4.3 Conversion variable (1) Processing procedure The Q series C24N / L series C24 module processes Conversion variable according to the following procedure.
APPENDICES MELSOFT (b) In case where “Conversion” is ‘HEX -> ASCII decimal’ or ‘ASCII decimal -> HEX Q series C24N / L series C24 (Number of digits) (Blank-padded character) (Delimiter) Digits are filled Variable number of digits No delimiter Sending data Adding a delimiter "-_ _12.34," When "Delimiter" is ’ , ’ "-_ _12.34, " "-_ _12.
APPENDICES MELSOFT (2) Data example The following table shows send data in case where a packet consists of Header Conversion variable Terminator and data stored in the data storage area is D0=837 (0345H), D1=18 (0012H).
APPENDICES MELSOFT Appendix 4.4 Check code (1) Processing procedure Q series C24N / L series C24 modules process Check code according to the following procedure. 1) Calculates value according to the selection of “Processing method”. 2) When “Complement calculation” is ‘One’s complement’ or ‘Two's complement’, performs a 2-word-wise complement operation on the value calculated in 1).
APPENDICES MELSOFT (a) Data flow : Forward direction 1) “Complement calculation” is ‘No complement calculation’ (15H in hexadecimal is 21 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII “5” “15” “015” “0015” hexadecimal (35H) (31H 35H) (30H 31H 35H) (30H 30H 31H 35H) “1” “21” “021” “0021” (31H) (32H 31H) (30H 32H 31H) (30H 30H 32H 31H) 15H 0015H 000015H 00000015H ASCII decimal HEX 2) “Complement calculation” is ‘One’s complement’ (One’s complement of 0000
APPENDICES MELSOFT (b) Data flow : Reverse direction 1) “Complement calculation” is ‘No complement calculation’ (15H in hexadecimal is 21 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “51” “510” “5100” hexadecimal (35H 31H) (35H 31H 30H) (35H 31H 30H 30H) ASCII decimal HEX “12” “120” “1200” (31H 32H) (31H 32H 30H) (31H 32H 30H 30H) 1500H 150000H 15000000H 2) “Complement calculation” is ‘One’s complement’ (One’s complement of 0000 0015H is FFFF FFEAH) When “C
APPENDICES MELSOFT (c) Data flow : Byte swap 1) “Complement calculation” is ‘No complement calculation’ (15H in hexadecimal is 21 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “0051” hexadecimal (30H 30H 35H 31H) “0012” ASCII decimal (30H 30H 31H 32H) 00001500H HEX 2) “Complement calculation” is ‘One’s complement’ (One’s complement of 0000 0015H is FFFF FFEAH) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal.
APPENDICES MELSOFT (3) Procedure for calculating sum check The followings show procedures for calculating sum check codes using the following sample data.
APPENDICES MELSOFT (b) Data flow : Reverse direction 1) “Complement calculation” is ‘No complement calculation’ (1FDH in hexadecimal is 509 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “DF” “DF1” “DF10” hexadecimal (44H 46H) (44H 46H 31H) (44H 46H 31H 30H) “90” “905” “9050” (39H 30H) (39H 30H 35H) (39H 30H 35H 30H) FD01H FD0100H FD010000H ASCII decimal HEX 2) “Complement calculation” is ‘One’s complement’ (One’s complement of 0000 01FDH is FFFF FE02H) When
APPENDICES MELSOFT (c) Data flow : Byte swap 1) “Complement calculation” is ‘No complement calculation’ (1FDH in hexadecimal is 509 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “10DF” hexadecimal (31H 30H 44H 46H) “5090” ASCII decimal (35H 30H 39H 30H) 0000FD01H HEX 2) “Complement calculation” is ‘One’s complement’ (One’s complement of 0000 01FDH is FFFF FE02H) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decima
APPENDICES MELSOFT (4) Procedure for calculating 16-bit CRC (for MODBUS) This is a check system that is used only when data are sent/received in the RTU mode of the MODBUS protocol. The data length of CRC is fixed to 2 bytes (16 bits), and the CRC is calculated every 1 byte (8 bits) from the start of the calculating range according to the following procedure. 1) Load a 16-bit register whose bits are all ‘1’. 2) Exclusive OR (XOR) the first 1 byte (8 bits) of the calculating range with 8 bits in above 1).
APPENDICES MELSOFT The followings show the example of 16-bit CRC (for MODBUS) calculation. Packet example: Station No.
APPENDICES MELSOFT (5) Calculating range of Check code The following shows specification examples of the calculating range of Check code.
APPENDICES MELSOFT Appendix 5 Functions Modified from the Previous Version (1) Functions modified from the previous version (a) Functions modified in Version 2.21X With upgrade from Version 2.20W (SW2D5C-QSCU) to Version 2.21X (SW2D5C-QSCU), the following are the main functions/setting items that are added to GX Configurator-SC. Function/Setting item Description Addition of applicable CPU Now compatible with L02CPU and L26CPU-BT. Addition of target modules Now compatible with LJ71C24 and LJ71C24-R2.
APPENDICES MELSOFT MEMO App - 26 App - 26
INDEX ind [A] Applicable CPU .............................................. 3- 2 Applicable module.......................................... 3- 2 [C] Circuit trace .................................................. 11- 6 Circuit trace option screen Monitor buffer head address setting ....... 11-10 Monitor buffer size setting ....................... 11-10 Read......................................................... 11-10 Write.........................................................
Programming example System configuration/wiring example ..... 13-27 Communication data ............................... 13-28 Communication setting............................ 13-29 Protocol........................................................... 1- 3 Protocol execution log display ....................... 1- 3 ind [R] Read from module........................................ 10- 3 [S] Saving circuit trace file ................................ 11-11 Screen display.........................................
Microsoft, Windows, Windows NT, Windows Vista are registered trademarks of Microsoft Corporation in the United States and other countries. Pentium is a trademark of Intel Corporation in the United States and other countries. Ethernet is a trademark of Xerox Corporation. All other company names and product names used in this manual are trademarks or registered trademarks of their respective companies.