GX Configurator SC Version 2 Operating Manual (Pre Defined Protocol Support Function) SH 080007 Sh080850engc

User Manual: SH-080007

Open the PDF directly: View PDF PDF.
Page Count: 180

DownloadGX Configurator-SC Version 2 Operating Manual (Pre-defined Protocol Support Function) SH-080007 Sh080850engc
Open PDF In BrowserView PDF
GX Configurator-SC Version 2
Operating Manual
(Pre-defined protocol support function)
-SW2D5C-QSCU-E

• 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.
In this manual, the safety instructions are ranked as " ! WARNING" and " ! CAUTION".

! WARNING

Indicates that incorrect handling may cause hazardous conditions,
resulting in death or severe injury.

! CAUTION

Indicates that incorrect handling may cause hazardous conditions,
resulting in minor or moderate injury or property damage.

Note that the ! CAUTION level may lead to a serious consequence according to the circumstances.
Always follow the instructions of both levels because they are important to personal safety.
Please save this manual to make it accessible when required and always forward it to the end user.

[Startup/Maintenance Precautions]
!

CAUTION

• Before starting online operations such as a communication test, consider the operation of the
connected device and fully ensure safety.

A-1

A-1

• 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.
(2) The PRODUCT has been designed and manufactured for the purpose of being used in general
industries.
MITSUBISHI SHALL HAVE NO RESPONSIBILITY OR LIABILITY (INCLUDING, BUT NOT LIMITED
TO ANY AND ALL RESPONSIBILITY OR LIABILITY BASED ON CONTRACT, WARRANTY, TORT,
PRODUCT LIABILITY) FOR ANY INJURY OR DEATH TO PERSONS OR LOSS OR DAMAGE TO
PROPERTY CAUSED BY the PRODUCT THAT ARE OPERATED OR USED IN APPLICATION NOT
INTENDED OR EXCLUDED BY INSTRUCTIONS, PRECAUTIONS, OR WARNING CONTAINED IN
MITSUBISHI'S USER, INSTRUCTION AND/OR SAFETY MANUALS, TECHNICAL BULLETINS AND
GUIDELINES FOR the PRODUCT.
("Prohibited Application")
Prohibited Applications include, but not limited to, the use of the PRODUCT in;
y Nuclear Power Plants and any other power plants operated by Power companies, and/or any other
cases in which the public could be affected if any problem or fault occurs in the PRODUCT.
y Railway companies or Public service purposes, and/or any other cases in which establishment of a
special quality assurance system is required by the Purchaser or End User.
y Aircraft or Aerospace, Medical applications, Train equipment, transport equipment such as Elevator
and Escalator, Incineration and Fuel devices, Vehicles, Manned transportation, Equipment for
Recreation and Amusement, and Safety devices, handling of Nuclear or Hazardous Materials or
Chemicals, Mining and Drilling, and/or other applications where there is a significant risk of injury to
the public or property.
Notwithstanding the above, restrictions Mitsubishi may in its sole discretion, authorize use of the
PRODUCT in one or more of the Prohibited Applications, provided that the usage of the PRODUCT is
limited only for the specific applications agreed to by Mitsubishi and provided further that no special
quality assurance or fail-safe, redundant or other safety features which exceed the general
specifications of the PRODUCTs are required. For details, please contact the Mitsubishi
representative in your region.

A-2

A-2

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.1, Section 11.3.2, Section 11.4, Chapter 13,
Section 13.1 to 13.3, Section 13.4.1 to 13.4.3, Appendix 1,
Appendix 2.1 to 2.3, Appendix 3, Appendix 4.1 to 4.4,
Appendix 5
Partial additions
CONDITIONS OF USE FOR THE PRODUCT

Sep., 2010

SH (NA)-080850ENG-C

Partial corrections
Generic Terms and Abbreviations Used in This Manual,
Chapter 2, Section 3.2, Section 4.2, Section 9.3.3, Section 10.1
Partial additions
Section 3.3

Japanese Manual Version SH-080817-D
This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent
licenses. Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property
rights which may occur as a result of using the contents noted in this manual.
© 2009 MITSUBISHI ELECTRIC CORPORATION

A-3

A-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 .............................................................................................AREVISIONS ....................................................................................................................................................AINTRODUCTION............................................................................................................................................ACONTENTS....................................................................................................................................................AAbout Manuals ...............................................................................................................................................AHow to Use This Manual................................................................................................................................AGeneric Terms and Abbreviations Used in This Manual ..............................................................................A1. OVERVIEW

1
2
3
4
4
7
8
9

1- 1 to 1- 6

1.1 Features .................................................................................................................................................. 1- 3
2. OPERATING ENVIRONMENT

2- 1 to 2- 2

3. FUNCTION LIST

3- 1 to 3- 2

3.1 Function List ............................................................................................................................................ 3- 1
3.2 Applicable CPUs and Modules ............................................................................................................... 3- 2
3.3 Applicable versions of relevant products...............................................................................................3- 3
4. PRE-DEFINED PROTOCOL SUPPORT FUNCTION OPERATING PROCEDURE

4- 1 to 4- 3

4.1 Procedure for Setting through Writing ..................................................................................................... 4- 1
4.2 Procedure for Debugging......................................................................................................................... 4- 2
5. SCREEN DISPLAY

5- 1 to 5- 3

5.1 Screen Display ......................................................................................................................................... 55.2 Menu List .................................................................................................................................................. 55.3 Toolbar...................................................................................................................................................... 55.4 Status Bar................................................................................................................................................. 5-

1
2
3
3

6. STARTING PRE-DEFINED PROTOCOL SUPPORT FUNCTION

6- 1 to 6- 2

7. ENDING OF PRE-DEFINED PROTOCOL SUPPORT FUNCTION

7- 1 to 7- 2

A-4

A-4

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...................................................................................................................................... 8- 2
8.1.3 Closing files ....................................................................................................................................... 8- 3
8.1.4 Saving files ........................................................................................................................................ 8- 3
8.2 Communication Type of Protocols .......................................................................................................... 8- 4
8.3 Protocol Edit Operation............................................................................................................................ 8- 5
8.3.1 Adding protocols................................................................................................................................ 8- 7
8.3.2 Changing to editable protocols ......................................................................................................... 8- 8
8.3.3 Protocol detailed setting.................................................................................................................... 8- 9
8.3.4 Setting send/receive parameters in a batch..................................................................................... 8-12
8.3.5 Deleting protocols/packets................................................................................................................ 8-13
8.3.6 Copying and pasting protocols/packets............................................................................................ 8-14
9. PACKET SETTING FUNCTION

9- 1 to 9- 39

9.1 Packet elements....................................................................................................................................... 9- 6
9.2 Packet Edit Operation .............................................................................................................................. 9-25
9.2.1 Adding new elements........................................................................................................................ 9-25
9.2.2 Changing element types ................................................................................................................... 9-26
9.3 Element Setting ........................................................................................................................................ 9-27
9.3.1 Setting of Header/Static Data/Terminator ....................................................................................... 9-27
9.3.2 Setting of Length .............................................................................................................................. 9-29
9.3.3 Setting of Non-conversion variable................................................................................................... 9-30
9.3.4 Setting of Conversion variable.......................................................................................................... 9-33
9.3.5 Setting of Check code ....................................................................................................................... 9-35
9.3.6 Setting of Non-verified reception ...................................................................................................... 9-36
9.4 Device Batch Setting................................................................................................................................ 9-37
9.5 Setting Device List ................................................................................................................................... 9-39
10. WRITING/READING DATA TO/FROM MODULE

10- 1 to 10- 6

10.1 Writing Data to Module ........................................................................................................................ 10- 1
10.2 Reading Data from Module.................................................................................................................. 10- 3
10.3 Verifying Data with Module .................................................................................................................. 10- 4
11. DEBUGGING SUPPORT FUNCTIONS

11- 1 to 11- 15

11.1 Selecting Module for Debugging ......................................................................................................... 11- 2
11.2 Protocol Execution Log Display........................................................................................................... 11- 3
11.3 Circuit Trace ......................................................................................................................................... 11- 6
11.3.1 Starting the circuit trace ................................................................................................................ 11- 6
11.3.2 Circuit trace option ........................................................................................................................ 11- 9
11.3.3 Opening the circuit trace file ......................................................................................................... 11-11
11.3.4 Saving the circuit trace file ............................................................................................................ 11-11
11.4 State Monitor ........................................................................................................................................ 11-12
A-5

A-5

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 .................................................................................... 13- 1
13.2 Pre-defined Protocol Ready (X1D)...................................................................................................... 13- 2
13.3 List of Applications and Assignments of Buffer Memory .................................................................... 13- 7
13.4 Dedicated Instruction ........................................................................................................................... 13-17
13.4.1 Dedicated instructions and available devices .............................................................................. 13-17
13.4.2 G(P). CPRTCL .............................................................................................................................. 13-18
13.4.3 Functional protocol........................................................................................................................ 13-25
13.5 Programming example......................................................................................................................... 13-27
13.5.1 System configuration/wiring example........................................................................................... 13-27
13.5.2 Communication data ..................................................................................................................... 13-28
13.5.3 Communication settings................................................................................................................ 13-29
APPENDICES

App- 1 to App- 26

Appendix 1 Help Function..........................................................................................................................App- 1
Appendix 2 Operation Image of Each Communication Type of Protocol.................................................App- 2
Appendix 2.1 In case where communication type is ‘Send only’ ..........................................................App- 2
Appendix 2.2 In case where communication type is ‘Receive only’ .....................................................App- 3
Appendix 2.3 In case where communication type is ‘Send & receive’ .................................................App- 5
Appendix 3 Verification Operation of Receive Packet ..............................................................................App- 7
Appendix 4 Data Examples of Packet Elements.......................................................................................App- 8
Appendix 4.1 Length ..............................................................................................................................App- 8
Appendix 4.2 Non-conversion variable..................................................................................................App-10
Appendix 4.3 Conversion variable .........................................................................................................App-12
Appendix 4.4 Check code ......................................................................................................................App-15
Appendix 4.5 Non-verified reception......................................................................................................App-24
Appendix 5 Functions Modified from the Previous Version......................................................................App-25
INDEX

A-6

Index- 1 to Index- 2

A-6

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
the module.

SH-080006
(13JL86)

(Sold separately)

MELSEC-L Serial Communication Module User's Manual (Basic)
Explains the specifications and usage of the module's special functions, the settings for use of the
special functions, and the method of data communication with the other device.

SH-080894ENG
(13JZ40)

(Sold separately)

MELSEC-Q/L Communication Module User's Manual (Application)
Explains the specifications and usage of the module's special functions, the settings for use of the
special functions, and the method of data communication with the other device.

SH-080007
(13JL87)

(Sold separately)

MELSEC-Q/L MELSEC Communication Protocol Reference Manual
Explains how the other device performs read, write, etc. of PLC CPU data by making communication in
the MC protocol using the serial communication module/Ethernet module.

SH-080008
(13JF89)

(Sold separately)

GX Developer Version 8 Operating Manual (Startup)
Explains the system configuration, installation method, and startup method of GX Developer.
(Sold separately)

SH-080372E
(13JU40)

GX Developer Version 8 Operating Manual
Explains the program creation method, printout method, monitor method, debugging method, etc. using
GX Developer.

SH-080373E
(13JU41)

(Sold separately)

GX Developer Version 8 Operating Manual (Function Block)
Explains the function block creation method, printout method, etc. using GX Developer.
(Sold separately)

SH-080376E
(13JU44)

GX Configurator-SC Version 2 Operating Manual (Protocol FB support function)
Explains the features, usage, and .setting method of each parameter of the protocol FB support function
which supports the creation of programs for data communication by modules.

SH-080393E
(13JU46)

(Sold separately)

REMARK
The manuals are available separately in printed form as options. Please place an
order with the manual number (model code) in the above table.
A-7

A-7

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. BASIC OPERATION Operation performed until the screen for actually achieving the purpose is displayed. DISPLAY/SETTING SCREEN Screen used to make setting and/or provide a display for the purpose. DISPLAY/SETTING DETAILS Explains the display/setting screen items. Explains the especially noted items of the explanation, functions desired to be known, etc. REMARK Gives information useful as the knowledge related to the explanation. A-8 A-8 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.) Means the pre-defined protocol support function of GX Configurator-SC. Generic term for the QJ71C24, QJ71C24-R2, QJ71C24N, QJ71C24N-R2, C24 QJ71C24N-R4, LJ71C24 and LJ71C24-R2. Q Series C24N Generic term for QJ71C24N, QLJ71C24N-R2 and QLJ71C24N-R4. L Series C24 Generic term for LJ71C24 and LJ71C24-R2. Intelligent function module utility Utility in GX Configurator-SC. Generic term for the following: Microsoft Windows 7 Starter Operating System, R R Microsoft Windows 7 Home Premium Operating System, R Windows 7 R R Microsoft Windows 7 Professional Operating System, R R Microsoft Windows 7 Ultimate Operating System, R R Microsoft Windows 7 Enterprise Operating System R R Generic term for the following: Microsoft Windows Vista Home Basic Operating System, R R Microsoft Windows Vista Home Premium Operating System, R Windows Vista R R Microsoft Windows Vista Business Operating System, R R Microsoft Windows Vista Ultimate Operating System, R R Microsoft Windows Vista Enterprise Operating System R R Generic term for the following: Windows XP R Microsoft Windows XP Professional Operating System, R R Microsoft Windows XP Home Edition Operating System R R Generic product name of the product model names SWnD5C-GPPW-E, SWnD5CGX Developer GPPW-EA, SWnD5C-GPPW-EV and SWnD5C-GPPW-EVA. (n means Version 8 or later.) Generic term for the Q00J, Q00UJ, Q00, Q00U, Q01, Q01U, Q02(H), Q02PH, Q02U, QCPU (Q mode) Q03UD, Q03UDE, Q04UDH, Q04UDEH, Q06H, Q06PH, Q06UDH, Q06UDEH, Q10UDH, Q10UDEH, Q12H, Q12PH, Q12PRH, Q13UDH, Q13UDEH, Q20UDH, Q20UDEH, Q25H, Q25PH, Q25PRH, Q26UDH, and Q26UDEHCPU. Redundant CPU Generic term for the Q12PRH and Q25PRHCPU. LCPU Generic term for L02CPU and L26CPU-BT. A-9 A-9 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. On the pre-defined protocol support function of GX Configurator-SC, the protocol setting can be configured just by writing pre-defined send/receive protocols to a flash ROM mounted on a Q series C24N / L series C24 module. The protocol communication with other devices can be easily performed only with the creation of a ladder program for protocol execution. The communication debugging functions necessary for system startup is also provided. Pre-defined protocol support function Protocol setting GX Configurator-SC Q series C24N / L series C24 Other devices Temperature controller, bar-code reader etc. RS-232 or RS-422/485 Debugging support function Protocol execution log display 1-1 Circuit trace State monitor 1-1 1 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. y Packet element (Packet format) y Packet data y Communication type Protocols can be selected from the pre-defined protocol library or created/edited arbitrarily. 1-2 1-2 1 OVERVIEW MELSOFT 1.1 Features (1) Easy to communicate with other devices The use of transmission/receive protocols reduces the execution steps of ladder programs and enables the protocol communication with other devices easily!! The protocol communication is available only by selecting pre-registered transmission/receive protocols, writing them to a flash ROM mounted on a Q series C24N / L series C24 module, and creating a easy ladder program using the dedicated instruction which is for starting up protocols. In comparison with the communication using a non procedural protocol, manhours of user application creation are reduced, because the Q series C24N / L series C24 module generates transmission packets and analyzes receive packets, and ladder programs to generate and analyze packets are no longer required. Existing ladder programs (using the non procedural communication) QCPU/LCPU Program for defining the communication format Q series C24N / L series C24 Other devices Sending Program for defining the transmit command Program for processing the data transmission Receiving Program for processing the data receiving Program for checking the receive data Using this function... Ladder programs using the pre-defined protocol support function QCPU/LCPU Q series C24N / L series C24 Dedicated instruction for starting up protocols Sending Protocol setting data 1-3 Other devices Receiving 1-3 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-4 1-4 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. When receiving data, the Q series C24N / L series C24 module automatically transfers the data necessary such as read data to CPU devices and buffer memory. < System example > QJ71C24N QCPU CPU device Sets the channel number to CPU device ’D0’ D0 CH1. FREQROL-A700 CH2. CH1. 1 D0 RS-232 Terminator Stores the current value to CPU device ’D100’ D100 Current value CH.2 1 SG 2 (FG) Request Header Header Response Current value Check code Terminator 3 RDA 4 (FG) RDB RS-422 /485 1-5 1 D100 SDA SDB Check code 5 6 7 1-5 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. (b) Circuit trace The transmission/receive packet data and communication signal wire condition between Q series C24N / L series C24 modules and device controllers can be traced. (c) State monitor The error status, communication signal wire condition, operation switch setting status, and execution status of communication protocols etc. of the C24 module can be monitored. 1-6 1-6 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". For installation 65MB or more For operation 20MB or more Display Operating system 800 *3 600 dots or more resolution Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft Microsoft R R R R R R R R R R R R Windows 95 Operating System (English version) Windows 98 Operating System (English version) Windows Millennium Edition Operating System (English version) Windows NT Workstation Operating System Version 4.0 (English version) Windows 2000 Professional Operating System (English version) Windows XP Professional Operating System (English version) Windows XP Home Edition Operating System (English version) Windows Vista Home Basic Operating System (English version) Windows Vista Home Premium Operating System (English version) Windows Vista Business Operating System (English version) Windows Vista Ultimate Operating System (English version) Windows Vista Enterprise Operating System (English version) R R R R R R R R R R R R Microsoft Windows 7 Starter Operating System (English version) Microsoft Windows 7 Home Premium Operating System (English version) R R R R Microsoft Windows 7 Professional Operating System (English version) Microsoft Windows 7 Ultimate Operating System (English version) R R R R Microsoft Windows 7 Enterprise Operating System (English version) R Essential software package R GX Configurator-SC Version 2.20W or later is required. *1: To use LCPU and L Series C24, use GX Developer Version 8.89T or later. R *2: To install GX Configurator-SC to a Windows 7-based personal computer, use GX Developer Version 8.91V or later. R R *3: Resolution of 1024 × 768 dots or more is recommended for Windows Vista or Windows 7. y For precautions in installation of GX Configurator-SC for each operating system, refer to “Method of installing the MELSOFT Series” included in the utility package. For Windows Vista and Windows 7, refer to the technical bulletin: “Installation procedure, precautions, and corrective actions for problems regarding Windows Vista-based personal computer” and “Products compatible with Windows 7 and precautions for installation”, as additional information. R 2-1 R 2-1 2 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.0 Workstation (Service Pack 3 or later) Pentium 300MHz or more 64MB or more Windows 2000 Professional Pentium 300MHz or more 64MB or more Windows XP Professional Pentium 300MHz or more 128MB or more Windows XP Home Edition Pentium 300MHz or more 128MB or more Windows Vista Home Basic Pentium 1GHz or more 1GB or more Windows Vista Home Premium Pentium 1GHz or more 1GB or more Windows Vista Business Pentium 1GHz or more 1GB or more Windows Vista Ultimate Pentium 1GHz or more 1GB or more R R R R R 2 R R R R R R R R R R R R R R R R R Windows Vista Enterprise Pentium 1GHz or more 1GB or more Windows 7 Starter Pentium 1GHz or more 1GB or more Windows 7 Home Premium Pentium 1GHz or more 1GB or more Windows 7 Professional Pentium 1GHz or more 1GB or more Windows 7 Ultimate Pentium 1GHz or more 1GB or more Windows 7 Enterprise Pentium 1GHz or more 1GB or more R R R R R R R R R R R R y When Windows XP, Windows Vista or Windows 7 is used, the following new functions cannot be used. If any of the following new functions is used, this product may not operate normally. Start of application in Windows compatible mode Fast user switching Remote desktop Big fonts (Details setting of Screen properties) Additionally, 64-bit Windows XP, Windows Vista and Windows 7 are not available. y In Windows Vista and Windows 7, log in as a user having User authority or higher. y When Windows 7 is used, the following new functions cannot be used. Windows XP Mode Windows Touch R R R R R R R R R R 2-2 2-2 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. Chapter 8 Packet setting Displays the packet element list and launches setting functions for configurable elements. Chapter 9 Element setting Sets a variety of data to packet elements. Section 9.3 Device batch setting Sets devices used in protocols all at once. In addition, displays the list of devices being used. Section 9.4 Section 9.5 Writing data to module Writes the setting data on the Protocol setting screen to a selected module. Section 10.1 Reading data from module Reads data of the protocol settings written in a selected module and displays data on the Protocol setting screen. Section 10.2 Verifying data with module Verifies the protocol setting being opened with that read from a selected module. Section 10.3 (2) Debugging support function Function Circuit trace Function outline Traces the transmission/receive packet data and communication signal wire condition. y Save/read of trace data Saves/reads the data obtained by the circuit trace. Reference Section Section 11.3 Section 11.3.4 State monitor Monitors the error status, communication signal wire, etc. of the QJ71C24(-R2/R4). Section 11.4 Protocol execution log display Displays the protocol execution logs and protocol execution results of a module to which the protocol setting is set. Section 11.2 3-1 3-1 3 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 Applicable modules and function ranges Pre-defined protocol Applicable module Q series C24 modules LCPU support function Debugging support function Circuit trace State monitor Protocol execution log display QJ71C24, QJ71C24-R2 *1 *1 QJ71C24N , QJ71C24N-R2 , *1 QJ71C24N-R4 LJ71C24, LJ71C24-R2 *1: Use a function version B module with a serial number of which the first five digits are ‘10122’ or higher. 3-2 3-2 3 FUNCTION LIST MELSOFT 3.3 Applicable versions of relevant products The following table shows versions of modules and software applicable to the functions. Applicable version Function Debugging support function State monitor Pre-defined protocol support function Writing data to module GX Configurator-SC GX Developer QJ71C24N, QJ71C24N-R2, QJ71C24N-R4 QJ71C24, QJ71C24-R2 Circuit trace Protocol execution log display Reading data from module Protocol setting Select from pre-defined protocol library Setting editable protocol Version 2.20W or later Version 8.78G or later Copying/pasting protocol Packet setting Function version B module with a serial number of which the first five digits are 10122 *1 or higher Element setting Device batch setting Setting device list Verify data with module : Applicable (Without restrictions by product version) : Not applicable *1: For the following settings of “Element setting”, use a function version B module with a serial number of which the first five digits are 11062 or higher. 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 first five digits are ‘10122’. y For Conversion variable (Refer to Section 9.3.4): Sign (“Signed”), Sign character, Number of decimals (other than “No decimal point”), or Delimiter (other than “No delimiter”) y For Non-verified reception (Refer to Section 9.3.6): Data length (“variable number of characters”) Applicable version Function Debugging support function Pre-defined protocol support function GX GX Configurator-SC Developer LJ71C24N, LJ71C24N-R2 State monitor Circuit trace Protocol execution log display Writing data to module Reading data from module Protocol setting Version 2.21X or later Version 8.89T or later Packet setting Setting device list Verify data with module : Applicable (Without restrictions by product version) 3-3 3-3 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. Operation: [Edit] [Add protocol] (Refer to Section 8.3.1.) The Add protocol screen is displayed. Select either of ‘Select from pre-defined protocol library’ or ‘Add editable protocol’. (3) Open the Write to module screen. For ‘Select from pre-defined protocol library’, a protocol can be selected from the pre-defined protocol library. For ‘Add editable protocol’, desired packet elements can be set. (Refer to Chapter 9.) Operation: [Module read/write] [Write to module] (Refer to Section 10.1.) The Module write screen is displayed. (4) Write the protocol setting to a specified module (Q series C24N / L series C24 module). Operation: Select a module to which the protocol setting is to be written and click the Execute button. The protocol setting is registered to a flash ROM mounted on a Q series C24N / L series C24 module. The protocol setting can be read from a specified module (Q series C24N / L series C24 module) as well. For details, refer to Section 10.2. 4-1 4-1 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.1 Stop the circuit trace with GX Configurator-SC when the dedicated instruction is completed Refer to section 11.3.1 Check whether any errors occur with the execution result in the control data of dedicated instruction or with *1 the system monitor of GX Developer Correct errors according to the error *2 information and the circuit trace result Refer to the ’Q Corresponding Serial Communication Module User’s Manual (Basic)’ , ’MELSEC-L Serial Communication Module User’s Manual (Basic)’ or ’GX Developer Version 8 Operating Manual’ Are any errors occurring? Recheck devices specified in "Data storage area specification" on the Element setting screens for ’Non-conversion variable’ and ’Conversion variable’ in GX Configurator-SC Refer to section 11.3.1 Refer to section 9.3 Yes No Check whether data are stored in specified CPU devices and intelligent function module devices (buffer memory) Are data stored? No Yes Completed *1: When a number of protocols is specified in the dedicated instruction, the execution result can be checked by each protocol in the protocol execution log. *2: Methods for checking an error factor (1) Identify an error factor by an error code. (2) Check the following items when a transmission monitoring timeout error occurs. 1) Cable connection (whether a cable looses.) 2) Whether the transmission is stopped due to the DTR control (3) Check the following items when a receive wait timeout error occurs. 1) Cable connection (whether a cable looses.) 2) Whether the transmission from other devices is stopped due to the DTR control 3) The circuit trace result Whether the transmission from other devices is stopped Whether the data missing occurs due to the receive error Whether the data (packets) sent from other devices include errors 4-2 4-2 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. Edit screen Protocol setting, the trace screen etc. are available. Status bar Displays status of various items. 5-1 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.3 Add receive packet — Section 9.2.1 Delete Delete Section 8.3.5 Copy Ctrl + C Section 8.3.6 Paste Ctrl + V Section 8.3.6 Delete multiple protocols — Section 8.3.5 Copy multiple protocols — Section 8.3.6 Paste multiple protocols — Section 8.3.6 Device batch setting — Section 9.4 Write to module — Section 10.1 Module read/write Read from module — Section 10.2 Module verification — Section 10.3 Tool Setting device list — Section 9.5 Module selection — Section 11.1 Protocol execution log — Section 11.2 Circuit trace — Section 11.3.1 Open circuit trace file — Section 11.3.3 Save as circuit trace file — Section 11.3.4 Circuit trace option — Section 11.3.2 — Section 11.4 Debugging support function Circuit trace State monitor Window Help 5-2 Cascade — — Tile horizontally — — Product information — Appendix 1 5-2 5 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. (For the details, refer to Section 8.3.) 2) Displays the module name, I/O address, and channel of a debugging object module being selected. 5-3 5-3 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. DISPLAY/SETTING SCREEN 6 6-1 6-1 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. DISPLAY/SETTING SCREEN 7 7-1 7-1 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.1 Changing to editable Changes a protocol selected from the pre-defined protocol library to Section 8.3.2 protocols an editable one. Protocol detailed setting Configures the number of retries of a protocol and whether to clear Section 8.3.3 OS area (receive data area) before protocol execution etc. Setting send/receive Configures all receive settings/send settings of the protocol detailed Section 8.3.4 parameters in a batch setting at once. Deleting protocols/packets Deletes a protocol/packet. Section 8.3.5 Copying and pasting Section 8.3.6 Copies and pastes a protocol/packet. protocols/packets 8.1 File Operation 8.1.1 Creating new files BASIC OPERATION 1. Select the [File] [New] menu ( ). 2. The Protocol setting screen is displayed. DISPLAY/SETTING SCREEN 8 8-1 8-1 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. DISPLAY/SETTING SCREEN 8 8-2 8-2 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. BASIC OPERATION (1) Saving a protocol setting file over the old one 1. Select the [File] [Save] menu ( ). 2. A protocol setting file being edited is saved over the old one. (2) Saving a protocol setting file with a name 1. Select the [File] [Save as] menu. 2. Set the "File path" and "File name". 3. Click the Save button. 4. A protocol setting file being edited is saved with a name. 8-3 8-3 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. Command Length of read data Read data Check code Terminator Maximum length: 2048 bytes The pre-defined protocol function performs communication with other devices using the following procedures (communication types). For the operation image of each communication type, refer to Appendix 2. Communication type name Description Send only Sends a send packet once. One send packet is required. Receive only Receives a packet if it matches any of up-to-16 defined receive packets. One or more receive packets are required. Send & receive Sends a send packet, and then receives a packet if it matches any of up-to-16 defined receive packets. One send packet and one or more receive packets are required. 8-4 8-4 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. 2) Manufacturer Displays the manufacturer’s name of a target device of a protocol to be set. 3) Model Displays the target model of a protocol to be set. 4) Protocol name Displays the name of a protocol to be set. Communication Display the communication type in a protocol to be set. 5) type Send only : Sends one send packet once. Receive only : Receives a packet if it matches any of up-to-16 defined receive packets. Send&Receive : Sends one send packet, and receives a packet if it matches any of upto-16 defined receive packets. 8-5 8-5 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. 9) Cell for adding No variable : There is no variable in the element. Variable set (in blue) : All variables are set. Variable unset (in red) : There are one or more unset variables. Element unset (in red) : There is no element in the editable protocol. Element error (in red) : The element does not meet requirements. The Add protocol screen is displayed by clicking this cell or pressing the Enter key. protocol 10) Protocol line One protocol line is displayed for each protocol. Up to 128 lines can be displayed per a module. The background is displayed in the following colors. Protocol selected from the pre-defined protocol library : Deep sky blue Editable protocol 11) Send packet line : Orange One send packet line is displayed for each send packet. (‘Send’ means the communication toward an external device from a module.) The line numbers per a protocol varies depending on its communication type. ‘Receive only’ : 0 line ‘Send only’ ‘Send&receive’ : 1 line The background is displayed in the following colors. Protocol selected from the pre-defined protocol library : Light sky blue Editable protocol 12) : Light yellow Receive protocol One receive packet line is displayed for each receive packet. (‘Receive’ means the line communication toward a module from an external device.) The line numbers per a protocol varies depending on its communication type. ‘Send only’ : 0 line ‘Receive only’ ‘Send&receive’ : 1 to 16 lines The background is displayed in the following colors. Protocol selected from the pre-defined protocol library : Pale green Editable protocol 13) Number of : Yellow Displays the number of registered protocols out of a maximum of 128. registered protocols 14) Number of Displays the number of registered packets out of a maximum of 256. registered packets 15) Packet data area usage Displays the percentage of the size of packet data being registered in the maximum registerable area of the packet data area (flash ROM area in a module to store packet data for communication with other devices). 8-6 8-6 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.”, “Manufacturer”, “Model”, and “Protocol name”. Items other than “Protocol No.” cannot be changed after a protocol addition. Add editable protocol Select this item to add a protocol which can be edited arbitrarily, specifying only “Protocol No.”. “Manufacturer”, “Model”, and “Protocol name” can be changed after a protocol addition. Protocol No. Set the number of the protocol to be added. Manufacturer Set a manufacturer’s name of the protocol to be added. Model Set a model of the protocol to be added. Protocol name Set a name of the protocol to be added. OK button Fixes the setting and closes the screen. Cancel button Cancels the setting and closes the screen. POINT When “Select from pre-defined protocol library” is selected, “Send/receive data storage area” in a Non-conversion variable/Conversion variable can only be configured in packet elements. 8-7 8-7 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-8 8-8 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. DISPLAY/SETTING SCREEN 8-9 8-9 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. *1 information Protocol setting Protocol name Set a protocol name of the protocol. information Communication type Select a communication type of the protocol. Receive Clear OS area (receive Select whether to clear the OS area (receive data area) of the Q series C24N / setting data area) before L series C24 module before the protocol execution. protocol execution If this item is not selected, the data that the Q series C24N / L series C24 *1 module received before the protocol execution also become a receive target of the protocol. Receive wait time Set waiting time after the Q series C24N / L series C24 module turns to the waiting for reception status. If the communication with other devices is not available due to a cable disconnection etc. and no matched packet can be received within the set time, the Q series C24N / L series C24 module determines an error and cancels the waiting for reception status. Send setting Number of retries Set the number of times the Q series C24N / L series C24 module retries to send when the sending from the Q series C24N / L series C24 module has not been completed within the set time of “Monitoring time”. The Q series C24N / L series C24 module determines an error if the sending has not been completed despite the specified number of times of sending retries. Retry interval Set the interval between the failure of sending from the Q series C24N / L series C24 module and the retry when the sending from the Q series C24N / L series C24 module has not been completed within the set time of “Monitoring time”. Standby time Set standby time between when a protocol set to the Q series C24N / L series C24 module turns to the execution status and when it actually sends the data. By setting this item, the send timing of the Q series C24N / L series C24 module can be adjusted to readiness of other devices to receive data. Monitoring time Set waiting time between when the Q series C24N / L series C24 module turns to the sending status and when the sending is completed. If the communication with other devices is not available due to a cable disconnection etc. and the sending cannot be completed within the set time, the Q series C24N / L series C24 module determines an error and cancels the sending status. *1: For a protocol selected from the pre-defined protocol library, “Connected device information” and “Protocol setting information” cannot be modified. 8 - 10 8 - 10 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. CPRTCL instruction execution CPRTCL instruction abnormal completion Q series C24N / L series C24 Standby time Monitoring time Retry interval Monitoring time Monitoring timeout Data sending 8 - 11 Retry interval Monitoring time Monitoring timeout First retry Monitoring timeout Second retry 8 - 11 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. Select the start number and end number of the range of protocols range to be set at once. Receive setting/ Specified values of selected items are to be set. Send setting OK button Fixes the setting and returns to the Protocol detailed setting screen. Cancel button Cancels the setting and returns to the Protocol detailed setting screen. 8 - 12 8 - 12 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. y A receive packet cannot be deleted when its communication type is “Send & receive” or “Receive only” and there is only one receive packet. y A packet in a protocol selected from the pre-defined protocol library cannot be deleted. 8 - 13 8 - 13 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. Select [Edit] [Paste] menu, or press the Ctrl + V key. 6. The selected line of the protocol/packet is overwritten. (2) Copying more than one in a batch Batch copy is available for diverting multiple protocols/packets to another predefined protocol support function window at a time. 1. Display the Protocol setting screen of the copy source. 2. Select the [Edit] [Copy multiple protocols] menu. 3. Specify the range of the protocol numbers to copy in the Copy multiple protocols screen. 4. Display the destination Protocol setting screen. 5. Select the [Edit] [Paste multiple protocols] menu. 6. Data in the protocol/packet lines of the protocol numbers of the copy source range are overwritten. (The protocol numbers of the copy source and of the destination become the same.) y A send packet cannot be pasted to a receive packet, and a receive packet cannot be pasted to a send packet. y A packet cannot be pasted to a protocol selected from the pre-defined protocol library. 8 - 14 8 - 14 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. DISPLAY/SETTING SCREEN 9 9-1 9-1 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. Displays the number of the packet element. Element type Displays the type of each element. For details, refer to Section 9.1. Data division Header Conversion Conversion variable variable Static data Check code Terminator Up to 32 elements can be allocated Header/Length/Static Data/Non-conversion variable/Conversion variable/ Non-verified reception/Check code/Terminator Element name Displays the name of each element. Element Displays the setting outline of each element. setting For the display details, refer to [Element display example] in this section. Display contents may vary depending on types of elements. *2 To display the respective setting screen, click an editable cell or press the Enter key. *3 Change type button *3 Changes the type of the packet element. For details, refer to Section 9.2.2. Add new button Adds a new packet element. For details, refer to Section 9.2.1. Copy button Copies the packet element at the cursor position. *3 Paste button *3 Pastes the copied packet element to the line next to the cursor position. Delete button Deletes the packet element at the cursor position. Close button Closes the Packet setting screen. *1: Not editable for a protocol selected from the pre-defined protocol library. *2: Displayed in red when a Variable unset error, Element error or Calculating range error occurs, and displayed in blue when no error occurs. *3: Not selectable for a protocol selected from the pre-defined protocol library. 9 9-2 9-2 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 ( ). Range for calculation of data length [CR](1byte) 1AB2C3(3byte) Object element3-8 Displays the code type using elliptical expressions. Length ASCII hexadecimal : Hexadecimal ASCII decimal : Decimal HEX : HEX Hexadecimal Displays the data flow using elliptical expressions. Forward direction (upper byte -> lower byte) : Forward Reverse direction (lower byte -> upper byte) Forward : Reverse Byte swap (by word) : byte Data size 2 byte For ‘Fixed length’, displays the address range of a device or buffer to be specified as a variable with [ ]. For ‘Variable length’, additionally displays the starting address of a device or buffer memory which specifies Fixed length: [D1-D2] Variable length: [D1] [D2-D11] the data length with another [ ]. Fixed length/Variable length Fixed length Non-conversion Length of send/receive data 600 byte variable Displays the unit of stored data using elliptical expressions. Lower byte + Upper byte : Lower/Upper byte Lower/Upper byte Lower bytes only : Lower byte Displays the byte swap using elliptical expressions. 9-3 Disable (lower -> upper) : No swap Enable (upper -> lower) : Swap Swap 9-3 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. HEX -> ASCII decimal : -> Dec HEX -> ASCII hexadecimal : -> Hex ASCII decimal -> HEX : Dec -> ASCII hexadecimal -> HEX : Hex -> Fixed number of data/Variable number of data Variable number Displays ‘Number of data’ using elliptical expressions. Number of data (3) Data digits (“Digit (variable)” is displayed when the value is ‘0’.) Displays a blank-padded character (0/Space). Conversion variable -> Hex Digit (3) Padded (0) Displays the conversion unit using elliptical expressions. Word : Word Double word : Double Double Displays whether signed or not. Signed Unsigned Signed When ‘Signed’ is selected in “Sign”, displays the sign character using elliptical expressions. None : none + :+ 0 :0 Sign character (none) Space :space Displays the number of decimals using elliptical expressions. Decimal (5) Displays the delimiter using elliptical expression. 9-4 No delimiter : none Comma : comma Space : space Delimiter (comma) 9-4 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. No complement calculation : No calculation One's complement : 1 complement Two's complement : 2 complement 1 complement Displays the data flow using elliptical expressions. Forward direction (upper byte -> lower byte) : Forward Reverse direction (lower byte -> upper byte) Forward : Reverse Byte swap (by word) : byte Data size Non-verified Displays the check size with ( ). (When the value is 0, reception displays ‘Variable’.) 2 byte (123 byte) (Receive only) 9-5 9-5 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. • At receiving : Verifies a header and receive data. The following table lists the items. Item Element name Code type Description Remark Set a name of the element. - Select a data type of the setting value. - ASCII string/ASCII control code/HEX Set data within 1 to 50 bytes. Code type Setting value Setting range ASCII string 20H to 7FH ASCII control code 00H to 1FH, and 7FH of control code HEX 00H to FFH of hexadecimal data (Setting example) ASCII string : ”ABC” ASCII control code : STX HEX : FFFF y Only one Header can be placed in a packet. y A Header can be placed only at the beginning of a packet. (2) Static Data Use this element when a specific code/character string such as command exists in a packet. y At sending : Sends a specified code and character string. y At receiving : Verifies the receive data. Multiple Static Data elements can be placed to desired positions in the data division. The items are the same as ones explained in (1) in this section. 9-6 9-6 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. Code type Setting value Setting range ASCII string 20H to 7FH ASCII control code 00H to 1FH, and 7FH of control code HEX 00H to FFH of hexadecimal data (Setting example) ASCII string : ”ABC” ASCII control code : STX HEX : FFFF y Only one Terminator can be placed in a packet. y Only a Check code and Static Data can be placed behind a terminator. 9-7 9-7 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. - Select a format of the data length. Code type - ASCII hexadecimal/ASCII decimal/HEX Select the data length on the line. Data length - The range is 1 to 4. At sending Forward direction (upper byte -> lower byte) : Sends a calculated length, from the upper byte. At receiving : Receives data, from the upper byte. At sending Reverse direction (lower byte -> upper byte) Data flow : Sends a calculated length, from the lower byte. At receiving : Receives data, from the lower byte. At sending Not settable when “Data length” is 1 byte : Sends a calculated length swapping the upper byte and Byte swap (by word) lower byte by word. At receiving : Receives data swapping the upper byte and lower byte by word. Calculating range 9-8 start end Set the starting element number of the calculating range. The range is 1 to 32. Set the ending element number of the calculating range. - The range is 1 to 32. 9-8 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’. y When any of a Non-conversion variable (Variable length), Conversion variable (Variable number of data), Conversion variable (Fixed number of data/Variable number of digits*1), and Non-verified reception (Variable number of characters) is placed behind a Length and they are not included in the calculation range of the Length, place any of the following data immediate after the Non-conversion variable (Variable length), Conversion variable (Variable length) or Non-verified reception. Static Data Terminator Check code + Static Data Check code + Terminator y When “Code type” is ‘ASCII hexadecimal’, a corresponding packet is regarded as a mismatch packet if a string except for ‘0’-‘9’ ‘A’-‘F’ ‘a’-‘f’ is received. y When “Code type” is ‘ASCII decimal’, a corresponding packet is regarded as a mismatch packet if a string except for ‘0’-‘9’ is received. *1: Excluding a case where “Number of data” is ‘1’ and “Delimiter” is not ‘No delimiter’. 9-9 9-9 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. At sending : Specifies the data length at the time of the protocol length Variable length Data length/ Maximum Set the length of data to be sent and received. (For the variable length data, set the maximum data length that can be specified to the data length storage area.) execution and sends data. At receiving : Receives data of which the length is variable. data length The range is 1 to 2048. At sending : Sends each one word (2 bytes) data in the data storage area in the order of the lower byte to the Lower byte + Upper byte upper byte. At receiving : Stores the receive data to the data storage area in the order of the lower byte to the upper byte. At sending Unit of stored data : Sends each lower byte of data in the data storage area. The Q series C24N / L series C24 module ignores Lower bytes only each upper byte of the data. At receiving : Stores the receive data to each lower byte in the data storage area. Q series C24N / L series C24 module stores 00H to each upper byte. At sending : When ‘Enable’ is selected, sends data swapping the upper byte and lower byte by word (2 bytes). When “Unit of stored data” is ‘Lower byte + Upper byte’ and “Data length” is an odd number of bytes, sends the upper byte at transmission of the last byte. When “Unit of stored data” is ‘Lower bytes only’ and “Data length” is an odd number of bytes, sends data Byte swap Disable (lower -> upper)/ without any byte swap at transmission of the last Enable (upper -> lower) byte. At receiving : When ‘Enable’ is selected, receives data swapping the upper byte and lower byte by word (2 bytes). When “Unit of stored data” is ‘Lower byte + Upper byte’ and “Data length” is an odd number of bytes, stores the last byte to the upper byte. When “Unit of stored data” is ‘Lower bytes only’ and “Data length” is an odd number of bytes, stores the last byte without any byte swap. Data storage area specification 9 - 10 Specify a starting device to store variable value. 9 - 10 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. (However, when the data length of a send packet is an odd number, the upper byte (lower byte in case of ‘Byte swap’) of the last device is not sent. When the data length of a receive packet is an odd number, the last data is stored with one byte of 00H.) y When ‘Lower bytes only’ is selected, twice size of the data length is occupied. (Word) +0 Specified device Data storage area Send packet: Users store the send data Receive packet: The Q series C24N / L series C24 module stores the receive data +n 9 - 11 9 - 11 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. (However, when the data length of a send packet is an odd number, the upper byte (lower byte in case of ‘Byte swap’) of the last device is not transmitted. When the data length of a receive packet is an odd number, one byte of 00H is added to the last data and stored.) y When ‘Lower bytes only’ is selected, twice size of the data length + one word (length for the data length storage area) are occupied. (Word) +0 Specified device Data length storage area*1 Send packet: Users store the send data length (data length on the line) The Q series C24N / L series C24 module stores the receive data length (data length on the line) +1 Data storage area Send packet: Users store the send data Receive packet: The Q series C24N / L series C24 module stores the receive data +n *1: The unit of data length is byte. 9 - 12 9 - 12 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. The receive process may not be performed normally if they cannot be classed. (Example) When value of a Terminator or value of a Static Data following a Non-conversion variable is used in a Non-conversion variable, the Q series C24N / L series C24 module recognizes it as data of a Terminator or a Static Data following a Nonconversion variable and performs the verify/receive process. y Multiple Non-conversion variable (Fixed length) elements can be placed in a packet, and multiple Non-conversion variable (Variable length) elements can also be placed in a send packet. However, only one Non-conversion variable (Variable length) can be placed in a receive packet, and any of the following requirements need to be met. (a) Place any of the following data immediate after a Non-conversion variable Static Data Terminator Check code + Static Data Check code + Terminator (b) Place a Length before a Non-conversion variable and include the Nonconversion variable in the calculation range. In addition, two or more of the following four elements cannot be placed in the same packet. Conversion variable (Variable number of data) Conversion variable (Fixed number of data and Variable number of digits) (Excluding a case where “Number of data” is ‘1’ and “Delimiter” is not ‘No delimiter’.) Non-conversion variable (Variable length) Non-verified reception (Variable number of characters) 9 - 13 9 - 13 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. HEX -> Converts numeric value stored in the data storage ASCII hexadecimal area to ASCII hexadecimal. HEX ASCII hexadecimal -> HEX Fixed number of data data Treats receive data as ASCII decimal, converts it to numeric value, and stores it to the data storage Treats receive data as ASCII hexadecimal, converts it to numeric value, and stores it to the data storage area. Fixes the number of data to be sent and received. time of the protocol execution and Variable number of data sends the data. At receiving : Receives data of which the number is variable. Number of data/ Maximum number of data - area. At sending : Specifies the number of data at the Fixed number of data/ Variable number of - HEX -> ASCII ASCII decimal -> Remark For Variable number of digits, delimiters are required. Set the number of data to be sent and received. (For ‘Variable number of data’, set the maximum number of data that can be specified to the data length storage area.) - The range is 1 to 256. Set the number of digits per one send and receive data. 1 to 10 When the number of digits of data is less than the - specified number of digits, upper digits are filled with blank-padded characters. Number of digits At sending : Sends only the data division converted to an ASCII string in Variable number of digits variable length. - At receiving : Receives only an ASCII string of the data division in variable length. Select a character used to fill upper digits when Blank-padded character 0/Space “Number of digits” is not ‘Variable number of digits’ and the number of digits of send/receive data is - less than the specified number of digits. Select how many words are manipulated as one data in the data storage Conversion unit area. For ‘Word’, converts data manipulating one word as one data. - For ‘Double word’, converts data manipulating two words as one data. 9 - 14 9 - 14 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 ‘-‘. Number of decimals Delimiter Data storage area specification 9 - 15 No decimal point/ Select the decimal point position of data on line. Variable point/ This item can be set when “Conversion” is ‘HEX -> 1 to 9 ASCII decimal’ or ‘ASCII decimal -> HEX’. No delimiter/ Select the delimiter inserted after one data. Comma/ A delimiter is not added to the end of data when Space the number of data is 2 or more. Specify a starting device to store variable value. - - - 9 - 15 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’. (Word) +0 Specified device Send packet: Users store the send data Receive packet: The Q series C24N / L series C24 module stores the receive data Data storage area +n (b) When “Fixed number of data/Variable number of data” is ‘Variable number of data’ An area starting from the device number which is specified on the Element setting screen +1 is considered as the ‘data storage area’. (Word) +0 Specified device Data quantity storage area Send packet: Users store the number of the send data Receive packet: The Q series C24N / L series C24 module stores the number of the receive data +1 Data storage area Send packet: Users store the send data Receive packet: The Q series C24N / L series C24 module stores the receive data +n 9 - 16 9 - 16 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”. Occupied size in Setting item Conversion Number of data storage area unit decimals per one data No decimal point Word Fixed point Variable point No decimal point Double word Fixed point Variable point Reference for data storage area configuration 1 word (d) Data storage area configuration 1) 2 words (d) Data storage area configuration 2) 2 words (d) Data storage area configuration 3) 4 words (d) Data storage area configuration 4) (d) Data storage area configuration The following shows the data storage area configuration per one data. 1) “Conversion unit”: Word, “Number of decimals”: No decimal point, Fixed point Data storage area 0h Numeric data 2) “Conversion unit”: Word, “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 Decimal point position 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 12345 12345(3039 H) 1(1 H) 1234.5 12345(3039 H) 10(0A H) 123.45 12345(3039 H) 100(64 H) 12.345 12345(3039 H) 1000(3E8 H) 1.2345 12345(3039 H) 10000(2710 H) 3) “Conversion unit”: Doubleword “Number of decimals”: No decimal point, Fixed point Data storage area 0h 1h 9 - 17 Numeric data (L) (H) 9 - 17 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.0 1234567890(499602D2H) 10(0AH) 12345678.90 1234567890(499602D2H) 100(64H) 1234567.890 1234567890(499602D2H) 1000(3E8H) : : 1.234567890 : 1234567890(499602D2H) 1000000000(3B9ACA00H) (e) Range of value that can be used in the data storage area The following table shows the range of value that can be used in the data storage area. Conversion Sign Conversion unit Word Unsigned HEX -> ASCII decimal Double word Word ASCII decimal -> HEX Signed Range of value 0 to 65535 (0H to FFFFH) 0 to 4294967295 (0H to FFFFFFFFH) -32768 to 32767 (8000H to FFFFH, 0H to 7FFFH) -2147483648 to 2147483647 Double word (80000000H to FFFFFFFFH, 0H to 7FFFFFFFH) 9 - 18 HEX -> ASCII hexadecimal Word 0H to FFFFH ASCII hexadecimal -> HEX Double word 0H to FFFFFFFFH 9 - 18 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. Item Sign/Sign character Operation of Q series C24N / L series C24 modules When “Signed” is selected, a sign character can be received. However, an ASCII -> BIN conversion error (7F20H) may occur when a sign character which is not at the beginning of a unit of data is received. When any other than “No decimal point” is selected, ‘.’ (a period) can be received. Number of decimals However an ASCII -> BIN conversion error (7F20H) may occur when ‘.’ (a period) which is not at the specified digit is received. An ASCII -> BIN conversion error (7F20H) may also occur when “variable point” is selected and ‘.’ (a period) which is at the beginning or end of a unit of data is received. When any other than “No delimiter” is selected, a delimiter can be Delimiter received. However an ASCII -> BIN conversion error (7F20H) may occur when a delimiter which is not at a boundary of data is received. 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 exceeds the upper limit shown below. Conversion unit Conversion Upper limit of the number of the receive data Word Double word ASCII decimal -> HEX Maximum 5 digits ASCII hexadecimal -> HEX Maximum 4 digits ASCII decimal -> HEX Maximum 10 digits ASCII hexadecimal -> HEX Maximum 8 digits y When “Number of decimals” is ‘Variable point’ in a send packet, a decimal point position designation error (7D21H) may occur if the decimal point position is greater than the number of digits. 9 - 19 9 - 19 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. (Example for the case that the setting of “Number of digits” is 4) Conversion variable Receive Data "1" "2" "3" Terminator ETX It is considered as an error that a ’Conversion variable’ of the receive data ends up with three digits while the setting of "Number of digits" is four digits. y When receiving data of which the number exceeds the “Maximum number of data”, the Q series C24N / L series C24 module stores data as many as the maximum number of data 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 Conversion variable from those of a Terminator or a Static Data following a Conversion variable. The receive process may not be performed normally if they cannot be classed. (Example) When value of a Terminator or value of a Static Data following a Conversion variable is used in a Conversion variable, the Q series C24N / L series C24 module recognizes it as data of a Terminator or a Static Data following a Conversion variable and performs the verify/receive process. 9 - 20 9 - 20 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]. [Variable number of data] Only one Conversion variable can be placed in one packet, and any of the following 1) and 2) need to be met. 1) For discriminating the data length of a Conversion variable, any of the following items is placed immediate after the Conversion variable. Static Data Terminator Check code + Static Data Check code + Terminator 2) A ‘Length’ is placed before a Conversion variable. (The Conversion variable needs to be included in the calculating range.) [Fixed number of data] (a) Variable number of digits 1) When the number of data is 2 or more, or the number of data is 1 with no delimiter, only one Conversion variable can be placed in a packet and it needs to be placed in the order mentioned in [Variable number of data]. 2) When a Conversion variable (the number of data is 1, with delimiter, and variable number of digits) and the following four elements are placed in the same packet, these four elements need to be placed behind the Conversion variable (the number of data is 1, with delimiter, and variable number of digits). Conversion variable (variable number of data) Conversion variable (fixed number of data and variable number of digits) (The case of (a) – 1. Excluding a case where “Number of data” is ‘1’ and “Delimiter” is not ‘No delimiter’.) Non-conversion variable (variable length) Non-verified reception (variable number of characters) Note that two or more of these four elements cannot be placed in the same packet. (b) Fixed number of digits (1 to 10) 1) When a Conversion variable (variable decimal point) and the four elements mentioned in (a) – 2), these elements need to be placed behind the Conversion variable (variable decimal point). 2) When a Conversion variable (unsigned) and the four elements mentioned in (a) – 2), these elements need to be placed behind the Conversion variable (unsigned). 9 - 21 9 - 21 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. Horizontal parity/Sum check/16-bit CRC (for MODBUS) - ASCII hexadecimal ASCII decimal Code type HEX At sending : Select a format in which a Not settable when calculated check code is sent. “Processing method” At receiving : Select a format in which data are received. is ‘16-bit CRC (for MODBUS)’ Not settable when Select the data length on the line (byte). Data length “Processing method” is ‘16-bit CRC (for The range is 1 to 4. MODBUS)’ At sending : Sends a calculated check Forward direction (Upper byte -> Lower byte) code, from the upper byte. At receiving : Manipulates receive data as a check code, from the upper byte. At sending : Sends a calculated check Reverse direction (Lower byte -> Upper byte) Data flow code, from the upper byte. At receiving : Manipulates receive data as a check code, from the upper byte. Effective only if the data length is 2 to 4 (bytes). At sending : Sends a calculated check code swapping the upper byte Not settable when “Processing method” is ‘16-bit CRC (for MODBUS)’ and lower byte by word. At receiving : Manipulates receive data as a Byte swap (by word) check code swapping the upper byte and lower byte by word. Effective only if the data length is 4 bytes. Complement calculation Calculating range 9 - 22 start end Select the complement calculation. No complement calculation/One’s complement/Two's complement Select the starting element number of the calculating range. The range is 1 to 32. Select the ending element number of the calculating range. Not settable when “Processing method” is ‘16-bit CRC (for MODBUS)’ - The range is 1 to 32. 9 - 22 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. y A Check code cannot be included in the calculated range. y When a calculated check code (Sum check/Horizontal parity/16-bit CRC) does not match a received check code, a sum check error (7F24H) may occur. y One or more elements are required before a Check code. 9 - 23 9 - 23 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. - 0 Set this item when the number of characters (variable number of not to be verified varies in each of characters) communication. 1 to 2048 (specified number of characters) Remark - Set the number of characters not to be verified. y When “Data length” is ‘0’, the following requirements need to be met. (1) Only one Non-verified reception can be placed in a packet. (2) Include a Non-verified reception in the calculating range of a Length. Otherwise, place any of the following data immediate after a Non-verified reception. Static Data Terminator Check code + Static Data Check code + Terminator (3) Two or more of the following four elements cannot be placed in the same packet. Conversion variable (Variable number of data) Conversion variable (Fixed number of data and Variable number of digits) (Excluding a case where “Number of data” is ‘1’ and “Delimiter” is not ‘No delimiter’.) Non-conversion variable (Variable length) Non-verified reception (Variable number of characters) 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-verified reception from those of a Terminator or a Static Data following a Non-verified reception. The receive process may not be performed normally if they cannot be classed. (Example) When value of a Terminator or value of a Static Data following a Non-verified reception is used in a Non-verified reception, the Q series C24N / L series C24 module recognizes it as data of a Terminator or a Static Data following a Nonverified reception and performs the verify/receive process. 9 - 24 9 - 24 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. The order of elements can be changed by clicking an element number and changing it on the Packet setting screen. 9 - 25 9 - 25 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. Cancel button Cancels the setting and closes the screen. 9 - 26 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. (1) Element setting screen DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details *1 Element name *1 Code type Set a name of an element. Set a data type of setting value. *1 Setting value Input control code button Set value of a Header/Static Data/Terminator. Set a control code on the ASCII Code input screen when “Code type” is ‘ASCII control code’. OK button Fixes the setting and returns to the Packet setting screen. Cancel button Cancels the setting and returns to the Packet setting screen. *1: For details of each item, refer to (1) to (3) of Section 9.1. 9 - 27 9 - 27 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 - 28 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. *1 Data length Select the data length on the line. *1 Data flow Select the sequence of data when “Data length” is not ‘1’. *1 Calculating range Select element numbers for the start and end of the calculating range. OK button Fixes the setting and returns to the Packet setting screen. Cancel button Cancels the setting and returns to the Packet setting screen. *1: For details of each item, refer to (4) of Section 9.1. 9 - 29 9 - 29 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. DISPLAY/SETTING SCREEN 9 - 30 9 - 30 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’. Select ‘Disable (lower -> upper)’/’Enable (upper -> lower)’ of “Byte swap” to be provided. Send (receive) data *1 length storage area Set a starting address of devices in which the data length of the send (receive) data of an element is stored. *1 (For Variable length only) Send (receive) data Fixed length *1 : Set a starting address of devices in which the value of a variable is stored. storage area *1 An ending address is automatically displayed. Variable length: According to the setting of the data storage area for the send (receive) area, automatically displays a starting address and ending address of devices in which the value of a variable is stored. OK button Fixes the setting and returns to the Packet setting screen. Cancel button Cancels the setting and returns to the Packet setting screen. *1: For details of each item, refer to (5) of Section 9.1. Applicable device list Device range Category Internal user*1, *2 Device type Other than Symbol those mentioned right Q00/Q01 CPU Q00JCPU QnU(D)(E) (H)CPU (except for Q00UJ/Q00U/ Q01U) Q00U/Q01U Q00UJ Input X 0 to 1FFFH 0 to 7FFH 0 to 7FFH 0 to 1FFFH 0 to 1FFFH 0 to 1FFFH Output Y 0 to 1FFFH 0 to 7FFH 0 to 7FFH 0 to 1FFFH 0 to 1FFFH 0 to 1FFFH Internal relay M 0 to 32767 0 to 32767 0 to 32767 0 to 61439 0 to 61439 0 to 61439 Latch relay L 0 to EFFFH 0 to 32767 Link relay B 0 to 7FFFH 0 to 7FFFH 0 to 7FFFH 0 to EFFFH 0 to EFFFH Data register D 0 to 32767 0 to 32767 0 to 32767 0 to 4212735 0 to 94207 0 to 32767 Link register W 0 to 7FFFH 0 to 7FFFH 0 to 7FFFH 0 to 4047FFH 0 to 16FFH 0 to 7FFFH R*2 0 to 32767 0 to 32767 - 0 to 32767 0 to 32767 - ZR 0 to 1042431 0 to 1042431 - 0 to 4184063 0 to 65535 - File register File register Buffer memory Intelligent function module devices G 1024 to 6911, 9728 to 16383, 20480 to 24575 *1: Do not specify a local device. *2: Specify devices within the range specified in the PLC parameter setting. 9 - 31 9 - 31 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, 20480 to 24575 *1: Do not specify a local device. *2: Specify devices within the range specified in the PLC parameter setting. (1) CPU device When a CPU device is specified as the data storage area, the Q series C24N / L series C24 module performs the read/write CPU device process. If the total length of variables used in a packet exceeds 1920 bytes, ‘read CPU device process’/’write CPU device process’ needs to be performed more than once, and the processing time might be longer. (2) Intelligent function module devices (buffer memory) High speed protocol processing is available because an intelligent function module device (buffer memory) is not affected by the sequence scan of a programmable controller CPU. When executing a protocol including a Non-conversion variable or Conversion variable, do not change the value of a CPU device specified as a variable during execution of the dedicated instruction. 9 - 32 9 - 32 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. DISPLAY/SETTING SCREEN 9 - 33 9 - 33 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). *1 (receive) data For ‘Variable number of data’, set the maximum number of data that can be specified to the data number storage area. Select 1 to 10 or ‘Variable number of digits’. Number of send *1 (receive) digits of data Blank-padded Select ‘Space’/’0’. &character at send The setting value is invalidated and ‘-‘ is displayed when “Number *1 (receive) of send (receive) digits of data” is ‘Variable number of digits’. Conversion unit Select ‘Word’/’Double word’. Send (receive) data Specify a starting address of devices in which the number of the *1 quantity storage area *2 send (receive) data of an element is stored. (For Variable number of data only) Fixed length Send (receive) data *1 : Specify a starting address of devices in which *2 the value of a variable is stored. storage area An ending address is automatically displayed. Variable length : According to the setting of the data storage area for the send (receive) area, automatically displays a starting address and ending address of devices in which the value of a variable is stored. *1 *3 Sign Select ‘Unsigned’/’Signed’. *1 Sign character Select ‘None’/’+’/’0’/’Space’ when “Sign” is ‘Signed’. *1 Number of decimals *1 Delimiter *3 Select ‘No decimal point’/1 to 9/’Variable point’. Select ‘No delimiter’/’Comma’/’Space’. OK button Fixes the setting and returns to the Packet setting screen. Cancel button Cancels the setting and returns to the Packet setting screen. *1: For details of each item, refer to (6) of Section 9.1. *2: For the setting range, refer to the applicable device list in Section 9.3.3. *3: Settable only when “Conversion” is ‘HEX -> ASCII decimal’ or ‘ASCII decimal -> HEX’. When executing a protocol including a Non-conversion variable or Conversion variable, do not change the value of a CPU device specified as a variable during execution of the dedicated instruction. 9 - 34 9 - 34 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. Select a send/receive format of a check code. *1*2 Data length Select the data length on the line. *1*2 Data flow Select the sequence of data when “Data length” is not ‘1’. Complement Select a type of complement calculation. *1*2 calculation *1 Calculating range Select element numbers for the start and end of the calculating range. OK button Fixes the setting and returns to the Packet setting screen. Cancel button Cancels the setting and returns to the Packet setting screen. *1: For details of each item, refer to (7) of Section 9.1. *2: Not settable when “Processing method” is ‘16-bit CRC (for MODBUS)’. 9 - 35 9 - 35 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. Set the number of characters not to be verified. OK button Fixes the setting and returns to the Packet setting screen. Cancel button Cancels the setting and returns to the Packet setting screen. *1: For details of each item, refer to (8) of Section 9.1. 9 - 36 9 - 36 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. Select a starting number of devices to be configured. OK button Fixes the setting and assigns devices in order of protocol number/packet number starting from the specified starting device. Cancel button 9 - 37 Cancels the setting and closes the screen. 9 - 37 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. 1 Send 2 2 Receive (1) Receive (2) Before batch setting After batch setting D1 - D3 D1 - D3 1 D2 - D4 D4 - D6 2 B80 - B9F D7 - D8 2 D0 - D0 D9 - D9 2 Variable unset (2 word) D10 - D11 3 Variable unset (1 word) D12 - D12 3 Send 4 Receive (1) 2 X10 - X1F D13 - D13 Send 4 X30 - X4F D14 - D15 2 D6 - D6 D16 - D16 3 D7 - D8 D17 - D18 2 D0 - D0 D0 - D0 5 6 9 - 38 Device Receive (1) Receive (2) 9 - 38 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. 9 - 39 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. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Module selection Display/Setting Details Select a module to which data to be written. The I/O address and type of a connected Q series C24N / L series C24 module are displayed in the combo box. 10 Execute button Based on the setting in “Module selection”, starts writing data to the flash ROM. Close button Closes the screen. 10 - 1 10 - 1 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’. (1) Conversion variable “Sign” is ‘Signed’ “Number of decimals” is 1 to 9 or ‘Variable point’ “Delimiter” is ‘Comma’ or ‘Space’ (2) Non-verified reception “Data length” is ‘0’ (variable number of characters) y An error may occur when the protocol setting data is written to a module during execution of the CPRTCL instruction. y The following data cannot be written to a module. Save these data in a protocol setting file. Manufacturer Packet name Type, version, explanation in the protocol detailed setting Element name in the packet setting y The settings of editable protocols may not be correct when the Q series C24N / L series C24 module detects a protocol setting data error after protocol settings are written to it. In such case, correct the protocol settings according to the following procedure and rewrite them to the module. (1) Confirm the protocol number, packet number, and element number of the detected error in the Q series C24N / L series C24 module protocol setting error information (buffer memory 4086H to 4089H). (2) Confirm whether or not the following conditions are met in the packet setting in which the error has been detected. When any elements of (a) and any elements of (b) described in the following table are in the same packet, (a) must be placed before (b). a Conversion variable (Fixed number of data, Fixed number of digits (1 to 10 digits), No sign character) Conversion variable (Fixed number of data, Fixed number of digits (1 to 10 digits), Variable decimal point) Conversion variable (Fixed number of data, Variable number of digits, Number of data is 1, Delimiter is Comma or Space) b Non-conversion variable (Variable length) Conversion variable (Variable number of data) Conversion variable (Fixed number of data, Variable number of digits, Number of data is 1, No delimiter) Conversion variable (Fixed number of data, Variable number of digits, Number of data is 2 or more) Non-verified reception (Variable number of characters) (3) Modify the protocol setting, and rewrite it to the module. 10 - 2 10 - 2 10 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. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Module selection Display/Setting Details Select a module from which data to be read. The I/O address and type of a connected Q series C24N / L series C24 module are displayed in the combo box. Execute button Based on the setting in “Module selection”, starts reading data from the flash ROM. Close button Closes the screen. y As the following data cannot be written to a module, these data are not displayed after the read from module operation. However, these data of a protocol selected from the pre-defined protocol library can be displayed. Manufacturer Packet name Type, version, explanation in the protocol detailed setting Element name in the packet setting 10 - 3 10 - 3 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. (1) Verification target selection screen DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Module selection Display/Setting Details Select a verification target module. The I/O address and type of a connected Q series C24N / L series C24 module are displayed in the combo box. Execute button Based on the setting in “Module selection”, starts comparing the protocol setting read from the module with that being open. Close button 10 - 4 Closes the screen. 10 - 4 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 - 5 10 - 5 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. Verifies if the corresponding protocol number exists, and displays ‘Mismatch’ when (1) Protocol No. Target item for each (2) Protocol edit availability (3) Protocol detailed setting information protocol *1*2 it only exists in the one side. Displays ‘Mismatch’ when the setting of “Selected from pre-defined protocol library”/” Editable protocol” is mismatched. Verifies the setting items (excluding “Manufacturer”, “Type”, “Version”, and “Explanation”) of the protocol detailed setting, and displays ‘Mismatch’ when any of the setting values are unmatched. (4) Number of packets Displays ‘Mismatch’ when the number of registered packets is unmatched. Verifies the setting items (excluding “Packet name” and “Element name”) of all (5) Packet setting information packets registered in the corresponding protocol, and displays ‘Mismatch’ when any of the setting values are unmatched. *1: Not displayed when all verification results of target items are matched. *2: Target items for each protocol are verified in the order of (1) to (5), and the first unmatched item is only displayed. y As the following data cannot be written to a module, these data are not compared. Manufacturer Packet name Type, version, explanation in the protocol detailed setting Element name in the packet setting y The Verification result screen is not displayed when there is not unmatched item in the verification results among the entire protocol data. 10 - 6 10 - 6 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. Sequence program Buffer memory Transmission/receive packet data and communication control signal statuses are accumulated in buffer memory. Monitor data area GX Configurator-SC C24 Data are read from buffer memory. Circuit trace State monitor Trace data accumulated in buffer memory are displayed. Refer to Section 11.3 for details. Protocol execution log Buffer memory Check communication control wires, etc. Refer to Section 11.4 for details. 11 - 1 Data are read from buffer memory. 11 - 1 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. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details The present object module Displays the information of the selected module. Module list Displays the list of selectable modules mounted on the same base. Channel specification Select the channel of the module. Setting button Sets the selected module and channel to the Object module. Update button Displays the latest module list. OK button Sets the data displayed in "The present object module" as the object module data. Cancel button Cancels the setting and closes the Module selection screen. 11 - 2 11 - 2 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. DISPLAY/SETTING SCREEN 11 - 3 11 - 3 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. Displays the executed protocol number. Protocol name Displays the executed protocol name. Type Displays the communication type of protocol: "Send only", "Receive only", "Send & receive" When the functional protocol (Refer to Section 13.4.3) is executed, "Functional protocol" is displayed. When the protocol number that is not written to the module is executed using the dedicated instruction (CPRTCL instruction), "Unregistered protocol No." is displayed. Execution result Displays the execution results of the protocols. Error completion: Displayed with red background. Normal completion: Displayed with light green background. For the protocol with "Waiting for transmission", "Sending", "Waiting for reception", and "Receiving", the corresponding logs are displayed in light blue. Error code Displays the error code of error completion in red when the execution result is an error completion. When the result is a normal completion, "-" is displayed. Retry Packet No. Displays the number of send retries. Displays the receive packet numbers which are matched by the verification. Update log button Obtains the latest log information from the buffer and redisplays them. Save CSV file button Saves the communication protocol execution logs being displayed to the CSV file. Close button Closes the Protocol execution log screen. 11 - 4 11 - 4 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. Note that, only the logs of error protocols are displayed at the default setting. To display all logs of protocols, set the condition in the intelligent function module utility. For details, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". 11 - 5 11 - 5 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. Select the [Debugging support function] [Circuit trace] [Circuit trace] menu. 3. Click the Start button to start trace. 4. When the monitor buffer becomes full or the Stop button is clicked, the trace data are displayed. 5. Confirm the send/receive packets and communication control signals from the displayed trace result. 11 - 6 11 - 6 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. However, the trace remains in the execution status. y When only displaying the result of the previously executed circuit trace, it is not necessary to select a module. 11 - 7 11 - 7 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. RS, ER, DR, CS and CD signals All signals are displayed with blue lines -. When signal is ON : When signal is OFF: Communication control signals When the obtained data does not have signal information, the signal is displayed as an OFF status. Receive error Three different errors of overrun error, parity error and framing error are displayed. Overrun error: (Green) Parity error : Framing error: (Light blue) (Purple) Start button Starts tracing. Stop button Stops tracing. After a stop, the trace data accumulated in the monitor buffer are displayed. Close button Closes the Circuit trace screen. 11 - 8 11 - 8 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. Set the "Monitor buffer starting address" and "Monitor buffer size", and click the Write button. 11 - 9 11 - 9 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. Input range Monitor buffer size setting CH1/CH2: 3 to 1A00 words (3 to F00 words for the user-specified area) *1 Set the maximum address for the trace data storage space to be in the range between 2602H to 3FFFH. (C02H to 1AFFH for the user-specified area) Note that the range of this value is checked at start of the circuit trace when using the user-specified area. Read button Write button Reads the monitor buffer starting address and size from the selected module. Writes the setting values of the "Monitor buffer starting address" and "Monitor buffer size" to the selected module. *1: The maximum address for the trace data storage space is calculated by the following formula. Maximum address for the trace data storage space = "Monitor buffer starting address" + "Monitor buffer size" - 1 11 - 10 11 - 10 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 - 11 [Circuit trace] [Save circuit trace file] 11 - 11 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. Click the <> tab and confirm the operation setting switch setting status. 7. Click the <> tab and confirm the protocol execution status (1) <> tab DISPLAY/SETTING SCREEN 11 - 12 11 - 12 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. (2) <> tab DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Communication error status Displays the communication error status. Switch setting, mode switching error Displays the switch setting and/or mode selection error status. Communication result Displays the error status of the communication result. Error reset button Resets the error information when XnE on CH1 or XnF on CH2 is ON. Masked in any other cases. For details, refer to the user's manual of a target module. 11 - 13 11 - 13 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 - 14 11 - 14 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. 11 - 15 11 - 15 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. Packet setting "All item" and protocol numbers set on the Protocol setting screen are displayed in the combo box. Setting device list Trace data The list of set devices is printed. Specify the file name of the trace data to be printed. Click the Reference button and select the trace data file. Printer setting button Displays the printer setting screen. Print button Executes printing. Print preview button Displays the print preview. Close button Closes the Print screen. 12 - 1 12 - 1 12 12 PRINT MELSOFT 12.2 Print Examples (1) Protocol setting File name of protocol setting file is printed 12 Print date is printed Page number is printed 12 - 2 12 - 2 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.1 I/O Signals of Programmable Controller CPU 13 This section explains the I/O signals of Q series C24N / L series C24 modules used for the pre-defined protocol. For the I/O signals not used in the pre-defined protocol communication, refer to the "Q Corresponding Serial Communication Module User's Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". 13 - 1 13 - 1 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. (1) ON/OFF timing X1D turns ON in the following conditions. y The protocol setting data are not written in the flash ROM.*1 y The protocol setting data are written in the flash ROM. Performed by user Write protocol setting data to flash ROM Pre-defined protocol ready (X1D) Power ON Checking time Performed by QJ71C24N (-R2/R4) Turns ON if the protocol setting data are normal. Checks the protocol setting data. Turns OFF while checking. Error on CH1/2 (XE/XF) OFF X1D turns OFF in the following condition. y A mode other than the pre-defined protocol is set for the communication protocol setting. *1: Only functional protocols can be executed. For details, refer to Section 13.4.3. 13 - 2 13 - 2 13 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. Mode switching request (Y2/Y9) Mode switching (X6/XD) ON Pre-defined protocol ready (X1D) OFF CH1 and CH2 are other then pre-defined protocol mode CH1 or CH2 is the pre-defined protocol mode Communication protocol before change: CH1 or CH2 is the pre-defined protocol mode. Communication protocol after change : CH1 or CH2 is the pre-defined protocol mode. Mode switching request (Y2/Y9) Mode switching (X6/XD) Pre-defined protocol ready (X1D) ON CH1 or CH2 is the pre-defined protocol mode 13 - 3 ON CH1 or CH2 is the pre-defined protocol mode 13 - 3 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. Mode switching request (Y2/Y9) Mode switching (X6/XD) Pre-defined protocol ready (X1D) ON CH1 or CH2 is the pre-defined protocol mode OFF CH1 and CH2 are other then pre-defined protocol mode *1: Based on either following condition; the protocol setting data written to the flash ROM are normal, or the protocol setting data are not written to the flash ROM. 13 - 4 13 - 4 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. END processing END processing END processing END processing Sequence program UINI instruction execution UINI instruction ON Completion device OFF ON OFF Status indication device at completion Normal completion One scan ON Mode switching signal (X6/XD) OFF Pre-defined protocol ready (X1D) OFF Error completion ON CH1 and CH2 are other then pre-defined protocol mode CH1 or CH2 is the pre-defined protocol mode Setting processing Q series C24N / L series C24 Communication disabled Communication protocol before change: CH1 or CH2 is the pre-defined protocol mode. Communication protocol after change : CH1 or CH2 is the pre-defined protocol mode. END processing END processing END processing END processing Sequence program UINI instruction execution UINI instruction ON Completion device OFF Error ON completion Status indication OFF device at completion ON Mode switching signal (X6/XD) Pre-defined protocol ready (X1D) Q series C24N / L series C24 13 - 5 Normal completion One scan OFF ON ON CH1 or CH2 is the pre-defined protocol mode CH1 or CH2 is the pre-defined protocol mode Setting processing Communication disabled 13 - 5 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. END processing END processing END processing END processing Sequence program 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 Pre-defined protocol ready (X1D) CH1 or CH2 is the pre-defined protocol mode ON OFF CH1 and CH2 are other then pre-defined protocol mode Q series C24N / L series C24 13 - 6 Setting processing Communication disabled 13 - 6 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)". (1) Configuration of the buffer memory A buffer memory consists of a user area and a system area as shown below. (a) User area 1) This is the area where users write/read data. 2) The user area consists of areas for storing setting values for data communication, for actual data communication, and for storing communication status and communication error information. 3) Data read/write to the user area should be performed following the instructions in the corresponding detailed reference page. (b) System area This area is used by the Q series C24N / L series C24 module system. (2) List of buffer memory assignments A buffer memory is configured with 16 bits per address. Name, initial value, etc. of each address of the buffer memory is shown in the lists on the following pages. 1) Abbreviations in the Applicable protocol column MC : MC protocol Non : Non procedure protocol Bi : Bidirectional protocol Pre : Pre-defined protocol 2) Meaning of symbols shown in the Applicable protocol column The following symbols are assigned to protocols related to the setting values of a corresponding area and to areas used for controlled with user settings, and indicate what kind of access is allowed to the area in question. RW : Area where it is possible to read/write data from/to the programmable controller CPU and the other device. R : Area where only reading is possible from the programmable controller CPU and the other device. – : System area used by the system or area not used by the corresponding protocol. 3) Meaning of symbols shown in the Registration allowed/not allowed column Indicates whether or not it is possible to use a value in the corresponding area by registering it to the flash ROM of the Q series C24N / L series C24 module. Allowed : Area that can be registered and used. Not allowed : Area that cannot be registered. 13 - 7 13 - 7 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 - 8 13 - 8 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. (b7) For system (b8) to (b15) Communication error clear request for CH2 and to turn LED off 0: ON, No initialization request 1: OFF, Initialization requested SD WAIT (b0) NAK (b5) SIO (b1) ACK. (b6) PRO. (b2) P/S (b3) NEU. (b7) CH2 ERR. (b14) C/N (b4) CH1 ERR. (b15) 0 RW Not allowed For system (b8) to (b13) Switching mode no. designation (0001H to 0007H, 00FFH) 144 (90H) 0006H: Non procedure protocol 0001H: MC protocol (format 1) 304 (130H) 0002H: MC protocol (format 2) 0007H: Bidirectional protocol 0003H: MC protocol (format 3) 0009H: Pre-defined protocol 0004H: MC protocol (format 4) 00FFH: GX Developer connection 0005H: MC protocol (format 5) Transmission specifications after switching designation Designates transmission specifications (below) after switching when b15 of this area is 1 (ON). For designation of mode switching 145 (91H) 305 (131H) Operation setting (b0) 0: Independent 1: Link Data bit (b1) 0: 7 bit 1: 8 bit Parity bit (b2) 0: No 1: Yes Odd/even parity (b3) 0: Odd 1: Even Stop bit (b4) 0: 1 bit 1: 2 bit Sum check code (b5) 0: No 1: Yes Write during RUN (b6) 0: Prohibited 1: Allowed Setting modification (b7) 0: Prohibited 1: Allowed Communication rate (b8 to b11) 50 bps to 230400 bps For system (b12 to b14) All 0 0 Not allowed RW Transmission specifications after switching (b15) designation 0: Match settings in GX Developer 1: Match settings in this area 146 (92H) 306 (132H) RS and DTR signal status designation 0: Off 1: On Signal setting (*1) RS signal (b0) DTR signal (b2) For system (b1), (b3) to (b15) 0005H Allowed DTR/DSR(ER/DR), DC control designation 147 (93H) 307 (133H) For designation of transmission control 148 (94H) 13 - 9 308 (134H) y Transmission control (b0) 0: DTR/DSR control y DC1/DC3 control (b8) 0: No control y DC2/DC4 control (b9) 0: No control 1: DC code control 0 1: Controlled Allowed 1: Controlled DC1/DC3(Xon/Xoff) code designation y DC1 code (b0 to b7) 00H to FFH: DC1 code y DC3 code (b8 to b15) 00H to FFH: DC3 code 1311H 13 - 9 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 (13CH) 157 (9DH) 317 (13DH) 158 (9EH) 318 (13EH) 290 (122H) — — 450 (1C2H) 291 to 303 (123H to 12FH) 1412H For half- duplex Simultaneous transmission priority/non-priority designation communications 0: Priority control Other than 0: Non-priority (transmission wait time, unit: 100 ms) designation (RS- Retransmission time transmission method designation 232) 0: Do not resend. 1: Resend. For designation of communication Simultaneously transmission data valid/invalid designation control For designation of data No-reception monitoring time (timer 0) designation communication time monitoring For designation Response monitoring time (timer 1) designation of data 0H : Wait infinitely communication 1H to BB8H: Monitoring time (unit: 100 ms) time monitoring For designation of data communication time monitoring Transmission monitoring time (timer 2) designation System area For designation of communication RS-422/485 interface echo back allow/prohibit designation control 0: Echo back allowed 1: Echo back prohibited For confirmation of station No. setting status RW 0 CD terminal check designation (for RS-232) For designation 0: Check 1: No check of communication Communication system designation (for RS-232) control 0: Full duplex communication 1: Half-duplex communication 451 to 511 (1C3H to Use prohibited 1EFH) 512 (200H) y DC2 code (b0 to b7) 00H to FFH: DC2 code y DC4 code (b8 to b15) 00H to FFH: DC4 code RW Allowed — Allowed 1 RW Allowed 0 0 — 0 32H (5 s) 708H (3 min.) 0 RW RW RW — RW RW — Allowed — Allowed Allowed Allowed RW Allowed — System area Depends on Station No. (switch setting) parameter setting LED ON status and communication error status on CH1 side 0: LED OFF, no error 513 (201H) 514 (202H) 13 - 10 SD WAIT (b0) SIO (b1) PRO. (b2) P/S (b3) For system (b8) to (b15) 1: LED ON, error C/N NAK ACK. NEU. (b4) (b5) (b6) (b7) For confirmation of LED ON status and LED ON status and communication error status on CH2 side communication 0: LED OFF, no error 1: LED ON, error error status SD WAIT (b0) NAK (b5) SIO (b1) ACK. (b6) PRO. (b2) NEU. (b7) P/S (b3) CH2.ERR. (b14) C/N (b4) CH1 ERR. (b15) For system (b8) to (b13) Depends R Not allowed on module status 13 - 10 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. (b0) 0: Normal 1: Error CH1 Communication rate setting (b1) 0: Normal 1: Error CH1 Setting change prohibit time mode switching (b3) 0: Normal 1: Error CH2 Communication protocol setting No. (b4) 0: Normal 1: Error CH2 Communication rate setting (b5) 0: Normal 1: Error CH2 Setting change prohibit time mode switching (b7) 0: Normal 1: Error Setting station No. (b14) 0: Normal 1: Error Linked operation setting (b15) 0: Normal 1: Error 543 (21FH) Use prohibited System area 544 (220H) For confirmation of flash ROM write result Flash ROM system parameters write result 0 : Normal completion Other than 1 (error code) : Abnormal completion 591 (24FH) 592 (250H) 593 (251H) 594 (252H) 595 (253H) 13 - 11 608 (260H) 609 (261H) 610 (262H) 611 (263H) For confirmation Station No. (instruction setting) of station No. setting status (*2) Communication protocol status (switch setting) 0: GX Developer connection 5: MC protocol (format 5) For confirmation 1: MC protocol (format 1) 6: Non procedure protocol of transmission 2: MC protocol (format 2) 7: Bidirectional protocol control status 3: MC protocol (format 3) 8: (For linked operation) 4: MC protocol (format 4) 9: Pre-defined protocol Transmission setting status (switch setting) Operation setting (b0) 0: Independent 1: Link Data bit (b1) 0: 7 bit 1: 8 bit Parity bit (b2) 0: No 1: Yes Odd/even parity (b3) 0: Odd 1: Even Stop bit (b4) 0: 1 bit 1: 2 bit Sum check code (b5) 0: No 1: Yes Write during RUN (b6) 0: Prohibited 1: Allowed Setting modification (b7) 0: Prohibited 1: Allowed Communication rate (b8 to b11) 50 bps to 230400 bps For system (b12 to b15) All 0 Communication protocol status (current) 0: GX Developer connection 5: MC protocol (format 5) For confirmation 1: MC protocol (format 1) 6: Non procedure protocol of transmission 2: MC protocol (format 2) 7: Bidirectional protocol control status 3: MC protocol (format 3) 8: (For linked operation) 4: MC protocol (format 4) 9: Pre-defined protocol Transmission status (current) Operation setting (b0) 0: Independent 1: link Data bit (b1) 0: 7 bit 1: 8 bit Parity bit (b2) 0: No 1: Yes Odd/even parity (b3) 0: Odd 1: Even Stop bit (b4) 0: 1 bit 1: 2 bit Sum check code (b5) 0: No 1: Yes Write during RUN (b6) 0: Prohibited 1: Allowed Setting modification (b7) 0: Prohibited 1: Allowed Communication rate (b8 to b11) 50 bps to 230400 bps For system (b12 to b15) All 0 MELSOFT Initial value 0 Applicable protocol MC Non Bi Pre Registration allowed/not allowed Not allowed R — 0 Depends on module RW Not allowed R Not allowed R Not allowed R Not allowed status Depends on parameter setting Depends on parameter setting Depends on module status 13 - 11 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 (258H) 616 (268H) 601 (259H) 602 (25AH) 617 (269H) 618 (26AH) 603 (25BH) 619 (26BH) 604 to 607 (25CH to 25FH) 620 to 1023 (26CH to 3FFH) 1024 (400H) 2048 (800H) 1025 to 1535 2049 to 2559 (401H to 5FFH) (801H to 9FFH) 1536 (600H) 2560 (A00H) 1537 to 2047 (601H to 7FFH) 2561 to 3071 (A01H to BFFH) 3072 to 6911 (C00H to 1AFFH) 8192 (2000H) 8210 (2012H) 8466 (2112H) 8211 (2013H) 8467 (2113H) 8212 (2014H) 8468 (2114H) 8213 to 8215 (2015H to 2017H) Data transmission result 0 : Normal completion 1 or more: Abnormal completion (error code) Data reception result 0 : Normal completion 1 or more: Abnormal completion (error code) MELSOFT Initial value MC Non Depends Bi Pre status R — RW — 0 Not allowed RW 0 — MC protocol transmission error code RW — Not allowed 0 Receive user frame (nth) Use prohibited Registration allowed/not allowed R on signal For confirmation of communication result System area — R — — System area Transmission data count designation 0: No designation 1 or more: Number of send data Transmission data designation Transmission/ receive area Data to be sent to an external device Receive data count (Number of data for which read is requested) 0: No receive data 1 or more: Number of receive data RW (*3) Not allowed 0 Receive data Data received from an external device For user System designation For transmission control designation (*1) For transmission control designation (*1) 8469 to 8471 (2115H to Use prohibited 2117H) User free area (3840 words) * Determined by the user. RW Flash ROM write allow/prohibit designation 0: Write prohibited 1: Write allowed 0 Transmission control start free area designation 64 to 4,095: transmission control start free area 64 Transmission control end free area designation 263 to 4096: transmission control end free area 263 Non procedure and non reception monitoring time format 0 System area 8472 (2118H) 8217 (2019H) 8473 (2119H) 8218 (201AH) 8474 (211AH) Monitor buffer head address designation (400H to 1AFDH,2600H to 3FFDH) CH1: 2600H CH2: 3300H 8219 (201BH) 8475 (211BH) Monitor buffer size designation (0003H to 1A00H) 0D00H 9216 (2400H) Use prohibited Communication data monitoring function (*1) System area RW Not allowed RW Allowed — RW — Allowed — Communication data monitoring designation 0000H: No monitor/stopped monitor designation 0001H: Monitor start designation 0002H: Monitoring (Q series C24 is a set.) 1002H: Monitoring stopped (Q series C24 is set.) 100FH: Monitor setting error (Q series C24 is a set.) Data optional designation 0: Off 1: On Full stop designation (b0) Timer 0 errors at occurrence stop designation (b2) For system (b1), (b3) to (b15) 8216 (2018H) 13 - 12 Applicable protocol — 0 0 RW Allowed 9216 (2400H) 13 - 12 13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 9217 (2401H) 9218 to 9727 (2402H to 25FFH) 9728 to 16383 (2600H to 3FFFH) 16384 to 16415 (4000H to 401FH) 16448 (4040H) (*4) Application For flash ROM write count housing Flash ROM write count 0 to 1000: Write count Use prohibited System area For user (*1) User free area 2 (6656 words) (Transmission/receiving data monitoring function default buffer) * Usage is determined by the user. 16416 to 16447 (4020H to Use prohibited 403FH) 16464 (4050H) Name For designation of pre-defined protocol function control data 16465 (4051H) 16450 (4042H) 16466 (4052H) 16451 (4043H) 16467 (4053H) For confirmation of pre-defined protocol function execution status Initial value 0 Bi Pre R Registration allowed/not allowed Not allowed RW Not allowed — System area Protocol cancellation designation 0: No cancellation designation 1: Cancellation request (user designation) 2: Cancellation completion (QJ71C24N (-R2/R4) designation) RW 0: Not executed 1: Waiting for transmission 2: Sending 3: Waiting for reception 4: Receiving 5: Completion Pre-defined protocol function error code 0 0 : Normal Other than 0: Abnormal (error code) 0 — R 0 — R 0 : No history 1 to 65535: Number of executions — R Not allowed — System area Protocol number 16518 (4086H) MC Non 0 Number of protocol executions 16468 to 16452 to 16479 16463 (4054H to (4044H to 404FH) 405FH) Use prohibited 16480 to 16517 (4060H to 4085H) Applicable protocol — Protocol execution status 16449 (4041H) MELSOFT 1 to 128 65535 : Protocol number : Not otherwise identified 0 — R 0 — R Type 16519 (4087H) 16520 (4088H) 0 : Packet setting or element setting : Protocol detailed setting Protocol 1 65535 : Not otherwise identified setting For confirmation data Packet number of protocol setting error 0 : Send packet data informat 1 to 16 : Receive packet number ion 65535 : Not otherwise identified Not allowed 0 — R 0 — R * Enabled only when Type is ‘0’. Element number 16521 (4089H) 16522 to 16527 (408AH to 408FH) 13 - 13 1 to 32 65535 : Element number : Not otherwise identified * Enabled only when Type is ‘0’. Use prohibited System area — 13 - 13 13 SETTINGS FOR Q SERIES C24N / L SERIES C24 MODULE Address Decimal (Hex) CH1 CH2 Application Name MELSOFT Initial value Number of protocol registration 16528 (4090H) 0 : No registration 1 to 128: Number of registered protocols 0 Applicable protocol MC Non Bi — Pre Registration allowed/not allowed R Protocol registration 16529 to 16536 (4091H to 4098H) For confirmation of protocol execution data 16537 to 16607 Use prohibited (4099H to 40DFH) 16624 to 16608 16625 to16609 (40F0H to Use prohibited (40E0H to 40E1H) 40F1H) 16610 (40E2H) 16611 to 16623 (40E3H to 40EFH) 13 - 14 16626 (40F2H) For designation of protocol execution log 16627 to 16639 (40F3H to Use prohibited 40FFH) 0: No 1: Yes * A bit corresponds to the protocol number turns ON/OFF. Each bit indicates a protocol number. 4091 H 4092 H 4093 H 4094 H 4095 H 4096 H 4097 H 4098 H b15 b14 b13 b2 b1 b0 4 3 2 1 16 15 14 32 31 30 29 19 18 17 48 47 46 45 35 34 33 64 63 62 51 50 49 80 79 78 67 66 65 83 82 81 96 95 94 100 99 98 97 112 111 110 116 115 114 113 128 127 126 0: Not registered 1: Registered Not allowed 0 — R System area — System area — Execution log option designation 0: Only protocols with error completion are stored. 1: Execution status and execution log of all protocols are stored. System area 0 — RW Allowed — 13 - 14 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 Number of stored protocol execution logs 0 : No log 1 to 32: Number of stored logs 0 MC Non Bi — Pre Registration allowed/not allowed R Not allowed Protocol execution log write pointer 0 : No history 1 to 32: Protocol execution log number of latest log Applicable protocol 0 — R — System area Protocol number 16643 (4103H) 18435 (4803H) 16643 to 16659 (4104H to 4113H) 18436 to 18451 (4804H to 4813H) 16660 to 16675 (4114H to 4123H) 18452 to 18467 (4814H to 4823H) 16676 (4124H) 18468 (4824H) 0 1 to 128 201 to 207 : No log : Protocol number : Functional protocol number 0 — R 0 — R 0 — R 0 — R Type of external device 0 : Protocol not executed Other than 0 : Type of external device (Maximum of 32 bytes are stored in ASCII code) Protocol name 0 : Protocol not executed Other than 0 : Protocol name (Maximum of 32 bytes are stored in ASCII code) Communication type For confirmation of protocol execution log Execution log 1 0 : Protocol not executed 1 : Send only 2 : Receive only 3 : Send & receive 14: Functional protocol 15: Protocol not registered Not allowed Protocol execution status 16677 (4125H) 18469 (4825H) 16678 (4126H) 18470 (4826H) 16679 (4127H) 18471 (4827H) 16680 (4128H) 18472 (4828H) 16681 (4129H) 18473 (4829H) 0 1 2 3 4 5 : Not executed : Waiting for send : Sending : Waiting for receive : Receiving : Completion 0 — R 0 — R 0 — R 0 — R Execution result 0 : Normal completion Other than 0 (error code): Error completion Verification match receive packet number 13 - 15 0 : When error occurred, or the communication type of the executed protocol is “Send only”. 1 to 16: Matched receive packet number Number of send retries 0 : Retry not executed 1 to 10: Number of retries System area — 13 - 15 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 18478 (482EH) b15 For confirmation of protocol execution log to b8 b7 b8 b7 R 0 — R 0 — R 0 — R 0 — R 0 — R 0 — R 0 — R 0 — R b0 to b0 Day of week (01H to 06H) to b8 b7 to Execution completion date b15 to b0 b8 b7 Hour (00H to 23H) to b0 Day (01H to 31H) 0: No log Upper 8 bits: Second Lower 8 bits: Minute b15 to b8 b7 to b0 Minute (00H to 59H) 0: No log Upper 8 bits: First 2 digits of year Lower 8 bits: Day of week 18481 (4831H) b15 to Not allowed Year (00H to 99H) Last 2 digits Second (00H to 59H) 16689 (4131H) to 0: No log Upper 8 bits: Hour Lower 8 bits: Day 18479 (482FH) 18480 (4830H) — b0 0: No log Upper 8 bits: Month Lower 8 bits: Last 2 digits of year Month (01H to 12H) 16688 (4130H) 0 00H (Sunday) to 06H (Saturday) b15 16687 (412FH) Pre Minute (00H to 59H) Year (00H to 99H) First 2 digits Execution log 1 Bi Day (01H to 31H) Second (00H to 59H) 16686 (412EH) to 0: No log Upper 8 bits: First 2 digits of year Lower 8 bits: Day of week 18477 (482DH) MC Non Registration allowed/not allowed Year (00H to 99H) Last 2 digits Hour (00H to 23H) to Applicable protocol b0 0: No log Upper 8 bits: Second Lower 8 bits: Minute b15 16685 (412DH) to 0: No log Upper 8 bits: Hour Lower 8 bits: Day 18475 (482BH) MELSOFT b8 b7 Year (00H to 99H) First 2 digits to b0 Day of week (01H to 06H) 00H (Sunday) to 06H (Saturday) 16690 to 18482 to 18177 19969 (4132H to (4832H to 4701H) 4E01H) 19970 to 18178 to 20223 18429 (4E02H to (4702H to 47FDH) 4EFFH) 20224 to 20479 (4F00H to 4FFFH) 20480 to 24575 (5000H to 5FFFH) 24576 to 32767 (6000H to 7FFFH) For confirmation of protocol execution log Execution log Same as Execution log 1 2 to 32 Use prohibited System area Transmission area for predefined protocol function Buffer for pre-defined protocol function Use prohibited System area — 0 — RW Not allowed — *1: Only QJ71C24N (-R2/R4) can be used. (System area when using QJ71C24 (-R2)) *2: Only QJ71C24N (-R2/R4) whose first five digits of serial number are 06062 or higher can be used. *3: It can be used as a user free area (send data storage area, receive data storage area) in the pre-defined protocol mode. *4: Addresses 16448 (4040H) and later can only be used for QJ71C24N (-R2/R4) (function version B or later) whose first five digits of serial number are 10122 or higher. (System area for others not included in the description.) 13 - 16 13 - 16 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. Dedicated instruction Application Pre-defined protocol communication Description of function Protocol setting data written to the flash ROM by GX CPRTCL Configurator-SC (pre-defined protocol support function) are executed. Do not change the buffer memory that is used for data (control data, setting data) specified by the dedicated instruction until the execution of that dedicated instruction completes or cancellation process completes. The completion of the dedicated instruction can be checked by the SPBUSY instruction. For details, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". For details of control data and setting data, refer to Section 13.4.2. (1) Available device The following devices are available for the dedicated instruction. Internal device *1 Bit Word X, Y, M, L, F, V, B T, ST, C, D, W File register R, ZR *2 Constant K, H *1: Word device bit designation can be used as bit data. Word device bit designation is done by designating Word device . Bit No. . (Bit numbers are designated in hexadecimal.) For example, bit 10 of D0 is designated as D0.A . However, bit designation cannot be used for timers (T), retentive timers (ST) and counters (C). *2: Available devices are described in the Constant column. 13 - 17 13 - 17 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. Applicable device Setting Internal device data (System, user) Bit Word Link direct device File Intelligent function J \ register Bit module device Word Index register Constant Zn U \G K, H Others n1 — — — n2 — — — (S) — — — — — — — (D) [Instruction code] [Executing condition] Command G.CPRTCL G.CPRTCL Un n1 n2 (S) (D) GP.CPRTCL Un n1 n2 (S) (D) Command GP.CPRTCL Setting data Setting Description data Un Start I/O signal of the module (00 to FE: Upper 2 digits when I/O signals are expressed in 3-digit.) Set by Data type User BIN16 bit Channel to communicate with other devices. n1 1: Channel 1 (CH1 side) User 2: Channel 2 (CH2 side) n2 Number of consecutive protocol executions (1 to 8) (S) Start number of the device in which control data are stored. (D) Bit device number to be turned ON at completion of execution. User BIN16 bit Device name BIN16 bit Device name User, system Device name System Bit The file register per local device and program cannot be used as the setting data. 13 - 18 13 - 18 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. (S) + 1 Number of executions Protocols with errors are included in the count. When settings of the setting data and control data contain an error, "0" is stored. y Set the first protocol number or functional protocol number (S) + 2 *4 to be executed. : Execution protocol : 1 to128, : number designation : 201 to 207 User y Set the 8th protocol number or functional protocol number (S) + 9 *4 to be executed. y When the communication type of the first protocol executed is "Receive only" or "Send & receive", the matched receive packet number is stored. (S) + 10 When the communication type is "Send only", "0" is stored. If the error occurs to the first protocol executed, "0" is stored. *4 When the functional protocol is executed, "0" is stored. : : Verification match : : 0, 1 to 16 receive packet number y When the communication type of the 8th protocol System executed is "Receive only" or "Send & receive", the matched receive packet number is stored. When the communication type is "Send only", "0" is stored. (S) + 17 If the error occurs to the 8th protocol executed, "0" is stored. When the number of the executed protocols is less than 8, "0" is stored. When the functional protocol is executed, "0" is stored. *4 *1: The followings are the descriptions of terms in the column. y User : Data set by the user before executing the CPRTCL instructions. y System: The programmable controller CPU stores the execution result of the CPRTCL instructions. *2: When executing multiple protocols, if an error occurs to the nth protocol, the protocols after the nth protocol are not executed. *3: For details of the error code at the error completion, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". *4: For details of functional protocols, refer to Section 13.4.3. 13 - 19 13 - 19 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. (3) Simultaneous execution of dedicated instructions The following table shows the processing when executing another instruction during execution of the CPRTCL instruction or executing the CPRTCL instruction during execution of another instruction in the same channel. *1 Instruction Availability of simultaneous execution Processing of simultaneous execution y The next instruction will be ignored until the active CPRTCL PUTE GETE SPBUSY UINI instruction is completed. (However, simultaneous execution is available when channels to be used are not the same.) ⎯ y Dedicated instructions simultaneous execution error (7FF0H) occurs in the dedicated instruction attempted later. : Available : Not available *1: Since the dedicated instructions shown below use a different communication protocol from that for the CPRTCL instruction, they are not used in the same channel. y ONDEMAND, OUTPUT, PRR, BIDOUT, INPUT, BIDIN, BUFRCVS, CSET If the dedicated instructions shown above are used in the same channel with the CPRTCL instruction, the communication protocol setting error (7FF2H) occurs. (Except for the BUFRCVS instruction) 13 - 20 13 - 20 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. y Normal completion : OFF with no change. y Error completion : Turns ON at the END processing of the scan where the CPRTCL instruction is completed, and turns OFF at the next END processing. [Operation during execution of the CPRTCL instruction] END END END END Sequence program Execution of CPRTCL instruction CPRTCL instruction Completion of sending by CPRTCL instruction ON Completion device OFF ON Status display device at completion Error completion OFF Normal completion One scan The following describes how to check the execution status of protocols. (1) Checking with the buffer memory Use the protocol execution status (address: 4041H/4051H). For details, refer to Section 13.3. (2) Checking with the intelligent function module utility For details, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". 13 - 21 13 - 21 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. 4FFFH or less : QCPU (Q Mode) User's Manual (Hardware Design, Maintenance and Inspection) MELSEC-L CPU Module User's Manual (Hardware Design, Maintenance and Inspection) 7000H or more : Q Corresponding Serial Communication Module User’s Manual (Basic) MELSEC-L Serial Communication Module User's Manual (Basic) Program example For the program example of the CPRTCL instruction, refer to Section 13.5.3. 13 - 22 13 - 22 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. Address Name Decimal (Hex) CH1 Setting value CH2 0: No cancellation specification 16448 16464 Protocol cancellation (4040H) (4050H) specification 1: Cancellation request (Specified by User) 2: Cancellation completion (Specified by Q series C24N / L series C24 modules) (2) Operation after execution of cancellation request (a) Operation of dedicated instruction (CPRTCL instruction) y The dedicated instruction (CPRTCL instruction) being executed is ended abnormally, and the error code is stored in the execution result ((S)+0). y When executing multiple protocols consecutively, if the cancellation is requested to the nth protocol, the nth protocol is ended forcibly and the protocols after the nth protocol are not executed. (b) Operation of Q series C24N / L series C24 modules y If the cancellation is requested when protocols are not executed, the cancellation is completed in no-operation. y If the cancellation is requested when the communication protocol setting is other than the pre-defined protocol mode, the value of the cancellation designation area is ignored. When the protocol with the communication type of "Send & receive" is cancelled, Execute the receive data clear after the cancellation. When the response from the other device is slow, and data are received after the cancellation, the receive data remains in the OS area (receive data area). For details of the receive data clear, refer to Section 13.4.3. 13 - 23 13 - 23 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. U0\G16448 Cancellation designation area Cancellation request Set a flag for cancellation request Cancellation completed Reset a flag for cancellation request 13 - 24 13 - 24 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. (2) List of functional protocols The following table shows the list of functional protocols described in this section. Protocol number Protocol type 201 Receive data clear 202 Send/Receive data monitoring start *1 Keyword Receive Data Clear Reference (a) in this section Send/Recv Monitor Start Send/Recv 203 Send/Receive data monitoring stop 204 Turns DTR (ER) signal ON DTR ON 205 Turns DTR (ER) signal OFF DTR OFF 206 Turns RS signal ON RS ON 207 Turns RS signal OFF RS OFF (b) in this section Monitor Stop (c) in this section *1: Character strings that are stored to the protocol name of the protocol execution log when functional protocols are executed. (a) Receive data clear Receive data in the OS area are cleared. (b) Send/Receive data monitoring start/stop Start or stop of send/receive data monitoring is specified. When the functional protocol (202, 203) is specified, a monitoring start command (0001H) or monitoring stop command (0000H) is set for send/receive data monitoring specification (address: 2018H/2118H) in the Q series C24N / L series C24 module. For details of send/receive monitoring, refer to the "MELSEC-Q/L Serial Communication Module User’s Manual (Application)". 13 - 25 13 - 25 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. For details of RS/DTR signal status specification, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)" or "MELSEC-L Serial Communication Module User's Manual (Basic)". 13 - 26 13 - 26 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.1 System configuration/wiring example The system configuration and wiring example are as follows. (1) System configuration example. QJ71C24N is mounted at the slot 0 on the base unit, and connected 1:1 with the other device through the RS-422/485 line using CH2. For details of system configuration, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)". 13 - 27 13 - 27 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). QJ71C24N CPU FREQROL-A700 CPU Device Set the inverter station number in the CPU device (D300) D300 Store the operation mode value in the CPU device (D201) D201 CH1. CH2. CH1. Inverter station number D300 Terminator Check code RS-232 Operation mode value Header D201 CH.2 SDA 1 SG SDB Inverter station number Header Operation mode value Check code Terminator 2 (FG) 3 RDA 4 (FG) 5 RDB 6 RS-422 7 /485 Manufacturer Mitsubishi Electric Device name FR-A700 Protocol name H7B: RD Operation Mode (2) Storage devices for send/receive data, buffer memory assignment Specify CPU devices and buffer memories in the data storage area as shown in the table below, and send/receive data. Packet name Element name Packet type H7B:RD Operation Mode Inverter Station Number Send packet NOR:RD Data (4 Digits Data) ERR:NAK Response 13 - 28 Inverter Station Number Read Data Inverter Station Number Error Code Receive packet Receive packet Data storage area specification D300 D200 D201 D202 D203 13 - 28 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. 2. Click the <> tab. 3. Set the following items to the slot on which QJ71C24N is mounted. DISPLAY/SETTING SCREEN DISPLAY/SETTING DETAILS Item Display/Setting Details Type Set "Intelli.". Module name Set QJ71C24N. Points Set 32 points. Start XY Set 0000. 4. Clicking the Switch setting button in the <> tab displays a screen described in (b). 13 - 29 13 - 29 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." for the input format Switch 1 — Switch 2 — — — CH2 communication speed setting: 19200bps Operation setting: Independent setting Data bit: 8 Parity bit: Yes Switch 3 07DE CH2 transmission Odd/even parity: Even setting Stop bit: 2 Sum check code: No Online change: Enable Setting change: Enable 13 - 30 Switch 4 0009 Switch 5 — CH2 communication protocol setting: Pre-defined protocol — 13 - 30 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. Click the "Element setting" cell (displayed in red) of "Element number" 2. Click 13 - 31 13 - 31 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. Set the following values for the data storage area. Packet name NOR:RD Data (4 Digits Data) ERR:NAK Response 13 - 32 Element number 2 Element name Data storage area specification Inverter Station Number D200 3 Read Data D201 2 Inverter Station Number D202 3 Error Code D203 13 - 32 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 - 33 13 - 33 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. (a) I/O signal of QJ71C24N Pre-defined protocol ready: X1D (b) Devices used by user Device Purpose Device Purpose X20 CPRTCL instruction execution command M1 Status display device at completion D300 Inverter Station Number designation device M101 Normal completion flag Execution result storing device for the CPRTCL M102 D10 instruction Error completion flag D12 Execution protocol number designation device D100 Error code storing device M0 Completion device — — Store the set value to the send data storage area Designate protocol number 1 Execute the protocol Communicate in CH2 Normal completion flag ON Abnormal completion flag ON Store the error code Receive data are stored to the receive data storage area that is set to the receive packet. 13 - 34 13 - 34 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. Bit 0 is OFF (0): Stores the execution log for the protocols with the abnormal completion only. Bit 0 is ON (1) : Stores the execution logs and the execution condition of all protocols. Note that, only the logs of error protocols are displayed at the default setting. To display all logs of protocols, set the condition in the intelligent function module utility. For details, refer to the "Q Corresponding Serial Communication Module User’s Manual (Basic)". 13 - 35 13 - 35 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. App - 1 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. Other device Header The operation image of ‘Send only’ is as follows. App (1) Normal completion QCPU/ Execute dedicated LCPU instruction (G(P).CPRTCL) Completion device OFF at normal completion Status display device at completion Q series C24N / L series C24 Other device Send packet Send packet (2) Error completion (transmission monitoring timeout error) Example of setting) Standby time: 0, Retry interval: 0, Monitoring time: other than 0 Error occurs QCPU/ Execute dedicated LCPU instruction (G(P).CPRTCL) Completion device ON at error completion Status display device at completion t : Transmission monitoring time Q series C24N / L series C24 Cannot send a packet Other device App - 2 App - 2 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. Receive data 1 Q series C24N / L series C24 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. 2 Other device Verification match The operation image of ‘Receive only’ is as follows. (1) Normal completion Store verification-matched receive packet number (1 to 16) QCPU/ LCPU Execute dedicated instruction (G(P).CPRTCL) Completion device Status display device at completion (Receive buffer clear) * Only if it is specified Q series C24N / L series C24 Receive packet Verification match Other device App - 3 Receive packet App - 3 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. y With multiple receive packet specifications, receive data are verified with registered receive packet information starting from information of the first registered packet, in the registration order. Once the receive data match one of them, the receiving process is performed and the following verification is cancelled. y The number of a receive packet which is matched in the verification is stored in the control data of the dedicated instruction (CPRTCL instruction). App - 4 App - 4 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. 2 Up to 16 receive packets can be specified Command Station No. 1 Header Receive data 1 Pre-defined receive packet Header Data Header Receiving process Other device Station No. 1 Receive data 2 Header Station No. 2 Verification match The operation image of ‘Send & receive’ is as follows. (1) Normal completion Store verification-matched receive packet number (1 to 16) QCPU/ Execute dedicated LCPU instruction (G(P).CPRTCL Completion device OFF at normal completion Status display device at completion (Receive buffer clear) Start waiting for receive data * Only if it is specified Q series C24N / L series C24 Send packet Receive packet Verification match Other device App - 5 Send packet Receive packet App - 5 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. y With multiple receive packet specifications, receive data are verified with registered receive packet information starting from information of the first registered packet, in the registration order. Once the receive data match one of them, the receiving process is performed and the following verification is cancelled. y The number of a receive packet that is matched in the verification is stored in the control data of the dedicated instruction (CPRTCL instruction). App - 6 App - 6 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. Specified receive packet STX ’1’ ’2’ Same Same Same Receive data STX ’1’ ’2’ ’3’ ’4’ ’5’ ’6’ ETX Same Different ’3’ STX ’1’ ’2’ ’3’ ’3’ ’4’ ’5’ ’6’ ETX ’4’ ’5’ ’6’ ETX Discarded Specified receive packet STX ’1’ Same Same Receive data App - 7 STX ’1’ ’2’ Same Same Same Same Same Same ’2’ ’3’ ’4’ ’5’ ’6’ ETX Verification match App - 7 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. Q series C24N / L series C24 (Data flow) Forward direction (upper byte Reverse direction (lower byte Swapping send data Sending data (Code type) lower byte) upper byte) HEX Byte swap (by word) *Only when the data length specification is 4 bytes (Data flow) Forward direction (upper byte Reverse direction(lower byte Receiving data Byte swap (by word) *Only when the data length specification is 4 bytes Swapping receive data (Data length) (Calculating range) Bin ASCII conversion of length value ASCII hexadecimal ASCII decimal (Code type) lower byte) upper byte) Calculated length value (Data length) (Complement calculation) HEX ASCII hexadecimal ASCII decimal ASCII Bin conversion of length value Received length value (2) Data example The followings shows examples in the case where the calculated value of length is 258 bytes in decimal (258 is 102H). (a) Data flow is ‘Forward direction’ Data length Code type ASCII hexadecimal ASCII decimal HEX App - 8 1 byte “2” (32H) “8” (38H) 02H 2 bytes “02” (30H 32H) “58” (35H 38H) 0102H 3 bytes “102” (31H 30H 32H) “258” (32H 35H 38H) 000102H 4 bytes “0102” (30H 31H 30H 32 H) “0258” (30H 32H 35H 38H) 00000102H App - 8 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 following shows specification examples of the calculating range of Length. Packet format Example 1 Example 2 Example 3 Packet element 1 Packet element 2 Packet element 3 Packet element n-2 Packet element n-1 Packet element n Header Length Static data Variable Terminator Check code Calculating range when specifying 1 to n Calculating range when specifying 3 to (n-2) Calculating range when specifying 3 to n Example 1: Calculating range when its start is 1 and end is n. Example 2: Calculating range when its start is 3 and end is n-2. Example 3: Calculating range when its start is 3 and end is n. App - 9 App - 9 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. Q series C24N / L series C24 (Byte swap) (Fixed length/Variable length) (Data length/Maximum data length) (Unit of stored data) When "Byte swap" is ’Disable’ Unit of stored data D0 Data storage area Lower bytes only Lower byte + Upper byte D1 ’B’ (42h) ’A’ (41h) D0 00h ’D’ ’C’ D1 00h (44h) (43h) D2 00h D3 00h ’A’ (41h) ’B’ (42h) ’C’ (43h) ’D’ (44h) "ABCD" Disable byte swap Sending data Swapping send data "ABCD" "ABCD" CPU device G device Q series C24N, L series C24 ignores data of upper bytes Send data Enable byte swap "BADC" When "Byte swap" is ’Enable’ Unit of stored data D0 Data storage area Lower bytes only Lower byte + Upper byte D1 ’A’ (41h) ’B’ (42h) D0 00h ’C’ ’D’ D1 00h (43h) (44h) D2 00h D3 00h ’B’ (42h) ’A’ (41h) ’D’ (44h) ’C’ (43h) Q series C24N, L series C24 ignores data of upper bytes (Byte swap) (Fixed length/Variable length) (Data length/Maximum data length) (Unit of stored data) When "Byte swap" is ’Disable’ Unit of stored data Data storage area D0 D1 ’B’ (42h) ’A’ (41h) D0 00h ’D’ ’C’ D1 00h (44h) (43h) "ABCD" Disable byte swap Receiving data "ABCD" Enable byte swap D2 00h D3 00h CPU device G device Swapping receive data "ABCD" Lower bytes only Lower byte + Upper byte ’A’ (41h) ’B’ (42h) ’C’ (43h) ’D’ (44h) Q series C24N, L series C24 stores 00h to upper bytes Receive data "BADC" When "Byte swap" is ’Enable’ Unit of stored data D0 Data storage area Lower bytes only Lower byte + Upper byte D1 ’A’ (41h) ’B’ (42h) D0 00h ’C’ ’D’ D1 00h (43h) (44h) D2 00h D3 00h ’B’ (42h) ’A’ (41h) ’D’ (44h) ’C’ (43h) Q series C24N, L series C24 stores 00h to upper bytes App - 10 App - 10 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 D0 = 0041H D0 = 0042H D1 = 4443H D1 = 4344H D1 = 0042H D1 = 0041H D2 = 0043H D2 = 0044H D3 = 0044H D3 = 0043H (b) The following table shows data to be stored in the data storage area in case where the string of send data is ‘EFG’ (Reference: E=45H, F=46H, and G=47H in ASCII code) Item Description Fixed length/Variable length Fixed length Data length 3 bytes Start address of data storage area D0 Unit of stored data Lower byte + Upper byte Lower bytes only Byte swap Data to be stored in data storage area App - 11 Disable Enable Disable Enable D0 = 4645H D0 = 4546H D0 = 0045H D0 = 0046H D1 = 0047H D1 = 4700H D1 = 0046H D1 = 0045H D2 = 0047H D2 = 0047H D3 = (Any data) D3 = (Any data) App - 11 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. (a) In case where “Conversion” is ‘HEX -> ASCII hexadecimal’ or ‘ASCII hexadecimal -> HEX’ Q series C24N / L series C24 (Delimiter) (Number of digits) (Blank-padded character) Digits are filled Variable number of digits No delimiter Sending data "00001234," Adding a delimiter Comma, space When "Delimiter" is ’ , ’ "00001234," (Conversion) "00001234" (Fixed number of data/ Variable number of data) (Conversion unit) CPU device G device Adding blank-padded characters Bin ASCII conversion of Digits are not filled (Blank-padded character : 0) send data Digits are not filled (Blank-padded character : space) When "Number of digits" is ’8’ and "Blank-padded character" is ’0’ "00001234" "1234" "1234" 1234h Send data (numeric data) When "Conversion unit" is ’Word’ 1234h D0 (Data length/Maximum data length) (Delimiter) (Number of digits) (Blank-padded character) "00001234," CPU device G device Deleting blank-padded Blank-padded characters characters are included When "Number of digits" is ’8’ and "Blank-padded character" is ’0’ "00001234" "00001234" "1234" ASCII bin conversion of receive data Deleting Comma, a delimiter space When "Delimiter" is ’ , ’ "00001234," (Fixed number of data/ Variable number of data) (Conversion unit) No blank-padded character Variable number of digits No delimiter Receiving data (Conversion) Receive data (numeric data) When "Conversion unit" is ’Word’ "1234" 1234h D0 1234h (Data length/Maximum data length) * Blank-padded characters At data sending, upper digits are filled with data specified in “Blank-padded character” when the number of digits is less than that specified in “Number of send digits of data”. At data receiving, either of ‘0’ or ‘_ (space)’ is processed as a blank-padded character, regardless of the setting of “Blank-padded character”. (Example) Setting of “Number of receive digits of data” is ‘6’ (‘_’ indicates a space character in the table) No. App - 12 Receive data Operation of Q series C24N / L series C24 modules 1 000120 Considers its starting 3 digits as blank-padded characters. 2 _ _ 0120 Considers its starting 3 digits as blank-padded characters. 3 0 _ 0120 Considers its starting 3 digits as blank-padded characters. 4 _ _ _ 120 Considers its starting 3 digits as blank-padded characters. 5 00012 _ Considers it to be an ASCII -> bin conversion error (7F20 H). 6 _ _ _ 12 _ Considers it to be an ASCII -> bin conversion error (7F20 H). 7 0001 _ 0 Considers it to be an ASCII -> bin conversion error (7F20 H). App - 12 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.34" (Number of decimals) Comma, space Adding blank-padded characters (Sign) (Sign character) (Conversion) Bin ASCII conversion of send data No decimal point Adding a decimal point Digits are not filled (Blank-padded character : 0) Digits are not filled (Blank-padded character : space) Bin ASCII conversion of send data Adding a sign character 1 to 10 Variable point "-12.34" "-12.34" ASCII decimal (Unsigned) CPU device G device ASCII decimal (Signed) Send data (numeric data) When "Conversion unit" is ’Word’ When "Number of digits" is ’6’ When "Number of decimals" is ’2’ and "Blank-padded character" is ’Space’ "-_ _12.34" (Fixed number of data/ Variable number of data) (Conversion unit) "-1234" "-1234" -1234 D0 -1234 (FB2Eh) (Data length/Maximum data length) (Delimiter) No blank-padded character Variable number of digits No delimiter Receiving data "-_ _12.34," Comma, space (Number of digits) (Blank-padded character) (Number of decimals) (Sign) (Sign character) (Conversion) ASCII decimal (Unsigned) No decimal point Deleting blank-padded characters Deleting a decimal point ASCII decimal Blank-padded 1 to 10 characters are (Signed) Variable point included When "Number of digits" is ’6’ When "Number of decimals" is ’2’ When "Delimiter" is ’ , ’ and "Blank-padded character" is ’Space’ Deleting a delimiter "-_ _12.34," "-_ _12.34" "-_ _12.34" "-12.34" "-12.34" "-1234" (Fixed number of data/ Variable number of data) (Conversion unit) ASCII bin conversion of receive data Deleting a sign character ASCII bin conversion of receive data "-1234" -1234 CPU device G device Receive data (numeric data) When "Conversion unit" is ’Word’ D0 -1234 (FB2Eh) (Data length/Maximum data length) App - 13 App - 13 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). (Reference: 120345H=1180485 in decimal form) Item Setting Details Fixed number of data/Variable number Fixed number of data Fixed number of data Fixed number of data 1 1 1 D0 D0 D0 Conversion unit Word Word Word Conversion HEX ASCII decimal HEX ASCII decimal HEX ASCII decimal Number of digits 5 5 Variable number of digits 0 Space - (Not settable) of data Number of data Start address of data storage area Blank-padded character Sign Unsigned Signed Signed Sign character - (Not settable) + + Number of decimals No decimal point 2 No decimal point Delimiter No delimiter Comma Comma Header 00837 Terminator Header +_ _ 8.37, Terminator Header +837, Terminator *1 Send data Item Setting Details Fixed number of data/Variable number Fixed number of data Fixed number of data Fixed number of data 1 2 2 D0 D0 D0 Double word Word Word Conversion HEX ASCII decimal HEX ASCII decimal HEX ASCII decimal Number of digits 10 5 5 0 Space 0 Sign Signed Unsigned Signed Sign character + - (Not settable) + Number of decimals 8 No decimal point 2 Delimiter No delimiter No delimiter Comma Header +00.01180485 Header _ _ 837 _ _ _18 Header +008.37, +000.18 Terminator Terminator Terminator of data Number of data Start address of data storage area Conversion unit Blank-padded character *1 Send data App - 14 App - 14 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). 3) When “Code type” is ‘ASCII decimal’, extracts the lowest one word from the value calculated in 2) and performs the hexadecimal decimal conversion. Q series C24N / L series C24 (Code type) (Data flow) Forward direction (upper byte lower byte) Reverse direction (lower byte upper byte) Swapping send data Sending data HEX Bin ASCII conversion of length value Byte swap (by word) *Only when the data length specification is 4 bytes Receiving data Byte swap (by word) *Only when the data length specification is 4 bytes Calculated length value ASCII hexadecimal ASCII decimal (Code type) (Data flow) Forward direction (upper byte Reverse direction (lower byte (Processing method) (Data length) (Calculating range) (Complement calculation) lower byte) upper byte) (Processing method) (Data length) (Calculating range) (Complement calculation) Calculated check code HEX Checking ASCII Bin conversion of length value Swapping receive data ASCII hexadecimal ASCII decimal Received check code (2) Procedure for calculating horizontal parity The followings show procedures for calculating horizontal parities using the following sample data. STX "Q" "J" "7" "1" "C" "2" "4" "N" Horizontal parity ETX Calculating range (For the data shown above) "Q" (51 H) "J" (4AH) "7" (37 H) "1" (31 H) "C" (43 H) "2" (32 H) "4" (34 H) "N" (4EH) ETX (03 H) 0101 0001 XOR 0100 1010 == 0001 1011 XOR 0011 0111 = 0010 1100 XOR 0011 0001 = 0001 1101 XOR 0100 0011 = 0101 1110 XOR 0011 0010 = 0110 1100 XOR 0011 0100 = 0101 1000 XOR 0100 1110 0001 0110 XOR 0000 0011 = 0001 0101 (Binary) Horizontal parity = 1 App - 15 5 (Hexadecimal) App - 15 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 0015H is FFFF FFEAH) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FFEAH in hexadecimal is 65514 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII “A” “EA” “FEA” “FFEA” hexadecimal (41H) (45H 41H) (46H 45H 41H) (46H 46H 45H 41H) “4” “14” “514” “5514” (34H) (31H 34H) (35H 31H 34H) (35H 35H 31H 34H) EAH FFEAH FFFFEAH FFFFFFEAH ASCII decimal HEX 3) “Complement calculation” is ‘Two’s complement’ (Two’s complement of 0000 0015H is FFFF FFEBH) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FFEBH in hexadecimal is 65515 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII “B” “EB” “FEB” “FFEB” hexadecimal (42H) (45H 42H) (46H 45H 42H) (46H 46H 45H 42H) “5” “15” “515” “5515” (35H) (31H 35H) (35H 31H 35H) (35H 35H 31H 35H) EBH FFEBH FFFFEBH FFFFFFEBH ASCII decimal HEX App - 16 App - 16 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) “12” “120” “1200” (31H 32H) (31H 32H 30H) (31H 32H 30H 30H) 1500H 150000H 15000000H ASCII decimal 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. (FFEAH in hexadecimal is 65514 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “AE” “AEF” “AEFF” hexadecimal (41H 45H) (41H 45H 46H) (41H 45H 46H 46H) “41” “415” “4155” (34H 31H) (34H 31H 35H) (35H 35H 31H 34H) EAFFH EAFFFFH EAFFFFFFH ASCII decimal HEX 3) “Complement calculation” is ‘Two’s complement’ (Two’s complement of 0000 0015H is FFFF FFEBH) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FFEBH in hexadecimal is 65515 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “BE” “BEF” “BEFF” hexadecimal (42H 45H) (42H 45H 46H) (42H 45H 46H 46H) “51” “515” “5155” (35H 31H) (35H 31H 35H) (35H 31H 35H 35H) EBFFH EBFFFFH EBFFFFFFH ASCII decimal HEX App - 17 App - 17 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. (FFEAH in hexadecimal is 65514 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “FFAE” hexadecimal (46H 46H 41H 45H) “5541” ASCII decimal (35H 35H 34H 31H) FFFFEAFFH HEX 3) “Complement calculation” is ‘Two’s complement’ (Two’s complement of 0000 0015H is FFFF FFEBH) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FFEBH in hexadecimal is 65515 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “FFBE” hexadecimal (46H 46H 42H 45H) ASCII decimal HEX App - 18 “5551” (35H 35H 35H 31H) FFFFEBFFH App - 18 APPENDICES MELSOFT (3) Procedure for calculating sum check The followings show procedures for calculating sum check codes using the following sample data. STX "Q" "J" "7" "1" "C" "2" "4" "N" ETX Sum check Calculating range (For the data shown above) Sum check = 51H + 4AH + 37H + 31H + 43H + 32H + 34H + 4EH + 03H = 1FD H (a) Data flow : Forward direction 1) “Complement calculation” is ‘No complement calculation’ (1FDH in hexadecimal is 509 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII “D” “FD” “1FD” “01FD” hexadecimal (44H) (46H 44H) (31H 46H 44H) (30H 31H 46H 44H) “9” “09” “509” “0509” (39H) (30H 39H) (35H 30H 39H) (30H 35H 30H 39H) FDH 01FDH 0001FDH 000001FD H ASCII decimal 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 decimal. (FF02H in hexadecimal is 65026 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII “2” “02” “E02” hexadecimal (32H) (30H 32H) (45H 30H 32H) (46H 45H 30H 32H) “6” “26” “026” “5026” (36H) (32H 36H) (30H 32H 36H) (35H 30H 32H 36H) 02H FE02H FFFE02H FFFFFE02H ASCII decimal HEX “FE02” 3) “Complement calculation” is ‘Two’s complement’ (Two’s complement of 0000 01FDH is FFFF FE03H) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FE03H in hexadecimal is 65027 in decimal) Data length Code type 1 byte 2 bytes 3 bytes 4 bytes ASCII “3” “03” “E03” “FE03” hexadecimal (33H) (30H 33H) (45H 30H 33H) (46H 45H 30H 33H) “7” “27” “027” “5027” (37H) (32H 37H) (30H 32H 37H) (35H 30H 32H 37H) 03H FE03H FFFE03H FFFFFE03H ASCII decimal HEX App - 19 App - 19 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 “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FF02H in hexadecimal is 65026 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “20” “20E” “20EF” hexadecimal (32H 30H) (32H 30H 45H) (32H 30H 45H 46H) “62” “620” “6205” (36H 32H) (36H 32H 30H) (36H 32H 30H 35H) 02FEH 02FEFFH 02FEFFFFH ASCII decimal HEX 3) “Complement calculation” is ‘Two’s complement’ (Two’s complement of 0000 01FDH is FFFF FE03H) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FE03H in hexadecimal is 65027 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “30” “30E” “30EF” hexadecimal (30H 33H) (33H 30H 45H) (33H 30H 45H 46H) “72” “720” “7205” (37H 32H) (37H 32H 30H) (37H 32H 30H 35H) 03FEH 03FEFFH 03FEFFFFH ASCII decimal HEX App - 20 App - 20 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 decimal. (FF02H in hexadecimal is 65026 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “EF20” hexadecimal (45H 46H 32H 30H) “0562” ASCII decimal (30H 35H 36H 32H) FFFF02FEH HEX 3) “Complement calculation” is ‘Two’s complement’ (Two’s complement of 0000 01FDH is FFFF FE03H) When “Code type” is ‘ASCII decimal’, the last one word is extracted and converted from hexadecimal to decimal. (FE03H in hexadecimal is 65027 in decimal) Code type Data length 1 byte 2 bytes 3 bytes 4 bytes ASCII “EF30” hexadecimal (45H 46H 33H 30H) ASCII decimal HEX App - 21 “0572” (30H 35H 37H 32H) FFFF03FEH App - 21 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). 3) Shift the result of 2) one bit right. 4) If the latest significant bit in above 2) is ‘1’, exclusive OR (XOR) the result of 3) with the generator polynomial (A001H). If the last bit is ‘0’, shift the result of 2) one bit right (operation described in 3)) without the exclusive OR (XOR) operation. 5) Repeat steps 3) and 4) until 8 shifts have been performed. 6) Exclusive OR (XOR) the result of 5) with the next 1 byte (8 bits). 7) Repeat step 2) through 6) until all bytes have been processed. The final result is CRC value. 8) When the CRC value is placed in a packet, the lower 8 bits are set first, and then the upper 8 bits are set. For the specific example of calculation, refer to the table on the next page. App - 22 App - 22 APPENDICES MELSOFT The followings show the example of 16-bit CRC (for MODBUS) calculation. Packet example: Station No. Function code 02 H 07 H 16-bit CRC 41 H 12 H Procedure example of 16-bit CRC (for MODBUS) of a packet example above: CRC error checking procedure (Load a 16-bit register whose bits are all ‘1’) 16-bit register (MSB) 1111 1111 02H(Station number) Flag 1111 1111 0000 0010 Exclusive OR (XOR) 1111 1111 1111 1101 Shift 1 0111 1111 1111 1110 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1101 1111 1111 1111 Shift 2 0110 1111 1111 1111 1) to 2) 1 3) to 4) 1 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1100 1111 1111 1110 Shift 3 0110 0111 1111 1111 0 Shift 4 0011 0011 1111 1111 1 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1001 0011 1111 1110 Shift 5 0100 1001 1111 1111 0 Shift 6 0010 0100 1111 1111 1 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1000 0100 1111 1110 Shift 7 0100 0010 0111 1111 0 Shift 8 0010 0001 0011 1111 1 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1000 0001 07H(Function code) 0011 1110 0000 0111 Exclusive OR (XOR) 1000 0001 0011 1001 Shift 1 0100 0000 1001 1100 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1110 0000 1001 1101 Shift 2 0111 0000 0100 1110 Generator polynomial 1010 0000 0000 0001 1 1 1101 0000 0100 1111 Shift 3 0110 1000 0010 0111 Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1100 1000 0010 0110 Shift 4 0110 0100 0001 0011 0 Shift 5 0011 0010 0000 1001 1 1 7) Generator polynomial 1010 0000 0000 0001 Exclusive OR (XOR) 1001 0010 0000 1000 Shift 6 0100 1001 0000 0100 0 Shift 7 0010 0100 1000 0010 0 Shift 8 0001 0010 0100 0001 0 App - 23 12H 41H 5) 6) Exclusive OR (XOR) CRC value Calculating procedure 8) App - 23 APPENDICES MELSOFT (5) Calculating range of Check code The following shows specification examples of the calculating range of Check code. Packet format Packet element 1 Packet element 2 Packet element n-2 Packet element n-1 Packet element n Header Static data Non-conversion variable Terminator Check code Calculating range when specifying 1 to (n-1) Example 1 Calculating range when specifying 2 to (n-1) Example 2 Calculating range when specifying 2 to (n-2) Example 3 Example 1: Calculating range when its start is 1 and end is n-1. Example 2: Calculating range when its start is 2 and end is n-1. Example 3: Calculating range when its start is 2 and end is n-2. Appendix 4.5 Non-verified reception The following shows a usage example of Non-verified reception. Example of format of packet from other device 1 byte STX 2 bytes 2 bytes 5 bytes 5 bytes Identification code Country code Manufacturer code Product code Variable number of characters 1 byte ETX Data to be read When the data are not needed by the user and data contents and/or the number of character vary Data needed by the user Set a Non-verified reception element Example of packet setting 1 byte 2 bytes Variable number of characters Header Conversion variable Non-verified reception (variable number of characters) 1 byte Terminator Using a Non-verified reception element has the following advantages in case of the packet format shown above. y Necessary data can only be stored in a CPU device and buffer memory. y A single protocol (packet) can handle receive packets that includes data whose contents vary each time. App - 24 App - 24 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. Reference Section 3.2 (2) Checking the GX Configurator-SC software version Check the version within the GX Developer product information. ([Help] [Product information] ) The GX Configurator-SC version is displayed in this section. App - 25 App - 25 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......................................................... 11-10 Circuit trace screen Send/receive packets ............................... 11- 8 Communication control signals ................ 11- 8 Start........................................................... 11- 8 Communication type of protocol .................... 8- 4 [D] Data example of packet element ...............App- 8 Debugging support function......................... 11- 1 Dedicated instruction G(P).CPRTCL.......................................... 13-18 Functional protocol .................................. 13-25 Device batch setting...................................... 9-35 Device list ...................................................... 9-29 [E] End.................................................................. 7- 1 [H] Help function...............................................App- 1 [I] I/O signal....................................................... 13- 1 [L] List of assignments of buffer memory ........ 13- 7 [M] Menu list ......................................................... 5- 2 Module verification ....................................... 10- 4 Index - 1 [O] Opening circuit trace file ..............................11-11 Operating procedure Procedure for setting through writing .........4- 1 Procedure for debugging ............................4- 2 [P] Packet edit operation Deleting packet ..........................................8-12 Copying/pasting packet .............................8-13 Adding new element ..................................9-23 Changing element type..............................9-24 Packet element Header.........................................................9- 6 Static Data ...................................................9- 6 Terminator ...................................................9- 7 Length..........................................................9- 8 Non-conversion variable ............................9-10 Conversion variable ...................................9-13 Check code ................................................9-20 Non-verified reception................................9-22 Packet element setting Header/Static Data/Terminator..................9-25 Length.........................................................9-27 Non-conversion variable ............................9-28 Conversion variable ...................................9-30 Check code ................................................9-33 Non-verified reception................................9-34 Pre-defined protocol ready (X1D) ................13- 2 Pre-defined protocol support function Function list .................................................3- 1 Creating new file .........................................8- 1 Opening file .................................................8- 2 Closing file ...................................................8- 3 Saving file ....................................................8- 3 Adding protocol ...........................................8- 7 Changing to editable protocol.....................8- 7 Protocol detailed setting..............................8- 8 Setting send/receive parameter.................8-11 Deleting protocol ........................................8-12 Copying and pasting protocol ....................8-13 Print ...............................................................12- 1 Print example ................................................12- 2 Index - 1 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................................................ 5- 1 Selecting module for debugging The present object module....................... 11- 2 Module list................................................. 11- 2 Channel specification ............................... 11- 2 Start ................................................................ 6- 1 State monitor ............................................... 11-12 State monitor <> tab Communication error status .................... 11-13 Switch setting, mode selection error....... 11-13 Communication result.............................. 11-13 Error reset ................................................ 11-13 State monitor <> tab Switch setting status for the operation.... 11-14 Mode switch............................................. 11-14 Station switch........................................... 11-14 State monitor <> tab Execution status ...................................... 11-15 Protocol cancel designation .................... 11-15 Pre-defined protocol function error code 11-15 State monitor <> tab X signal state monitor.............................. 11-13 Y signal state monitor.............................. 11-13 RS-232 signal monitor............................. 11-13 Status bar ....................................................... 5- 3 [T] Tool button...................................................... 5- 3 [V] Verification operation of receive packet ....App- 7 [W] Write to module ............................................ 10- 1 Index - 2 Index - 2 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. SH (NA)-080850ENG-C SH(NA)-080850ENG-C(1009)MEE MODEL: GXCON-SC-O-PP-E MODEL CODE: 13JU66 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.

Source Exif Data:
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.6
Linearized                      : Yes
Encryption                      : Standard V4.4 (128-bit)
User Access                     : Print, Copy, Annotate, Fill forms, Extract, Print high-res
Author                          : Mitsubishi Electric Corporation
Create Date                     : 2016:09:08 14:48:02+09:00
Modify Date                     : 2016:09:15 10:26:05+09:00
Subject                         : SH-080850ENG-C
XMP Toolkit                     : Adobe XMP Core 5.6-c015 84.158975, 2016/02/13-02:40:29
Metadata Date                   : 2016:09:15 10:26:05+09:00
Format                          : application/pdf
Title                           : GX Configurator-SC Version 2 Operating Manual (Pre-defined protocol support function)
Creator                         : Mitsubishi Electric Corporation
Description                     : SH-080850ENG-C
Rights                          : Copyright 2009 Mitsubishi Electric Corporation All Rights Reserved.
Document ID                     : uuid:b51d41a3-5de6-429b-91f0-b50f1830fa4b
Instance ID                     : uuid:587d498b-e65c-4d52-b62d-0aed5e3ea166
Startup Profile                 : Print
Keywords                        : 
Page Layout                     : SinglePage
Page Mode                       : UseOutlines
Page Count                      : 180
EXIF Metadata provided by EXIF.tools

Navigation menu