GX Works 2 Operating Manual Stru

GX Works 2 Operating Manual Stru
SAFETY PRECAUTIONS
(Always read these instructions before using this product.)
Before using this product, thoroughly read this manual and the relevant manuals introduced in this manual
and pay careful attention to safety and handle the products properly.
The precautions given in this manual are concerned with this product. For the safety precautions of the
programmable controller system, refer to the User's Manual for the CPU module.
In this manual, the safety precautions 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 serious consequences according to the circumstances.
Always follow the precautions of both levels because they are important for personal safety.
Please save this manual to make it accessible when required and always forward it to the end user.
[Design Instructions]
WARNING
● When data change, program change, or status control is performed from a personal computer to a running
programmable controller, create an interlock circuit outside the programmable controller to ensure that the whole
system always operates safely.
Furthermore, for the online operations performed from a personal computer to a programmable controller CPU, the
corrective actions against a communication error due to such as a cable connection fault should be predetermined as
a system.
[Startup/Maintenance Instructions]
CAUTION
● The online operations performed from a personal computer to a running programmable controller CPU (Program
change when a programmable controller CPU is RUN, operating status changes such as forced input/output
operation and RUN-STOP switching, and remote control operation) must be executed after the manual has been
carefully read and the safety has been ensured.
When changing a program while a programmable controller CPU is RUN, it may cause a program corruption in some
operating conditions. Fully understand the precautions described in GX Works2 Version 1 Operating Manual
(Common) before use.
● The positioning test functions of OPR, JOG, inching or positioning data for QD75/LD75 positioning module must be
executed with the programmable controller set to STOP after the manual has been carefully read and the safety has
been ensured. Specially when executing the function on the network system, ensure the safety thoroughly since the
machinery whose operation cannot be checked by an operator may be activated. The operation failure may cause the
injury or machine damage.
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;
• 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.
• 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.
• 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
REVISIONS
The manual number is written at the bottom left of the back cover.
Print date
Manual number
Revision
Jul., 2008
SH(NA)-080781ENG-A First edition
Jan., 2009
SH(NA)-080781ENG-B
Model Addition
Q00UJ, Q00U, Q01U, Q10UDH, Q10UDEH, Q20UDH, Q20UDEH, FX series
Addition
MANUALS, Section 6.2.7, Appendix 1.4
Correction
GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL, Section 1.1,
Section 1.3.1, Section 1.3.5, Section 1.3.6, Section 4.2, Section 5.3, Section 5.4,
Section 5.7, Section 6.1.1, Section 6.2.1, Section 6.2.2, Section 6.2.8, Section 7.1,
Section 7.2, Section 7.5, Section 7.5.1, Section 7.6.5, Section 8.1, Section 9.4,
Section 9.5, Section 11.2, Appendix 1.1, Appendix 1.5
Jul., 2009
SH(NA)-080781ENG-C
Model Addition
Q00J, Q00, Q01
Addition
Section 6.4.3, Chapter 7
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL,
Section 1.2, Section 1.3, Section 2.1, Section 4.1, Section 4.2.1, Section 4.2.2,
Section 4.2.3, Section 4.3.1, Section 4.3.2, Section 4.4.1, Section 5.1, Section 5.2,
Section 5.3, Section 5.4, Section 5.6.1, Section 6.1, Section 6.2.1, Section 6.2.3,
Section 6.2.4, Section 6.3, Section 6.3.1, Section 6.4, Section 6.4.4, Section 6.4.10,
Section 6.4.11, Section 6.4.13, Chapter 8, Section 9.1, Section 11.2, Section 11.3,
Section 12.2, Appendix 1
Section 6.3.4 is changed to Section 7.12.
Section 6.4.3 to Section 6.4.12 are changed to Section 6.4.4 to Section 6.4.13
Chapter 7 to Chapter 11 are changed to Chapter 8 to Chapter 12
Oct., 2009
SH(NA)-080781ENG-D
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL,
Section 1.3.1, Section 1.3.6, Section 5.1, Section 5.2, Section 5.3, Section 5.4,
Section 6.4.2, Section 6.4.7, Section 12.1, Section 12.2, Appendix 1.2, Appendix 1.6
Jan., 2010
SH(NA)-080781ENG-E
Model Addition
L02, L26-BT
Addition
CONDITIONS OF USE FOR THE PRODUCT, Section 6.2.11
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL,
Section 1.3, Section 2.1, Section 4.1, Section 4.2.3, Section 4.4.1, Section 5.2,
Section 5.7, Section 6.2.2, Section 6.4.2, Section 6.4.3, Section 6.4.7, Section 6.4.13,
Section 8.1, Section 8.2, Section 8.4.7, Section 9.1, Section 12.1, Section 12.2,
Appendix 1
Section 6.2.11 is changed to Section 6.2.12.
A-3
Print date
Manual number
Apr., 2010
SH(NA)-080781ENG-F
Revision
Model Addition
Q50UDEH, Q100UDEH, LJ72GF15-T2
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL,
Section 1.2, Section 1.3.1, Section 2.1, Section 5.2, Section 5.3, Section 5.4,
Section 5.5, Section 5.7, Section 8.1, Section 8.2, Section 8.4.3, Section 8.5,
Section 11.1, Section 12.2, Appendix 1.1, Appendix 1.2, Appendix 1.6, Appendix 1.8
Sep., 2010
SH(NA)-080781ENG-G
Addition
Section 5.8
Correction
Section 1.2, Section 1.3.1, Section 4.3.2, Section 4.4.1, Section 5.2, Section 5.3,
Section 5.4, Section 5.7, Section 6.2.1, Section 6.2.2, Section 6.2.10, Section 6.4.2,
Section 6.4.7, Section 8.1, Section 8.2, Section 8.5, Section 9.1, Section 12.1,
Section 12.2, Appendix 1.1, Appendix 1.2, Appendix 1.6
Jan., 2011
SH(NA)-080781ENG-H
Addition
TERMS, Section 5.5.1, Section 5.5.2, Section 6.2.5, Chapter 7, Chapter 8,
Section 11.2.3
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL,
Section 1.2, Section 1.3.1, Section 2.1, Section 4.2.2, Section 4.2.3, Section 5.2,
Section 5.3, Section 5.4, Section 5.5, Section 6.1.1, Section 6.2.1, Section 10.5,
Section 11.1, Section 12.1, Section 12.2, Section 14.2, Appendix 1
Section 5.5.1 to 5.5.2 are changed to Section 5.5.3 to 5.5.4
Section 6.2.2 is changed to Section 7.1.4, Section 6.2.3 is changed to Section 6.2.2,
Section 6.2.4 is changed to Section 8.8, Section 6.2.5 is changed to Section 6.2.3,
Section 6.2.6 is changed to Section 8.8.7, Section 6.2.7 is changed to Section 8.11,
Section 6.2.8 is changed to Section 6.2.4
Section 6.2.10 to 6.2.12 are changed to Section 6.2.6 to 6.2.8
Section 6.3 is changed to Chapter 7, Section 6.4 is changed to Chapter 8,
Section 11.2.2 is changed to Section 13.3.1,
Section 11.2.3 is changed to Section 13.2.5,
Section 11.2.4 is changed to Section 13.3.4,
Section 11.2.5 is changed to Section 13.2.2,
Section 11.2.6 to Section 11.2.7 are changed to Section 13.3.3,
Section 11.2.8 is changed to Section 13.2.6,
Section 11.2.9 to Section 11.2.10 are changed to Section 13.2.4,
Section 11.2.11 is changed to Section 13.3.5, Section 13.2.7,
Chapter 7 to 12 are changed to Chapter 9 to 14
A-4
Print date
Mar., 2011
Manual number
SH(NA)-080781ENG-I
Revision
Addition
Section 5.7.1, Section 10.5.1, Section 10.5.2, Section 10.5.3
Correction
MANUALS, Section 1.3.1, Section 5.4, Section 5.7, Section 6.2.1, Section 6.2.2,
Section 8.2.2, Section 8.9, Section 8.9.2, Section 10.1, Section 10.2, Section 10.4.4,
Section 10.4.6, Section 10.5, Section 11.1, Section 14.2, Appendix 1.1, Appendix 1.6
Jul., 2011
SH(NA)-080781ENG-J
Model Addition
L02-P, L26-PBT
Addition
Section 8.7.2, Section 8.8.7, Appendix 1.2
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL,
Section 1.2, Section 1.3.1, Section 1.3.6, Section 2.1, Section 4.3.2, Section 4.4.1,
Section 5.2, Section 5.3, Section 5.4, Section 5.6.3, Section 5.7.1, Section 6.1,
Section 6.1.2, Section 6.2.1, Section 6.2.6, Section 6.2.7, Section 6.2.8, Section 6.2.9,
Section 8.1, Section 8.2.1, Section 8.5.1, Section 8.5.2, Section 8.6.3, Section 8.7.5,
Section 8.8.4, Section 8.8.7, Section 8.8.8, Section 8.9.3, Section 8.10, Section 8.11,
Section 10.1, Section 10.2, Section 10.4.4, Section 10.5.2, Section 10.5.3,
Section 11.1, Section 12.1, Section 12.3.2, Section 12.4, Section 13.3.7,
Section 13.4.5, Section 14.1, Section 14.2, Appendix 1.6
Section 8.7.2 to Section 8.7.4 are changed to Section 8.7.3 to Section 8.7.5
Section 8.8.7 is changed to Section 8.8.8
Appendix 1.2 to Appendix 1.8 are changed to Appendix 1.3 to Appendix 1.9
Sep., 2011
SH(NA)-080781ENG-K
Correction
Section 1.3.1
Japanese Manual Version SH-080732-P
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.
© 2008 MITSUBISHI ELECTRIC CORPORATION
A-5
INTRODUCTION
Thank you for purchasing the Mitsubishi integrated FA software, MELSOFT series.
Before using this product, thoroughly read this manual to develop full familiarity with the functions and
performance to ensure correct use.
CONTENTS
SAFETY PRECAUTIONS .......................................................................................................................A - 1
CONDITIONS OF USE FOR THE PRODUCT .......................................................................................A - 2
REVISIONS ............................................................................................................................................A - 3
INTRODUCTION ....................................................................................................................................A - 6
CONTENTS ............................................................................................................................................A - 6
MANUALS ............................................................................................................................................A - 12
GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL............................................................A - 21
TERMS .................................................................................................................................................A - 21
1
2
OVERVIEW
1.1
What is Structured Project?
1-2
1.2
Features of Structured Project
1-2
1.3
List of Functions
1-5
List of functions common to Simple project and Structured project ............................................. 1 - 5
1.3.2
List of functions for editing in ladder language........................................................................... 1 - 16
1.3.3
List of functions for editing SFC diagrams ................................................................................. 1 - 16
1.3.4
List of functions for editing SFC block list .................................................................................. 1 - 16
1.3.5
List of functions for editing in ST language ................................................................................ 1 - 17
1.3.6
List of functions for editing in structured ladder/FBD language.................................................. 1 - 18
Overview of Screen Configuration
PROGRAMMING PROCEDURE
3.1
4
1.3.1
SCREEN CONFIGURATION
2.1
3
1 - 1 to 1 - 20
Creating Programs
PROGRAM CONFIGURATIONS
2 - 1 to 2 - 2
2-2
3 - 1 to 3 - 4
3-2
4 - 1 to 4 - 16
4.1
Program Configurations of Structured Project
4-2
4.2
Creating Program Files and Tasks
4-3
4.3
4.2.1
Procedure for creating program files and tasks ........................................................................... 4 - 3
4.2.2
Registering program blocks to tasks ............................................................................................ 4 - 4
4.2.3
Setting executing conditions ........................................................................................................ 4 - 7
Creating POUs
4.3.1
A-6
4 - 10
Procedure for creating POUs ..................................................................................................... 4 - 10
4.3.2
4.4
Using POUs
4.4.1
5
5 - 1 to 5 - 32
5.1
Label Setting Screens
5-2
5.2
Setting Global Labels
5-3
5.3
Setting Local Labels for Program Blocks
5-9
5.4
Setting Labels for Functions and Function Blocks
5 - 11
5.5
Common Operations for Setting Labels
5 - 13
5.5.1
Classes....................................................................................................................................... 5 - 13
5.5.2
Data types .................................................................................................................................. 5 - 14
5.5.3
Selecting data types ................................................................................................................... 5 - 15
5.5.4
Editing rows ................................................................................................................................ 5 - 18
Setting Structured Data Type Labels
5.6.1
5.7
5.8
Setting data type of structure...................................................................................................... 5 - 20
Setting data type as structure..................................................................................................... 5 - 20
5.6.3
Assigning devices to structured data type labels........................................................................ 5 - 21
5.6.4
Assigning devices to structure array type labels ........................................................................ 5 - 23
Setting Ranges for Devices Assigned Automatically
6.2
Writing/Reading Data to/from CSV Files
Types of Program Editor
5 - 29
6 - 1 to 6 - 16
6-2
6.1.1
Available programming languages ............................................................................................... 6 - 3
6.1.2
Available comment formats .......................................................................................................... 6 - 4
Common Operations of Program Editors
6-5
6.2.1
Using POUs (Function Block Selection window) .......................................................................... 6 - 5
6.2.2
Using labels in the program.......................................................................................................... 6 - 8
6.2.3
Undo and redo............................................................................................................................ 6 - 11
6.2.4
Changing display size of editing screen ..................................................................................... 6 - 12
6.2.5
Splitting editing screen ............................................................................................................... 6 - 13
6.2.6
Opening label setting screen of program editor being edited ..................................................... 6 - 14
6.2.7
Displaying compilation result in list form..................................................................................... 6 - 14
6.2.8
Setting display contents of tool hint ............................................................................................ 6 - 15
6.2.9
Opening label setting and program screens for selected POU .................................................. 6 - 16
EDITING ST PROGRAMS
7.1
5 - 26
Precautions on automatically assigned devices ......................................................................... 5 - 27
COMMON OPERATIONS OF PROGRAM EDITORS
6.1
5 - 20
5.6.2
5.7.1
7
4 - 14
Using functions and function blocks ........................................................................................... 4 - 15
SETTING LABELS
5.6
6
Setting properties of functions and function blocks .................................................................... 4 - 11
ST Editor
7 - 1 to 7 - 6
7-2
7.1.1
Writing ST programs..................................................................................................................... 7 - 3
7.1.2
Automatic indention ...................................................................................................................... 7 - 3
A-7
8
7.1.3
Setting tab length ......................................................................................................................... 7 - 4
7.1.4
Using templates ........................................................................................................................... 7 - 5
EDITING STRUCTURED LADDER/FBD PROGRAMS
8.1
Creating Ladder/FBD Programs
8.1.1
8.2
8.3
8.4
8.5
8.6
8.8
8.9
A-8
8-2
Selecting editing modes ............................................................................................................... 8 - 3
Editing in Select Mode
8-4
8.2.1
Entering ladder symbols............................................................................................................... 8 - 4
8.2.2
Entering instructions..................................................................................................................... 8 - 5
Drawing Lines
8-7
8.3.1
Connecting lines automatically when entering ladder symbols.................................................... 8 - 7
8.3.2
Connecting ladder symbols with lines .......................................................................................... 8 - 8
8.3.3
Connecting lines automatically..................................................................................................... 8 - 8
8.3.4
Overwriting input/output variable with lines.................................................................................. 8 - 9
8.3.5
Rearranging lines automatically ................................................................................................... 8 - 9
8.3.6
Inserting and deleting rows and columns................................................................................... 8 - 10
Operating Ladder Symbols
8 - 11
8.4.1
Moving ladder symbols .............................................................................................................. 8 - 11
8.4.2
Moving ladder symbols with lines connected ............................................................................. 8 - 11
8.4.3
Copying ladder symbols............................................................................................................. 8 - 13
Changing Type of Contact and Coil
8 - 15
8.5.1
Setting the type of contact and coil ............................................................................................ 8 - 15
8.5.2
Changing contact and coil in predetermined order .................................................................... 8 - 17
Operating Functions and Function Blocks
8.6.1
8.7
8 - 1 to 8 - 40
8 - 18
Adding variables automatically when entering functions and function blocks............................ 8 - 18
8.6.2
Editing variable names and instance names.............................................................................. 8 - 19
8.6.3
Changing the number of arguments for functions and function blocks ...................................... 8 - 20
Changing Display Format of Variables
8 - 21
8.7.1
Displaying variable names in multiple lines................................................................................ 8 - 21
8.7.2
Displaying labels and devices simultaneously ........................................................................... 8 - 21
8.7.3
Displaying instance names in multiple lines............................................................................... 8 - 22
8.7.4
Specifying the number of displaying characters for variable names .......................................... 8 - 22
8.7.5
Changing display format of variable........................................................................................... 8 - 23
Editing Ladder Blocks
8 - 26
8.8.1
Inserting ladder blocks ............................................................................................................... 8 - 26
8.8.2
Deleting ladder blocks................................................................................................................ 8 - 26
8.8.3
Cutting, copying, pasting, and moving ladder blocks ................................................................. 8 - 27
8.8.4
Editing ladder block headers...................................................................................................... 8 - 28
8.8.5
Editing listed ladder blocks......................................................................................................... 8 - 29
8.8.6
Setting ladder block labels/titles................................................................................................. 8 - 30
8.8.7
Switching to display/hide left power rail ..................................................................................... 8 - 30
8.8.8
Displaying grid............................................................................................................................ 8 - 31
Editing Comments
8 - 32
8.9.1
Editing comments....................................................................................................................... 8 - 32
8.9.2
Changing the size of comment entry field .................................................................................. 8 - 32
8.9.3
Moving comments ...................................................................................................................... 8 - 33
8.10
8.11
9
Editing in Guided Mode
8 - 34
8.10.1
Overwrite mode and insert mode ............................................................................................... 8 - 34
8.10.2
Entering ladder symbols ............................................................................................................. 8 - 35
8.10.3
Entering instructions ................................................................................................................... 8 - 35
8.10.4
Connecting ladder symbols with lines ........................................................................................ 8 - 35
8.10.5
Drawing lines .............................................................................................................................. 8 - 36
8.10.6
Wrapping ladder ......................................................................................................................... 8 - 37
8.10.7
Setting Guided mode as the default editing mode...................................................................... 8 - 37
8.10.8
Entering variable names after contacts and coils ....................................................................... 8 - 37
8.10.9
Inserting comment entry fields to ladder blocks to be added ..................................................... 8 - 38
Checking Wrapping Position for Printing
8 - 39
SEARCHING FOR SPECIFIC POSITION
9.1
9.2
9 - 1 to 9 - 4
Searching for Specific Position in ST Program
9-2
9.1.1
Jumping to specified line .............................................................................................................. 9 - 2
9.1.2
Using bookmarks.......................................................................................................................... 9 - 2
Searching for Specific Position in Structured Ladder/FBD Program
9.2.1
9-4
Jumping to specified ladder block number ................................................................................... 9 - 4
10 CONVERTING/COMPILING PROGRAMS
10 - 1 to 10 - 24
10.1
Converting/Compiling Created Programs
10 - 2
10.2
Compiling All Programs
10 - 4
10.3
Executing Online Program Change Simultaneously with Conversion/Compilation
10 - 6
10.4
Changing Operating Conditions of Compilation
10 - 6
10.5
10.6
10.4.1
Changing the number of errors and warnings that stop compilation .......................................... 10 - 6
10.4.2
Hiding warning messages .......................................................................................................... 10 - 7
10.4.3
Using same name for global label and local label ...................................................................... 10 - 8
10.4.4
Using same lower case label name as device............................................................................ 10 - 8
10.4.5
Connecting PLS, PLF, or ALT outputs directly to other inputs with lines ................................... 10 - 9
10.4.6
Assigning common devices to outputs of function with EN/ENO ............................................. 10 - 10
10.4.7
Retaining bit type outputs of functions...................................................................................... 10 - 13
Compilation
10.5.1
Compilation target data when compiling all programs.............................................................. 10 - 14
10.5.2
Assigning devices..................................................................................................................... 10 - 15
10.5.3
Precautions on Compilation...................................................................................................... 10 - 18
Checking for Errors and Warnings
10.6.1
10 - 22
Correcting errors and warnings ................................................................................................ 10 - 23
11 WRITING/READING DATA TO/FROM PROGRAMMABLE CONTROLLER CPU
11.1
10 - 14
Writing/Reading Data to/from Programmable Controller CPU
11 - 1 to 11 - 6
11 - 2
A-9
12 MONITORING
12 - 1 to 12 - 10
12.1
Starting and Stopping Monitoring of Program
12 - 2
12.2
Starting and Stopping Monitoring of Function Blocks
12 - 3
12.3
Changing Operating Conditions of Monitoring
12 - 4
12.3.1
Changing current value display format (decimal/hexadecimal) of word type variable ............... 12 - 4
12.3.2
Setting the number of displaying characters for character strings ............................................. 12 - 5
12.4
Monitoring Programs on ST Editor
12 - 6
12.5
Monitoring Programs in Structured Ladder/FBD Editor
12 - 8
13 USING USER LIBRARIES
13 - 1 to 13 - 16
13.1
User Libraries
13 - 2
13.2
Procedure for Using User Library
13 - 3
13.3
Creating User Library
13 - 4
13.4
13.3.1
Creating user libraries ................................................................................................................ 13 - 4
13.3.2
Changing library name ............................................................................................................... 13 - 5
13.3.3
Creating data.............................................................................................................................. 13 - 5
13.3.4
Saving library file........................................................................................................................ 13 - 6
13.3.5
Deleting user library from project ............................................................................................... 13 - 8
13.3.6
Setting password to user library................................................................................................. 13 - 9
13.3.7
Set help file to library................................................................................................................ 13 - 10
Using User Library
13 - 11
13.4.1
Installing user library data to project ........................................................................................ 13 - 11
13.4.2
Creating programs using user library ....................................................................................... 13 - 12
13.4.3
Editing user library ................................................................................................................... 13 - 13
13.4.4
Updating user library ................................................................................................................ 13 - 15
13.4.5
Displaying user library help ...................................................................................................... 13 - 16
14 SETTING OPTIONS
14 - 1 to 14 - 6
14.1
Basic Operations
14 - 2
14.2
Option Setting List
14 - 3
APPENDIX
App - 1 to App - 20
Appendix 1 List of Toolbars and Shortcut Keys
Appendix 1.1
A - 10
App - 2
Common toolbars and shortcut keys............................................................................... App - 2
Appendix 1.2
"Navigation Window" toolbar icons ................................................................................. App - 6
Appendix 1.3
Toolbar icons and shortcut keys for setting labels .......................................................... App - 7
Appendix 1.4
Toolbar icons and shortcut keys for setting device memory ........................................... App - 8
Appendix 1.5
Toolbar icons and shortcut keys for verification result .................................................... App - 9
Appendix 1.6
Toolbar icons for executing sampling trace..................................................................... App - 9
Appendix 1.7
Toolbar icons and shortcut keys for program editors .................................................... App - 10
Appendix 1.8
Toolbar icons and shortcut keys for I/O system setting function................................... App - 19
Appendix 1.9
Shortcut keys for operating intelligent function module................................................. App - 20
INDEX
Index - 1 to Index - 3
A - 11
■
MANUALS
Related manuals are separately issued according to the purpose of their functions in GX Works2.
● Related manuals
The manuals related to this product are shown below.
Refer to the following tables when ordering required manuals.
1)
Manual name
Manual number
(Model code)
GX Works2 Version 1 Operating Manual (Common)
Explains the system configuration of GX Works2 and the functions common to Simple project and
Structured project such as parameter setting, operation method for the online function.
(Sold separately)
SH-080779ENG
(13JU63)
GX Works2 Version 1 Operating Manual (Simple Project)
Explains operation methods such as creating and monitoring programs in Simple project of GX Works2.
(Sold separately)
SH-080780ENG
(13JU64)
GX Works2 Version 1 Operating Manual (Intelligent Function Module)
Explains operation methods of intelligent function module such as parameter setting, monitoring
programs, and predefined protocol support function in GX Works2.
(Sold separately)
SH-080921ENG
(13JU69)
GX Works2 Beginner's Manual (Simple Project)
Explains fundamental operation methods such as creating, editing, and monitoring programs in Simple
project for users inexperienced with GX Works2
(Sold separately)
SH-080787ENG
(13JZ22)
GX Works2 Beginner's Manual (Structured Project)
Explains fundamental operation methods such as creating, editing, and monitoring programs in
Structured project for users inexperienced with GX Works2.
(Sold separately)
SH-080788ENG
(13JZ23)
2)
A - 12
Operation of GX Works2
Structured Programming
Manual name
Manual number
(Model code)
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
Explains the programming methods, types of programming languages, and other information required to
create structured programs.
(Sold separately)
SH-080782ENG
(13JW06)
MELSEC-Q/L Structured Programming Manual (Common Instructions)
Explains the specifications and functions of common instructions such as sequence instructions, basic
instructions, and application instructions that can be used in structured programs.
(Sold separately)
SH-080783ENG
(13JW07)
MELSEC-Q/L Structured Programming Manual (Application Functions)
Explains the specifications and functions of application functions that can be used in structured
programs.
(Sold separately)
SH-080784ENG
(13JW08)
MELSEC-Q/L Structured Programming Manual (Special Instructions)
Explains the specifications and functions of special instructions such as module dedicated instruction,
PID control instruction, and built-in I/O function dedicated instruction, that can be used in structured
programs.
(Sold separately)
SH-080785ENG
(13JW09)
FXCPU Structured Programming Manual (Device & Common)
Explains the devices and parameters provided in GX Works2 for structured programming.
(Sold separately)
JY997D26001
(09R925)
FXCPU Structured Programming Manual (Basic & Applied Instruction)
Explains the sequence instructions provided in GX Works2 for structured programming.(Sold separately)
JY997D34701
(09R926)
FXCPU Structured Programming Manual (Application Functions)
Explains the application functions provided in GX Works2 for structured programming. (Sold separately)
JY997D34801
(09R927)
3)
Operation of iQ Works
Manual name
Manual number
(Model code)
iQ Works Beginner’s Manual
Explains fundamental operation methods such as managing the system using MELSOFT Navigator and
using system labels for users inexperienced with GX Works2.
(Sold separately)
SH-080902ENG
(13JZ44)
The Operating Manuals are included on the CD-ROM of the software package in a PDF file format.
Manuals in printed form are sold separately for single purchase. Order a manual by quoting the manual
number (model code) listed in the table above.
A - 13
● Purpose of this manual
This manual explains the operations for creating sequence programs in Structured project using the
functions supported by GX Works2.
Manuals for reference are listed in the following table according to their purpose.
For information such as the contents and number of each manual, refer to the list of 'Related
manuals'.
1)
Operation of GX Works2
Purpose
Installation
Learning the operating
environment and
installation method
GX Works2
Installation
Instructions
GX Works2
Beginner's Manual
Simple
Project
Structured
Project
Learning the operations
of available functions
regardless of project
type.
Learning the functions
and operation methods
for programming
Learning data setting
methods for intelligent
function module
A - 14
Structured
Project
Details
Details
Intelligent
Function
Module
Outline
Learning the project
types and available
languages in GX Works2
Learning the basic
operations and operating
procedures when
creating a structured
project for the first time
Simple
Project
Details
Learning all functions of
GX Works2
Operation of
GX Works2
Common
Details
Learning a USB driver
installation method
Learning the basic
operations and operating
procedures when
creating a simple project
for the first time
GX Works2 Version 1
Operating Manual
Outline
Details
Details
Details
Outline
Details
2)
Operations in each programming language
For details of instructions used in each programming language, refer to the section 3 on the next
page.
Purpose
GX Works2
Beginner's Manual
Simple
Project
GX Works2 Version 1
Operating Manual
Structured
Project
Ladder
Simple
Project
Structured
Project
Details
Outline
Simple
Project
SFC
*1
Details
Outline
ST
Details
Outline
Ladder
Details
Outline
SFC
Structured
Project
*1
Details
Outline
Structured ladder/
FBD
Details
Outline
ST
Details
Outline
*1: MELSAP3 and FX series SFC only
A - 15
3)
Details of instructions in each programming language (for QCPU (Q mode)/LCPU)
Purpose
MELSECQ/L/F
Structured
Programming
Manual
Fundamentals
All
languages
MELSEC-Q/L Structured
Programming Manual
Common
Instructions
Special
Instructions
Application
Functions
Learning details of
programmable
controller CPU
error codes,
special relays,
and special
registers
SFC
Learning the
types and details
of instructions for
intelligent function
modules
Details
Details
Learning details of
specifications,
functions, and
instructions of
SFC (MELSAP3)
Learning the
types and details
of common
instructions
Learning the
types and details
Using
of instructions for
structured intelligent function
ladder/FBD modules
or ST
Learning the
types and details
language
of instructions for
network modules
Learning the
types and details
of instructions for
the PID control
function
Learning the
types and details
of application
functions
-
Details
Learning the
types and details
of instructions for
network modules
Learning the
fundamentals for
creating a
Structured
program
A - 16
PID Control
Instructions
Manual
for
module
to be
used
Details
Learning the
types and details
of instructions for
the PID control
function
Using SFC
language
Common
Instructions
MELSEC-Q/L/QnA
Programming Manual
Details
Learning the
types and details
of common
instructions
Using
ladder
language
MELSECQ/L
Programming
Manual
Details
Details
Details
Details
Outline
Details
Outline
Details
Outline
Details
4)
Details of instructions in each programming language (for FXCPU)
Purpose
MELSECQ/L/F
Structured
Programming
Manual
Fundamentals
Using
ladder
language
Learning the
types and details
of basic/
application
instructions,
descriptions of
devices and
parameters
Using SFC
language
Learning details of
specifications,
functions, and
instructions of
SFC
Learning the
fundamentals for
creating a
structured
program
Learning the
descriptions of
Using
devices,
structured parameters, and
ladder/FBD error codes
or ST
Learning the
language
types and details
of sequence
instructions
Learning the
types and details
of application
instructions
FXCPU Structured Programming Manual
Device &
Common
Basic &
Applied
Instruction
Application
Functions
FXCPU Programming Manual
FX0, FX0S,
FX0N, FX1,
FXU, FX2C
FX1S, FX1N,
FX2N, FX1NC,
FX2NC
FX3G, FX3U,
FX3UC
Details
Details
Details
Details
Details
Details
Details
Details
Details
Details
A - 17
● How to read this manual
Screen display
Describes the screen display
procedure.
Follow the
and select
[(menu)] to open the screen.
*Screen display may depend on
the CPU.
In that case, typical example is
described.
Display contents
Describes the display contents
in the screen.
Operating procedure
Describes the operating
procedure of the function.
Reference location
leads to the reference
location and reference manual.
Screen button
Describes the buttons in the
screen.
Section title
Clarifies the section of currently
open page.
A - 18
Supported CPU
Chapter heading
Supported programmable
controller CPUs are shown in
icons under the section title.
Index on the right of the page
number clarifies the chapter of
currently open page.
The following table explains the CPU module icons that indicate the function availability.
Icon
QCPU (Q mode)
LCPU
FXCPU
Q CPU
L CPU
FX
-
-
L CPU
FX
*1
Q CPU
Q CPU
Description
Normal icons indicate that the corresponding function
is available.
Icons with * (asterisk) symbol indicate that the
corresponding function is available with restrictions
such as CPU types.
Icons with
symbol indicate that the corresponding
function is not available.
This manual also uses the following columns:
This explains notes for requiring attention or useful functions relating to the information given on the
same page.
Restrictions
This explains restrictions relating to the information given on the same page.
A - 19
● Symbols used in this manual
The following shows the symbols used in this manual with descriptions and examples.
1
2
3
4
5
6
No.
1
Symbol
[
]
(Underline)
4
5
A - 20
Menu name on a menu bar
Example
[Project]
Toolbar icon
2
3
Description
"
"
Screen name
Q Parameter Setting screen
Tab name in a screen
<<PLC System>>
Item name in a screen
"Timer Limit Setting"
6
Button on a screen
−
Keyboard key
button
■
GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL
This manual uses the generic terms and abbreviations listed in the following table to discuss the
software packages and programmable controller CPUs. Corresponding module models are also listed if
needed.
Generic term and abbreviation
Description
GX Works2
Generic product name for SWnDNC-GXW2-E
(n: version)
Existing application
-
GX Developer
Generic product name for SWnD5C-GPPW-E, SWnD5C-GPPW-EA, SWnD5C-GPPW-EV,
and SWnD5C-GPPW-EVA
(n: version)
GX IEC Developer
Generic product name for SWnD5C-MEDOC3
(n: version)
MELSOFT Navigator
Product name for the integrated development environment included in SWnDNC-IQWK (iQ
Platform compatible engineering environment MELSOFT iQ Works)
(n: version)
iQ Works
Abbreviation for iQ platform supporting engineering environment MELSOFT iQ Works
Personal computer
Generic term for personal computer on which Windows® operates
Basic model QCPU
Generic term for Q00J, Q00, and Q01
High Performance model QCPU
Generic term for Q02, Q02H, Q06H, Q12H, and Q25H
Universal model QCPU
Generic term for Q00UJ, Q00U, Q01U, Q02U, Q03UD, Q03UDE, Q04UDH, Q04UDEH,
Q06UDH, Q06UDEH, Q10UDH, Q10UDEH, Q13UDH, Q13UDEH, Q20UDH, Q20UDEH,
Q26UDH, Q26UDEH, Q50UDEH, and Q100UDEH
QCPU (Q mode)
Generic term for Basic model QCPU, High Performance model QCPU, and Universal
model QCPU
LCPU
Generic term for L02, L02-P, L26-BT, and L26-PBT
FXCPU
Generic term for FX0, FX0S, FX0N, FX1, FXU, FX2C, FX1S, FX1N, FX1NC, FX2N, FX2NC, FX3G,
FX3U, and FX3UC
FXGP(WIN)
Abbreviation for SW0PC-FXGP/WIN-E
MELSAP3
Abbreviation for the SFC function in MELSAP3 display format
MELSAP-L
Generic term for the SFC function in MELSAP-L (instruction format) and MELSAP-L (start
conditions format)
SFC
Generic term for MELSAP3, MELSAP-L, and FX series SFC
■
TERMS
The following are the terms used in this manual.
Term
Description
Simple project
Generic term for projects created by using the ladder/SFC/ST language
Structured project
Generic term for projects created by using the ladder/SFC/ST/structured ladder/FBD language
Common instruction
Generic term for sequence instructions, basic instructions, application instructions, data link
instructions, multiple CPU dedicated instructions, and multiple CPU high-speed transmission
dedicated instructions
Special instruction
Generic term for module dedicated instructions, PID control instructions, socket communication
function instructions, built-in I/O function instructions, and data logging function instructions
List format
An input format to input mnemonic language in a ladder program
A - 21
MEMO
A - 22
OVERVIEW
2
SCREEN
CONFIGURATION
1
OVERVIEW
1
This manual explains specific operating procedures using Structured project.
For the full product features and functions of GX Works2, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
What is Structured Project? . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Features of Structured Project. . . . . . . . . . . . . . . . . . . . . . . . . 1-2
List of Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-5
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
1.1
1.2
1.3
1-1
GX Works2
1 OVERVIEW
1.1
What is Structured Project?
In Structured project, programs can be created using the structured programming.
By segmenting the control functions and creating components from commonly used parts of programs, this
type of programming (structured programming) is easy to understand visually, and created components are
highly reusable to other programs.
1.2
Features of Structured Project
This section explains the features of Structured project.
■
Various programming languages are available
Various programming languages are available for structured programs. Users can combine these
languages by selecting the most appropriate programming language for each purpose to create
programs.
Table 1.2-1 Programming languages supported by Structured project
Type
Name
Description
Ladder*1
Ladder diagram
A graphic language using ladders composed of contacts and coils.
Can be operated in a similar way to existing GX Developer
operation.
ST
Structured text
A high-level structured text language with grammatical structure
similar to C language.
SFC*1
Sequential function chart
A graphic language in which executing orders and executing
conditions of programs are defined.
Structured ladder
Ladder diagram
A graphic language using ladders composed of contacts and coils,
which can be inserted flexibly.
FBD
Function block diagram
A graphic language using ladders by connecting functions and/or
function blocks with lines.
*1: Not supported by FXCPU.
■
Common program editors for each programmable controller CPU
The program editors of Structured project can be used for any type of programmable controller CPU
supported by GX Works2. Users can select the desired programming languages regardless of the
target programmable controller CPU.
For details of the programmable controller CPUs supported by GX Works2, refer to the following
manual.
GX Works2 Version 1 Operating Manual (Common)
1-2
1.2 Features of Structured Project
■
1
Creating large programs efficiently with structured programming
In Structured project, programs can be easily structured by managing program components in a
OVERVIEW
hierarchy.*1
Programs that are easy to maintain and highly reusable can be created efficiently by structuring
programs. This is suitable for developing large programs.
2
Project
Program file 2
Task 1
Task 2
SCREEN
CONFIGURATION
Program file 1
Task 3
*1 : A program is created in units of POUs (abbreviation for Program Organization Units) such as program
blocks (PRGs), functions (FUNs), and function blocks (FBs). Function blocks can be nested in a
hierarchy. Created programs are registered to the tasks of program files.
4
Assets of programs are utilized as libraries
In Structured project, sequence program components can be saved as libraries which can be utilized as
assets of programs in multiple projects.
Register to
libraries
5
SETTING LABELS
GX Works2
PROGRAM
CONFIGURATIONS
■
PROGRAMMING
PROCEDURE
3
Library
COMMON OPERATIONS
OF PROGRAM EDITORS
6
Utilize programs
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
1-3
GX Works2
1 OVERVIEW
■
Assets of past programs can be utilized
In GX Works2, sequence programs created with previous versions of GX Developer and GX IEC
Developer can be imported, which enables efficient utilization of program assets.
GX Works2
Utilize the assets of
past programs
GX Developer
1-4
GX IEC Developer
1.3 List of Functions
List of functions common to Simple project and Structured
project
This section explains the functions common to Simple project and Structured project.
The following tables show functions that are available regardless of the type of editing or setting target.
Project (common function)
New
Create a new project.
Open
Open an existing project.
Close
Close an open project.
Save
Save a project.
Save As
Name and save a project.
Compress/Unpack
Compress
Compress and save a project.
Unpack
Unpack a compressed project.
Delete
Delete an existing project.
Verify
Verify between two project data.
Project Revision
Revision List
SCREEN
CONFIGURATION
5
(Common)
6
-
Register the project change history.
Display the list of project change history.
Change PLC Type
Change the programmable controller CPU type.
Change Project Type
Change the project type from Simple project (without labels)
to Simple project (with labels), or from Simple project (with
labels) to Structured project.
Object
(Common)
7
-
New
Add data to a project.
Rename
Rename the selected data.
Delete
Delete the selected data.
Copy
Copy the selected data.
Paste
Paste the copied data.
Set as Default Connection
Specify data in selected connection target as a connection
target for regular use.
Property
Display the selected data properties.
1.3.1 List of functions common to Simple project and Structured project
(Common)
8
EDITING STRUCTURED
LADDER PROGRAMS
Revision Entry
Reference
PROGRAM
CONFIGURATIONS
4
List of common functions
SETTING LABELS
■
3
COMMON OPERATIONS
OF PROGRAM EDITORS
1.3.1
2
PROGRAMMING
PROCEDURE
This section shows the list of functions of GX Works2.
The functions are divided into common functions available (Project, Online, Debug, Diagnostics, Tool,
Window, and Help) and functions used for each editing and setting target (Edit, Find/Replace, Compile, and
View).
For (Common), (Simple), and (Intelligent) indicated in the Reference column, refer to the following manuals
respectively:
(Common) .............GX Works2 Version 1 Operating Manual (Common)
(Simple).................GX Works2 Version 1 Operating Manual (Simple Project)
(Intelligent) ............GX Works2 Version 1 Operating Manual (Intelligent Function Module)
OVERVIEW
1
List of Functions
EDITING ST
PROGRAMS
1.3
1-5
GX Works2
1 OVERVIEW
Project (common function)
Intelligent Function Module
-
New Module
Add new intelligent function module data.
Delete Module
Delete intelligent function module data.
Property
Display properties of an intelligent function module data.
Save the Positioning Module Data
Save data of the positioning module selected on the Project
view to a file.
Read from the Positioning Module
Data
Read data from the positioning module and reflect it to the
positioning module selected on the Project view.
Intelligent Function Module Parameter
List
Display a list of set/unset parameters of an intelligent
function module.
Open Other Data
Open a project created with GX Developer.
Read ASC Format File
Read an ASC format file.
Import GX Configurator-QP Data
Read a project created with GX Configurator-QP.
(Intelligent)
(Common)
-
Create
Create a new library.
Install
Import a created library to the project.
Deinstall
Delete a library from the project.
Reload
Update the library imported to the project.
Rename
Rename a library.
Open
Enable editing of a library.
Close
Disable editing of a library.
Change Password
Set a password for a library.
Save As
Name and save a project.
Save
Save a library file.
Help
Display help information of the library.
Security
Chapter 13
-
Change Password
Change the password of the current login user.
User Management
Manage user information of the project.
Add/delete a user or change the user information.
Data Security Setting
Set the access authorization of each user related to
reading/writing data.
Print
Batch print multiple data in the project.
Print Preview
Display a print preview of data to be batch printed.
Print Window
Print the open screen.
Print Window Preview
Display the print preview of the open screen.
Printer Setup
Change the printer settings.
(Recently used files 1 to 4)
Display the recently used GX Works2 project paths and open
the selected project.
Start GX Developer
Start GX Developer from GX Works2.
Exit
Exit GX Works2.
Edit (common function)
1-6
(Common)
Save an open project in GX Developer format.
Library
Undo
(Intelligent)
-
Open Other Project
Export to GX Developer Format File
Reference
(Common)
Reference
Restore the previous processing status.
Redo
Restore the processing deleted with [Undo].
Cut
Cut the selected data.
Copy
Copy the selected data.
Paste
Paste the cut or copied data at the cursor position.
1.3.1 List of functions common to Simple project and Structured project
-
1.3 List of Functions
1
Find/Replace (common function)
Reference
Display the usage of selected device or label.
Search an instruction.
Find Contact or Coil
Search a contact or coil corresponding to the specified
device.
2
Find String
Search a string.
Replace a device/label in the program.
Replace Instruction
Replace an instruction.
Replace String
Replace a string.
Change Open/Close Contact
Change an open contact to a closed contact, or change a
closed contact to an open contact.
Device Batch Replace
Batch-replace devices with the specified device.
Register to Device Batch Replace
Register selected devices on the Device Batch Replace
screen.
Compile (common function)
Build
Convert/compile a program being edited.
Online Program Change
Write sequence programs to a programmable controller CPU
after the conversion/compilation.
Rebuild All
Convert/compile all programs in the project.
View (common function)
Toolbar
(Common)
3
Reference
Section 10.1
(Common)
Section 10.2
Reference
-
Display/hide each toolbar.
Display/hide the status bar.
Color and Font
Set the display color for characters such as labels, device
comments on the work window.
Docking Window
(Common)
-
Navigation Window
Display/hide the Navigation window.
Function Block Selection Window
Display/hide the Function Block Selection window.
Select a part such as FB or function on the window for
utilizing it to a program.
Section 6.2.1
Output Window
Display/hide the Output window.
In the Output window, the conversion (compilation) result is
displayed.
Section 10.6
Cross Reference
Display/hide the Cross Reference window.
In the Cross Reference window, devices/labels used in the
project are displayed.
Device List
Display/hide the Device List window.
In the Device List window, the usage of selected device is
displayed.
Watch 1 to 4
Display/hide the Watch window.
In the Watch window, the monitoring result is displayed.
5
6
(Common)
7
-
Intelligent Function Module Monitor
Display/hide the Intelligent Function Module Monitor window.
1 to 10
Intelligent Function Module Guidance
Display/hide the Intelligent Function Module Guidance
window.
Find/Replace
Display/hide the Find/Replace window.
In the Find/Replace window, the search/replace result is
displayed.
Debug Window
(Intelligent)
(Common)
-
Break Point Window
Display/hide the Break Point window.
Break Device Window
Display/hide the Break Device window.
Skip Range Window
Display/hide the Skip Range window.
1.3.1 List of functions common to Simple project and Structured project
(Common)
1-7
EDITING ST
PROGRAMS
Intelligent Function Module Monitor
(Common)
4
8
EDITING STRUCTURED
LADDER PROGRAMS
Toolbar name
Statusbar
PROGRAMMING
PROCEDURE
Replace Device
PROGRAM
CONFIGURATIONS
Search a device/label in the program.
SETTING LABELS
Display the usage of devices.
Find Device
COMMON OPERATIONS
OF PROGRAM EDITORS
Device List
SCREEN
CONFIGURATION
Find Instruction
OVERVIEW
Cross Reference
GX Works2
1 OVERVIEW
Online (common function)
Read from PLC
Read data from the programmable controller CPU.
Write to PLC
Write data to the programmable controller CPU.
Verify with PLC
Verify a project being edited against the data in the
programmable controller CPU.
Remote Operation
Remotely control RUN/PAUSE/STOP of the programmable
controller CPU from GX Works2.
Password/Keyword
New
Delete
Cancel the password/keyword set to the programmable
controller CPU.
Disable
Temporarily unlock the password/keyword set to the
programmable controller CPU.
PLC Memory Operation
(Common)
(Common)
-
Format PLC Memory
Format the programmable controller CPU memory.
Clear PLC Memory
Clear the programmable controller CPU memory.
Arrange PLC Memory
Arrange the programmable controller CPU memory.
(Common)
Delete data in the programmable controller CPU.
PLC User Data
-
Read PLC User Data
Read the programmable controller CPU user data.
Write PLC User Data
Write the programmable controller CPU user data.
Delete PLC User Data
Delete the programmable controller CPU user data.
Export to ROM Format
Copy the program memory data in the programmable
controller CPU to ROM.
Program Memory Batch Download
Transfer the content of program cache memory to program
memory in batch.
Latch Data Backup
(Common)
-
Backup
Back up device memory/file register/error history data to the
standard ROM.
Delete Backup Data
Delete the backup data in the programmable controller CPU.
PLC Module Change
1-8
Section 11.1
Set a password/keyword to the programmable controller
CPU.
Delete PLC Data
Reference
(Common)
-
Create Backup Data
Back up data in the programmable controller CPU to the
memory card.
Restore
Restore the backup data to another programmable controller
CPU.
Set Clock
Set the clock in the programmable controller CPU.
Register/Cancel Display Module Menu
Register/cancel menus to operate intelligent function module
using the LCPU display module menu.
1.3.1 List of functions common to Simple project and Structured project
(Common)
1.3 List of Functions
Online (common function)
Start Monitoring (All Windows)
Start monitoring of all open windows.
Stop Monitoring (All Windows)
Stop monitoring of all open windows.
Start Monitoring
Start monitoring of the open window.
Stop Monitoring
Stop monitoring of the open window.
Change Value Format (Decimal)
Display the current device value in decimal in program
monitoring.
Change Value Format (Hexadecimal)
Display the current device value in hexadecimal in program
monitoring.
Device/Buffer Memory Batch
Monitor device/buffer memory in batch.
Program List
Monitor the processing time of programs being executed.
Interrupt Program List
Monitor the number executions of interrupt programs.
Change Instance (Function Block)
Select an instance of the function block to be monitored.
SFC All Block Batch Monitoring
Batch monitor all blocks in the SFC program.
SFC Auto Scroll
Scroll the screen to display active steps automatically when
they are out of the screen during monitoring.
Watch
(Common)
2
Section 12.1
Section 12.3.1
(Common)
Section 12.2
(Simple)
-
Start Watching
Start monitoring the current values of registered devices/
labels and intelligent function module.
Stop Watching
Stop monitoring the current values of registered devices/
labels and intelligent function module.
Register Watch
Register the selected devices to the Watch window.
(Common)
Start/Stop Simulation
Start/stop simulation.
Instructions Unsupported by Simulation
Display a list of the instructions and devices used in the
program unsupported by the simulation function.
Modify Value
For ladder and SFC (Zoom) programs, change the ON/OFF
status and values of devices and labels used in the program.
Forced Input Output Registration/
Cancellation
Register/cancel the forced input/output of the device 'X'/'Y'.
Device Test with Execution Condition
Register Device Test with Execution
Condition
Register the device test with execution condition.
Check/Disable Register Device Test
with Execution Condition
Check/disable the registration of device test with execution
condition.
Batch Disable Device Test with
Execution Condition
Cancel the device test with execution condition in batch.
Sampling Trace
Reference
5
(Common)
SETTING LABELS
Debug (common function)
-
6
(Common)
Display the Sampling Trace screen.
Measure the scan time of a desired section.
(Common)
7
Stop the step execution.
Cancel
Cancel the step execution.
Break Execution
Execute the break execution.
Step Execution
Execute the step execution.
Execution Option
Display the "Execution Option" screen of the step execution.
(Common)
8
EDITING STRUCTURED
LADDER PROGRAMS
Stop
EDITING ST
PROGRAMS
Step Execution
3
4
Read local device data from the programmable controller
CPU and saves them to a personal computer in CSV format.
Local Device Batch Read + Save CSV
Scan Time Measurement
(Simple)
SCREEN
CONFIGURATION
Switch the mode of the open window to "Monitor (Write
Mode)" during monitoring.
PROGRAMMING
PROCEDURE
Monitor (Write Mode)
PROGRAM
CONFIGURATIONS
Monitor Mode
OVERVIEW
Switch the mode of the open window to "Monitor Mode"
during monitoring.
Open Sampling Trace
1
COMMON OPERATIONS
OF PROGRAM EDITORS
Monitor
Reference
1.3.1 List of functions common to Simple project and Structured project
1-9
GX Works2
1 OVERVIEW
Debug (common function)
Break Setting
-
Set/Cancel Break Point
Set a break point at the cursor position, or cancel the set
break point.
Enable/Disable Break Point
Enable/disable the break point at the cursor position.
Cancel All Break Points
Cancel all break points.
Break Point Window
Display the Break Point window.
Cancel All Break Devices
Cancel all break devices.
Break Device Window
Display the Break Device window.
Skip Setting
(Common)
-
Set/Cancel Skip Range
Set a skip range, or cancel the set skip range.
Enable/Disable Skip Range
Enable/disable the skip range at the cursor position.
Cancel All Skip Ranges
Cancel all skip ranges.
Skip Range Window
Display the Skip Range window.
Diagnostics (common function)
(Common)
Reference
Diagnose the operating status of the programmable
controller CPU.
PLC Diagnostics
Ethernet Diagnostics
Diagnose Ethernet.
CC IE Control Diagnostics
Diagnose CC-Link IE Controller Network.
CC IE Field Diagnostics
Diagnose CC-Link IE Field Network.
MELSECNET Diagnostics
Diagnose MELSECNET/10(H).
CC-Link Diagnostics
Diagnose CC-Link and CC-Link/LT.
System Monitor
Monitor the system status of the programmable controller
CPU.
Online Module Change
Change modules online.
Tool (common function)
IC Memory Card
(Common)
Reference
-
Read IC Memory Card
Read data from the IC memory card.
Write IC Memory Card
Write data to the IC memory card.
Check Program
Check programs of the project without labels and display
errors.
(Common)
(Simple)
Check Parameter
Check parameters and display errors.
(Common)
Options
Set various options.
Chapter 14
Key Customize
Change the settings of the shortcut keys.
(Common)
Device/Label Automatic-Assign Setting
Set device range to be automatically assigned to a label.
Section 5.7
Block Password
Set a block password to data.
Confirm Memory Size
Calculate the size of files to be written to the programmable
controller CPU.
Set TEL Data/Connect via Modem
1 - 10
Reference
(Common)
-
Line Connection
Connect the line.
Line Disconnection
Disconnect the line.
AT Command Registration
Register a modem between a personal computer and a
serial communication module, or a personal computer and
an FXCPU.
Phone Book
Set phone numbers of targets such as remote access
targets.
Options
Set options for TEL data.
LCPU Logging Configuration Tool
Start the LCPU logging configuration tool.
Ethernet Adapter Module Configuration Tool
Start the Ethernet adapter module configuration tool.
1.3.1 List of functions common to Simple project and Structured project
(Common)
1.3 List of Functions
1
Tool (common function)
Display the High-Speed Counter Monitor screen.
I/O Monitor
Display the I/O Monitor screen.
Check Intelligent Function Module Parameter
Check the duplication of devices set in the Auto refresh
function and display the result.
Check Auto Refresh Duplication
Intelligent Function Module Tool
-
2
(Common)
-
−
Analog Module
Offset/Gain Setting
Configure the offset/gain setting of the analog module.
Q61LD Two-Point Calibration
Setting
Configure the Q61LD two-point calibration setting.
Q61LD Default Setting
Configure the Q61LD default setting.
3
−
Temperature Input Module
PROGRAMMING
PROCEDURE
Configure the offset/gain setting of the temperature input
module.
Offset/Gain Setting
−
Temperature Control Module
Auto Tuning
Execute the auto tuning function of the temperature control
module.
Sensor Correction Function
Execute the sensor correction function of the temperature
control module.
(Intelligent)
Preset
Execute the preset function of the counter module.
QD75/LD75 Positioning Module
Positioning Monitor
−
Execute the positioning monitor.
Positioning Test
Execute the positioning test.
Wave Trace
Execute the wave trace.
Location Trace
5
Execute the location trace.
−
Serial Communication Module
Circuit Trace
Execute the circuit trace.
Predefined Protocol Support
Function
Start the predefined protocol support function.
Select a language used in a project.
Window (common function)
(Common)
Reference
Tile windows in overlapping display.
Tile Vertically
Tile windows vertically.
Tile Horizontally
Tile windows horizontally.
Arrange Icons
Arrange the icons at the bottom of the window.
Close All
Close all open windows.
Display the open window.
Window
Display a list of open windows.
Also open or arrange specified windows.
(Common)
6
7
EDITING ST
PROGRAMS
(Switch to other window)
4
PROGRAM
CONFIGURATIONS
−
Counter Module
Cascade
(Common)
SCREEN
CONFIGURATION
High-Speed Counter Monitor
SETTING LABELS
Display the Positioning Monitor screen.
OVERVIEW
-
Positioning Monitor
Language Selection
Reference
COMMON OPERATIONS
OF PROGRAM EDITORS
Built-in I/O Module Tool
EDITING STRUCTURED
LADDER PROGRAMS
8
1.3.1 List of functions common to Simple project and Structured project
1 - 11
GX Works2
1 OVERVIEW
Help (common function)
Display the GX Works2 Help screen.
GX Works2 Help
Operating Manual
Reference
(Common)
-
GX Works2 Beginner's Manual (Simple
Project)
GX Works2 Beginner's Manual
(Structured Project)
Operating Manual Common
Display the operating manuals.
(Common)
Operating Manual (Simple Project)
Operating Manual (Structured Project)
Operating Manual (Intelligent Function
Module)
About
■
Display product information such as the version.
List of functions for setting labels
The following table shows the functions for setting and editing labels.
Edit (function for label setting)
Delete
Delete the selected data.
Select All
Select all items.
New Declaration (Before)
Add a row above the cursor position.
New Declaration (After)
Add a row below the cursor position.
Delete Row
Delete a row at the cursor position.
Read from CSV File
Read label settings from the CSV file.
Write to CSV File
Write label settings to the CSV file.
System Label
1 - 12
Reference
-
Section 5.5.4
Section 5.8
-
Confirm Update of System Label
Database
Reflect system label information changed in another project
on global labels.
Import System Label
Import system label information and reflect it on global
labels.
Register Device Name of System
Label
Register a selected global label as a system label.
Disable System Label Relation
Disable the relation between a selected global label and a
system label.
Execute Verification Synchronous with
System Label
Resolve a mismatch when system label information contains
it.
1.3.1 List of functions common to Simple project and Structured project
Section 5.2
-
1.3 List of Functions
■
1
List of functions for editing device comments
-
2
Intelligent Function Module
Utilize sample comments of intelligent function module
device.
Clear All
Delete all device comment data.
Read from CSV File
Read device comments from the CSV file.
Write to CSV File
Write device comments to the CSV file.
Hide Bit Specification Information
Hide the bit-specified word device comment of the selected
row.
Show Bit Specification Information
Display the bit-specified word device comment of the
selected row.
Cut The Range including Hidden Bit
Specification Information
Cut data including hidden bit-specified comment.
Copy The Range including Hidden Bit
Specification Information
Copy data including hidden bit-specified comment.
Paste The Range including Hidden Bit
Specification Information
Paste data including hidden bit-specified comment.
■
(Common)
4
List of functions for setting device memory
The following tables show the functions for setting device memory.
Edit (function for setting device memory)
Delete
Delete the selected data.
Insert Row
Insert a row at the cursor position.
Input Device
Enter a device.
Paste Text
Enter a character string.
FILL
Set the same value to continuous devices simultaneously.
Find/Replace (function for setting device memory)
Find Device Cell
Search for a device.
View (function for setting device memory)
Display Mode
Display data in binary.
Octal
Display data in octal.
Decimal
Display data in decimal.
Hexadecimal
Display data in hexadecimal.
Float
Display data in real number.
String
Display data in character string.
String (ASCII only)
Display data in ASCII string.
Register
Setup
Reference
(Common)
Reference
(Common)
Reference
Display data in units of words.
32-bit
Display data in units of double words.
64-bit
Display data in units of 64 bits.
(Common)
8
(Common)
Change the editor size.
1.3.1 List of functions common to Simple project and Structured project
6
7
-
16-bit
5
-
-
Binary
3
PROGRAMMING
PROCEDURE
Utilize sample comments of SM/SD.
PROGRAM
CONFIGURATIONS
Special Relay/Special Register
SCREEN
CONFIGURATION
Import from Sample Comment
SETTING LABELS
Select all data being displayed.
COMMON OPERATIONS
OF PROGRAM EDITORS
Select All
Reference
EDITING ST
PROGRAMS
Delete the selected data.
1 - 13
EDITING STRUCTURED
LADDER PROGRAMS
Edit (function for editing device comments)
Delete
OVERVIEW
The following table shows functions for editing device comments.
GX Works2
1 OVERVIEW
Tool (function for setting device memory)
Read Device Memory from PLC
Read device memory data from the programmable controller
CPU.
Write Device Memory to PLC
Write device memory data to the programmable controller CPU.
Read from Excel File
Read data from an Excel file.
Write to Excel File
Write data to an Excel file.
■
Reference
(Common)
List of functions for verification result
The following tables show the functions for verification result.
Edit (function for verification result)
Write to CSV File
Write verification result to a CSV file.
Find/Replace (function for verification result)
Next Unmatch
Move to the next mismatched data.
Previous Unmatch
Move to the previous mismatched data.
View (function for verification result)
1 - 14
Return to Result List
Return to the <<Verify Result List>> tab from the <<Detail
Verify Result>> tab.
Close Detail Result
Close the <<Detail Verify Result>> tab being displayed.
Close All Detail Result
Close all <<Detail Verify Result>> tabs being displayed.
1.3.1 List of functions common to Simple project and Structured project
Reference
(Common)
Reference
(Common)
Reference
(Common)
1.3 List of Functions
■
1
List of functions for executing sampling trace
Switching Display Items
(Common)
2
-
Device
Address
Comment
Display/hide the display item titles.
(Common)
Data Types
Radix
Timing Chart Scale
-
Narrow Scale
Change the display width of the timing chart scale.
Wide Scale
Trend Graph Scale
(Common)
-
Narrow Scale
Wide Scale
Change the display width of the trend graph scale.
(Common)
Initial Display
-
Past Time
Display/hide the additional information.
Program Name
Debug (function for executing sampling trace)
(Common)
4
Reference
-
Display the Sampling Trace screen.
Trace Setting
Display the screen on which the sampling trace conditions
are set.
Start Trace
Start sampling trace.
Stop Trace
Suspend sampling trace.
Execute Manual Trigger
Generate a trigger at any given timing.
Register Trace
Write trace settings to the programmable controller CPU.
Execute this to control the sampling trace start by a
sequence program.
Sampling trace starts when the Trace start command
(SM801) is executed after executing "Register Trace".
Forced Execution Registration
Effective
Enable to execute the sampling trace from the peripherals.
Display Trace Buffer Condition
Display trace data storage status.
Export CSV Data
Save the trace data (trace settings + results) to a personal
computer in CSV file format.
Read from PLC
Read the sampling trace data (trace settings + results) from
the programmable controller CPU.
Write to PLC
Write the trace data (trace settings + results) to the
programmable controller CPU.
Delete All Data
Delete all information including the device data registered
and the sampling trace result displayed on the Sampling
Trace screen.
5
SETTING LABELS
Open Sampling Trace
6
(Common)
7
EDITING ST
PROGRAMS
Sampling Trace
3
PROGRAM
CONFIGURATIONS
Additional Information
SCREEN
CONFIGURATION
Display the trigger position.
PROGRAMMING
PROCEDURE
Move to Trigger Point
Reference
COMMON OPERATIONS
OF PROGRAM EDITORS
View (function for executing sampling trace)
Result Position
OVERVIEW
The following tables show the functions for executing sampling trace.
EDITING STRUCTURED
LADDER PROGRAMS
8
1.3.1 List of functions common to Simple project and Structured project
1 - 15
GX Works2
1 OVERVIEW
1.3.2
List of functions for editing in ladder language
For the functions for editing in the ladder language, refer to the following manual.
GX Works2 Version 1 Operating Manual (Simple Project)
1.3.3
List of functions for editing SFC diagrams
For the functions for editing SFC diagrams, refer to the following manual.
GX Works2 Version 1 Operating Manual (Simple Project)
1.3.4
List of functions for editing SFC block list
For the functions for editing SFC block list, refer to the following manual.
GX Works2 Version 1 Operating Manual (Simple Project)
1 - 16
1.3.2 List of functions for editing in ladder language
1.3 List of Functions
1.3.5
1
List of functions for editing in ST language
Delete the selected data.
List Operands
Display the screen for inserting a label by selecting an
existing label.
Display Template
Insert a template corresponds to the instruction, function, or
control syntax.
Mark Template (Left)
Set an argument of the template in the selected status from
the left by selecting the menu each time.
Mark Template (Right)
Set an argument of the template in the selected status from
the right by selecting the menu each time.
-
OVERVIEW
Edit (function for editing in ST language)
Delete
Section 6.2.2
2
Section 7.1.4
SCREEN
CONFIGURATION
The following tables show the functions for editing with the ST editor.
Reference
Jump to the specified row.
Bookmark
Section 9.1.1
-
Toggle Bookmark
Set a bookmark at the cursor row. The bookmark is deleted
when one is already set at the cursor row.
Bookmark List
Jump to the specified bookmark from the bookmark list.
Next Bookmark
Display the next bookmark position.
Previous Bookmark
Display the previous bookmark position.
Delete All Bookmarks
Cancels all bookmarks.
View (function for editing in ST language)
Display Compile Result
Display the compilation result in a list form.
Zoom
Section 9.1.2
Reference
Section 6.2.7
-
Increase Zoom
Change the display size of the program.
Section 6.2.9
Section 6.2.6
6
Section 6.2.4
Decrease Zoom
Zoom Header/Body
-
Header
Open the label setting screen in the selected POU.
Body
Open the program editor in the selected POU.
Open Header
Open the label setting screen for the program being edited.
Online (function for editing in ST language)
Monitor
Reference
-
Start Monitoring (Bit Type only)
Start monitoring only bit type devices/labels.
Section 12.4
7
EDITING ST
PROGRAMS
Start Monitoring
Start monitoring with the split window format that displays
monitor data of numeric value and character strings.
5
SETTING LABELS
Set Zoom Factor
4
PROGRAM
CONFIGURATIONS
Jump
Reference
COMMON OPERATIONS
OF PROGRAM EDITORS
Find/Replace (function for editing in ST language)
PROGRAMMING
PROCEDURE
3
EDITING STRUCTURED
LADDER PROGRAMS
8
1.3.5 List of functions for editing in ST language
1 - 17
GX Works2
1 OVERVIEW
1.3.6
List of functions for editing in structured ladder/FBD language
The following tables show the functions for editing with the structured ladder/FBD editor.
Edit (function for editing in structured ladder/FBD language)
Delete the selected data.
Select Mode
Change to the contact and coil input mode.
Section 8.4.1
Interconnect Mode
Change to the line drawing mode.
Section 8.3.2
Auto Connect
Specify and connect the start and end points to draw a line.
Section 8.3.3
Guided Mode
Change to the keyboard input mode.
Overwrite Mode
Overwrite the ladder symbol entered in Guided editing at the
cursor position.
Insert Mode
Insert the ladder symbol entered in Guided editing at the
cursor position.
Line Mode
Change the input format to draw lines in Guided editing.
Auto Comment
Add a comment entry field at the start of the ladder block
added in Guided editing.
Recalculate Line
Arrange a line automatically to redraw it.
Insert Row
Insert a row in a ladder being edited.
Insert Column
Insert a column in a ladder being edited.
Section 8.10
Section 8.3.5
Section 8.3.6
-
Top
Insert a new ladder block at the start of all ladder blocks.
Before
Insert a new ladder block in front of a ladder block being
edited.
After
Insert a new ladder block after a ladder block being edited.
Bottom
Insert a new ladder block at the end of all ladder blocks.
Input Instruction
-
-
Guided Editing
New Ladder Block List
Open a Input Instruction screen.
Ladder Symbol
1 - 18
Reference
Delete
Section 8.8.1
Section 8.2.2
-
Open Contact
Insert
at the cursor position.
Close Contact
Insert
at the cursor position.
Coil
Insert
at the cursor position.
Jump
Insert
at the cursor position.
Return
Insert
at the cursor position.
Open Branch
Insert
at the cursor position.
Close Branch
Insert
at the cursor position.
Input Label
Insert
at the cursor position.
Output Label
Insert
at the cursor position.
Horizontal Line Segment
Insert
at the cursor position.
Vertical Line Segment
Insert
at the cursor position.
Rising Pulse
Insert
at the cursor position.
Falling Pulse
Insert
at the cursor position.
Rising Pulse Close
Insert
at the cursor position.
Falling Pulse Close
Insert
at the cursor position.
Comment
Insert a comment entry field at the cursor position.
Ladder Block Label
Display the Ladder Block screen.
Left Power Rail
Display/hide the left power rail.
1.3.6 List of functions for editing in structured ladder/FBD language
Section 8.2.1
Section 8.8.7
1.3 List of Functions
1
Decrease the number of arguments of functions and function
blocks.
Ladder Block List
Display a list of ladder blocks in a program.
Signal Configuration
OVERVIEW
Delete
-
Section 8.6.3
2
-
Configure
Set the type of a contact and a coil.
Toggle
Change the contact and coil type per execution in the
following order.
• Contact: Open Contact → Close Contact
• Coil: Normal → Negation → Set → Reset
Find/Replace (function for editing in structured ladder/FBD language)
Jump
Jump to the specified ladder block number.
View (function for editing in structured ladder/FBD language)
Section 8.5
3
Reference
Section 9.2.1
Reference
View Mode
Label
Display a variable by its entered format.
Device
Display a device/address in device format. The variable is
displayed as an assigned device in device format.
Address
Display a device/address in address format. The variable is
displayed as an assigned device in address format.
Comment
Display a label comment.
Change Label-Device-Address Mode
Switch the display format in order (label, device, address).
Change Label-Comment Mode
Switch the display between label and comment.
All Device Display
Batch-change all labels on the program editors to the device
display.
Cancel All Device Display
Cancel the device display on the program editors, and
display data in the format at the time of data entry.
Grid
Show a grid on the screen being edited to display the start/
end positions of a line.
Section 8.7.5
Section 8.8.8
Display the wrapping position for printing.
Section 8.11
Display Compile Result
Display the compilation result in a list form.
Section 6.2.7
-
Set Zoom Factor
Increase Zoom
Change the display size of the program.
Section 6.2.4
Decrease Zoom
Zoom Header/Body
-
Header
Open the label setting screen in the selected POU.
Body
Open the program editor in the selected POU.
7
Section 6.2.6
EDITING ST
PROGRAMS
Open the label setting screen for a program being edited.
Section 6.2.9
6
8
EDITING STRUCTURED
LADDER PROGRAMS
Open Header
4
5
Print Wrap Position
Zoom
SCREEN
CONFIGURATION
Increment
Increase the number of arguments of functions and function
blocks.
PROGRAMMING
PROCEDURE
Number of Pins
Section 6.2.2
PROGRAM
CONFIGURATIONS
List Operands
Reference
SETTING LABELS
Display the screen for inserting a label by selecting an
existing label.
COMMON OPERATIONS
OF PROGRAM EDITORS
Edit (function for editing in structured ladder/FBD language)
1.3.6 List of functions for editing in structured ladder/FBD language
1 - 19
GX Works2
1 OVERVIEW
MEMO
1 - 20
1.3.6 List of functions for editing in structured ladder/FBD language
SCREEN CONFIGURATION
2
SCREEN
CONFIGURATION
2
OVERVIEW
1
This chapter explains the screen configuration of GX Works2.
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
Overview of Screen Configuration . . . . . . . . . . . . . . . . . . . . . 2-2
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
2.1
2-1
GX Works2
2 SCREEN CONFIGURATION
2.1
Overview of Screen Configuration
Q CPU L CPU
FX
This section explains the main frame (basic screen) of GX Works2 that is displayed when it is started up.
The following screen shows a main frame configuration in which a work window and docking windows are
displayed.
Screen display
Title bar
Menu bar
Toolbar
Navigation
window
Function Block
Selection window
Work
window
Docking window
Status bar
Display contents
Name
Title bar
Menu bar
Display menu options for executing each function.
Toolbar
Display tool buttons for executing each function.
Work window
A main screen used for operations such as programming,
parameter setting, and monitoring.
Docking window
A sub screen to support operations performed on a work
window.
Reference
−
−
Appendix 1
GX Works2 Version 1
Operating Manual
(Common)
Navigation window
Display contents of a project in tree format.
Function Block Selection window
Display a list of functions (such as function blocks) used for
programming.
Section 6.2.1
Output window
Display compilation and check results (errors and warnings).
Section 10.6
Cross Reference window
Display cross reference results.
Device List window
Display the device usage list.
Watch window 1 to 4
A screen used for monitoring and changing current device
values.
Intelligent Function Module
Monitor 1 to 10
A screen used for monitoring intelligent function modules.
Find/Replace window
A screen used for searching and replacing character strings
in the project.
Status bar
2-2
Description
Display a project name.
Display information about a project being edited.
Section 4.1
GX Works2 Version 1
Operating Manual
(Common)
PROGRAMMING
PROCEDURE
2
SCREEN
CONFIGURATION
3
OVERVIEW
1
This chapter explains how to create programs in Structured project.
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
Creating Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
3.1
3-1
GX Works2
3 PROGRAMMING PROCEDURE
3.1
Creating Programs
Q CPU L CPU
FX
This section explains the general operating steps from the creation of a program in Structured project to the
execution of the created program in the programmable controller CPU.
1.
Creating a new project
Procedure
Reference
Start up GX Works2.
Create a new Structured project.
To reuse an existing Structured project, open that Structured project.
2.
Setting parameters
Procedure
Reference
Set parameters.
GX Works2 Version 1
Operating Manual
(Common)
Check parameters.
3.
GX Works2 Version 1
Operating Manual
(Common)
Configuring programs
Procedure
Reference
Create program files.
Create tasks.
Chapter 4
Create POUs.
Register POUs (program blocks) to the tasks.
4.
Setting labels
Procedure
Reference
Define global labels.
Chapter 5
Define local labels.
(To the next page)
3-2
3.1 Creating Programs
1
Editing programs
Procedure
3
Compiling programs
Compile a program or compile all programs.
Reference
PROGRAMMING
PROCEDURE
Procedure
7.
2
SCREEN
CONFIGURATION
Edit programs of each POU.
6.
Reference
Chapter 6
Chapter 7
Chapter 8
Chapter 10
4
Connecting a personal computer to the programmable controller CPU
Procedure
Connect a personal computer to the programmable controller CPU.
Set the connection target.
Reference
GX Works2 Version 1
Operating Manual
(Common)
PROGRAM
CONFIGURATIONS
5.
OVERVIEW
(From the previous page)
Writing data to the programmable controller CPU
Write sequence programs to the programmable controller CPU.
9.
Reference
Chapter 11
6
COMMON OPERATIONS
OF PROGRAM EDITORS
Procedure
Write parameters to the programmable controller CPU.
Confirming the operation
Procedure
10.
7
Reference
Chapter 12
EDITING ST
PROGRAMS
Monitor the execution status of sequence programs.
Ending the project
Procedure
Save the project.
Exit GX Works2.
8
Reference
GX Works2 Version 1
Operating Manual
(Common)
3-3
EDITING STRUCTURED
LADDER PROGRAMS
8.
SETTING LABELS
5
GX Works2
3 PROGRAMMING PROCEDURE
MEMO
3-4
PROGRAM
CONFIGURATIONS
2
SCREEN
CONFIGURATION
4
OVERVIEW
1
In Structured project, sequence programs are configured by using tasks and POUs.
This chapter explains the program configurations of Structured project.
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
Program Configurations of Structured Project . . . . . . . . . . . 4-2
Creating Program Files and Tasks. . . . . . . . . . . . . . . . . . . . . . 4-3
Creating POUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-10
Using POUs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-14
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
4.1
4.2
4.3
4.4
4-1
GX Works2
4 PROGRAM CONFIGURATIONS
4.1
Program Configurations of Structured Project
Q CPU L CPU
FX
This section explains the configurations of Structured project that are displayed in a tree format in the Project
view.
For (Common) and (Intelligent) indicated as the reference, refer to the following manuals respectively:
(Common) .............GX Works2 Version 1 Operating Manual (Common)
(Intelligent) ............GX Works2 Version 1 Operating Manual (Intelligent Function Module)
*1
(Common)
(Intelligent)
(Common)
Define labels shared among POUs.
Section 5.2
*2
Define the program execution order and type.
Register program blocks to the task.
Define POUs.
(Common)
Section 4.2
Section 4.3
Program block
Write a program in the desired programming language.
Section 5.3
Program configuration
Define labels.
Chapter 6
Chapter 7
Chapter 8
Function block (FB)/Function (FUN)
Write a program in the desired programming language.
Section 5.4
Define labels.
Define structured data type.
Chapter 6
Chapter 7
Chapter 8
Section 5.6
(Common)
*1: For FXCPU, this item is not displayed.
*2: For FXCPU, no classification for program execution type. Only one item, "Execution Program", is
displayed.
4-2
4.2 Creating Program Files and Tasks
FX
This section explains how to register program blocks executed on the programmable controller CPU, and
setting the executing conditions of programs using program files and tasks.
For details of program files and tasks, refer to the following manual.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
Procedure for creating program files and tasks
1.
Creating a program file and task
Procedure
Reference
Create a program file.
• Select [Project] ⇒ [Object] ⇒ [New].
Create a task.
• Select the program file folder and perform the following operation.
Select [Project] ⇒ [Object] ⇒ [New].
2.
GX Works2 Version 1
Operating Manual
(Common)
Reference
Display the Task Setting screen.
• Select Project view ⇒ "Program Setting" ⇒ "(program setting)" ⇒ "(program file)" ⇒
"(task)".
Set program blocks to be registered to the task.
4
5
Registering program blocks to the task
Procedure
PROGRAMMING
PROCEDURE
3
The following explains the procedure for creating a program file and task.
PROGRAM
CONFIGURATIONS
4.2.1
2
SCREEN
CONFIGURATION
Q CPU L CPU
OVERVIEW
1
Creating Program Files and Tasks
GX Works2 Version 1
Operating Manual
(Common)
Section 4.2.2
SETTING LABELS
4.2
Setting the executing condition
Procedure
Reference
Set the executing condition of the program file on the <<Program>> tab of PLC parameter.
Set the executing condition on the Property screen of the task.
• Select the task and perform the following operation.
Select [Project] ⇒ [Object] ⇒ [Property].
GX Works2 Version 1
Operating Manual
(Common)
7
Section 4.2.3
EDITING ST
PROGRAMS
3.
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING STRUCTURED
LADDER PROGRAMS
8
4.2.1 Procedure for creating program files and tasks
4-3
GX Works2
4 PROGRAM CONFIGURATIONS
4.2.2
Registering program blocks to tasks
Register program blocks to a task and specify the executing order. Only the program blocks that are
registered to the task are compiled. (
Chapter 10)
Operating procedure
1.
Select Project view ⇒ "Program Setting" ⇒ "(program setting)" ⇒ "(program file)"
⇒ "(task)".
2.
Right-click and select [Open Task Setting] from the shortcut menu.
The Task Setting screen is displayed.
3.
Set the items on the screen.
Item
Maximum
number of
characters
Description
Enter a program block name.
Program Name
Click
screen.
to set a program block name on the Program Selection
32
Enter comments for the program block.
Comment
A new line can be inserted in a cell by pressing the
keys.
+
1024
● Program blocks that can be registered
A single program block can be registered to any one of tasks for only once. Only the program blocks that are not
registered to any of the tasks are displayed on the Program Selection screen.
● Executing order of program blocks registered to a task
Structured ladder/FBD or ST programs are executed in the order they are registered to a task.
SFC program is executed in the order of block number, regardless of the order they are registered to the task.
4-4
4.2.2 Registering program blocks to tasks
4.2 Creating Program Files and Tasks
A maximum number of tasks that can be created in a single project is 124. A maximum number of
program blocks that can be registered to tasks is 800.
However, the number of tasks that can be registered to a program file, the number of program blocks
that can be registered to a task, and the type of program block that can be registered to a single task
differ according to the selected programming language.
● Maximum number of tasks that can be created in a single program file and the maximum number of
program blocks that can be registered to a single task
Maximum number of tasks that can be
created in a single program file
Ladder
Maximum number of program blocks
that can be registered to a single task
1
1
SFC
ST
3
320*1
124
Structured ladder/FBD
320
*1: For Basic model QCPU/Q00UJ/Q00U/Q01U/Q02U/L02, the maximum number of SFC blocks is
128.
● Program block that can be registered to a single task
4
PROGRAM
CONFIGURATIONS
: Applicable ×: Not Applicable
Program block that can be registered to a single task
Programming language
Ladder
Ladder
SFC
ST
Structured
ladder/FBD
×
×
×
×
×
×
ST
×
×
Structured ladder/FBD
×
×
5
SETTING LABELS
SFC
2
PROGRAMMING
PROCEDURE
Programming language of
program block registered
to the first task
OVERVIEW
1
Registering tasks
SCREEN
CONFIGURATION
■
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
4.2.2 Registering program blocks to tasks
4-5
GX Works2
4 PROGRAM CONFIGURATIONS
■
Setting program names on the program selection screen
Set a program block on the Task Setting screen using the Program Selection screen.
Screen display
On the Task Setting screen, click
next to the "Program Name" entry field.
Operating procedure
1.
Select the reference source of the program block from the "Libraries" field.
Libraries
Description
<ALL>
Browse all program blocks defined in the project and libraries.
<Project>
Browse program blocks defined in the project.
(Library name)
Browse program blocks defined in the specified library.
2.
Select a program block from the "Programs" field.
3.
Click the
button when the setting is completed.
The selected program block is displayed on the Task Setting screen.
4-6
4.2.2 Registering program blocks to tasks
4.2 Creating Program Files and Tasks
4.2.3
1
Setting executing conditions
■
OVERVIEW
Set executing conditions for program files and tasks.
Executing conditions for program files (execution type)
2
SCREEN
CONFIGURATION
The executing conditions for program files are set on the <<Program>> tab of PLC parameter.
This function is not supported by FXCPU.
Screen display
Select Project view ⇒ "Parameter" ⇒ "PLC Parameter" ⇒ <<Program>>.
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
6
COMMON OPERATIONS
OF PROGRAM EDITORS
For details of the program executing conditions, refer to the following manual.
User's Manual (Function Explanation, Program Fundamentals) of the CPU module to be used
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
4.2.3 Setting executing conditions
4-7
GX Works2
4 PROGRAM CONFIGURATIONS
■
Task executing conditions
An executing condition for a program file can be set to a task.
A task executing condition is set on the Property screen of the task.
Select the task to be set in the Project view in advance.
Screen display
Select [Project] ⇒ [Object] ⇒ [Property].
Operating procedure
•
Set the items on the screen.
Item
Event
Description
TRUE
Execute the task in every scan.
FALSE
Execute the task in the cycle specified in the "Interval" field.
Attributes
Device or label name Execute the task when the specified device or label is TRUE.
Scan execution
Fixed scan execution
Event execution
Interval
Set the cycle time to execute the task in a constant cycle.
(Enter FALSE in the "Event" field.)
Set the cycle time in time type format
(Ex.: T#100ms, T#24d20h31m23s647ms).
For details of time type format, refer to the following manual.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
Do not set shorter time than the scan time of sequence program.
Priority
Set the task execution priority in the range from 0 to 31. Tasks with smaller values are
executed by priority.
Tasks of the same priority are executed in the alphabetical order of task data names.
Title
Enter a title of the task.
Timer/
Output
Control
4-8
Task executing
condition
Checked
The outputs and the current values of timers in the task are reset when the task is not
executed.
Not checked
The outputs and the current values of timers in the task are retained when the task is not
executed.
4.2.3 Setting executing conditions
4.2 Creating Program Files and Tasks
The following tables show the task executing order according to the set execution type (scan execution
(priority: high/low), fixed scan execution or event execution) in the task property setting.
Task1
Task attributes
Event
Interval
Priority
TRUE
0
31
Task executing condition
M0
0
31
Event execution
Task3
FALSE
T#100ms
31
Fixed scan execution
Task4
TRUE
0
30
Scan execution (priority: high)
SCREEN
CONFIGURATION
4
Scan execution (priority: low)
Task2
3
PROGRAM
CONFIGURATIONS
Task name
2
PROGRAMMING
PROCEDURE
● Interruption start for QCPU (Q mode)/LCPU
To enable an interruption start, set an interrupt pointer number (I0 to I31) in the "Event" field. In this case, create a
program using the basic instruction EI (Enable Interrupt) for the program blocks registered to scan execution tasks.
● Interruption start for FXCPU
The following shows the settings for FXCPU.
• I†01 (rising input interruption), I†00 (falling interruption)
• I6†† to I8†† (timer interruption)
• I010 to I060 (counter interruption)
For details, refer to the following manual.
FXCPU Structured Programming Manual [Device & Common]
● When the program block registered to the task is created in the ladder
When the program block registered to the task is created in the ladder, items of "Attributes" cannot be set.
● When the program end instruction is used
When the program end instruction such as the FEND or GOEND instruction is used, program blocks and/or tasks
following the program end instruction are not executed.
OVERVIEW
1
Executing order
Task name
Execution timing
1
Task4
Executed in every scan
2
Task1
Executed in every scan
3
Task2
When M0 turned ON
4
Task3
In every 100ms
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
4.2.3 Setting executing conditions
4-9
GX Works2
4 PROGRAM CONFIGURATIONS
4.3
Creating POUs
Q CPU L CPU
FX
This section explains how to create POUs.
A POU (abbreviation for Program Organization Unit) is a unit of program defined for each function.
4.3.1
Procedure for creating POUs
The following explains the procedure for creating a POU.
1.
Creating a new POU
Procedure
Create a POU.
• Select [Project] ⇒ [Object] ⇒ [New].
2.
Reference
GX Works2 Version 1
Operating Manual
(Common)
Setting local labels
Procedure
Display the Local Label Setting screen or Function/FB Label Setting screen.
• Select Project view⇒ "POU" ⇒ "Program" ⇒ "(POU)" ⇒ "Local Label".
Reference
Chapter 5
Set labels that are used only within the POU.
3.
Editing the program
Procedure
Display the program editor.
• Select Project view ⇒ "POU" ⇒ "Program" ⇒ "(POU)" ⇒ "Program".
Edit the program in the specified programming language.
4 - 10
4.3.1 Procedure for creating POUs
Reference
Chapter 6
4.3 Creating POUs
4.3.2
1
Setting properties of functions and function blocks
OVERVIEW
Set properties of a function and function block.
Select a function or function block to be set in the Project view in advance.
Screen display
2
<For function block>
SCREEN
CONFIGURATION
Select [Project] ⇒ [Object] ⇒ [Property].
<For function>
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
Operating procedure
Set the items on the screen.
Description
Click
*1, *2, *3
Use EN/ENO*1, *2
and select a data type from the list.
Checked
Apply function block program codes to each location where instances are used at
compilation.
Even if EN of the function block is OFF, the output variable is retained at ON. To turn
OFF the output variable when EN is OFF, select the "Use MC/MCR" check box below.
Not checked
Create function block program codes for each function block at compilation. Codes are
created to call function blocks for each location where instances are used. To call
function blocks, use automatically assigned devices.
(
Section 5.7)
Checked
Apply function block program codes using the MC/MCR instruction to each location
where instances are used at compilation.
Not checked
Apply function block program codes using the CJ instruction to each location where
instances are used at compilation.
Checked
Become a function or function block with EN/ENO.
Not checked
Become a function or function block without EN/ENO.
Use Macrocode*1, *2
Use MC/MCR
5
Set the data type of return value of the function.
Result Type
SETTING LABELS
Item
6
COMMON OPERATIONS
OF PROGRAM EDITORS
•
7
*1: This item cannot be selected when using ladder function blocks.
*3: This item can be selected only when the check boxes of both "Use Macrocode" and "Use EN/ENO" items are
checked.
EDITING ST
PROGRAMS
*2: This item cannot be selected when using ST function blocks in Simple project.
EDITING STRUCTURED
LADDER PROGRAMS
8
4.3.2 Setting properties of functions and function blocks
4 - 11
GX Works2
4 PROGRAM CONFIGURATIONS
● "Use MC/MCR"
• This check box can be checked only if both of the "Use EN/ENO" and "Use Macrocode" check boxes are
checked.
• If the MC/MCR instruction is used and the function block is not executed, the outputs and the current values of
timers in the function block are reset. (If the instruction is not used, the current values are retained).
● Return value of function
Program the function names as labels in a function to set a return value.
Setting function names as labels is not needed. Data type set on "Result Type" can be used.
Example: Set return value of function name "FUN_01" to 0
<Structured ladder/FBD>
<ST>
FUN_01 := 0;
● Applying function blocks to locations where instances are used
The following shows the example of codes when the following programs are compiled.
Note that devices are assigned as follows.
• Input1: X0
• Input2: X11
• Output1: D10
<The program at the location of use>
<Function block>
Use Macrocode
4 - 12
Code to be created in the program at the
location of use
Function block code
Applied
(The check box is checked.)
LD X0
AND X11
INCP D10
None
Not applied
(The check box is not checked.)
LD X0
OUT M4096
LD X11
OUT M4097
LD SM400
CALL P2048
LD SM400
MOV D6144 D10
P2048
LD M4096
AND M4097
INCP D6144
RET
4.3.2 Setting properties of functions and function blocks
4.3 Creating POUs
● When the "Use Macrocode" check box is not checked
Since pointers of automatically assigned devices are used, the number of function instances that can be created is
limited to the number of pointers or less specified on the Device/Label Automatic-Assign Setting screen.
(
Section 5.7)
Check the "Use Macrocode" check box, if the number of set pointers or more instances are required.
2
SCREEN
CONFIGURATION
● Using the MC/MCR instruction for EN control
OVERVIEW
1
The following shows the example of codes when the following programs are compiled.
Note that devices are assigned as follows.
• Input1: X0
• Input2: X11
• Output1: D10
3
PROGRAMMING
PROCEDURE
<The program at the location of use>
PROGRAM
CONFIGURATIONS
4
<Function block>
Code to be created in the program at the
location of use
Use MC/MCR
COMMON OPERATIONS
OF PROGRAM EDITORS
6
LD X0
AND X11
INCP D10
MCR N0
LD M40
OUT M41
LDI M40
CJ P2050
7
LD X0
AND X11
INCP D10
P2050
EDITING ST
PROGRAMS
MC/MCR is not used
(The check box is not checked.)
LD M40
OUT M41
MC N0 M4096
8
EDITING STRUCTURED
LADDER PROGRAMS
MC/MCR is used
(The check box is checked.)
SETTING LABELS
5
4.3.2 Setting properties of functions and function blocks
4 - 13
GX Works2
4 PROGRAM CONFIGURATIONS
4.4
Using POUs
Q CPU L CPU
This section explains how to use the created POUs.
• Program blocks are used by registering them to tasks. (
Section 4.2.2)
• Functions and function blocks are used in program blocks. (
Section 4.4.1)
Project
Program file
Task
Register
POU
Program block
POU folder
POU
Program block
Apply
POU
Function
POU
Function block
4 - 14
FX
4.4 Using POUs
1
Using functions and function blocks
Select a function or function block from the Function Block Selection window and insert it to a program.
(Function Block Selection window
Section 6.2.1)
Operating procedure
2
In the Project view, select ⇒ "POU"
⇒ "Program" ⇒ "(program)" ⇒ "Program".
SCREEN
CONFIGURATION
1.
The program editor is displayed.
2.
Select [View] ⇒ [Docking Window] ⇒ [Function
Block Selection Window] (
3
).
PROGRAMMING
PROCEDURE
The Function Block Selection window is displayed.
3.
Select "Project" from the combo box.
The functions and function blocks defined in the project are
displayed in tree format.
4
Select a function or function block and then drag
and drop it to the program editor.
PROGRAM
CONFIGURATIONS
4.
The selected function or function block is inserted to the
specified position on the editor.
On the structured ladder/FBD editor, the cursor position at
the time of the drop operation becomes the position of the input pin
at the upper left of the function or function block.
5
SETTING LABELS
5.
Set an instance name.
For a function block, set an instance name on the Label
Registration/Selection screen displayed when a function/
function block is dropped. For the method for setting the
Label Registration/Selection screen, refer to the following
section.
Section 6.2.2 Using labels in the program
6
COMMON OPERATIONS
OF PROGRAM EDITORS
6.
OVERVIEW
4.4.1
Set an argument.
7
EDITING ST
PROGRAMS
Enter a device or label name for the argument defined in the
function or function block.
● Inserting functions and function blocks
Functions and function blocks can be also inserted by the following operation.
• Select a function or a function block from the Project view, and drag and drop it to the desired position.
4.4.1 Using functions and function blocks
EDITING STRUCTURED
LADDER PROGRAMS
8
4 - 15
GX Works2
4 PROGRAM CONFIGURATIONS
■
Using function blocks created in other programming languages
Use function blocks created in other programming languages.
The following table shows the function blocks that can be called from the program/function block.
: Applicable ×: Not applicable
Function blocks to be called
Ladder
Structured ladder
/FBD
ST
×
Ladder*1
Program/function block that
calls function blocks
Structured ladder
/FBD
×
ST
*1: Function blocks in the ladder language cannot call function blocks. Only programs can call function blocks.
The following explains the precautions for calling function blocks from ladder to ST or from ST to
Ladder language.
1)
Check "Enable function block call from ladder to ST and from ST to ladder" under [Tool] ⇒
[Options] ⇒ "Compile" ⇒ "Basic Setting". (
Section 14.2)
Note that the program becomes in the uncompiled status when the option setting is changed.
Compile the program again.
2)
The following requirements must be satisfied when using function blocks created in the ST
language in the ladder program.
• Data type of the input/output label is any of the following types: bit, word (signed), double word
(signed), single-precision real, double-precision real, string
• The number of the input/output labels is less than 24
• The number of characters of the input/output label is less than 16
• The "Use Macrocode" item is checked in the option setting of the function blocks
• The "Use EN/ENO" item is not checked in the option setting of the function blocks
• Function block created in the structured ladder/FBD language is not used for the function block in
the ST language.
<Ladder program that calls the function block>
<Function block from structured ladder/FBD program used in ST program>
<Function block
in structured ladder/FBD program>
4 - 16
4.4.1 Using functions and function blocks
SETTING LABELS
2
SCREEN
CONFIGURATION
5
OVERVIEW
1
This chapter explains how to set labels.
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
Label Setting Screens. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-2
Setting Global Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Setting Local Labels for Program Blocks . . . . . . . . . . . . . . . . 5-9
Setting Labels for Functions and Function Blocks . . . . . . . 5-11
Common Operations for Setting Labels . . . . . . . . . . . . . . . . 5-13
Setting Structured Data Type Labels . . . . . . . . . . . . . . . . . . . 5-20
Setting Ranges for Devices Assigned Automatically . . . . . 5-26
Writing/Reading Data to/from CSV Files . . . . . . . . . . . . . . . . 5-29
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
5.1
5.2
5.3
5.4
5.5
5.6
5.7
5.8
5-1
GX Works2
5 SETTING LABELS
5.1
Label Setting Screens
Q CPU L CPU
FX
This section shows label setting screens. Labels are set on each screen below according to the type of label.
Global Label Setting screen
Define labels that can be used for all POUs in the project.
(
Section 5.2)
Local Label Setting screen
Define labels that can be used only for each POU (program
Section 5.3)
block). (
Function/FB Label Setting screen
Define labels that can be used only for each POU
Section 5.4)
(function/function block). (
Structure Setting screen
Define structured data types to be used for labels.
(
Section 5.6.1)
5-2
5.2 Setting Global Labels
FX
This section explains how to set global labels.
Global labels can be used in iQ Works supported products (GX Works2, MT Developer2, GT Designer3) by
registering them as system labels.
For details of system labels, refer to the following manual.
(
iQ Works Beginner’s Manual)
● System labels
Same label names can be used in programming between GX Works2, MT Developer2, and GT Designer3 by using
system labels.
● System label data base
A system label data base is a data base to manage system labels.
A system label data base is created in the workspace when the workspace is saved in MELSOFT Navigator.
System labels cannot be used in the workspace which does not contain a system label data base.
2
SCREEN
CONFIGURATION
Q CPU L CPU
OVERVIEW
1
Setting Global Labels
3
PROGRAMMING
PROCEDURE
5.2
4
Screen display
PROGRAM
CONFIGURATIONS
Select Project view ⇒ "Global Label" ⇒ "(global label)".
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5-3
GX Works2
5 SETTING LABELS
Operating procedure
•
Set the items on the screen.
Item
Maximum number of
characters
Description
Class
Select a label class from the list displayed by clicking
Section 5.5.1)
(
Label Name
Enter a desired label name.
.
Ladder/ST/SFC/
Structured ladder/FBD
: 32
(FB instance name: 16)
Specify a data type from the Data Type Selection screen displayed by
Data Type
Constant
Device
Address
128
clicking
.(
Section 5.5.3)
It can also be entered directly.
Enter a constant value when "VAR_GLOBAL_CONSTANT" is selected
for "Class" and simple type is selected for "Data Type".
128
Set a specific device to be assigned to the label when
"VAR_GLOBAL" is selected for "Class".
• When a device name is entered in either column, the other column
is displayed in the respective format automatically.
• When the "Device" column is blank, a device is automatically
assigned.
• When the data type is Structure, click the "Detail Setting" cell and
set devices on the Structure Device Setting screen.
Section 5.6.3)
(
50
Comment*1,*2
Enter a label comment.
Comments can be displayed on the program editor by switching
display/hide of comments. (
Section 8.7.5)
1024
Remark*1,*2
Enter supplementary information for label comments.
This item is not displayed on the program editor.
1024
Display the relation between the global label and system label.
Class
Relation with System
Label*2
Description
Disclose
The global label is disclosed as a system label.
Browse
The global label refers the system label which is
disclosed by another project.
Blank
There is no relation with a system label.
System Label Name*2
Display the name of the system label which relates to the global label.
-
Attribute*2
Display the attribute of the system label which relates to the global
label.
-
*1: A new line can be inserted in a cell by pressing the
+
keys.
*2: The compilation is not needed after editing.
*3: For FXCPU, these items are supported by FX3G, FX3U and FX3UC only.
5-4
-
5.2 Setting Global Labels
1
Screen button
OVERVIEW
(For FXCPU, this button is supported by FX3G, FX3U and FX3UC only)
Updates the system label information.
Operation
1. Click the
2
SCREEN
CONFIGURATION
button.
The Change Contents of System Label Database screen is displayed.
PROGRAMMING
PROCEDURE
3
4
2. Click the
When the
PROGRAM
CONFIGURATIONS
button.
The information on the changed system labels are applied to the project.
button is clicked, these changes will be updated at the next update.
3. The following message is displayed.
button.
COMMON OPERATIONS
OF PROGRAM EDITORS
6
7
EDITING ST
PROGRAMS
4. Click the
SETTING LABELS
5
8
EDITING STRUCTURED
LADDER PROGRAMS
●
5-5
GX Works2
5 SETTING LABELS
●
(For FXCPU, this button is supported by FX3G, FX3U and FX3UC only)
Imports system labels to the project.
Operation
1. Click the
button.
The Import System Labels to Project screen is displayed.
2. Check "Select" of a system label to import to the project.
3. Click the
button.
4. The following message is displayed.
5. Click the
●
button.
(For FXCPU, this button is supported by FX3G, FX3U and FX3UC only)
Registers a global label as a system label.
Operation
1. Select a global label to register as a system label.
2. Click the
button.
3. The following message is displayed.
4. Click the
5-6
button.
5.2 Setting Global Labels
1
OVERVIEW
5. The following message is displayed.
6. Click the
(For FXCPU, this button is supported by FX3G, FX3U and FX3UC only)
Disables the relation between a global label and system label.
After the relation with the system label is disabled, the global label becomes a normal global label.
Operation
1. Select a global label to disable its relation with a system label.
PROGRAMMING
PROCEDURE
3
2. Click the
button.
3. The following message is displayed.
PROGRAM
CONFIGURATIONS
4
4. Click the
button.
5. The following message is displayed.
SETTING LABELS
5
6
COMMON OPERATIONS
OF PROGRAM EDITORS
button.
7
EDITING ST
PROGRAMS
6. Click the
8
EDITING STRUCTURED
LADDER PROGRAMS
●
button.
SCREEN
CONFIGURATION
2
5-7
GX Works2
5 SETTING LABELS
● Class setting
When an item other than the class, such as a label name or data type, is set in a blank column, "VAR_GLOBAL" is
automatically set for "Class". Change it if necessary.
● Characters that can be used for label names
Any of the following label names causes an error at compilation.
• A label name that includes a space.
• A label name that begins with a numeral.
• A label name which is same as the one used for devices. (Lower case label names can be used by setting the
option.
Section 10.4.4)
For details, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
● Specifying devices/addresses
The digit-specified bit device (K4M0) or bit-specified word device (D0.1) can be specified for devices/addresses.
● Specifying timer/counter devices
When "Data Type" is a bit type, specified devices are treated as contacts (TS, STS, CS).
When "Data Type" is a word type, specified devices are treated as current values (TN, STN, CN).
● Assigning devices automatically
Devices are automatically assigned to labels which are not set devices when compiling a program. The device
assignment range can be changed on the Device/Label Automatic-Assign Setting screen. (
Section 5.7)
The assigned devices can be checked with the cross reference function.
(
GX Works2 Version 1 Operating Manual (Common))
● System label
Devices are automatically assigned to labels which are not set devices when compiling a program. The device
assignment range can be changed on the Device/Label Automatic-Assign Setting screen.
(
Section 5.7)
• System labels whose "Attribute" is set to "Common" are not supported by LCPU.
• System labels whose "Attribute" is set to "Common" or "Link" are not supported by FXCPU.
• Importing system labels with MELSOFT Navigator may cause an error at compilation with GX Works2.
Check the corresponding error location and correct the error as instructed by the error message displayed on the
output window.
5-8
5.3 Setting Local Labels for Program Blocks
1
Setting Local Labels for Program Blocks
Q CPU L CPU
FX
This section explains how to set local labels used for each program block.
OVERVIEW
5.3
2
Screen display
SCREEN
CONFIGURATION
Select Project view ⇒ "POU" ⇒ "(program)" ⇒ "(program block)" ⇒ "Local Label".
PROGRAMMING
PROCEDURE
3
•
Set the items on the screen.
Select a label class from the list displayed by clicking
Section 5.5.1)
(
.
Ladder/ST/SFC/
Structured ladder/FBD
: 32
(FB instance name: 16)
Label Name
Enter a desired label name.
Data Type
Specify a data type from the Data Type Selection screen displayed by clicking
(
Section 5.5.3)
It can also be entered directly.
Constant
Enter a constant value when "VAR_CONSTANT" is selected for "Class" and simple
type is selected for "Data Type".
128
This item cannot be set for local labels.
When the data type is Structure, click the "Detail Setting" cell and set devices on the
Structure Device Setting screen.
(
Section 5.6.3)
-
Device
Address
Comment*1,*2
Enter a comment.
Comments can be displayed on the program editor by switching display/hide of
comments. (
Section 8.7.5)
*1: A new line can be inserted in a cell by pressing the
+
.
128
4
5
SETTING LABELS
Class
Maximum number of
characters
Description
6
COMMON OPERATIONS
OF PROGRAM EDITORS
Item
PROGRAM
CONFIGURATIONS
Operating procedure
1024
keys.
*2: The compilation is not needed after editing.
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5-9
GX Works2
5 SETTING LABELS
● Class setting
When an item other than the class, such as a label name or data type, is set in a blank column, "VAR" is
automatically set for the "Class". Change it if necessary.
● Characters that can be used for label names
Any of the following label names causes an error at compilation.
• A label name that includes a space.
• A label name that begins with a numeral.
• A label name which is same name as the one used for devices. (Lower case label names can be used by setting
the option.
Section 10.4.4)
For details, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
● Assigning devices automatically
Devices are automatically assigned to labels when a program is compiled. The device assignment range can be
changed on the Device/Label Automatic-Assign Setting screen. (
Section 5.7)
The assigned devices can be checked with the cross reference function.
(
GX Works2 Version 1 Operating Manual (Common))
5 - 10
5.4 Setting Labels for Functions and Function Blocks
1
Setting Labels for Functions and Function Blocks
Q CPU L CPU
FX
This section explains how to set local labels for each function or function block.
Create a new function or function block in advance.
For the method for creating new functions or function blocks, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
OVERVIEW
5.4
SCREEN
CONFIGURATION
2
Screen display
Select Project view ⇒ "POU" ⇒ "FB/FUN" ⇒ "(function/function block)" ⇒ "Local Label".
PROGRAMMING
PROCEDURE
3
Operating procedure
Class
Maximum number of
characters
Description
Select a label class from the list displayed by clicking
(
Section 5.5.1)
.
Ladder/ST/SFC/
Structured ladder/FBD
: 32
(FB instance name: 16)
Label Name
Enter a desired label name.
Data Type
Specify a data type from the Data Type Selection screen displayed by clicking
(
Section 5.5.3)
It can also be entered directly.
Constant
Enter a constant value when "VAR_CONSTANT" is selected for "Class" and simple
type is selected for "Data Type".
128
Comment*1,*2
Enter a comment.
Comments can be displayed on the program editor by switching display/hide of
comments. (
Section 8.7.5)
1024
*1: A new line can be inserted in a cell by pressing the
+
.
128
5
6
COMMON OPERATIONS
OF PROGRAM EDITORS
Item
PROGRAM
CONFIGURATIONS
4
Set the items on the screen.
SETTING LABELS
•
keys.
*2: The compilation is not needed after editing.
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5 - 11
GX Works2
5 SETTING LABELS
● Class setting
When an item other than the class, such as a label name or data type, is set in a blank column, "VAR" is
automatically set for the "Class". Change it if necessary.
● Characters that can be used for label names
Any of the following label names causes an error at compilation.
• A label name that includes a space.
• A label name that begins with a numeral.
• A label name which is same name as the one used for devices. (Lower case label names can be used by setting
the option.
Section 10.4.4)
For details, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
● Assigning devices automatically
Devices are automatically assigned to labels when a program is compiled. The device assignment range can be
changed on the Device/Label Automatic-Assign Setting screen. (
Section 5.7)
The assigned devices can be checked with the cross reference function.
(
GX Works2 Version 1 Operating Manual (Common))
● Return value of function
VAR_OUTPUT cannot be set in a function.
Program the function names as labels in a function to set a return value.
Setting function names as labels is not needed. Data type set on "Result Type" can be used.
Example: Set return value of function name "FUN_01" to 0
<Structured ladder/FBD>
<ST>
FUN_01 := 0;
■
Maximum number of input/output labels
The maximum number of input/output labels can be used in a function/a function block differs
depending on programming languages.
When setting input/output labels with local label setting of function/function block, set within the number
of the input/output labels shown in the following table.
Programming
language
Ladder language
Structured ladder/FBD
or ST language
*1 :
5 - 12
Function
Input
0 to 253
Function block
Input
Output
*1
1 to 24
(Including I/O label)
1 to 24*1
(Including I/O label)
0 to 253
(Including I/O label)
The I/O label is counted that each of input /output labels is one label.
5.5 Common Operations for Setting Labels
1
Common Operations for Setting Labels
Q CPU L CPU
FX
This section explains the common operations for each label setting editor.
OVERVIEW
5.5
2
Classes
SCREEN
CONFIGURATION
5.5.1
Label classes indicate from which POU and how the label can be used.
Selectable labels are different according to the type of label setting editor.
The following table shows selectable labels for each label setting editor.
3
Class
Description
Type of usable label setting editor
Global label Local label
Function
Function block
A common label that can be used for program
blocks and function blocks.
×
×
×
VAR_GLOBAL_
CONSTANT
A common label with a constant value that can be
used for program blocks and function blocks.
×
×
×
VAR
A label that can be used for program blocks and
function/function blocks.
×
VAR_CONSTANT
A label with a constant value that can be used for
program blocks and function/function blocks.
×
VAR_RETAIN*1
A latch-type label that is used within the range of
declared program block and function block.
×
VAR_INPUT
A label that is used for an input of function/
function block.
Its value cannot be changed in a POU.
×
×
VAR_OUTPUT
A label that is used for an output of function block.
×
VAR_IN_OUT
A label that can be used for both input and output
of function block with the same name.
Its value can be changed in a POU.
×
4
×
5
×
×
×
×
SETTING LABELS
PROGRAM
CONFIGURATIONS
VAR_GLOBAL
PROGRAMMING
PROCEDURE
: Applicable, ×: Not applicable
COMMON OPERATIONS
OF PROGRAM EDITORS
6
*1: Not supported by FXCPU
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5.5.1 Classes
5 - 13
GX Works2
5 SETTING LABELS
5.5.2
Data types
Label data types are described in the following table.
For details such as value ranges of each data type, refer to the following manuals.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
MELSEC-Q/L Programming Manual (Common Instruction)
User's Manual (Function Explanation, Program Fundamentals) of the CPU module to be used.
Note that data types are different according to the programming language (ladder, SFC, ST, structured
ladder/FBD).
The following table shows data types that can be used for each programming language.
: Applicable, ×: Not applicable
Data type
Programming language
Ladder/SFC
ST/Structured ladder/FBD
Bit
Word (signed)
Double word (signed)
Word (unsigned)/16-bit string
×
Double word (unsigned)/32-bit string
×
*1
Single-precision real
Double-precision real*2
String*3
×
Time
Timer
*5
×
Counter
*5
×
Retentive timer*4
*5
×
Pointer
*5
×
*1: For FXCPU, this item is supported by FX2N, FX2NC, FX3G, FX3U and FX3UC only.
*2: Supported by Universal model QCPU/LCPU only.
*3: For FXCPU, this item is supported by FX3U and FX3UC only.
*4: For FXCPU, this item is supported by FX1N, FX1NC, FX2N, FX2NC, FX3G, FX3U and FX3UC only.
*5: For ladder language, these items cannot be used for inline structured text.
5 - 14
5.5.2 Data types
5.5 Common Operations for Setting Labels
5.5.3
1
Selecting data types
OVERVIEW
Select a data type.
Data type can be selected on the Data Type Selection screen other than direct data entry.
Screen display
2
in the data type entry field on each label setting screen.
SCREEN
CONFIGURATION
Click
PROGRAMMING
PROCEDURE
3
4
Select a type in the "Type Class".
2.
Description
Specify this to select a data type from basic types such as bit and word.
Structured Data Types
Specify this to select a data type from the defined structures.
(Not displayed for the structured data settings)
Function Blocks
Specify this to select a data type from the defined function blocks.
(Not displayed for the FB label settings/structured data settings)
5
In the "Libraries" field, select the reference source such as the defined structure
that is used as the data type.
Item
SETTING LABELS
Item
Simple Types
6
Description
<ALL>
Browse data types and structures/function blocks defined in the project, and all libraries.
<Project>
Browse structures/function blocks defined in the project.
(Not displayed when "Simple Types" is selected.)
Standard Lib.
Browse function blocks of the application functions.
(Not displayed when "Simple Types" or "Structured Data Types" is selected.)
3.
In the "Data Type" field, select the data type, structure, or function block name.
4.
Click the
COMMON OPERATIONS
OF PROGRAM EDITORS
1.
PROGRAM
CONFIGURATIONS
Operating procedure
7
button when the setting is completed.
EDITING ST
PROGRAMS
The settings are displayed in the "Data Type" column on the label setting screen.
EDITING STRUCTURED
LADDER PROGRAMS
8
5.5.3 Selecting data types
5 - 15
GX Works2
5 SETTING LABELS
● Method for displaying the Data Type Selection screen
The Data Type Selection screen can be opened by any of the following operations when
status.
• Press the
key.
• Press the
• Press the
■
is in the selected
key.
key.
Setting arrays for data type
Define a data type as an array.
To define a data type as an array, set the items in the "Array Element" field on the Data Type Selection
screen.
Operation
1. Click
in the data type entry field on each label setting
screen.
2. Check the check box in the "Array Element" field.
3. Enter the number of elements in the "Element" field.
4. Set the data type of the array element in the same
manner as setting the normal data type.
● To change the offset
To change the offset ([Array start value]..[Array end value]) to a value other than 0, edit the offset
value by directly entering the array type declaration in text on each label setting screen.
5 - 16
5.5.3 Selecting data types
5.5 Common Operations for Setting Labels
Edit two- or three-dimensional array by directly entering the array type declaration in text on each
label setting screen.
For details on array type declarations, refer to the following manual.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
OVERVIEW
1
● To change the array to a two- or three-dimensional array
Setting data length of the character string data type
To change the data length of the character string data type, directly edit the data length on each label
setting screen.
The data length of the character string data type is set in the option setting.
Operation
• Select [Tool] ⇒ [Options] ⇒ "Label Setting Editor" ⇒ "Default Length of String Data Type", and
set the data length.
4
PROGRAM
CONFIGURATIONS
■
3
PROGRAMMING
PROCEDURE
● When a constant type is set for Class
For labels whose classes are set as VAR_CONSTANT or VAR_GLOBAL_CONSTANT, arrays cannot be set for the
data type. If they are set, an error occurs at compilation.
● Offset values
Minus values can be set for offset values.
SCREEN
CONFIGURATION
2
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5.5.3 Selecting data types
5 - 17
GX Works2
5 SETTING LABELS
5.5.4
Editing rows
Edit rows on the label setting screen.
■
Adding rows
Add a row on the label setting screen.
● New Declaration (Before)
Insert a row above the selected row.
Operation
• Select [Edit] ⇒ [New Declaration (Before)] (
).
● New Declaration (After)
Insert a row below the selected row.
Operation
• Select [Edit] ⇒ [New Declaration (After) (
).
● Adding rows
The following settings can be set with the New Declaration (After) function.
Set whether to leave cells of added row blank.
Enter label names or data types automatically.
Select [Tool] ⇒ [Options] ⇒ "Label Setting Editor".
5 - 18
5.5.4 Editing rows
5.5 Common Operations for Setting Labels
■
1
Deleting rows
OVERVIEW
Delete a row on the label setting screen.
Operation
• Select [Edit] ⇒ [Delete Row] (
).
For the "Comment" and "Remark" columns, data can be entered in multiple lines. The 'all lines/first line
display' function switches the display between all lines and only the first line by double-clicking " + " or
" - ".
● All lines display
Display all lines of information in the "Comment" and "Remark" columns.
Operation
3
PROGRAMMING
PROCEDURE
Displaying all lines or first line of comments and remarks
4
PROGRAM
CONFIGURATIONS
• Double-click " + " in the row number cell of the table.
● First line display
Display only the first line of information in the "Comment" and "Remark" columns.
Operation
5
• Double-click " - " in the row number cell of the table.
Only the first line is displayed.
SETTING LABELS
■
SCREEN
CONFIGURATION
2
All lines are displayed.
■
Selecting all rows
All rows can be selected by the following operation.
Operation
COMMON OPERATIONS
OF PROGRAM EDITORS
6
7
EDITING ST
PROGRAMS
• Select [Edit] ⇒ [Select All].
EDITING STRUCTURED
LADDER PROGRAMS
8
5.5.4 Editing rows
5 - 19
GX Works2
5 SETTING LABELS
5.6
Setting Structured Data Type Labels
Q CPU L CPU
FX
This section explains how to set structured data type labels.
5.6.1
Setting data type of structure
Set the elements of the structure on the Structure Setting screen.
Screen display
Select Project view ⇒ "POU" ⇒ "Structured Data Types" ⇒ "(structure)".
Operating procedure
•
Set the items on the screen.
Item
Label Name
Data Type
Constant
Description
Enter a desired label name.
32
Enter the data type of label which can be set on the Data Type Selection screen
displayed by clicking
.(
Maximum number of
characters
Section 5.5.3)
Display the constant value of the selected type.
128
128
Enter comments.
Comment
A new line can be inserted in a cell by pressing the
+
keys.
To display comments on the program editor, select "Device Comment" in "Comment
Display Item".
1024
● Creating new structured data
Create structured data using the Project view.
(
GX Works2 Version 1 Operation Manual (Common))
5.6.2
Setting data type as structure
To define the data type of label as a structure, set a structure in the data type entry field on each label
setting screen. In addition to direct text entry, a structure can be selected on the Data Type Selection
screen (
Section 5.5.3).
5 - 20
5.6.1 Setting data type of structure
5.6 Setting Structured Data Type Labels
1
Assigning devices to structured data type labels
Devices of the structured data type global labels are set on the Structure Device Setting screen.
If the structure is set for data type on the Global Label Setting screen, "Detail Setting" is displayed in the
"Device" and "Address" columns. Click "Detail Setting" to display the Structure Device Setting screen.
OVERVIEW
5.6.3
2
Screen display
SCREEN
CONFIGURATION
Click "Detail Setting" on the label setting screen.
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
5
Set the items on the screen.
Item
Description
Label Name
Display label names defined as structure.
Data Type
Display data types set to data names.
Device
name
Device
Address
Set device names to be assigned in the "Device" or "Address" column. (When a device
name is entered in either column, it is displayed in the respective format automatically.)
Automatic Filling
Check this to set devices automatically to cells in which devices are not set with the same
data type.
Use Bit Designation
Check this to specify a bit device of word device.
6
COMMON OPERATIONS
OF PROGRAM EDITORS
•
SETTING LABELS
Operating procedure
7
EDITING ST
PROGRAMS
● Display on the Local Label Setting screen
• For the Structure Device Setting screen, the read-only screen is displayed.
EDITING STRUCTURED
LADDER PROGRAMS
8
5.6.3 Assigning devices to structured data type labels
5 - 21
GX Works2
5 SETTING LABELS
■
Entering device names automatically
The Automatic filling function can be used when setting series of devices for the same data type data
on the Structure Device Setting screen.
When using the Automatic filling function, whether to use bit specification of word device can be
selected.
Operation
1. Click "Detail Setting" on the label setting screen.
The Structure Device Setting screen is displayed.
2. Enter the device name to the Device/Address column.
Series of devices are automatically set in the cells following the one entered, skipping the
cells where devices are already set.
● When using bit specification
Enter "D1".
Automatically
set data
● When not using bit specification
Enter "D1".
Automatically
set data
● When not using bit specification
• When the bit specification is not used, uncheck the "Use Bit Designation" item on the Structure Device Setting
screen.
5 - 22
5.6.3 Assigning devices to structured data type labels
5.6 Setting Structured Data Type Labels
1
Assigning devices to structure array type labels
Set devices for the structure array type global labels on the Structure Device Setting screen.
When VAR_GLOBAL is set for "Class" and the structure array is set for "Data Type" on the Global Label
Setting screen, "Detail Setting" is displayed in the "Device" and "Address" columns. Click "Detail
Setting" to display the Structure Device setting screen.
2
SCREEN
CONFIGURATION
Screen display
OVERVIEW
5.6.4
Click "Detail Setting" on the label setting screen.
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
•
Set the items on the screen.
Item
Description
Structure Array
Display elements of the structure array in tree format.
The device setting of the element selected in the tree is displayed in the right
area of the screen.
Label Name
Display label names defined as the structure.
Data Type
Display data types set to data names.
Address
Word Device/Bit
Structure Array Offset Device
Value
Use Bit Designation
Set device names to be assigned in the "Device" or "Address" column. (When a
device name is entered in either column, it is displayed in the respective format
automatically.)
Device names can be entered for the start array element only.
For the subsequent array elements, device names offset from the device number
set for the start element are automatically set.
7
Specify the device offset value to be set to the same data type cells in the array
element.
Check this to specify a bit device of word device.
EDITING ST
PROGRAMS
Device
6
COMMON OPERATIONS
OF PROGRAM EDITORS
Operating procedure
SETTING LABELS
5
8
5.6.4 Assigning devices to structure array type labels
EDITING STRUCTURED
LADDER PROGRAMS
● Display on the Local Label Setting screen
• For the Structure Device Setting screen, the read-only screen is displayed.
5 - 23
GX Works2
5 SETTING LABELS
■
Entering device names automatically by setting offset values
On the Structure Device setting screen, device numbers to be entered automatically can be set in fixed
spacing for each array element of the structure array. Specify the difference in device numbers between
the array elements as an offset value for the start device of the same data type.
Operation
1. Click "Detail Setting" on the label setting screen.
The Structure Device Setting screen is displayed.
2. Set the "Structure Array Offset Value".
3. Set the device name for the start element data of the array.
Devices are set to the same data type of the array elements in the screen.
Offset value is not specified.
< Array [0] >
< Array [1] >
Enter "D1".
Devices starting
from "D7" are
assigned.
Offset value is 10.
< Array [0] >
Enter "D1".
< Array [1] >
Devices starting
from "D11" are
assigned.
● Using bit specification
Devices can be set by specifying a bit device of word device when entering devices automatically.
Operation
1. Click "Detail Setting" on the label setting screen.
The Structure Device Setting screen is displayed.
2. Check the "Use Bit Designation" item.
3. Set the device name for the start element data of the array.
Devices are set to the same data type or bit device data type.
5 - 24
5.6.4 Assigning devices to structure array type labels
5.6 Setting Structured Data Type Labels
2
SCREEN
CONFIGURATION
● Data for which device name can be entered
For the structure array type, a device name can be entered only for the start element of array.
For the subsequent array elements, device names offset from the device number set for the start element are
automatically set.
● Offset values
• An expression such as '1\2' can be specified for an incremental value of device such as U0\G0.
• When '0' is specified for the incremental value, the device number same as the data set to the start of devices is
set to all data in the array.
OVERVIEW
1
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5.6.4 Assigning devices to structure array type labels
5 - 25
GX Works2
5 SETTING LABELS
5.7
Setting Ranges for Devices Assigned Automatically
Q CPU L CPU
FX
This section explains how to set the ranges for devices that are automatically assigned to labels.
The devices set as automatically assigned device are assigned to labels during compilation.
(
Section 10.5)
■
QCPU (Q mode)/LCPU
Screen display
Select [Tool] ⇒ [Device/Label Automatic-Assign Setting].
Latch
selection
field
Operating procedure
•
Set the items on the screen.
Item
Latch selection field
Select latch (1) or latch (2).
Select when the range of latch (1), latch (2) is set on the <<Device>> tab of PLC
parameters.
Device
Display the devices to be assigned automatically.
Digit
Display whether the range of device assign setting is in decimal or hexadecimal.
Assign Selection
Check the device to be assigned automatically. Multiple devices can be set.
Assignment
Range
5 - 26
Description
Start
End
Enter the range of device points to be assigned automatically.
Total Points
Display the total points of each device range for VAR and VAR_RETAIN.
PLC Parameter
Device Setting Range
Display the device point range set on the <<Device>> tab of PLC parameters.
When the latch range is set, display the device point range with the latch range.
(Ex) When D: 0 to 12287, latch D: 5000 to 6000 are set on the <<Device>> tab of
PLC parameters, display range of D: 0 to 12287, range of latch D: 5000 to 6000.
5.7 Setting Ranges for Devices Assigned Automatically
■
1
FXCPU
OVERVIEW
Screen display
Select [Tool] ⇒ [Device/Label Automatic-Assign Setting].
SCREEN
CONFIGURATION
2
PROGRAMMING
PROCEDURE
3
Select the device type, and set the start and end addresses to be assigned automatically.
Precautions on automatically assigned devices
All programs need to be compiled when the range of automatically assigned device is changed.
Compiling all programs changes the device assignment to labels. Therefore, device values set before
the program change remain on the device-assigned labels.
For QCPU (Q mode)/LCPU, reset the programmable controller CPU, clear all device memories
including latches, clear all file registers, then switch the programmable controller to RUN for a
precautionary measure.
(
GX Works2 Version 1 Operating Manual (Common))
For precautions on compiling all programs, refer to Section 10.5.3.
● Assigning device with Device/Label Automatic-Assign Setting
Assign the devices to labels with the Device/Label Automatic-Assign Setting during compilation.
For details, refer to Section 10.5.
The assigned devices can be checked with the cross reference function.
(
GX Works2 Version 1 Operating Manual (Common))
Devices within the range set on the Device/Label Automatic-Assign Setting screen cannot be used in
a program.
● Precautions when the multiple types of devices are assigned automatically (QCPU (Q mode)/LCPU)
Refer to Precautions on compilation. (
Section 10.5.3 )
● Device types and setting ranges
6
7
8
EDITING STRUCTURED
LADDER PROGRAMS
The types of automatically assigned devices differ by the type of CPU.
The setting ranges depend on the number of device points set in PLC parameter.
For details of PLC parameter, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
5.7.1 Precautions on automatically assigned devices
SETTING LABELS
5
● Precautions when changing automatically assigned devices
COMMON OPERATIONS
OF PROGRAM EDITORS
5.7.1
4
EDITING ST
PROGRAMS
•
PROGRAM
CONFIGURATIONS
Operating procedure
5 - 27
GX Works2
5 SETTING LABELS
● Precautions when displaying the Device/Label Automatic-Assign Setting screen
When displaying the Device/Label Automatic-Assign Setting screen, an error message may be
displayed.
In this case, terminate GX Works2, copy "vsflex8n.ocx" stored in the folder of GX Works2 installation
destination to "C:\WINDOWS\system32" (for Windows XP), and restart GX Works2.
5 - 28
5.7.1 Precautions on automatically assigned devices
5.8 Writing/Reading Data to/from CSV Files
1
Writing/Reading Data to/from CSV Files
Q CPU L CPU
FX
■
Writing label setting data
Write label setting data to CSV files.
Operating procedure
1.
Select [Edit] ⇒ [Write to CSV File] (
2
SCREEN
CONFIGURATION
This section explains how to write the label setting data to the CSV file and how to read the label setting data
from the CSV file.
OVERVIEW
5.8
3
).
PROGRAMMING
PROCEDURE
The following message is displayed.
2.
Click the
PROGRAM
CONFIGURATIONS
4
button.
The Write to CSV File screen is displayed.
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
Enter the file name to be saved and click the
7
button.
EDITING ST
PROGRAMS
The label setting data is saved in the save destination.
8
EDITING STRUCTURED
LADDER PROGRAMS
3.
5 - 29
GX Works2
5 SETTING LABELS
■
Reading label setting data
Read label setting data from CSV files.
Operating procedure
1.
Select [Edit] ⇒ [Read from CSV File] (
).
The Read from CSV File screen is displayed.
2.
Select the file name to be read and click the
The following message is displayed.
3.
Click the
button.
The label setting data is read to the project.
5 - 30
button.
5.8 Writing/Reading Data to/from CSV Files
The title name of Label Setting Editor links with the title name of the CSV file.
• Data of column which coincides in the title name of Label Setting Editor in the CSV file is read to
Label Setting Editor.
• Data of column which does not coincide in the title name of Label Setting Editor cannot be read
to the CSV file.
• Columns order of the CSV file can be read even if it does not coincide in the columns order of
Label Setting Editor.
<Label Setting Editor>
Title name
OVERVIEW
1
CSV file format
2
SCREEN
CONFIGURATION
■
PROGRAMMING
PROCEDURE
3
<CSV File>
Title name
● When multi-byte characters are used in the label name
Do not use multi-byte characters in a label name when using a CSV file created in Japanese version of GX Works2
in other language version of GX Works2.
For GX Works2 with the language version other than Japanese, this function supports multi-byte characters,
however, the compilation function does not support multi-byte characters. Therefore, the program cannot be
compiled properly when multi-byte characters are used in a label name.
5
SETTING LABELS
Restrictions
PROGRAM
CONFIGURATIONS
4
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
5 - 31
GX Works2
5 SETTING LABELS
MEMO
5 - 32
COMMON OPERATIONS OF
PROGRAM EDITORS
This chapter explains the common operations of program editors used to edit sequence programs.
2
SCREEN
CONFIGURATION
6
OVERVIEW
1
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
Types of Program Editor. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-2
Common Operations of Program Editors . . . . . . . . . . . . . . . . 6-5
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
6.1
6.2
6-1
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
6.1
Types of Program Editor
Q CPU L CPU
This section explains how to edit programs according to the programming language.
ST editor (
Chapter 7)
Structured ladder/FBD editor
(
Chapter 8)
Ladder editor
For the operating method of the ladder editor, refer to the
following manual.
GX Works2 Version 1 Operating Manual
(Simple Project)
SFC editor
For the operating method of the SFC editor, refer to
the following manual.
GX Works2 Version 1 Operating Manual
(Simple Project)
● Creating new program data
Program data are created in the project view. (
GX Works2 Version 1 Operating Manual (Common))
Program data are created paired with a label editor when a new POU is created.
6-2
FX
6.1 Types of Program Editor
1
Available programming languages
The following table shows the programming languages that can be used for each POU.
: Available ×: Not available
Programming language
Structured
ladder/FBD
ST
Functions
Ladder*1
SFC*1
×
×
2
SCREEN
CONFIGURATION
POU
×
Function blocks
OVERVIEW
6.1.1
Program blocks
*1: Not supported by FXCPU.
PROGRAMMING
PROCEDURE
3
● Changing programming languages
• Select a programming language when creating a new POU.
For creating a new data, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
• The programming language that is selected when creating a program, cannot be changed later.
To change to another programming language, create a new POU.
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
6.1.1 Available programming languages
6-3
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
6.1.2
Available comment formats
The following explains a comments that can be used for each program editor.
■
Comments on the ST editor
On the ST editor, comments are enclosed by
'(*' and '*)'.
■
Comments on the structured ladder/FBD editor
On the structured ladder/FBD editor,
comments can be pasted anywhere in the
same manner as ladder symbols.
(
Section 8.9)
In the Guided mode, comments can be
added at the start of a ladder block.
(
Section 8.10.9)
■
Label comments
Label comments and remarks set at label
setting can be displayed on tool hints.
(
Section 6.2.8)
6-4
6.1.2 Available comment formats
6.2 Common Operations of Program Editors
Q CPU L CPU
FX
This section explains the common operations of program editors (ST editor and structured ladder/FBD editor).
The operating method when using a structured ladder/FBD editor is explained in this section.
6.2.1
Using POUs (Function Block Selection window)
Select POUs such as functions or function blocks from the Function Block Selection window and utilize
them to the program.
2
3
POU type
PROGRAMMING
PROCEDURE
Screen display
OVERVIEW
1
Common Operations of Program Editors
SCREEN
CONFIGURATION
6.2
POU list
4
).
PROGRAM
CONFIGURATIONS
Select [View] ⇒ [Docking Window] ⇒ [Function Block Selection Window] (
SETTING LABELS
5
Screen display
Item
6
Description
Display POUs in categories.
All Parts
COMMON OPERATIONS
OF PROGRAM EDITORS
POU type
Display functions/function blocks and operators.
Application Instruction
Display functions/function blocks of application functions.
(Instructions)*1
Display common instructions, application instructions, and special instructions.
(User library name)
Display functions defined in the user library.
Project
Display functions/function blocks defined in FB/FUN.
Operator
7
Display operators.
POU list
Display POUs of the type selected for 'POU type'.
Function*2
*2
Operator
Display function blocks.
EDITING ST
PROGRAMS
Function block
Display functions.
*2
Display operators.
*1: For FXCPU, basic instructions and application instructions are displayed.
8
*2: For details of functions/function blocks/operators, refer to the following manual.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals))
6.2.1 Using POUs (Function Block Selection window)
EDITING STRUCTURED
LADDER PROGRAMS
(
6-5
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
Operating procedure
1.
Select a POU to be used from the 'POU list'.
2.
Drag & drop the selected POU to the program editor.
Drag and Drop
6-6
6.2.1 Using POUs (Function Block Selection window)
6.2 Common Operations of Program Editors
■
1
Searching for a POU name by its initial letter
OVERVIEW
Search for a particular item among those displayed on the POU list tree by its initial letter.
Operating procedure
•
In the POU list field, enter the initial letter of the POU to be searched for.
2
SCREEN
CONFIGURATION
The cursor moves to the entered initial letter of the POU.
If there is no POU with the entered initial letter, the selection status does not change.
S
3
key.
PROGRAMMING
PROCEDURE
Press the
■
PROGRAM
CONFIGURATIONS
4
Displaying label settings
5
SETTING LABELS
Display a label setting screen by right-clicking a function or function block.
Displays a label setting screen
of the selected POU by clicking
"Open Header" from the short
cut menu.
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
6.2.1 Using POUs (Function Block Selection window)
EDITING STRUCTURED
LADDER PROGRAMS
● Operators
Since label settings are not available for operators, short cut menu is not displayed.
6-7
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
6.2.2
Using labels in the program
Enter preset labels to program editor. A new label can also be registered.
Screen display
Select [Edit] ⇒ [List Operands] (
).
Registered
label list
● Display setting for Label Registration/Selection screen
For a structured ladder/FBD program, the Label Registration/Selection screen can be displayed when inserting an
undefined label by setting the option below.
Select "Declare new label name" under [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒
"Label".
■
Entering registered labels
Select and enter the registered labels on the Label Registration/Selection screen.
Chapter 5) or on the Label Registration/Selection screen
Register labels with label setting editor (
Registering new labels).
(
Operating procedure
1.
Select the argument to which a label is entered on a program editor.
2.
Select [Edit] ⇒ [List Operands] (
).
The Label Registration/Selection screen is displayed.
6-8
6.2.2 Using labels in the program
6.2 Common Operations of Program Editors
1
Set the items on the screen.
item
Description
Scope to Find
Select a label setting editor’s name of the search destination.
Type Classification
Select a type classification of data type. (
Data Type
Select a data type.
Registered label list
Display a list of labels existing in the label setting editor of the search destination.
Select a label to be entered.
SCREEN
CONFIGURATION
button.
The selected label is applied to the program editor.
3
PROGRAMMING
PROCEDURE
■
Registering new labels
Select and enter the new labels on the Label Registration/Selection screen.
Operating procedure
Select the argument to which a label is entered on a program editor.
2.
Select [Edit] ⇒ [List Operands] (
PROGRAM
CONFIGURATIONS
4
1.
5
).
SETTING LABELS
The Label Registration/Selection screen is displayed.
3.
Set the items on the screen.
item
Description
Label Name
Enter a label name.
Label Setting Information
-
6
Scope to Register
Select a label setting editor's name of registering destination.
Class
Select a class name of label from the list displayed by clicking
(
Section 5.5.1)
Data Type
Set a data type from the Data Type Selection screen displayed by clicking
(
Section 5.5.3)
It can also be entered directly.
Device
Set a device to be assigned to the label when "VAR_GLOBAL" is selected for
"Class".
• When the "Device" column is blank, a device is automatically assigned.
Constant
Enter a constant value when "VAR_GLOBAL_CONSTANT" or "VAR_CONSTANT"
is selected for "Class", and simple type is selected for "Data Type".
Comment
Enter a label comment.
Comments can be displayed on the program editor by switching display/hide of
comments. (
Section 8.7.5)
A new line cannot be inserted. Edit a comment with a label setting editor to insert a
new line.
Minimize dialog after applying
2
After clicking the
Selection screen.
.
.
button, check to minimize the Label Registration/
6.2.2 Using labels in the program
6-9
COMMON OPERATIONS
OF PROGRAM EDITORS
Click the
Section 5.5.3)
After clicking the
button, check this to minimize the Label
Registration/Selection screen.
Minimize dialog after applying
4.
OVERVIEW
-
7
EDITING ST
PROGRAMS
Select from Registered Label
8
EDITING STRUCTURED
LADDER PROGRAMS
3.
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
4.
Click the
button.
The label is registered and applied to the program editor.
■
Changing registered label settings
Change the settings of registered labels on the Label Registration/Selection screen.
Label setting editor and data type of registered label can be changed.
Operating procedure
1.
Select [Edit] ⇒ [List Operands] (
).
The Label Registration/Selection screen is displayed.
2.
Select the label from "Registered Label List".
For items of "Select from Registered Label", refer to "Entering registered labels".
3.
Change the settings on "Label Setting Information".
For items of "Label Setting Information", refer to "Registering new labels"
4.
For changing the label setting editor, check "Move the selected labels to the Scope
to Register".
5.
Click the
button.
The label settings are changed.
6 - 10
6.2.2 Using labels in the program
6.2 Common Operations of Program Editors
6.2.3
1
Undo and redo
■
OVERVIEW
Undo and redo the previous editing status.
Undo
2
SCREEN
CONFIGURATION
Operating procedure
• Select [Edit] ⇒ [Undo] (
) after editing the ladder.
The previous editing status is restored.
3
PROGRAMMING
PROCEDURE
Redo
Operating procedure
• Select [Edit] ⇒ [Redo] (
) after performing [Undo].
The operation deleted by clicking the [Undo] button is restored.
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
■
6.2.3 Undo and redo
6 - 11
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
6.2.4
Changing display size of editing screen
Change the display size of editing screen.
Screen display
Select [View] ⇒ [Zoom] ⇒ [Set Zoom Factor].
Operating procedure
• Set the items on the screen.
Item
6 - 12
Description
200%, 150%, 100%, 75%, 50%
Change the display size of editing screen with a selected magnification.
Specify
Set a magnification specified by every 12.5%.
6.2.4 Changing display size of editing screen
6.2 Common Operations of Program Editors
6.2.5
1
Splitting editing screen
OVERVIEW
Split the editing screen one above the other.
Operating procedure
Drag the split bar on the scroll bar of the editing screen.
2
SCREEN
CONFIGURATION
Split bar
3
PROGRAMMING
PROCEDURE
Drag the split bar.
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
•
6.2.5 Splitting editing screen
6 - 13
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
6.2.6
Opening label setting screen of program editor being edited
Display the Local label Setting screen of the program editor being edited.
Operating procedure
•
Select [View] ⇒ [Open Header].
[View]
6.2.7
[Open Header]
Displaying compilation result in list form
Display a compiled program in a list format.
A selected ladder block for structured ladder/FBD or a whole editor currently opened for ST is the
compilation target.
Operating procedure
1.
For structured ladder/FBD, select a ladder block.
2.
Select [View] ⇒ [Display Compile Result].
[View]
[Display Compile Result]
The compilation result is not displayed when the compilation
target is an assignment command in which the source data
and the target data are the same.
Example in ST language) M0 :=M0;
● Precautions on FXCPU
For FXCPU, when a block password with the validated setting for "Read-protect the execution program" exists, the
compilation result cannot be displayed.
6 - 14
6.2.6 Opening label setting screen of program editor being edited
6.2 Common Operations of Program Editors
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD/ST" ⇒
"Tool Hint".
2.
Set the following items:
Item
Tool Hint Display Format
Example
Monitored Value
(Displayed only
during
monitoring)
Class
Display a label class.
VAR_GLOBAL
Device
Display a device assigned to the label in the device
format.
X1
Address
Display a device assigned to the label in the address
format.
%IX1
Data Type
Display a data type of the label.
Bit
Constant Value
Display a constant value of the label.
FALSE
Comment
Display label comments.
GLOBAL1
comment
Remark
Display a remark of the global label.
GLOBAL1
remark
Single Line
Display tool tips in a single line.
Multi Line
Display tool tips in multiple lines.
3
4
5
SETTING LABELS
Tool Hint Display Items
Description
Display a monitoring result.
When the labels are used for array element, or when
the elements are not specified for array or structured
data type, the monitoring values are not displayed.
2
SCREEN
CONFIGURATION
The contents excluding label names displayed on the tool hints can be set by the following operation.
PROGRAMMING
PROCEDURE
Content defined on the label setting screen as tool hints is displayed by placing the cursor on a label
name on the program editor.
OVERVIEW
1
Setting display contents of tool hint
PROGRAM
CONFIGURATIONS
6.2.8
<Single line>
COMMON OPERATIONS
OF PROGRAM EDITORS
6
7
EDITING ST
PROGRAMS
<Multiple lines>
EDITING STRUCTURED
LADDER PROGRAMS
8
6.2.8 Setting display contents of tool hint
6 - 15
GX Works2
6 COMMON OPERATIONS OF PROGRAM EDITORS
6.2.9
Opening label setting and program screens for selected POU
Display label settings or a program of the function or function block selected on the program editor.
■
Displaying a label setting screen
Operation
• Select [View] ⇒ [Zoom Header/Body] ⇒ [Header].
■
Displaying a program editor
Operation
• Select [View] ⇒ [Zoom Header/Body] ⇒ [Body].
[View] [Zoom Header/Body]
[Header]
[View] [Zoom Header/Body]
[Body]
● Displaying by double-clicking the function or function block
For a structured ladder/FBD program, a label editor or program editor can be opened by double-clicking POU.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "FB/FUN" and set "Double clicking
opens header" or "Double clicking opens body".
6 - 16
6.2.9 Opening label setting and program screens for selected POU
EDITING ST PROGRAMS
2
SCREEN
CONFIGURATION
7
OVERVIEW
1
This chapter explains the functions of ST editor to edit ST programs.
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
ST Editor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
7.1
7-1
GX Works2
7 EDITING ST PROGRAMS
7.1
ST Editor
Q CPU L CPU
FX
This section explains how to edit programs on the ST editor.
The ST editor is a language editor in text format for creating programs in the ST language.
The operating method is the same as that of general text editor. Spaces, tabs and line feeds can be entered
between keywords and variable names of the ST control syntax.
Screen display
Select Project view ⇒ "POU" ⇒ "Program" ⇒ "(program)" ⇒ "Program".
● Display colors
On the ST editor, the following display colors can be specified by selecting [View] ⇒ [Color and Font].
The colors in the parentheses indicate the default colors.
➀ Syntax (Blue)
➀ Syntax ➅ Device
➁ Operator (Black)
➁ Operator
➂ Comment (Dark green)
➃ Constant (Black)
➄ String constant (Black)
➅ Device (Black)
➆ Global label
➆ Global label (Magenta)
➇ Local label (Magenta)
➇ Local label
➃ Constant
➄ String constant
➂ Comment
For details, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
7-2
7.1 ST Editor
7.1.1
1
Writing ST programs
OVERVIEW
Write a ST program.
For functions/instructions used for ST program, refer to the structured programming manuals.
Operating procedure
•
2
Write a program in the text format using a keyboard.
SCREEN
CONFIGURATION
The colors of defined labels, devices, syntaxes, operators,
constants, string constants, and comments change when they are
entered.
Syntaxes entered in lower-case characters are automatically
changed to upper-case characters.
PROGRAMMING
PROCEDURE
3
● Options of labels displayed while typing a label
Labels match to the entered characters are displayed while typing a label. If only one option is available, it is
entered automatically.
Global labels and local labels of corresponding POU are displayed.
PROGRAM
CONFIGURATIONS
4
● Entering assignment operators
+
5
keys to enter an assignment operator (:=).
SETTING LABELS
7.1.2
+
Automatic indention
Insert a tab as the indention at the head of a new line automatically when a line feed is inserted during
program editing.
The indention can be set in the option setting.
Operating procedure
2.
Select "Auto Indention".
3.
Enter the ST control statement to the ST editor
(such as a FOR statement).
7
EDITING ST
PROGRAMS
Select [Tool] ⇒ [Options] ⇒ "Program Editor"
⇒ "ST".
8
EDITING STRUCTURED
LADDER PROGRAMS
1.
6
COMMON OPERATIONS
OF PROGRAM EDITORS
Press the
When a line feed is inserted, the next line is indented based on the content of the statement.
7.1.1 Writing ST programs
7-3
GX Works2
7 EDITING ST PROGRAMS
7.1.3
Setting tab length
Set a tab length in the option setting.
Operating procedure
7-4
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "ST".
2.
Set the "Tabulator Length".
7.1.3 Setting tab length
7.1 ST Editor
Operating procedure
1.
2.
Move the cursor to the instruction/function/control syntax entered to the ST editor.
Select [Edit] ⇒ [Display Template] (
3
).
A template is inserted.
3.
2
SCREEN
CONFIGURATION
Insert templates correspond to the instructions/functions/control syntaxes on the ST editor.
A template of argument is inserted when an instruction or function is entered from the Function Block
Selection window by the drag and drop operation.
A template is an argument data type defined for each instruction/function or a format of control syntax.
For details of data types and formats displayed in the templates, refer to the following manual.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
OVERVIEW
1
Using templates
Enter variables according to the inserted template.
4
PROGRAM
CONFIGURATIONS
Delete the data type name enclosed by "?", and enter a label name or device that is equivalent to
the data type.
PROGRAMMING
PROCEDURE
7.1.4
● Inserting templates
A template can also be inserted by right-clicking the instruction/function/control syntax entered to the ST editor and
) from the shortcut menu.
6
Select [Edit] ⇒ [Mark Template (Left)] (
)/[Mark Template (Right)] (
), or press
keys to set an argument of the template in the selected status one by one.
+
+
COMMON OPERATIONS
OF PROGRAM EDITORS
selecting [Display Template] (
● Editing arguments
SETTING LABELS
5
/
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
7.1.4 Using templates
7-5
GX Works2
7 EDITING ST PROGRAMS
MEMO
7-6
7.1.4 Using templates
EDITING STRUCTURED
LADDER/FBD PROGRAMS
This chapter explains the functions of program editor to edit structured ladder/FBD programs.
2
SCREEN
CONFIGURATION
8
OVERVIEW
1
PROGRAMMING
PROCEDURE
3
4
PROGRAM
CONFIGURATIONS
Creating Ladder/FBD Programs. . . . . . . . . . . . . . . . . . . . . . . . 8-2
Editing in Select Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
Drawing Lines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
Operating Ladder Symbols . . . . . . . . . . . . . . . . . . . . . . . . . . 8-11
Changing Type of Contact and Coil. . . . . . . . . . . . . . . . . . . . 8-15
Operating Functions and Function Blocks . . . . . . . . . . . . . . 8-18
Changing Display Format of Variables . . . . . . . . . . . . . . . . . 8-21
Editing Ladder Blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-26
Editing Comments. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-32
Editing in Guided Mode . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-34
Checking Wrapping Position for Printing . . . . . . . . . . . . . . 8-39
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
8.1
8.2
8.3
8.4
8.5
8.6
8.7
8.8
8.9
8.10
8.11
8-1
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.1
Creating Ladder/FBD Programs
Q CPU L CPU
FX
This section explains how to create ladder programs and functions for creating ladder programs on the
structured ladder/FBD editor.
The structured ladder/FBD editor is a language editor in graphic format for creating programs in the structured
ladder/FBD language.
Ladder symbols such as contacts, coils, and functions/function blocks are used to create structured ladder/
FBD programs. Each ladder symbol is connected with a line.
The suitable editing mode can be selected according to the program entry method and editing target. (
Section 8.1.1)
Screen display
Select Project view ⇒ "POU" ⇒ "Program" ⇒ "(program)" ⇒ "Program".
Ladder block header
Program editing area
Coil
Ladder block
Contact
Function
Left power
rail
Jump
Comment
Pointer
Return
Ladder Block
Label
Input label
Output label
Grid
Display contents
Name
8-2
Description
Ladder block
A unit for creating a program
A ladder block consists of a ladder block header and a program editing area.
Ladder block header
Display information such as a title set for each ladder block, and a label name of the jump
target.
Program editing area
An area for creating a program.
Ladder symbols can be placed in the grid area.
Reference
Section 8.8
Section
8.8.4
Section 8.1
Left power rail
A start position of the structured ladder program.
For FBD, the display of left power rail can be switched to hide.
Section
8.8.7
Grid
Indicate specific positions of tab stop and start/end positions of lines.
Section
8.8.8
8.1 Creating Ladder/FBD Programs
1
Selecting editing modes
Select mode
Interconnect mode
Guided mode
■
Description
Reference
Place ladder symbols such as contacts and coils in a ladder block.
Connect ladder symbols with a line.
This mode is used for editing programs mainly with the mouse.
Section 8.2
Connect placed ladder symbols with a line.
Section
8.3.2
Place ladder symbols such as contacts, coils, and instructions within the grid
frames.
This mode is used for editing programs mainly with the keyboard.
Section
8.10
2
SCREEN
CONFIGURATION
Mode
OVERVIEW
Select a program editing mode. The following table shows the selectable modes.
3
Mouse cursor and grid
The following table shows different appearances of the mouse cursor and grid according to the mode.
Table 6.4.1-1 Displays in different editing modes for the structured ladder editor
Mode
Menu and toolbar
Auto connect
[Edit] ⇒ [Select Mode]
OFF
Mouse cursor
Grid display
4
PROGRAM
CONFIGURATIONS
Select mode
ON
OFF
ON
5
SETTING LABELS
OFF
6
COMMON OPERATIONS
OF PROGRAM EDITORS
[Edit] ⇒ [Guided Mode]
⇒ [Guided Editing]
7
EDITING ST
PROGRAMS
Guided mode
[Edit] ⇒ [Interconnect Mode]
8
EDITING STRUCTURED
LADDER PROGRAMS
Interconnect
mode
PROGRAMMING
PROCEDURE
8.1.1
8.1.1 Selecting editing modes
8-3
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.2
Editing in Select Mode
Q CPU L CPU
This section explains how to enter instructions.
8.2.1
Entering ladder symbols
Enter ladder symbols such as contacts, coils, and application instructions.
Table 8.2.1-1
Ladder symbols
Toolbar
Shortcut key
Open Contact*1
Close Contact*1
Coil*1
Jump
+
Return
+
Open Branch*1
Close Branch*1
Input Label
Output Label
Horizontal Line
Vertical Line
Rising Pulse*1,*2
−
Falling Pulse*1,*2
−
Rising Pulse Close*1,*3
−
Falling Pulse Close*1,*3
−
Comment
+
*1: These items cannot be used for FBD.
*2: Not supported by FX0, FX0S, FX0N, FXU, and FX2C.
*3: Supported by Universal model QCPU/LCPU.
Operating procedure
1.
Select [Edit] ⇒ [Ladder Symbol] ⇒ [(ladder symbol)].
The shape of the mouse cursor changes according to the selected ladder symbol.
8-4
8.2.1 Entering ladder symbols
FX
8.2 Editing in Select Mode
2.
Click the position where the ladder symbol is entered in the program editing area.
1
8.2.2
OVERVIEW
The selected ladder symbol is entered.
Entering instructions
2
SCREEN
CONFIGURATION
Enter an instruction in the Select mode.
Operating procedure
1.
Select [Edit] ⇒ [Input Instruction] (
).
The Input Instruction screen is displayed.
PROGRAMMING
PROCEDURE
Ladder symbol
selection field
3
Instruction device
entry field
The following table shows the display contents of the screen.
Name
Instruction device entry field
2.
Select a ladder symbol.
Clicking the
PROGRAM
CONFIGURATIONS
Ladder symbol selection field
4
Description
button displays the list of ladder symbols.
Enter an instruction and/or a device.
Enter an instruction and device, and click the
button.
5
Click the desired position.
The instruction is entered at the cursor position.
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
3.
SETTING LABELS
The shape of the cursor changes according to the selected instruction.
8.2.2 Entering instructions
8-5
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
■
Changing instruction
Change entered operator, function, or function block.
Operating procedure
1.
Select an operator, function, or function block to be changed.
2.
Press the initial letter of the instruction to be changed on the keyboard.
A list of instructions is displayed on the Input Instruction screen.
3.
Select an instruction and click the
button.
The operator, function, or function block is changed.
After changing the instruction, adjust the arguments of the instruction if necessary.
● Entering POUs
Operators, functions, and function blocks can also be selected from the Function Block Selection window. (
Section 6.2.1)
● Instruction device entry field
• When more than one character of an instruction/label is entered on the Input Instruction screen, options of
instruction/label whose first characters match are displayed. An instruction/label can be selected by using the
/
key.
• When nothing is entered in the ladder symbol selection field, 'instruction + space + device/label' can be entered.
(For example: ld X0) However, when an instruction exists as a ladder symbol; such as JMP and RET, is entered,
it is entered as a ladder symbol. For entering in functional description, select "
" on the ladder symbol
selection field, and enter an instruction such as JMP.
● Entering unregistered labels
By setting the option, a new label setting can be added on the Label Registration/Selection screen when an
unregistered label is entered.
Check the "Declare new label name" item under [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒
"Label". (
Section 14.2)
● Browse Manual button
A detail of the instruction can be displayed by clicking the
button on the Input Instruction screen.
(
GX Works2 Version 1 Operating Manual (Common))
8-6
8.2.2 Entering instructions
8.3 Drawing Lines
1
Drawing Lines
Q CPU L CPU
FX
This section explains how to create lines in a program.
OVERVIEW
8.3
2
SCREEN
CONFIGURATION
Connecting lines automatically when entering ladder
symbols
When entering ladder symbols of contacts/coils/jump/return in the Select mode, the line can be
connected automatically.
3
Operating procedure
1.
Select [Edit] ⇒ [Ladder Symbol] ⇒ [(ladder symbol to be entered)].
2.
4
PROGRAM
CONFIGURATIONS
A graphical image of the selected ladder symbol is appended to the mouse cursor.
If a line can be connected to the left-hand horizontal direction, a line is displayed to the left-hand
direction.
PROGRAMMING
PROCEDURE
8.3.1
Click the position where the ladder symbol is entered.
5
SETTING LABELS
If a lines can be connected to the left-hand horizontal direction, the following message is displayed.
3.
Click the
button.
The selected ladder symbol is entered and the line is connected automatically to the left-hand
horizontal direction.
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
● Entering position of ladder symbols
When entering the ladder symbols, click and drag a ladder symbol moves the entering position of the ladder
symbols.
This function is useful when creating a ladder in parallel as shown below.
EDITING STRUCTURED
LADDER PROGRAMS
8
Click
Drag and drop
8.3.1 Connecting lines automatically when entering ladder symbols
8-7
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.3.2
Connecting ladder symbols with lines
Connect ladder symbols with a line.
Operating procedure
1.
Select [Edit] ⇒ [Select Mode] (
Mode] (
)/[Interconnect
).
For the interconnect mode, the cursor changes to
2.
For the select mode, click the start position of the
line.
The cursor changes to
3.
Drag
.
.
Drag the line from the start position to the end
position.
A line is drawn in a vertical or horizontal straight line.
8.3.3
Connecting lines automatically
Connect lines automatically by specifying the start and end points.
Operating procedure
1.
Select [Edit] ⇒ [Auto Connect].
Click
For the interconnect mode, the cursor changes from
to
.
2.
Click the start position.
For the interconnect mode, the cursor changes to
3.
Click the end position.
The line is automatically routed.
8-8
8.3.2 Connecting ladder symbols with lines
.
Click
8.3 Drawing Lines
8.3.4
1
Overwriting input/output variable with lines
OVERVIEW
Overwrite an input/output variable of a function or function block with a line.
Operating procedure
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒
"Structured Ladder/FBD" ⇒ "FB/FUN".
2.
Select "Pin overwrites".
3.
Select [Edit] ⇒ [Auto Connect].
4.
Draw a line over the input or output variable.
2
SCREEN
CONFIGURATION
1.
Overwrite with a line
3
8.3.5
PROGRAMMING
PROCEDURE
The existing input/output variable is automatically overwritten with the line.
Rearranging lines automatically
4
PROGRAM
CONFIGURATIONS
Rearrange and redraw a line when the Auto connect function is activated.
Operating procedure
1.
Select the line to be rearranged.
2.
Select [Edit] ⇒ [Recalculate Line].
5
SETTING LABELS
<Before automatic arrangement execution>
COMMON OPERATIONS
OF PROGRAM EDITORS
6
<After automatic arrangement execution>
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8.3.4 Overwriting input/output variable with lines
8-9
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.3.6
Inserting and deleting rows and columns
Insert and delete rows and columns.
■
Inserting rows and columns
Insert a row or a column.
Operating procedure
1.
Select [Edit] ⇒ [Insert Row] (
The cursor changes to
2.
or
)/[Insert Column] (
).
.
Click the position where a row or column is inserted.
A row or column is inserted by each click.
Inserts a column
by each click.
■
Deleting rows and columns
Delete a row or a column.
Operating procedure
1.
Select [Edit] ⇒ [Insert Row] (
The cursor changes to
2.
or
)/[Insert Column] (
.
Hold down the
key and click the position where a row
or column is deleted.
A row or column is deleted by each click.
8 - 10
).
8.3.6 Inserting and deleting rows and columns
Shift
+ click
Deletes a column
by each click.
8.4 Operating Ladder Symbols
1
Operating Ladder Symbols
Q CPU L CPU
FX
This section explains how to operate ladder symbols such as contacts or coils in the select mode.
OVERVIEW
8.4
2
Moving ladder symbols
SCREEN
CONFIGURATION
8.4.1
Disable the Auto connect function and move a ladder symbol.
Operating procedure
Select [Edit] ⇒ [Select Mode] (
The cursor changes to
).
PROGRAMMING
PROCEDURE
1.
3
.
2.
Click a ladder symbol.
3.
Drag it to the desired position.
Drag
PROGRAM
CONFIGURATIONS
4
Moving ladder symbols with lines connected
5
SETTING LABELS
8.4.2
Enable the Auto connect function and move a ladder symbol with the lines connected.
Operating procedure
Select [Edit] ⇒ [Auto Connect].
to
6
.
2.
Click a ladder symbol.
3.
Drag it to the desired position.
COMMON OPERATIONS
OF PROGRAM EDITORS
The cursor changes from
Drag
The ladder symbol moves with the lines connected.
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
1.
8.4.1 Moving ladder symbols
8 - 11
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
● Bend points of the line
The bend points of the line when the ladder symbol is moved, are at the adjacent points of ladder symbols.
Bend point
A bend point can be changed to any desired point by adding a bend point on the line as shown below.
When adding a bend point, select [Edit] ⇒ [Interconnect Mode] ( ).
[Select Mode] ( )
[Interconnect Mode] ( )
Double click
Move the ladder symbol
A bend point is added.
Added bend point
Note that when deleting the added bend point, delete not only the line but the bend point as well as shown
below.
Select a range and press Delete
8 - 12
8.4.2 Moving ladder symbols with lines connected
8.4 Operating Ladder Symbols
8.4.3
1
Copying ladder symbols
OVERVIEW
Copy a ladder symbol within the editor or to another structured ladder/FBD editor.
● Copying ladder symbols by the drag-and-drop operation
Ladder symbols can be copied within the editor.
2
Operation
+
SCREEN
CONFIGURATION
1. Hold down the
key and click the ladder symbol.
2. Drag it to the desired position.
Ctrl
3
PROGRAMMING
PROCEDURE
Drag
● Copying ladder symbols using the clipboard
Ladder symbols can be copied within the same editor or to another structured ladder/FBD editor by
the basic menu options using a clipboard or shortcut keys.
Operation
)/[Copy] (
5
).
2. Select [Edit] ⇒ [Paste] ( ).
3. Click the desired position. The upper left of the pasted position is the position to be clicked.
SETTING LABELS
1. Select [Edit] ⇒ [Cut] (
4
PROGRAM
CONFIGURATIONS
Copied ladder symbol
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8.4.3 Copying ladder symbols
8 - 13
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
● Copying ladder symbols to other ladder blocks
Ladder symbols cannot be copied or moved to other ladder blocks by the drag-and-drop operation when the Auto
connect function is enabled.
In order to copy or move ladder symbols, disable the Auto connect function or use the clipboard.
Select [Edit] ⇒ [Auto Connect] to switch the Auto connect function ON/OFF.
● Copying ladder symbols by the drag-and-drop operation when the Auto connect function is enabled
The line of the copied ladder symbol is connected automatically when the Auto connect function is activated. If the
line is not connected properly, or ladder symbols are overlapped, disable the Auto connect function by selecting
[Edit] ⇒ [Auto Connect] (uncheck the item) and correct the line.
● Cutting/copying ladder symbols using a clipboard
When cutting or copying ladder symbols using a clipboard, the selection range differs between left-clicking and
right clicking of a mouse.
Select the menu by left-clicking on the ladder symbol to delete lines and a ladder symbol. Select the menu by right
clicking on the ladder symbol to leave the lines and delete the ladder symbol only.
< For cutting function >
Left-click on the ladder
symbol and select
[Edit] [Cut]
A ladder symbol and lines are cut.
Right-click on the ladder
symbol and select
[Edit] [Cut]
8 - 14
8.4.3 Copying ladder symbols
Only a ladder symbol is cut.
8.5 Changing Type of Contact and Coil
1
Changing Type of Contact and Coil
Q CPU L CPU
FX
This section explains how to change the type of contact and coil.
OVERVIEW
8.5
2
Setting the type of contact and coil
SCREEN
CONFIGURATION
8.5.1
The following table shows the types that can be set for contacts and coils.
Type
Ladder symbol
3
Open Contact
Contact*1
PROGRAMMING
PROCEDURE
Close Contact
Rising Pulse*2
Falling Pulse*2
Rising Pulse Close*3
PROGRAM
CONFIGURATIONS
Falling Pulse
4
Close*3
Normal
Negation
Coil*1
Set
5
Open Contact
/
Close Contact
/
Bit type input/output pin
SETTING LABELS
Reset
Open Contact
Close Contact
6
Open Contact
COMMON OPERATIONS
OF PROGRAM EDITORS
Jump
Return
Close Contact
*1: These items cannot be used for FBD.
*2: Not supported by FX0, FX0S, FX0N, FXU, and FX2C.
7
EDITING ST
PROGRAMS
*3: Supported by Universal model QCPU/LCPU.
EDITING STRUCTURED
LADDER PROGRAMS
8
8.5.1 Setting the type of contact and coil
8 - 15
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
Operating procedure
1.
Select a contact or coil whose type is changed.
2.
Select [Edit] ⇒ [Signal Configuration] ⇒ [Configure].
3.
Select the type on the Signal Configuration screen.
4.
Click the
button.
The selected contact or coil is set.
<Contact selected>
<Coil selected>
<Bit type input/output pin, jump or return selected>
● Setting the type of contact and coil
The type of contact or coil can be set by double-clicking a contact or coil.
● Bit type input/output pin
For a bit type input pin and a bit type output pin connected to a POU such as an FB or function, its contact type of
open/close can be changed.
To change the type of a contact, double-click on the position designated in the following figure, or click on the
position designated in the following figure and select [Edit] ⇒ [Signal Configuration] ⇒ [Configure].
For an input pin,
double-click here.
8 - 16
8.5.1 Setting the type of contact and coil
For an output pin,
double-click here.
8.5 Changing Type of Contact and Coil
8.5.2
1
Changing contact and coil in predetermined order
Type
OVERVIEW
The following table shows the order when changing the type of contact and coil.
Change sequence
Open
Contact
Close
Contact
Rising Pulse*2
Falling Pulse*2
Rising Pulse
Close*3
Falling Pulse
Close*3
2
Normal
Negation
Set
SCREEN
CONFIGURATION
Contact*1
Reset
Coil*1
Jump
Return
Open Contact
Close Contact
Open Contact
Close Contact
4
Open Contact
PROGRAM
CONFIGURATIONS
Bit type input/
output pin
PROGRAMMING
PROCEDURE
3
Close Contact
*1: These items cannot be used for FBD.
5
*2: Not supported by FX0, FX0S, FX0N, FXU, and FX2C.
SETTING LABELS
*3: Supported by Universal model QCPU/LCPU.
Operating procedure
Select a contact or coil.
2.
Select [Edit] ⇒ [Signal Configuration] ⇒ [Toggle].
6
COMMON OPERATIONS
OF PROGRAM EDITORS
1.
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8.5.2 Changing contact and coil in predetermined order
8 - 17
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.6
Operating Functions and Function Blocks
Q CPU L CPU
FX
This section explains how to operate functions and function blocks.
8.6.1
Adding variables automatically when entering functions and
function blocks
Configure the option setting in order to add input/output variables automatically when functions or
function blocks are entered. (This setting is enabled only when the Auto connect function is activated.)
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "FB/
FUN".
2.
Select "Automatic input/output labels".
To add an output variable to ENO, select "Automatic ENO labels".
3.
Select [Edit] ⇒ [Auto Connect].
<Without adding input/output variables>
8 - 18
<Adding input/output variables>
8.6.1 Adding variables automatically when entering functions and function blocks
8.6 Operating Functions and Function Blocks
8.6.2
1
Editing variable names and instance names
OVERVIEW
Edit a variable name or function block instance name.
Operating procedure
1.
Click the entry field of a ladder symbol such as a contact, coil, or input/output label.
2.
Edit the variable name or instance name.
<Input variable>
<Contact>
2
SCREEN
CONFIGURATION
The entry field is enabled for editing.
<Function block>
PROGRAMMING
PROCEDURE
3
● Using set label names
Right-click the entry field when it is enabled for editing, and select the label name on the Label Registration/
Selection screen.
(
Section 6.2.2)
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8.6.2 Editing variable names and instance names
8 - 19
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.6.3
Changing the number of arguments for functions and
function blocks
Change the number of arguments of functions and function blocks in the application functions.
For details of functions whose number of arguments can be changed, refer to the following manual.
MELSEC-Q/L Structured Programming Manual (Application Functions)
FXCPU Structured Programming Manual (Application Functions)
To add or delete an argument, select a function or a function block and proceed the following operation.
● Adding an argument
Operation
• Select [Edit] ⇒ [Number of Pins] ⇒ [Increment] (
).
● Deleting an argument
Operation
• Select [Edit] ⇒ [Number of Pins] ⇒ [Delete] (
).
Increment pins
Added arguments
Decrement pins
● Adding and deleting arguments
Arguments can also be added or deleted using the following method.
• Using the
or
key
• Changing the height of the ladder symbol using the mouse
8 - 20
8.6.3 Changing the number of arguments for functions and function blocks
8.7 Changing Display Format of Variables
1
Changing Display Format of Variables
Q CPU L CPU
FX
This section explains how to change the display format of variables.
OVERVIEW
8.7
Displaying variable names in multiple lines
Change the view mode to display variable names of contacts and coils in multiple lines by setting the
option.
3
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "Label".
2.
Select "Display label name/comment of contact or coil in multiline".
3.
Set the values of "Display Lines" and "Visible Characters per Line".
5
Displaying labels and devices simultaneously
SETTING LABELS
8.7.2
4
<Multiple lines>
PROGRAM
CONFIGURATIONS
<Single line>
Change the view mode to display the labels and devices simultaneously by setting the option.
Operating procedure
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "Label".
2.
Select "Display labels and devices".
6
COMMON OPERATIONS
OF PROGRAM EDITORS
1.
The assigned devices are displayed.
<Display labels and devices>
EDITING ST
PROGRAMS
7
8
EDITING STRUCTURED
LADDER PROGRAMS
<Display labels>
PROGRAMMING
PROCEDURE
8.7.1
SCREEN
CONFIGURATION
2
8.7.1 Displaying variable names in multiple lines
8 - 21
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
● Devices not to be displayed
The devices are not displayed in the following cases even the option is set.
• When the program is never compiled
• When the labels are used for array element
• When structured data type labels are used
● Edit and find/replace when the labels and devices are displayed simultaneously
When the labels and devices are displayed simultaneously, only labels can be the target of edit and find/replace.
8.7.3
Displaying instance names in multiple lines
Display wrapped function block instance name within the width of function block by setting the option.
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "FB/
FUN".
2.
Select "Wrap instance name for function block".
<Single line>
8.7.4
<Wrapping a line>
Specifying the number of displaying characters for variable
names
Change the number of displaying characters for variable names of functions and function blocks by
setting the option.
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "FB/
FUN".
2.
Select "Specify the number of enable characters for label name/comment".
3.
Set the number of characters (2 to 255).
<16 characters>
8 - 22
8.7.3 Displaying instance names in multiple lines
<8 characters>
8.7 Changing Display Format of Variables
8.7.5
1
Changing display format of variable
Entered format display
OVERVIEW
Change the display format of variable to the device/address/comment format.
Label comment display
Address format display
3
PROGRAMMING
PROCEDURE
Device format display
SCREEN
CONFIGURATION
2
● Displaying in the entered format
Operation
• Select [View] ⇒ [View Mode] ⇒ [Label].
Variables are displayed in the format as they are entered.
PROGRAM
CONFIGURATIONS
4
● Displaying in the device format
Operation
• Select [View] ⇒ [View Mode] ⇒ [Device].
Entered format is displayed in the device format.
As for labels, the assigned devices are displayed in the device format.
5
SETTING LABELS
● Displaying in the address format
Operation
• Select [View] ⇒ [View Mode] ⇒ [Address].
Devices are displayed in the address format.
As for labels, the assigned devices are displayed in the address format.
6
COMMON OPERATIONS
OF PROGRAM EDITORS
● Displaying label comments
Operation
• Select [View] ⇒ [View Mode] ⇒ [Comment].
Label comments are displayed.
Device comments are not displayed.
● Switching label/device/address display
7
• Select [View] ⇒ [View Mode] ⇒ [Change Label-Device-Address Mode].
The display is switched in order (label, device, address) by selecting the menu each time.
[Change Label-Device-Address Mode]
First operation
Device format display
8
Address format display
EDITING STRUCTURED
LADDER PROGRAMS
Entered format display
Second operation
Third operation
8.7.5 Changing display format of variable
EDITING ST
PROGRAMS
Operation
8 - 23
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
● Switching label/comment display
Operation
• Select [View] ⇒ [View Mode] ⇒ [Change Label-Comment Mode].
The display is switched between label and comment by selecting the menu each time.
[Change Label-Comment Mode]
Entered format display
Comment display
● Batch-changing display of all program editors to device format display
Operation
• Select [View] ⇒ [All Device Display].
The display of all program editors (except for ST) being opened is changed to the device
format display.
● Batch-canceling device format display on all program editors
Operation
• Select [View] ⇒ [Cancel All Device Display].
The device format display of all program editors is canceled, and the display returns to the
entered format.
8 - 24
8.7.5 Changing display format of variable
8.7 Changing Display Format of Variables
<Device format display>
<Comment display>
● Structured data type/function block labels
Structured data type/function block labels are displayed as label names even when the display format is changed
to the comment display.
3
<Comment display>
PROGRAMMING
PROCEDURE
<Label format display>
2
SCREEN
CONFIGURATION
● Displaying uncompiled labels and label comments
An asterisk (*) is prefixed to each label name of uncompiled labels to which devices are not assigned when the
display format is changed to the device format or address format.
An asterisk (*) is prefixed to each label name of labels to which label comments are not set when the display format
is changed to the comment display.
OVERVIEW
1
● Constant type labels
When the display format is the device format, constant type labels are displayed as constants set in a label setting
editor.
<Label format display>
<Device format display>
PROGRAM
CONFIGURATIONS
4
● Restrictions on operations when changing the display format
Program editing and search/replace functions are disabled in the device/address format or comment display. To
operate these functions, return the setting to [Standard].
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8.7.5 Changing display format of variable
8 - 25
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.8
Editing Ladder Blocks
Q CPU L CPU
This section explains how to edit ladder blocks.
8.8.1
Inserting ladder blocks
Add or insert a new ladder block.
● Inserting a ladder block at the start
Operation
• Select [Edit] ⇒ [New Ladder Block List] ⇒ [Top].
A new ladder block is inserted at the start of all ladder blocks.
● Inserting a ladder block in front of the current ladder block
Operation
• Select [Edit] ⇒ [New Ladder Block List] ⇒ [Before] (
).
A new ladder block is inserted in front of the ladder block being edited.
● Inserting a ladder block in back of the current ladder block
Operation
• Select [Edit] ⇒ [New Ladder Block List] ⇒ [After] (
).
A new ladder block is inserted in back of the ladder block being edited.
● Inserting a ladder block at the end
Operation
• Select [Edit] ⇒ [New Ladder Block List] ⇒ [Bottom].
A new ladder block is inserted at the end of all ladder blocks.
8.8.2
Deleting ladder blocks
Delete a selected ladder block.
Operating procedure
•
8 - 26
Select [Edit] ⇒ [Delete].
8.8.1 Inserting ladder blocks
FX
8.8 Editing Ladder Blocks
Cut/copy/paste/move ladder blocks within the editor or to another program editor on the screen.
Ladder blocks can be pasted/moved between program editors with the same programming language.
1.
Select a ladder block by clicking the ladder block header.
2.
Select [Edit] ⇒ [Cut] (
3.
Select a ladder block to which cut/copied ladder block is pasted, and select [Edit] ⇒
[Paste] (
).
)/[Copy] (
).
Copying/moving ladder blocks by the drag-and-drop operation
Ladder blocks can be copied/moved by clicking the ladder block header and the drag-and-drop
operation.
• To cancel the copy/move operation, press the
key during the drag-and-drop operation.
• To switch the copy/move operations, press the
key during the drag-and-drop operation.
(Different icons are displayed for the copy and move operations.)
Ctrl
4
5
Move
SETTING LABELS
Copy
3
PROGRAMMING
PROCEDURE
A cut/copied ladder block is inserted above the selected ladder block.
SCREEN
CONFIGURATION
2
Operating procedure
■
OVERVIEW
1
Cutting, copying, pasting, and moving ladder blocks
PROGRAM
CONFIGURATIONS
8.8.3
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8.8.3 Cutting, copying, pasting, and moving ladder blocks
8 - 27
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.8.4
Editing ladder block headers
A ladder block header is an area that displays information set for each ladder block.
Create a ladder block label and ladder block title.
Screen display
Ladder block number
Ladder block label
Ladder block title
Ladder block header
Display contents
Name
Description
Ladder block number
A number automatically assigned from the start.
Ladder block label
Enter a character string to be specified as the jump target when using the jump instruction.
A colon (:) needs to be entered at the end of the character string.
A maximum number of characters that can be entered is 7.
Ladder block title
Enter a meaning of the program as a title when necessary.
A maximum number of characters that can be entered is 20.
Operating procedure
1.
Double-click the ladder block header.
The Ladder Block screen is displayed.
Double-click
(Or press Enter twice
when the cursor is pointed
at the ladder block
header.)
2.
8 - 28
Enter the ladder block label and
ladder block title.
8.8.4 Editing ladder block headers
8.8 Editing Ladder Blocks
8.8.5
1
Editing listed ladder blocks
OVERVIEW
Edit listed ladder blocks in the program. The following information is displayed in the list.
• Ladder block number
• Ladder block label
• Ladder block title
2
SCREEN
CONFIGURATION
Screen display
Select [Edit] ⇒ [Ladder Block List].
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
5
SETTING LABELS
Screen button
●
Inserts a new ladder block in front of the selected ladder block.
●
6
COMMON OPERATIONS
OF PROGRAM EDITORS
Inserts a new ladder block at the end of the existing ladder blocks.
●
Displays an editing screen of the ladder block header.
●
,
,
,
,
,
7
Same functions as the buttons on program editors.
●
EDITING ST
PROGRAMS
Searches for a ladder block based on the ladder block label.
●
Closes the Ladder Block List screen.
EDITING STRUCTURED
LADDER PROGRAMS
8
8.8.5 Editing listed ladder blocks
8 - 29
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.8.6
Setting ladder block labels/titles
Set a ladder block label/title on the Ladder Block screen.
Operating procedure
1.
Select [Edit] ⇒ [Ladder Symbol] ⇒ [Ladder Block Label].
2.
Set the ladder block label and ladder block title, and click the
8.8.7
button.
Switching to display/hide left power rail
Switch to display/hide left power rail for each ladder block.
When using FBD, switch the left power rail to hide.
Operating procedure
•
Select a ladder block, and select [Edit] ⇒ [Ladder Symbol] ⇒ [Left Power Rail] ( ).
The left power rail of selected ladder block is switched to display/hide.
<Display left power rail>
<Hide left power rail>
Restrictions
● Entering position of line when hiding left power rail
When a vertical line is entered on the position of left power rail, the vertical line is regarded as the left power rail.
When entering a vertical line, avoid the left power rail position.
Regarded as
left power rail.
If a line is entered on the position of left power rail as shown below, a warning message "Multiple ladders in one
network. (C2034)" is displayed on the Output window at compilation.
● Compilation result when FBD is used
When multiple ladder blocks are created for single ladder block, a warning message "Multiple ladders in one
network. (C2034)" is displayed on the Output window at compilation.
Disabling the warnings is recommended when FBD is used.
Set the warning code "C2034" under [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Output Result" ⇒ "Disable Warning
Section 10.4.2)
Codes". (
8 - 30
8.8.6 Setting ladder block labels/titles
8.8 Editing Ladder Blocks
1
Displaying grid
A grid indicates specific positions, such as tab stop positions and the start/end position of a line, on a
program editing area. Switch the grid display on a program editing area.
Operating procedure
2
<Without grid>
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
SETTING LABELS
5
COMMON OPERATIONS
OF PROGRAM EDITORS
6
7
EDITING ST
PROGRAMS
<With grid>
SCREEN
CONFIGURATION
Select [View] ⇒ [Grid].
8
EDITING STRUCTURED
LADDER PROGRAMS
•
OVERVIEW
8.8.8
8.8.8 Displaying grid
8 - 31
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.9
Editing Comments
Q CPU L CPU
This section explains how to edit comments.
Comments can be entered in the same manner as ladder symbols. (
FX
Section 8.2.1)
Operating procedure
•
Select [Edit] ⇒ [Ladder Symbol] ⇒ [Comment] (
8.9.1
).
Editing comments
Edit a comment.
Operating procedure
1.
Click the comment.
The comment entry field is enabled.
2.
8.9.2
Comment entry field
Enter a comment.
Press the
+
Click
keys to insert a line feed.
Changing the size of comment entry field
Change the size of a comment entry field.
After changing to the Select Mode, change the size by the following procedure. (
Section 8.1.1)
Operating procedure
1.
Click the bottom right corner of the comment.
2.
Drag the corner to adjust the size.
Click
Drag
8 - 32
8.9.1 Editing comments
8.9 Editing Comments
8.9.3
1
Moving comments
OVERVIEW
Move a comment.
Comments can be moved only within the same ladder block.
Operating procedure
SCREEN
CONFIGURATION
3
PROGRAMMING
PROCEDURE
Click and drag
PROGRAM
CONFIGURATIONS
4
5
SETTING LABELS
Drag it to the desired position.
6
COMMON OPERATIONS
OF PROGRAM EDITORS
2.
2
7
EDITING ST
PROGRAMS
Click the head (left end) of the comment.
8
EDITING STRUCTURED
LADDER PROGRAMS
1.
8.9.3 Moving comments
8 - 33
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.10
Editing in Guided Mode
Q CPU L CPU
FX
This section explains how to edit programs in the Guided mode, which is convenient when data is entered
mainly from the keyboard.
Screen display
Select [Edit] ⇒ [Guided Mode] ⇒ [Guided Editing] (
).
Grid cursor
8.10.1
Grid in Guided mode
Overwrite mode and insert mode
Select either overwrite mode or insert mode in the Guided mode.
Edit
Description
Grid cursor color
Overwrite Mode
Overwrites the existing ladder symbol at the cursor
position with the entered ladder symbol.
Blue
Insert Mode
Moves the existing ladder symbol at the cursor
position to the right and inserts a ladder symbol.
Purple
For switching between overwrite and insert modes, follow the operation below.
Operating procedure
•
Select [Edit] ⇒ [Guided Mode] ⇒ [Overwrite Mode]/[Insert Mode].
The mode changes between overwrite and insert, and the grid cursor color changes.
● Switching "Overwrite Mode" and "Insert Mode"
The mode can also be switched by pressing the
8 - 34
8.10.1 Overwrite mode and insert mode
key.
8.10 Editing in Guided Mode
8.10.2
1
Entering ladder symbols
OVERVIEW
The ladder symbol entry method in the Guided mode is the same as that of the Select mode.
For entering ladder symbols, refer to the following section.
Section 8.2.1 Entering ladder symbols
2
Entering instructions
SCREEN
CONFIGURATION
8.10.3
The following explains how to enter instructions in the Guided mode.
The instruction entry method in the Guided mode is the same as that of the Select mode.
For entering instructions, refer to the following section.
Section 8.2.2 Entering instructions
PROGRAMMING
PROCEDURE
8.10.4
3
Connecting ladder symbols with lines
4
PROGRAM
CONFIGURATIONS
Connect the entered ladder symbols with a line.
Operating procedure
1.
Select [Edit] ⇒ [Guided Mode] ⇒ [Line Mode].
The thickness of grid cursor is doubled. The normal grid in the Guided
mode is divided into 4 5 parts of smaller grids to specify a position.
connected by pressing the
3.
SETTING LABELS
Move the cursor to the position where the line is to be
Press the
/
key.
6
button (Horizontal line).
COMMON OPERATIONS
OF PROGRAM EDITORS
2.
5
A horizontal line is drawn by the length of one divided grid.
Press the
button (Vertical line).
7
EDITING ST
PROGRAMS
A vertical line is drawn by the length of one divided grid.
8
EDITING STRUCTURED
LADDER PROGRAMS
4.
8.10.2 Entering ladder symbols
8 - 35
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.10.5
Drawing lines
Draw a line.
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒
"Guided".
2.
Select "Allow hotkey repeater".
Draw a line using the Horizontal Line Segment or Vertical Line Segment screen.
Operating procedure
1.
Press the
(Horizontal line) or
(Vertical line) button.
The Horizontal Line Segment or Vertical Line
Segment screen is displayed.
2.
Set the length of the line to be drawn using the grid width/height as the unit of
length.
A line of the specified length is displayed.
8 - 36
8.10.5 Drawing lines
8.10 Editing in Guided Mode
8.10.6
1
Wrapping ladder
OVERVIEW
Wrap a ladder if it does not fit in one line.
Operating procedure
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒
"Guided".
2
SCREEN
CONFIGURATION
1.
Select "Ladder Wrapping".
● Target of wrapping ladder to be displayed
Ladders edited after setting the above option are wrapped. (The display of edited ladders before setting the above
option is not changed.)
8.10.7
Setting Guided mode as the default editing mode
4
PROGRAM
CONFIGURATIONS
2.
PROGRAMMING
PROCEDURE
3
5
SETTING LABELS
Set the Guided mode as the default editing mode of the structured ladder/FBD editor.
Operating procedure
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒
"Guided".
2.
Select "Open Structure Ladder/FBD Editor in guided mode".
8.10.8
6
COMMON OPERATIONS
OF PROGRAM EDITORS
1.
Entering variable names after contacts and coils
7
Enter variable names continuously after a contact or a coil is entered.
1.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒
"Guided".
2.
Select "Enter label names after contacts and coils".
EDITING ST
PROGRAMS
Operating procedure
EDITING STRUCTURED
LADDER PROGRAMS
8
8.10.6 Wrapping ladder
8 - 37
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
8.10.9
Inserting comment entry fields to ladder blocks to be added
Insert a comment entry field at the top of a ladder block in the Guided mode.
Operating procedure
1.
Select [Edit] ⇒ [Guided Mode] ⇒ [Auto Comment]
(
2.
).
Select [Edit] ⇒ [New Ladder Block List] ⇒ [Before]
(
).
A ladder block with a comment entry field is added.
Comment entry field
● Width of automatically inserted comment
The width of automatically inserted comment can be changed by the following operation.
Select [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/FBD" ⇒ "Guided", and set the "Auto Comment
Block Width".
● Entering a comment in the desired grid
Hold down the
key and press the
Ctrl
8 - 38
+
key, and a comment can be entered to the grid at the cursor position.
M
8.10.9 Inserting comment entry fields to ladder blocks to be added
8.11 Checking Wrapping Position for Printing
Q CPU L CPU
FX
This section explains how to display the wrapping positions of ladder for printing window.
2
Operating procedure
•
OVERVIEW
1
Checking Wrapping Position for Printing
Select [View] ⇒ [Print Wrap Position].
The wrapping position for printing window is displayed.
Wrapping position
SCREEN
CONFIGURATION
8.11
PROGRAMMING
PROCEDURE
3
PROGRAM
CONFIGURATIONS
4
5
SETTING LABELS
● Wrapping positions
When the paper size is changed by the print setting, the wrapping positions are adjusted automatically.
COMMON OPERATIONS
OF PROGRAM EDITORS
6
EDITING ST
PROGRAMS
7
EDITING STRUCTURED
LADDER PROGRAMS
8
8 - 39
GX Works2
8 EDITING STRUCTURED LADDER PROGRAMS
MEMO
8 - 40
SEARCHING FOR SPECIFIC
POSITION
This chapter explains how to move to a specified position in the program.
10
CONVERTING/
COMPILING PROGRAMS
9
SEARCHING FOR
SPECIFIC POSITION
9
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
12
MONITORING
Searching for Specific Position in ST Program . . . . . . . . . . . 9-2
Searching for Specific Position in Structured Ladder/FBD Program . . 9-4
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
9.1
9.2
9-1
GX Works2
9 SEARCHING FOR SPECIFIC POSITION
9.1
Searching for Specific Position in ST Program
Q CPU L CPU
This section explains how to search for a specific position in the ST program.
For searching for devices and instructions, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
9.1.1
Jumping to specified line
A cursor jumps to the specified line.
Screen display
Select [Find/Replace] ⇒ [Jump].
Operating procedure
1.
Set the items on the screen.
Item
Description
Enter a line number to which a cursor jumps.
Line No.
2.
Click the
Click
to select a line number from the list of previously searched lines.
button.
The cursor jumps to the specified line.
9.1.2
Using bookmarks
Use bookmarks that are placed at positions in a program for frequent reference.
Bookmarks allow quick reference to specific positions in a program.
Bookmark
9-2
9.1.1 Jumping to specified line
FX
9.1 Searching for Specific Position in ST Program
Operation
• Select [Find/Replace] ⇒ [Bookmark] ⇒ [Toggle Bookmark] (
).
A new bookmark is set at, or the existing bookmark is cleared from, the line where the cursor
is placed.
● Jumping from bookmark list
SEARCHING FOR
SPECIFIC POSITION
9
● Setting/canceling a bookmark
CONVERTING/
COMPILING PROGRAMS
10
Operation
1. Select [Find/Replace] ⇒ [Bookmark] ⇒ [Bookmark List] (
).
All registered bookmarks are displayed.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
2. Select a bookmark to which a cursor jumps.
12
3. Click the
Click the
MONITORING
button, or double-click the selected line.
The cursor moves to the line where the bookmark is set.
button to cancel all bookmarks.
● Moving to the next bookmark
13
Operation
USING USER
LIBRARIES
• Select [Find/Replace] ⇒ [Bookmark] ⇒ [Next Bookmark] (
).
The cursor moves to the start of the line where the next bookmark is placed.
● Moving to the previous bookmark
Operation
14
SETTING OPTIONS
• Select [Find/Replace] ⇒ [Bookmark] ⇒ [Previous Bookmark] (
).
The cursor moves to the start of the line where the preceding bookmark is placed.
● Deleting all bookmarks
Operation
).
A
APPENDIX
• Select [Find/Replace] ⇒ [Bookmark] ⇒ [Delete All Bookmarks] (
All bookmarks are deleted.
INDEX
I
9.1.2 Using bookmarks
9-3
GX Works2
9 SEARCHING FOR SPECIFIC POSITION
9.2
Searching for Specific Position in Structured Ladder/FBD Program
Q CPU L CPU
This section explains how to search for a specific position in the structured ladder/FBD program.
For searching for devices and instructions, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
9.2.1
Jumping to specified ladder block number
A cursor jumps to the specified ladder block.
Screen display
Select [Find/Replace] ⇒ [Jump].
Operating procedure
1.
Set the items on the screen.
Item
Description
Enter a ladder block number to which a cursor jumps.
Ladder Block No.
2.
Click the
Click
blocks.
to select a ladder block from the list of previously searched ladder
button.
The cursor jumps to the specified ladder block.
9-4
9.2.1 Jumping to specified ladder block number
FX
This chapter explains how to convert/compile created programs.
Programs are converted/compiled to sequence programs that can be executed on the programmable
controller CPU.
10
CONVERTING/
COMPILING PROGRAMS
10 CONVERTING/COMPILING
PROGRAMS
SEARCHING FOR
SPECIFIC POSITION
9
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
MONITORING
USING USER
LIBRARIES
13
SETTING OPTIONS
14
A
APPENDIX
10.4
10.5
10.6
12
Converting/Compiling Created Programs. . . . . . . . . . . . . . 10-2
Compiling All Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-4
Executing Online Program Change Simultaneously with
Conversion/Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-6
Changing Operating Conditions of Compilation . . . . . . . . 10-6
Compilation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10-14
Checking for Errors and Warnings . . . . . . . . . . . . . . . . . . 10-22
I
INDEX
10.1
10.2
10.3
10 - 1
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.1
Converting/Compiling Created Programs
Q CPU L CPU
FX
This section explains how to compile uncompiled program blocks among all program blocks that are
registered to tasks.
Since this process compiles only uncompiled programs, the compiling time can be reduced.
Sequence
program
Task
Program
block
Converts/compiles
uncompiled program
blocks only.
Program
block
Build
Compilation target
The program
blocks
become one
sequence
program after
the
compilation.
Program
block
● Conversion and compilation
The following explains the difference between conversion and compilation.
Conversion: Confirms edited content of ladder/SFC programs.
Compilation: Assigns devices to labels and creates a code to execute the program in a programmable controller
CPU.
Operating procedure
1.
Select [Compile] ⇒ [Build] (
).
The Confirm Build Method screen is displayed.
10 - 2
10.1 Converting/Compiling Created Programs
Select the "Execute compile after conversion" item, and click the
button.
Programs are compiled after the conversion and the result is displayed on the Output window.
By double-clicking the result, the corresponding error location in the program is displayed.
For checking errors/warnings, refer to Section 10.6.
9
SEARCHING FOR
SPECIFIC POSITION
2.
CONVERTING/
COMPILING PROGRAMS
10
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
Output window
● Build function
Only the program being edited is converted when the "Convert the selected program" is selected on the Confirm
12
13
USING USER
LIBRARIES
When two or more changes are required in a program, and if "Execute compile after conversion" is selected every
time program is changed, processing time is required for each compilation.
To reduce compilation processing time, select "Convert the selected program" first, and select "Execute compile
after conversion" after all changes are made in a program.
● Compiling programs when adding/changing labels
For precautions on compiling programs when adding/changing labels, refer to Section 10.5.3.
MONITORING
Build Method screen.
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
10 - 3
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.2
Compiling All Programs
Q CPU L CPU
FX
This section explains how to batch compile all program blocks that are registered to tasks.
Compilation target
Task 1
Program
block
Sequence
program 1
Converts/compiles all
program blocks.
Program
block
Rebuild All
Program
block
Task 2
Program
block
Sequence
program 2
Program
block
Operating procedure
1.
Select [Compile] ⇒ [Rebuild All] (
).
The following message is displayed.
Uncheck the item if the duplicated coil check, ladder check, and consistency (paring) check are not
performed after the compilation.
10 - 4
10.2 Compiling All Programs
Execute the compilation after reading and understanding the precaution described
on the message.
All programs are converted/compiled and the result is displayed on the Output window.
By double-clicking the result, the corresponding error location in the program is displayed.
For checking errors/warnings, refer to Section 10.6.
9
SEARCHING FOR
SPECIFIC POSITION
2.
CONVERTING/
COMPILING PROGRAMS
10
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
Output window
12
MONITORING
● Assigning devices to labels when compiling all programs
For assigning devices to labels when compiling all programs, refer to Section 10.5.
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
10 - 5
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.3
Executing Online Program Change Simultaneously with Conversion/Compilation
Q CPU L CPU
FX
For the operation for executing the Online program change simultaneously with the conversion/compilation,
refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
10.4
Changing Operating Conditions of Compilation
Q CPU L CPU
FX
This section explains how to change the operating conditions of compilation.
10.4.1
Changing the number of errors and warnings that stop
compilation
Change the number of errors and warnings that stop compilation.
If the number of errors and warnings that occurred during compilation reaches the specified value, the
compilation is aborted.
Screen display
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Output Result".
Display contents
•
Set the items on the screen.
Item
10 - 6
Description
Error
Set the number of errors that stops compilation (1 to 9999).
Warning
Set the number of warnings that stops compilation (1 to 9999).
10.4.1 Changing the number of errors and warnings that stop compilation
10.4 Changing Operating Conditions of Compilation
9
Hiding warning messages
SEARCHING FOR
SPECIFIC POSITION
10.4.2
Hide messages displayed on the Output window when compiling programs.
The registered warnings are not displayed on the Output window.
Screen display
10
CONVERTING/
COMPILING PROGRAMS
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Output Result".
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
Operating procedure
•
To register the warnings, enter the warning code and click the
button.
12
MONITORING
The registered warnings are not displayed on the Output window.
Enter
•
To cancel the registration, select the warning code and click the
13
button.
USING USER
LIBRARIES
The unregistered warnings are displayed on the Output window.
Select
SETTING OPTIONS
14
● Warning codes
Warning codes and their content can be checked in the Output window when compiling programs.
(
Section 10.6)
● Maximum number of warnings to be invalidated
A maximum number of warnings to be invalidated is 100.
APPENDIX
A
INDEX
I
10.4.2 Hiding warning messages
10 - 7
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.4.3
Using same name for global label and local label
Use the same name for a global label and a local label.
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Basic Setting".
2.
Check the "Use the same label name in global label and local label" check box.
• If this check box is not checked, an error occurs when compiling programs.
• If this check box is checked, a warning is displayed when compiling programs (Same label
names can be used).
10.4.4
Using same lower case label name as device
Use a label name (for example: m0, x1F) that contains a lower case of alphabetic part of the device.
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Structured Ladder/FBD/ST" ⇒ "Compile
Condition1".
2.
Check the "Use lower-case device names as labels" check box.
• If this check box is not checked, an error occurs when compiling programs.
• If this check box is checked, a warning is displayed when compiling programs.
(Label names that contain a same lower case as the device can be used.)
Example of lower case label name
defined as global label.
(m0 is treated as a label name and
compiled as assigned device D10.)
● Label names which cannot be used
When a device name is written in upper case, and device number contains lower case in alphabetic part, device
whose device number is hexadecimal (such as W device) may cause a compilation error, even "Options" is
enabled.
For example, "W0a1", "W1a" are regarded as devices, therefore, a compilation error is caused. "Wa1" can be used
as a label when no numbers exist between device name and device number, even a device name is written in
upper case, and device number contains lower case in alphabetic part.
● Inline structured text
For inline structured text, the devices within the range set on the <<Device>> tab of PLC parameter cannot be
used as labels. Use the devices out of range set on the <<Device>> tab of PLC parameter.
10 - 8
10.4.3 Using same name for global label and local label
10.4 Changing Operating Conditions of Compilation
Connect outputs of the selected function(s) (PLS, PLF, or ALT*1) directly to other inputs with lines.
*1: Supported by FXCPU only.
9
SEARCHING FOR
SPECIFIC POSITION
Connecting PLS, PLF, or ALT outputs directly to other inputs
with lines
1.
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Structured Ladder/FBD/ST" ⇒ "Compile
Condition1".
2.
In "Function Output Setting", check the function(s) (PLS and/or PLF) to be set.
• If any of these check boxes are not checked, an error occurs when compiling programs.
• If any of these check boxes are checked, errors and warnings are not displayed when compiling
programs.
Example) Creating a program using the PLS output
<Check box is not checked>
The output is required to be retained at the label or device.
CONVERTING/
COMPILING PROGRAMS
10
Operating procedure
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
10.4.5
MONITORING
12
13
USING USER
LIBRARIES
<Check box is checked>
The output can be connected directly to another input with a line.
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
10.4.5 Connecting PLS, PLF, or ALT outputs directly to other inputs with lines
10 - 9
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.4.6
Assigning common devices to outputs of function with EN/
ENO
Assign common devices to each function, when system devices are automatically assigned to outputs
of function with EN/ENO while editing on the structured ladder/FBD/ST editor.
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Structured Ladder/FBD/ST" ⇒ "Compile
Condition3".
2.
Uncheck the "Automatically assign each system device to output of functions that
use EN/ENO" check box.
• If the check box is checked, the individual devices are assigned to each function.
• If the check box is not checked, the same device is assigned to the outputs.
Example) Devices automatically assigned to outputs of function with EN/ENO
<Check box is checked>
The individual devices are assigned.
M4105
M4106
<Check box is not checked>
The same device is assigned.
M4105
M4105
10 - 10
10.4.6 Assigning common devices to outputs of function with EN/ENO
10.4 Changing Operating Conditions of Compilation
9
SEARCHING FOR
SPECIFIC POSITION
Precautions when the check box is not checked
Uncheck the option to save the number of automatically assigned devices to be used.
Take precautions when performing this operation.
The following are the program examples which require precautions.
● Program examples which require precautions
10
Uncheck the option to assign the same devices to and as shown below.
However, even M3, M4 are OFF, B9 may be ON since AND instruction without EN/ENO is
executed without execution condition.
, M8188 is assigned to
<Example of ladder>
2
in the following program example.
11
<Compilation result of ladder block 1>
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
1
1
1
2
12
1
2
MONITORING
M8190 is assigned to
2
CONVERTING/
COMPILING PROGRAMS
1
2
13
USING USER
LIBRARIES
<Compilation result of ladder block 2>
1
2
14
When M3, M4 are OFF,
the execution result is
not stored on M8190,
M8188.
SETTING OPTIONS
■
A
APPENDIX
B9 may ON, even
M3, M4 are OFF.
INDEX
I
10.4.6 Assigning common devices to outputs of function with EN/ENO
10 - 11
GX Works2
10 CONVERTING/COMPILING PROGRAMS
● Example of program which outputs the correct result
Create a program as indicated below to output the correct operation result to B9.
• Use instruction (AND_E) with EN/ENO to output instruction
• Regard logical AND of input (AND_E)'s execution result as output's execution condition (EN) .
<Example of ladder>
Regard logical AND
of input (AND_E)'s
execution result as
output's execution
condition.
<Compilation result of ladder block 1>
Use instruction
(AND_E) with
EN/ENO.
<Compilation result of ladder block 2>
Store logical AND
of input (AND_E)'s
execution result on
M8179.
Only when M3, M4
are ON, the operation
result is stored on B9.
10 - 12
10.4.6 Assigning common devices to outputs of function with EN/ENO
10.4 Changing Operating Conditions of Compilation
9
SEARCHING FOR
SPECIFIC POSITION
Retaining bit type outputs of functions
Retain bit type outputs of the target function(s).
Operating procedure
1.
Select [Tool] ⇒ [Options] ⇒ "Compile" ⇒ "Structured Ladder/FBD/ST" ⇒ "Compile
Condition2".
2.
Check the function(s) to be set.
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
• If any of these check boxes are not checked, bit type outputs of function(s) are not retained. (An
operation equivalent to the OUT instruction).
• If the check box(es) is checked, bit type outputs of the function(s) are retained. (An operation
equivalent to the SET instruction).
10
CONVERTING/
COMPILING PROGRAMS
10.4.7
MONITORING
12
Example) Retaining the INT_TO_BOOL_E output
<Check box is not checked>
USING USER
LIBRARIES
13
<Check box is checked>
Start-up condition (EN)
14
SETTING OPTIONS
Bit type output (Return value)
APPENDIX
A
INDEX
I
10.4.7 Retaining bit type outputs of functions
10 - 13
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.5
Compilation
Q CPU L CPU
FX
By compilation operation, the labels are assigned to devices, and programs created in project with labels are
converted to executable programs in a programmable controller CPU.
● Checking the compilation status
The compilation status can be checked in the Project view. Items are displayed in red as shown
below if the data are in uncompiled status.
Uncompiled data can be displayed on the Project view by right-clicking on global label/POU/program
file, and selecting [Open Uncompiled Data] from the shortcut menu.
Uncompiled data status is displayed on the Project view.
Items are displayed in
red if the data are in
uncompiled status.
10.5.1
Compilation target data when compiling all programs
When compiling all programs, compilation target data are determined according to the registration/
usage status of data type.
The following table shows the compilation target data.
: Compiled, ×: Not compiled
Registration/usage status of
compilation target data type
Compilation target data type
Global label data
-
Program (program file)
Registered to any of the following
programs.
. Initial program
. Scan program
. Wait program
. Fixed interval program
. No execution type
Task
Registered in the program file.
Program
Function block
Function
Structure
10 - 14
Compilation target when
compiling all programs
Registered in the task.
Not registered in the task.
X
Declared in the label setting editor.
Not declared in the label setting editor.
X
Used in the program.
Not used in the program.
X
Declared in the label setting editor.
Not declared in the label setting editor.
10.5.1 Compilation target data when compiling all programs
X
10.5 Compilation
11
Assigning devices defined on the label setting editor to the labels
The following explains the device assignment to the labels defined on the label setting editor.
For global labels, only labels whose “Device”/ “Address“ are blank on the label setting editor can be
assigned.
When both global labels and local labels are assigned, global labels are assigned to devices first, and
then local labels are assigned to devices.
● Assigning only one type of device automatically
Assign the devices in top down order on the label setting editor.
Devices are assigned in descending order on the screen (assigned from higher number of a device
number) of device range set on the Device/Label Automatic-Assign Setting.
For pointer (P), devices are assigned in ascending order (assigned from lower number of a device
number).
<Label setting>
13
SETTING OPTIONS
14
<Devices to be assigned to labels>
Data type
Word (signed)
Example of devices to be
assigned
1
Label_A
2
Label_B
Word (signed)
D8190
3
Label_C
Double-precision real
D8186
4
Label_D
Double-precision real
D8182
A
D8191
Descending
order
APPENDIX
Label name
I
INDEX
Definition
order
12
USING USER
LIBRARIES
Example
<Device automatic-assign setting>
Set the following device range.
• D device: 8000 to 8191
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
■
10
CONVERTING/
COMPILING PROGRAMS
Assign the devices set on the Device/Label Automatic-Assign Setting screen during compilation.
In structured ladder/FBD and ST, create actual programs with temporary variable during compilation.
Temporary variable is a device to retain the operation result of programs temporarily, and assign the
device within the range set on the Device/Label Automatic-Assign Setting.
Temporary variable is used for such as the following situations.
• Ladders are branched in structured ladder/FBD
• Over 3 items of four arithmetic operations are used in ST
• Other situations which require retaining the operation result temporarily
Temporary variable can be checked by compilation result. (Section 6.2.7)
SEARCHING FOR
SPECIFIC POSITION
9
Assigning devices
MONITORING
10.5.2
10.5.2 Assigning devices
10 - 15
GX Works2
10 CONVERTING/COMPILING PROGRAMS
● Assigning multiple types of device automatically (QCPU (Q mode)/LCPU)
Assign the devices in top down order on the label setting editor.
Devices are assigned in descending order (assigned from higher number of a device number) of
device range set on the Device/Label Automatic-Assign Setting.
When the number of devices is less than the number of devices required for one label, devices are
assigned in descending order of the next device’s device range.
When the following label requires the devices which are within the above device range, the previous
devices which are not assigned yet are assigned.
Example 1
<Device automatic-assign setting>
Set the following device range.
• D device: 8000 to 8002
• ZR device: 0 to 1023
<Label setting>
<Devices to be assigned to labels>
Definition
order
Label name
Example of devices to be
assigned
Data type
1
Label_A
Word (signed)
D8002
2
Label_B
Word (signed)
D8001
3
Label_C
Double-precision real
ZR1020*1
4
Label_D
Double-precision real
ZR1016
*1 :
Descending
order
Since double-precision real requires four devices, one device of D8000 is not enough.
Therefore, the next device ZR is assigned.
Example 2
<Device automatic-assign setting>
Set the following device range.
• D device: 8000 to 8002
• ZR device: 0 to 1023
<Label setting>
<Devices to be assigned to labels>
Definition
order
10 - 16
Label name
Data type
Example of devices to be
assigned
1
Label_A
Word (signed)
D8002
2
Label_B
Double-precision real
ZR1020*1
3
Label_C
Word (signed)
D8001*2
4
Label_D
Double-precision real
ZR1016*3
Descending
order
*1 :
Since double-precision real requires four devices, two device of D8000 to D8001 are not
enough. Therefore, the next device ZR is assigned.
*2 :
Since word (signed) requires one device, D8001 can be assigned. Therefore, return to
the previous device (D device), and the device is assigned to the label.
*3 :
Since double-precision real requires four devices, one device of D8000 is not enough.
Therefore, the next device ZR is assigned.
10.5.2 Assigning devices
10.5 Compilation
● When the type of device to be assigned is one (QCPU (Q mode)/LCPU)
Devices are assigned in descending order (assigned from higher number of a device number) of device
range set on the Device/Label Automatic-Assign Setting in the same manner as the assignment to a
label defined in a label setting editor.
● When the multiple types of devices are assigned automatically
Select one device to be assigned from devices set on the Device/Label Automatic-Assign Setting with
the order of ZR R W D/B M.
Multiple device types are not assigned to temporary variable.
10
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Example 1
<Device automatic-assign setting>
Set the following device range.
• D device: 8000 to 8191
• ZR device: 0 to 1023
<Device to be assigned>
Assign ZR for temporary variable
12
MONITORING
Example 2
<Device automatic-assign setting>
Set the following device range.
• D device: 8000 to 8191
• W device: 0 to 1023
<Device to be assigned>
Assign W for temporary variable.
13
Checking points of the empty automatically assigned device
The usage of devices within the range set on the Device/Label Automatic-Assign Setting can be
checked by searching devices within the automatically assigned device range with the Device List.
Example
When 4000 to 8191 of D device are set on the Device/Label Automatic-Assign Setting, search D4000 to
D8191 with the Device List.
The range of number of empty device points is the devices before the device numbers being used
among D4000 to D8191 (*).
For example, if D5000 to D8191 are used, D4000 to D4999 are the number of empty device points
within the range set on the Device/Label Automatic-Assign Setting.
14
A
APPENDIX
For details of Device List, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
USING USER
LIBRARIES
■
SEARCHING FOR
SPECIFIC POSITION
Assign a device to temporary variable.
9
CONVERTING/
COMPILING PROGRAMS
Assigning to temporary variable (automatically assigned device to other than
label)
SETTING OPTIONS
■
INDEX
I
10.5.2 Assigning devices
10 - 17
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.5.3
Precautions on Compilation
● When the multiple types of devices are assigned automatically (QCPU (Q mode)/LCPU)
If a program or label is changed and executed “Build” repeatedly, the number of used devices is
increased and that of assignable devices is decreased since the devices assigned once cannot be
used. Execute “Rebuild All”.
When D, W, R, ZR are selected as automatically assigned device concurrently, devices are
assigned from D, W. If the number of D, W is not enough, devices are assigned from R, ZR.
Note that the control timing may change depending on the program content since the operation
processing times of D, W and R differ from that of ZR.
For details of operation processing time, refer to the following manual.
MELSEC-Q/L Structured Programming Manual (Common Instructions)
● When ZR is added to automatically assigned device after compilation (QCPU (Q mode)/LCPU)
Temporary variable assigns only one type of devices, however, when ZR device is added to
automatically assigned device after compilation, ZR device is assigned by recompilation.
Operation processing time may differ depending on the program content.
Increase the device range other than ZR to avoid the change of operation processing time.
● When array type labels are used
When devices/labels are used for indexes in array type labels, the compilation result is created
with the devices shown below.
Note that the device values may be overwritten when the following devices are used in user
programs.
• Basic model QCPU, High Performance model QCPU: Z0, Z1
• Universal model QCPU, LCPU: Z16 to 19
• FXCPU: Z0, V0
● Compiling programs when adding/changing labels
When programs are compiled after adding/changing labels, devices are reassigned to labels in
uncompiled POUs only. Since previous device values may remain among the devices reassigned
to labels, clear the previous device values by the following procedure when adding/changing
labels.
Operation
1. Add/change labels only.
(Do not edit the programs.)
2. Select [Compile] ⇒ [Build], and compile the programs.
3. Register added/changed labels to the Watch window and clear the current values to 0.
4. Edit the programs and select [Compile] ⇒ [Online Program Change].
● Assigning devices to labels when compiling all programs
All programs need to be compiled when the following operations are performed.
• Changing the following PLC parameters*1
• "Common Pointer No." and "Timer Limit Setting" on the <<PLC System>> tab
• "File Register" and "File for Local Device" on the <<PLC File>> tab
• Settings on the <<Device>> tab
• Changing the following option settings
• "Default Length of String Data Type" in "Label Setting Editor"
• Settings in "Compile"
• Changing automatically assigned devices
• Updating instructions and application functions when opening Structured project.
10 - 18
10.5.3 Precautions on Compilation
10.5 Compilation
QCPU (Q mode)/LCPU only
SEARCHING FOR
SPECIFIC POSITION
11
MONITORING
12
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
*1 :
10
CONVERTING/
COMPILING PROGRAMS
When all programs are compiled, devices are reassigned to labels in all POUs. If all the compiled
programs are written to the programmable controller CPU and run as they are, the programs may
be processed with the device values set before the program change.
After compiling all programs, clear the device values set before the program change by the
following procedure.
Note that, by setting the following option, device values in the range set in the device/label
automatic-assign setting can be automatically cleared to 0 after writing programs to the
programmable controller CPU.
• [Tool] ⇒ [Options] ⇒ "When writing to PLC after a Rebuild All operation, clear the device ranges
set in the Device/Label Auto-Assign setting to 0."
9
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
• Changing PLC type
• Changing project type
• Reading data from programmable controller CPU (except for when reading symbolic information
and parameters at the same time)
• Reading data written to the programmable controller CPU by GX Developer or GX IEC
Developer
• Using Open Other Project function
10.5.3 Precautions on Compilation
10 - 19
GX Works2
10 CONVERTING/COMPILING PROGRAMS
• QCPU (Q mode)/LCPU
Operation
1. Switch the programmable controller CPU to STOP.
2. Select [Online] ⇒ [Write to PLC], and write programs to the programmable controller CPU.
3. Switch the programmable controller CPU to RESET.
It can also be reset by selecting [Compile] ⇒ [Remote Operation].
4. Select [Online] ⇒ [PLC Memory Operation] ⇒ [Clear PLC Memory] to clear the memories.
If VAR_RETAIN is used in the [Device/Label Automatic-Assign Setting], clear all device
memories including latches.
If file registers are used in the [Device/Label Automatic-Assign Setting], clear all file registers.
• FXCPU
Operation
1. Switch the programmable controller CPU to STOP.
2. Select [Online] ⇒ [Write to PLC], and write programs to the programmable controller CPU.
3. Select [Online] ⇒ [PLC Memory Operation] ⇒ [Clear PLC Memory] to clear the device
memories.
The remote RUN function when writing data to programmable controller CPU after compiling all
programs can be disabled by setting the following option. Check "Turn PLC to STOP at time of
PLC write after executing Rebuild All and do not execute remote RUN" under [Tool] ⇒ [Options] ⇒
[PLC Read/Write].
10 - 20
10.5.3 Precautions on Compilation
10.5 Compilation
Program configuration of the Structured project
Compilation target
Program file
MAIN
Program
block 1
Program
block 3
Sequence
program
MAIN
Program
block 3
Function 1
Task 1
Program
block 4
SUB1
Function 1
12
Sequence
program
SUB1
Program
block 2
13
Program
block 4
Function 1
Task 2
USING USER
LIBRARIES
Function 1 is used in the
program blocks 3 and 4.
MONITORING
Program
block 2
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
Program
block 1
Function 1 is modified.
● Device/label automatic-assign setting
Devices in the range set on the Device/Label Automatic-Assign Setting screen (automatically
assigned devices) cannot be used in the program.
If automatically assigned devices are used in a program, a compilation error occurs.
(For the device/label automatic-assign setting
Section 5.7)
● Input arguments of function/function block
Data cannot be written to input arguments (VAR_INPUT) of function/function block.
If data are written to input arguments, a compilation error occurs.
14
SETTING OPTIONS
POU
10
CONVERTING/
COMPILING PROGRAMS
Example) Compiling programs after modifying Function 1 in the following program configuration.
Program blocks 3 and 4 are compiled and the program files MAIN and SUB1 are
modified.
9
SEARCHING FOR
SPECIFIC POSITION
● Modification of global labels and functions/function blocks
If global labels and/or functions/function blocks are modified, multiple program blocks become the
compile targets. Write all program files of the compile targets to the programmable controller CPU
to apply the modifications.
A
● Compiling structured ladder/FBD/ST programs
APPENDIX
The code is not created when the program as shown below is compiled in the structured ladder/
FBD or ST program.
Example) The same device is used for a contact and coil
I
INDEX
The code is not created when
the program is compiled.
10.5.3 Precautions on Compilation
10 - 21
GX Works2
10 CONVERTING/COMPILING PROGRAMS
10.6
Checking for Errors and Warnings
Q CPU L CPU
FX
When the program check or the compilation is executed, the target programs and label settings are checked
and the results are displayed on the Output window.
The following explains how to check the errors displayed on the Output window.
Screen display
Function type
Error/warning list
Status
Display contents
Item
Display the name of the executed function.
Error/warning list
-
Result
Display the check results.
Display "Error" and "Warning".
Display "Check Warning" for the duplicated coil check/ladder check/consistency
check warnings.
Data Name
Display project names with errors and warnings.
Class
Display check types such as the compilation and program check.
Content
Display descriptions of errors and warnings.
Error Code
Status
10 - 22
Description
Function type
Display error code numbers.
Display the total number of errors and warnings.
10.6 Checking for Errors and Warnings
9
Correcting errors and warnings
SEARCHING FOR
SPECIFIC POSITION
10.6.1
Check and correct errors/warnings.
Operating procedure
10
Double-click the error/warning message displayed on the Output window.
CONVERTING/
COMPILING PROGRAMS
1.
The corresponding error location in the program is displayed.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
Double click
MONITORING
12
Check the corresponding error location and correct the error as instructed by the
error/warning message.
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
2.
USING USER
LIBRARIES
13
10.6.1 Correcting errors and warnings
10 - 23
GX Works2
10 CONVERTING/COMPILING PROGRAMS
MEMO
10 - 24
10.6.1 Correcting errors and warnings
This chapter explains how to write/read sequence programs to/from the programmable controller CPU or
memory card.
For the overview of the data write/read operation, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
CONVERTING/
COMPILING PROGRAMS
11
12
MONITORING
Writing/Reading Data to/from Programmable Controller CPU . . . . . 11-2
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
11.1
10
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11 WRITING/READING DATA TO/
FROM PROGRAMMABLE
CONTROLLER CPU
SEARCHING FOR
SPECIFIC POSITION
9
11 - 1
GX Works2
11 WRITING/READING DATA TO/FROM PROGRAMMABLE CONTROLLER CPU
11.1
Writing/Reading Data to/from Programmable Controller CPU
Q CPU L CPU
FX
This section explains how to write the Structured project data to the programmable controller CPU or memory
card, and how to read the data from the programmable controller CPU or memory card to the project.
Symbolic information can be written to/read from a programmable controller CPU for projects with labels of
FX3U/FX3UC version 3.00 or later only.
Screen display
Select [Online] ⇒ [Write to PLC] (
)/[Read from PLC] (
).
For QCPU (Q mode)/LCPU/FXCPU (FX3U/FX3UC version 3.00 or later), symbolic information is
displayed on the file list.
Setting target
module tab
File list
Memory capacity
11 - 2
11.1 Writing/Reading Data to/from Programmable Controller CPU
Description
Display the information on the set connection target.
Setting target module tab
Switch the setting target module.
If the target data of write/read exists, the color of the tab name is displayed in
blue.
PLC Module
Set to write the data to the programmable controller CPU.
Intelligent Function Module*1
Set to write the data of the intelligent function module to buffer memory/flash
ROM of the intelligent function module.
GX Works2 Version 1 Operating Manual (Common)
button.
-
Option
Display Size
File list
11
Check this to display "Size" and memory capacity in the file list.
-
Target
Select the data to be written/read.
Target Memory*1
Select the memory from the list ( ) by clicking the cell under "Target Memory".
For details of the memory card application, refer to the following manual.
User's Manual (Hardware Design, Maintenance and Inspection) of the
CPU module to be used
Memory capacity*2
-
Writing Size
12
Display the total size of written data checked in "Target".
Free Volume
Display the free space volume of the target memory.
Use Volume
Display the used space volume of the target memory.
*1: Not supported by FXCPU.
*2: For FXCPU, program size and symbolic information data size are displayed when executing the Write to
PLC function. Symbolic information size is displayed on the screen for projects with labels of FX3U/
FX3UC version 3.00 or later only.
When a program (program file), device comment, or device memory is selected, the range can be
set by clicking the
/
button.
When reading data from the programmable controller CPU, and the device memory is selected, the
detailed settings are required.
For details, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
Click the
button.
When the Write to PLC function is executed, the specified data are written to the target memory.
When the Read from PLC function is executed, the specified data are read from the target memory.
13
14
APPENDIX
A
I
INDEX
2.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Display the title of the target memory by clicking the
*1
MONITORING
Title*1
10
USING USER
LIBRARIES
Item
Connection Channel List
CONVERTING/
COMPILING PROGRAMS
Set the items on the screen.
SETTING OPTIONS
1.
SEARCHING FOR
SPECIFIC POSITION
9
Operating procedure
11 - 3
GX Works2
11 WRITING/READING DATA TO/FROM PROGRAMMABLE CONTROLLER CPU
Screen button
●
Displays the illustration of the connection channel list.
●
Selects the parameters and all programs displayed on the list.
●
Selects all data displayed on the list.
●
Cancels the selection status of all data displayed on the list.
●
/
Switches display/hide of the Related functions button.
For details of the related functions, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
●
(Read from PLC, Delete PLC Data only)
Displays the project name of the symbolic information in the Title/Project Name column.
●
Updates data list on the Online Data Operation screen.
For QCPU (Q mode)/LCPU, updates writing size, free space volume, and used space volume.
When multiple personal computers are connected to the programmable controller CPU, update the
target memory before reading data from the programmable controller CPU.
11 - 4
11.1 Writing/Reading Data to/from Programmable Controller CPU
The following table shows the program data included in the symbolic information.
Included data
Global label
Program setting
11
Task
Program
Local label
Function block
Function
Structure
12
User library
● Compile status when the symbolic information is read
• When the symbolic information and parameters are read simultaneously, and the data in the symbolic
information match with parameters and programs (program files) in the programmable controller CPU, the read
data are in compiled status. When only the symbolic information is read, the read data are in uncompiled status.
• When the symbolic information of GX Developer or GX IEC Developer is read, the read data are in uncompiled
status. Compile the program again after executing the Read from PLC function.
● Precautions for reading symbolic information
For the precautions for reading label programs (symbolic information) of the existing application using GX Works2,
or reading label programs (symbolic information) of GX Works2 using the existing application, refer to the following
manual.
(
GX Works2 Version 1 Operating Manual (Common))
● For FXCPU
• The symbolic information data can be read from/written to the programmable controller CPU in FX3U and FX3UC
version 3.00 or later only.
• When a memory cassette to which the symbolic information has been written is used on an FXCPU other than
FX3U/FX3UC version 3.00 or later, the symbolic information may be corrupted.
● Saving project automatically after writing data to programmable controller CPU
A project can be saved automatically after writing data to the programmable controller CPU by setting the option.
Check the "Save project after writing to PLC" item under [Tool] ⇒ [Options] ⇒ "Project" ⇒ "Automatic Save".
MONITORING
Symbolic information
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
POU
13
USING USER
LIBRARIES
Item
10
CONVERTING/
COMPILING PROGRAMS
The symbolic information is data that store the program configuration such as structures and labels.
To restore these data included in the symbolic information when reading a program from the
programmable controller CPU, write/read the symbolic information to/from the programmable controller
CPU.
Data such as structures and labels included in the symbolic information cannot be restored if only
sequence programs are read. (Data are treated as the ladder in Structured projects.)
SEARCHING FOR
SPECIFIC POSITION
9
Symbolic information
14
SETTING OPTIONS
■
APPENDIX
A
INDEX
I
11 - 5
GX Works2
11 WRITING/READING DATA TO/FROM PROGRAMMABLE CONTROLLER CPU
MEMO
11 - 6
SEARCHING FOR
SPECIFIC POSITION
9
12 MONITORING
This chapter explains how to monitor the program execution status of the programmable controller CPU using
the program editor.
For the overview of monitoring, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
CONVERTING/
COMPILING PROGRAMS
10
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
12
MONITORING
Starting and Stopping Monitoring of Program . . . . . . . . . . 12-2
Starting and Stopping Monitoring of Function Blocks . . . 12-3
Changing Operating Conditions of Monitoring . . . . . . . . . 12-4
Monitoring Programs on ST Editor . . . . . . . . . . . . . . . . . . . 12-6
Monitoring Programs in Structured Ladder/FBD Editor . . 12-8
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
12.1
12.2
12.3
12.4
12.5
12 - 1
GX Works2
12 MONITORING
12.1
Starting and Stopping Monitoring of Program
Q CPU L CPU
FX
This section explains how to monitor a program on the program editor.
Open the program editor to be monitored in advance.
■
Starting monitoring of programs
Start monitoring of the program.
Operating procedure
•
Select [Online] ⇒ [Monitor] ⇒ [Start Monitoring] (
).
The monitoring starts.
■
Stopping monitoring of programs
Stop monitoring of the program.
Operating procedure
•
Select [Online] ⇒ [Monitor] ⇒ [Stop Monitoring] (
).
The monitoring stops.
● Changing current values
During monitoring, bit devices can be forced ON/OFF, and the current values of devices, buffer memories, and
labels can be changed.
For forcing bit devices ON/OFF and changing current values, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
● Monitoring buffer memory and link memory
To monitor the ON/OFF status of the buffer memory and link memory (example: U0\G0.1), select [Tool]
⇒ [Options] ⇒ "Monitor" ⇒ "Structured Ladder/FBD/ST" ⇒ "Operational Setting" and check "Monitor buffer
memory and link memory".
● Monitoring labels whose classes are set as a constant type
For labels whose classes are set as VAR_GLOBAL_CONSTANT, VAR_CONSTANT, the values are not displayed
during monitoring.
To check the values, select "Constant Value" under [Tool] ⇒ [Options] ⇒ "Program Editor" ⇒ "Structured Ladder/
FBD/ST" ⇒ "Tool Hint" ⇒ "Tool Hint Display Items", and check with tool hint.
12 - 2
12.2 Starting and Stopping Monitoring of Function Blocks
Starting and Stopping Monitoring of Function Blocks
Q CPU L CPU
FX
This section explains how to monitor function block programs.
Open the function block program to be monitored in advance.
10
CONVERTING/
COMPILING PROGRAMS
■
Starting monitoring of function blocks
Start monitoring of the function block.
Operating procedure
11
Select [Online] ⇒ [Monitor] ⇒ [Change Instance (Function Block)].
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
1.
9
SEARCHING FOR
SPECIFIC POSITION
12.2
The Change Instance (Function Block) screen is displayed.
MONITORING
12
13
Select the FB instance to be monitored.
3.
Click the
4.
Select [Online] ⇒ [Monitor] ⇒ [Start Monitoring] (
USING USER
LIBRARIES
2.
button.
14
).
Screen button
SETTING OPTIONS
The monitoring starts.
The display and executable operations during monitoring are the same as those of the program
monitoring.
●
A
■
APPENDIX
Cancels the selected status of the FB instance and stops monitoring.
Stopping monitoring of function blocks
Stop monitoring of the function block.
I
Operating procedure
Select [Online] ⇒ [Monitor] ⇒ [Stop Monitoring] (
).
The monitoring stops.
INDEX
•
12 - 3
GX Works2
12 MONITORING
12.3
Changing Operating Conditions of Monitoring
Q CPU L CPU
FX
This section explains how to change the operating conditions of monitoring.
12.3.1
Changing current value display format (decimal/
hexadecimal) of word type variable
Change the current value display format of word and double word type variable displayed during
monitoring.
■
Changing display format during monitoring
Change the current value display format of word and double word type variable during monitoring.
Operating procedure
•
Select [Online] ⇒ [Monitor] ⇒ [Change Value Format (Decimal)] / [Change Value Format
(Hexadecimal)].
Decimal
■
Hexadecimal
Changing display format before starting monitoring
Change the current value display format by setting the option.
The monitoring starts with the set display format.
Operating procedure
•
Select [Tool] ⇒ [Options] ⇒ "Monitor" ⇒ "Structured Ladder/FBD/ST" ⇒ "Display Format
of Monitoring Value" ⇒ "Decimal"/"Hexadecimal".
Decimal
12 - 4
Hexadecimal
12.3.1 Changing current value display format (decimal/hexadecimal) of word type variable
12.3 Changing Operating Conditions of Monitoring
Setting the number of displaying characters for character
strings
Set the number of displaying characters for the monitoring result of character strings by setting the
option on the structured ladder/FBD and ST editors.
10
Select [Tool] ⇒ [Options] ⇒ "Monitor" ⇒ "Structured Ladder/FBD/ST"
⇒ "Character String Monitor Setting".
2.
Set the number of displaying characters within the range from 2 to 50.
CONVERTING/
COMPILING PROGRAMS
Operating procedure
1.
9
SEARCHING FOR
SPECIFIC POSITION
12.3.2
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
MONITORING
12
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
12.3.2 Setting the number of displaying characters for character strings
12 - 5
GX Works2
12 MONITORING
12.4
Monitoring Programs on ST Editor
Q CPU L CPU
FX
This section explains the display of the ST editor at the monitoring.
Screen display
Select [Online] ⇒ [Monitor] ⇒ [Start Monitoring].
Split window
Select [Online] ⇒ [Monitor] ⇒ [Start Monitoring (Bit Type only)].
■
Monitoring labels other than bit type labels and word devices
The monitoring values of labels other than bit type labels and word devices are displayed on the right
side of the split window.
Monitoring value of counter
Monitoring value of D0
■
Monitoring bit type labels and bit devices
The following shows the display of bit type labels and bit devices at the monitoring.
<FALSE>
12 - 6
<TRUE>
12.4 Monitoring Programs on ST Editor
10
CONVERTING/
COMPILING PROGRAMS
● Displaying monitoring values
When the labels are used for array element, or when the elements are not specified for array or structured data
type, the monitoring values are not displayed correctly. The monitoring values on tool hint are not displayed
correctly either.
Monitoring values of each element for array or structured data type can be checked on the Watch window.
SEARCHING FOR
SPECIFIC POSITION
9
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
MONITORING
12
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
12 - 7
GX Works2
12 MONITORING
12.5
Monitoring Programs in Structured Ladder/FBD Editor
Q CPU L CPU
This section explains the display of the structured ladder/FBD editor at the monitoring.
Screen display
Select [Online] ⇒ [Monitor] ⇒ [Start Monitoring].
■
Monitoring contacts and coils
The following shows the display of contacts and coils at the monitoring.
<FALSE>
■
<TRUE>
Monitoring bit type labels and bit devices
The following shows the display of bit type labels and bit devices at the monitoring.
<TRUE>
<FALSE>
12 - 8
FX
12.5 Monitoring Programs in Structured Ladder/FBD Editor
9
Monitoring labels other than bit type labels and word devices
The monitoring values of labels other than bit type labels and word devices are displayed to the right of
the corresponding labels or devices.
Monitoring value of RadianAngle
Monitoring value of CosVal
SEARCHING FOR
SPECIFIC POSITION
■
CONVERTING/
COMPILING PROGRAMS
10
● Displaying monitoring values
• Monitoring values of FB I/O arguments can be checked with the tool hint.
For the display method of the tool hint, refer to Section 6.2.8.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
• When the labels are used for array element, or when the elements are not specified for array or structured data
type, the monitoring values are not displayed. The monitoring values on tool hint are not displayed either.
In this case, check monitoring values of array or structured data type on the Watch window.
MONITORING
12
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
12 - 9
GX Works2
12 MONITORING
MEMO
12 - 10
SEARCHING FOR
SPECIFIC POSITION
9
13 USING USER LIBRARIES
CONVERTING/
COMPILING PROGRAMS
10
In Structured project, user libraries are shared among multiple projects as program assets.
This chapter explains the user library operating methods.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
12
MONITORING
User Libraries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-2
Procedure for Using User Library . . . . . . . . . . . . . . . . . . . . 13-3
Creating User Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-4
Using User Library . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13-11
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
13.1
13.2
13.3
13.4
13 - 1
GX Works2
13 USING USER LIBRARIES
13.1
User Libraries
Q CPU L CPU
FX
User libraries are components which can be shared between multiple projects and can be used in
Structured project only.
These libraries are created by the user.
Frequently-used components are stored and reused for programming efficiency.
< Project 1 >
< Project 2 >
Edit
Library
Program
Program
Program
Store
Reuse
Global label
Global label
Global label
FB/FUN
FB/FUN
FB/FUN
Structure
Structure
Structure
Global label
Global label
Program setting
Program setting
Task
Task
POU
POU
Program block
Program block
FB/FUN
FB/FUN
Structure
Structure
The following data can be registered to user libraries.
• Global labels
• Structured data
• POUs (program blocks, functions, function blocks)
13 - 2
Utilize
Library
Library file
Library components
can be used.
13.2 Procedure for Using User Library
9
Procedure for Using User Library
Q CPU L CPU
FX
This section explains how to create a user library.
POUs created in a user library can be shared among multiple projects.
The following explains how to utilize a created user library to other projects.
Procedure
Reference
Section 13.3.1
Section 13.3.3
Save the user library under a specified name.
Section 13.3.4
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Create data for user library.
Utilize the library.
Procedure
Reference
Section 13.4.1
Create a program using the user library.
Section 13.4.2
12
MONITORING
Utilize the user library to a project.
Edit the user library and update the library file data.
13
Change the setting to enable or disable editing of the utilized user library data.
Section 13.4.3
Update the user library data.
Section 13.4.4
USING USER
LIBRARIES
Reference
14
SETTING OPTIONS
Procedure
A
APPENDIX
3.
CONVERTING/
COMPILING PROGRAMS
Create a user library.
Create a new user library.
2.
10
I
INDEX
1.
SEARCHING FOR
SPECIFIC POSITION
13.2
13 - 3
GX Works2
13 USING USER LIBRARIES
13.3
Creating User Library
Q CPU L CPU
This section explains how to create a user library.
13.3.1
Creating user libraries
Create a new user library.
Select the User Library view of the Navigation window and follow the operation below.
Screen display
Select [Project] ⇒ [Library] ⇒ [Create] (
).
Operating procedure
1.
Enter a library name.
2.
Click the
button.
A user library is created and displayed on the User Library view.
●
•
●
•
●
•
13 - 4
Maximum number of user libraries
The maximum number of user libraries that can be created in a project is 800.
Number of characters for a library name
The maximum number of characters that can be entered for a library name is 32.
Invalid characters for library names
For invalid characters for library names, refer to the following manual.
MELSEC-Q/L/F Structured Programming Manual (Fundamentals)
13.3.1 Creating user libraries
FX
13.3 Creating User Library
9
Changing library name
SEARCHING FOR
SPECIFIC POSITION
13.3.2
Change the user library name.
Operating procedure
Select a library name to be renamed in the User Library view.
2.
Select [Project] ⇒ [Library] ⇒ [Rename].
10
CONVERTING/
COMPILING PROGRAMS
1.
The editing of the library name in the project tree is enabled.
Set the library name.
Press the
13.3.3
11
key to confirm the new library name.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
3.
Creating data
Create data for the user library.
Adding data
MONITORING
■
12
Add new data (programs, global labels, functions/function blocks, structures) to the user library.
For details of adding new data, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
USING USER
LIBRARIES
13
● Global labels
Labels defined by global labels in the User Library view can be used in programs in the Project view.
Labels defined by global labels in the Project view can also be used in programs in the User Library view.
● System labels
Global labels in the User Library view cannot be registered to the system label data base.
SETTING OPTIONS
■
14
Editing data
Edit data (programs, global labels/local labels, functions/function blocks, structures).
For details of editing data, refer to Chapter 5 through Chapter 8.
APPENDIX
A
INDEX
I
13.3.2 Changing library name
13 - 5
GX Works2
13 USING USER LIBRARIES
13.3.4
Saving library file
Save a user library to a library file.
A library file can be also saved with a different library name.
■
Saving user library under specified name
Save the user library under a specified name.
Screen display
Select [Project] ⇒ [Library] ⇒ [Save As].
Operating procedure
1.
Select a library name to be saved in the User Library view. (Multiple libraries can be
selected.)
2.
Select [Project] ⇒ [Library] ⇒ [Save As].
The Save Library as screen is displayed.
3.
Set a file name.
4.
Click the
button.
The user library data are saved to the library file.
13 - 6
13.3.4 Saving library file
13.3 Creating User Library
Save the user library in the library file.
Operating procedure
2.
Select a library name to be saved in the User Library view. (Multiple libraries can be
selected.)
10
CONVERTING/
COMPILING PROGRAMS
1.
SEARCHING FOR
SPECIFIC POSITION
9
Saving library files
Select [Project] ⇒ [Library] ⇒ [Save].
The user library data is saved in the library file.
● Identifying the saved library file
A saved library file is identified with the path and file name which are specified when the file was saved with a
specified name previously, or installed to the project.
● Applying file changes to other projects
To apply the changes to library files in other projects, update the user libraries in each project in advance.
(
Section 13.4.4)
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
■
MONITORING
12
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
INDEX
I
13.3.4 Saving library file
13 - 7
GX Works2
13 USING USER LIBRARIES
13.3.5
Deleting user library from project
Delete a user library from the project.
Operating procedure
1.
Select a library name to be deleted in the User Library view. (Multiple libraries can
be selected.)
2.
Select [Project] ⇒ [Library] ⇒ [Deinstall].
The selected data is deleted.
● Deleting user library
• The saved library file is not deleted even if a user library is deleted.
• All POUs using the deleted library file become in the uncompiled status. Compile the program again.
13 - 8
13.3.5 Deleting user library from project
13.3 Creating User Library
9
Setting password to user library
Set a password to protect data in the user library.
Once the password is set, programs in the POUs are hidden on the screen. Structures, global labels,
and local labels are displayed.
SEARCHING FOR
SPECIFIC POSITION
13.3.6
10
Screen display
CONVERTING/
COMPILING PROGRAMS
Select [Project] ⇒ [Library] ⇒ [Change Password].
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
MONITORING
12
Operating procedure
Set the items on the screen.
Description
Display a library name to which a password is set.
Password Setup
2.
Set a password.
Old Password
Enter a previous password.
Leave the field blank when setting a password for the first time.
New Password
Enter a new password.
Confirm Password
Re-enter a new password for confirmation.
Click the
USING USER
LIBRARIES
Item
Library Name
14
SETTING OPTIONS
1.
13
button
APPENDIX
A
I
INDEX
● Password
Set a password within 14 characters using alphanumeric characters and symbols correspond to the ASCII code
20H to 7EH. For details of ASCII code, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
● Libraries saved in library files
If a user library is saved in the library file, the password setting is also saved.
Library files must be managed carefully if they are shared with multiple projects.
● Editing status
Before using this function, enable the editing of the user library. (
Section 13.4.3)
13.3.6 Setting password to user library
13 - 9
GX Works2
13 USING USER LIBRARIES
13.3.7
Set help file to library
Set a help file to the library.
Specified files created in the following formats can be set as help data.
• Windows help file (*.hlp)
• HTML help file (*chm)
• Text file (*txt)
Operating procedure
1.
Select a user library to which a property is set, and select [Project] ⇒ [Object] ⇒
[Property] (
).
The Property screen is displayed.
2.
Click the
button.
The Open a help file screen is displayed.
3.
Select a file to be set.
The path and name of the selected help file are displayed on the Property screen.
4.
Click the
button.
The specified help file is set as the user library help.
13 - 10
13.3.7 Set help file to library
13.4 Using User Library
9
Using User Library
Q CPU L CPU
FX
This section explains how to use a created user library.
SEARCHING FOR
SPECIFIC POSITION
13.4
13.4.1
CONVERTING/
COMPILING PROGRAMS
10
Installing user library data to project
Install user library data from the existing library file to the project.
Screen display
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Select [Project] ⇒ [Library] ⇒ [Install].
MONITORING
12
Operating procedure
Set the items on the screen.
13
2.
Description
Library File
Set a path of the library file to be installed.
Click the
button, and select a folder in the Open Library screen.
Library Name
Enter a library name.
Click the
button.
The selected library file data are installed and the library name is displayed on the User Library
view.
● Maximum number of user libraries
The maximum number of user libraries that can be created in a project is 800.
USING USER
LIBRARIES
Item
14
SETTING OPTIONS
1.
APPENDIX
A
INDEX
I
13.4.1 Installing user library data to project
13 - 11
GX Works2
13 USING USER LIBRARIES
13.4.2
Creating programs using user library
Use data in a user library to create programs in a project.
■
Using user library data: programs
Use programs in a user library by registering them to a task.
For details of registering programs to a task, refer to Section 4.2.
■
Using user library data: global labels
Use global labels in a user library by selecting them in a program.
For details of selecting global labels in a program, refer to Chapter 5.
■
Using user library data: functions/function blocks
Use functions/function blocks in a user library by selecting a user library for POU type in the Function
Block Selection window.
For details of using functions/function blocks, refer to Section 5.4.
■
Using user library data: structures
Use structures in a user library by setting them in each label editor.
For details of using structures, refer to Section 5.6.
13 - 12
13.4.2 Creating programs using user library
13.4 Using User Library
9
Editing user library
SEARCHING FOR
SPECIFIC POSITION
13.4.3
Edit installed user library data.
■
Enabling editing of user library data
CONVERTING/
COMPILING PROGRAMS
10
Enable the editing of user library data.
To edit user library data, the library needs to be set in the editing status.
Screen display
<Editing status>
<Editing disabled status>
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
MONITORING
12
Operating procedure
Select a user library to edit in the User Library view. (Multiple libraries can be
selected.)
2.
Select [Project] ⇒ [Library] ⇒ [Open] (
14
SETTING OPTIONS
1.
USING USER
LIBRARIES
13
).
The editing of the user library data is enabled.
● Library password
If the library is protected with a password, the password
needs to be entered to open the library for editing.
When the password entry screen is displayed, enter the
library password.
APPENDIX
A
I
INDEX
● Editing status when opening a project
When a project is opened, all libraries are in the editing disabled status.
(Even if a project is closed with the editing status, it is set in the editing disabled status when reopening the
project.)
13.4.3 Editing user library
13 - 13
GX Works2
13 USING USER LIBRARIES
■
Disabling editing of user library data
Disable the editing of user library data.
Screen display
<Editing status>
<Editing disabled status>
Operating procedure
13 - 14
1.
Select a user library to edit in the User Library view. (Multiple libraries can be
selected.)
2.
Select [Project] ⇒ [Library] ⇒ [Close] (
).
The editing of the user library data is disabled.
13.4.3 Editing user library
13.4 Using User Library
9
SEARCHING FOR
SPECIFIC POSITION
Updating user library
Update data in a user library file.
Operating procedure
1.
Select a library name to be updated in the User Library view. (Multiple libraries can
be selected.)
2.
Select [Project] ⇒ [Library] ⇒ [Reload].
The data in the library file is read and the display contents in the User Library view are refreshed.
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
To apply the library file changes made in another project (➀ in the figure below) to the current project,
the user library needs to be updated (➂ and ➃ in the figure below).
10
CONVERTING/
COMPILING PROGRAMS
13.4.4
Save/Install
2 Enable the editing.
12
UserLib1 file
MONITORING
1 Content is changed
in another project.
3 Execute "Reload".
13
4 Changed content is
USING USER
LIBRARIES
updated.
UserLib1 file
SETTING OPTIONS
14
● Compilation status of POUs
When a user library is updated, all POUs using the updated user library become in the uncompiled status.
● Editing status
• Before using this function, enable the editing of the user library data. (
Section 13.4.3)
• When this function is completed, the editing of the user library data is disabled.
APPENDIX
A
INDEX
I
13.4.4 Updating user library
13 - 15
GX Works2
13 USING USER LIBRARIES
13.4.5
Displaying user library help
Display a help set to a user library.
Specified files created in the following formats can be set as help data.
• Windows help file (*.hlp)
• HTML help file (*chm)
• Text file (*txt)
For setting a help, refer to Section 13.3.7.
Screen display
Select [Project] ⇒ [Library] ⇒ [Help].
R
Windows help file (*.hlp)
HTML help file (*.chm)
Operating procedure
1.
Select a library name to be displayed as a library help in the User Library view.
2.
Select [Project] ⇒ [Library] ⇒ [Help].
A library help screen is displayed.
13 - 16
13.4.5 Displaying user library help
SEARCHING FOR
SPECIFIC POSITION
9
14 SETTING OPTIONS
This chapter explains the functions of options for setting screen display format or detailed operations of each
function.
CONVERTING/
COMPILING PROGRAMS
10
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
12
MONITORING
Basic Operations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-2
Option Setting List . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14-3
USING USER
LIBRARIES
13
SETTING OPTIONS
14
APPENDIX
A
I
INDEX
14.1
14.2
14 - 1
GX Works2
14 SETTING OPTIONS
14.1
Basic Operations
Q CPU L CPU
This section explains how to set options.
Screen display
Select [Tool] ⇒ [Options].
Operating procedure
•
Set the items on the screen.
When the cursor is placed on a setting item, an explanation of the item is displayed on the
"Explanation" field.
Details of the setting items
Section 14.2
Screen button
●
Restores the initial settings.
●
Restores the user default settings.
●
Stores the current settings as the user default and applies them to a new project.
14 - 2
FX
14.2 Option Setting List
Description
Reference
GX Works2 Version 1 Operating Manual (Common)
Label
Structured
Ladder/
FBD
FB/FUN
Program
Editor
Guided
ST
Ladder/SFC*1
Ladder*1
SFC*1
Tool Hint Display Items
Select items displayed on tool hint.
Tool Hint Display Format
Select display lines on tool hint.
Display label name/
comment of contact or
coil in multiline
Set display lines and characters per line.
Section
8.7
Display labels and
devices
Select whether to display labels and devices which are
assigned to the labels, when 'Label' is selected from
View Mode. Users can neither edit the displayed
devices nor set them to the Find/Replace target.
Section
8.7.2
Declare new label name
Select whether to display label registration/selection
dialog when entering new labels.
Section
8.6.2
Wrap instance name for
function block
Select whether to wrap function block instance name
at the function block width.
Specify the number of
enable characters for
label name/comment
Specify the number of display characters of function or
function block label.
Automatic input/output
labels
Select whether to add input/output label when function
block or function is pasted.
Automatic ENO labels
Select whether to add ENO output label when function
block or function is pasted.
Pin overwrites
Select whether to overwrite I/O label with a grid line
when ruling a grid line over function or function block.
Double clicking opens
header
Select whether a label editor is displayed when
function or function block is double clicked.
Double clicking opens
body
Select whether a program editor is displayed when
function or function block is double clicked.
Ladder Wrapping
Select whether to wrap ladder. The edited ladder shall
be object after changing the setting.
Open Structure Ladder/
FBD Editor in guided
mode
Set the default at opening structured ladder/FBD
editor as guided mode.
Allow hotkey repeater
Select whether to display grid line ruling dialog at
drawing lines.
Enter label names after
contacts and coils
Select whether to input label names or devices after
entering contacts and coils.
Auto Comment Block
Width
Set the width of comment to be added in ladder block
with grid numbers when adding ladder block.
Auto indention
Select whether to use the automatic indent when
beginning a new line after entering ST control syntax
such as IF or FOR, and when displaying template of
inline structured text.
Section
7.1.2
Instruction/label name
prediction
Select whether to display listed label names starting
with the input character when a character is input.
(Structured text: label name, inline structured text:
instruction and label name)
Section
7.1.1
Tabulator Length
Set tab length.
It is not available with inline structured text.
Section
7.1.3
Section
6.2.8
Section
8.7
Section
8.6.1
Section
8.3.2
Section
6.2.9
Section
8.10
GX Works2 Version 1 Operating Manual (Common)
11
12
13
14
A
I
GX Works2 Version 1 Operating Manual (Simple Project)
INDEX
Structured
Ladder/
Tool Hint
FBD/ST
10
CONVERTING/
COMPILING PROGRAMS
Project
Item
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Option tree item
MONITORING
The following table shows the option setting items.
USING USER
LIBRARIES
FX
SETTING OPTIONS
Q CPU L CPU
SEARCHING FOR
SPECIFIC POSITION
9
Option Setting List
APPENDIX
14.2
14 - 3
GX Works2
14 SETTING OPTIONS
Option tree item
Device Comment Editor
Label Setting Editor
Parameter
Item
Description
GX Works2 Version 1 Operating Manual (Common)
Automatic copy and
increment when inserting
a row
Select whether to copy the texts in the upper row after
incrementing it when inserting a row.
Copy data type/comment
items
Select if the data type, comment, and remark shall be
object for auto copy.
Default Length of String
Data Type
Set the default string length for string data type.
Section
5.5.4
Section
5.5.3
GX Works2 Version 1 Operating Manual (Common)
Structured Ladder/FBD/
ST
Monitor
Ladder
SFC*1
Display Format of
Monitoring Value
Select whether to display monitored value in Decimal
or Hexadecimal.
Section
12.3.1
Monitor buffer memory
and link memory
* Only applies to the
QCPU, LCPU, FX3U(C)
Select whether to monitor buffer memory and link
memory during monitoring. Scan time of PLC will be
lengthened depending on the setting.
-
Significant Characters
Set the number of displayable characters to monitor
character-string data.
Section
12.3.2
GX Works2 Version 1 Operating Manual (Simple Project)
PLC Read/Write
GX Works2 Version 1 Operating Manual (Common)
*1
GX Works2 Version 1 Operating Manual (Common)
Online Change
Symbolic Information
GX Works2 Version 1 Operating Manual (Common)
Function Block Call*1
Enables the followings: calling function block from
ladder to ST and from ST to ladder, using inline ST in
ladder and reducing steps when using function block.
*Value of VAR_IN_OUT type input label always
remains equal to the value of output label.
Program Check
Check when program check is not needed after Build
or Online Program Change. It can reduce the compile
time depending on the setting.
Operational Setting
Select whether to use the same label name in global
label and local label. When the same label is selected,
local label will be given priority.
Build Cross Reference
Information
By creating cross reference information after
compiling, time to search cross reference can be
reduced. Also able to search cross reference
information even before compiling. In this case, the
specified Find condition will be used as filtering
condition.
Stop Build
Set the number of error and warning to stop the
compile.
Disable Warning Codes
Register warning codes to invalidate. The registered
warning codes shall not be displayed in output
window.
Basic Setting
Compile
Output Result
14 - 4
Reference
Section
4.4.1
-
Section
10.4
14.2 Option Setting List
Item
Compile
Condition 1
names as labels*2
Function Output Setting
Reference
Select whether to use device names typed with lower
case as labels.
Only the device name outside device range
is valid for Inline Structured Text.
Select whether to connect directly from the objective
function output to other input.
10
CONVERTING/
COMPILING PROGRAMS
(D)INT_TO_BOOL_E,
(D)WORD_TO_BOOL_E,
TIME_TO_BOOL_E
NOT_E
LIMITAION_E,
MAXIMUM_E,
MINIMUM_E
Intelligent Function Module*1
*1
IQ Works Interaction
System Label Setting*3
11
User Defined Function
with EN/ENO
Select whether to generate a code which keeps bit
type output of the target function. (Codes keeping bit
type are generated if output is in bit type array or in
structure array, regardless of option setting.)
User Defined Function
Block with EN/ENO
Select whether to generate a code which keeps bit
type output of the target function block. (Codes
keeping bit type are generated if output is in bit type
array or in structure array, regardless of option
setting.)
Automatically assign
each system device to
output of functions that
use EN/ENO.
*Please refer to
appropriate manual if you
want to uncheck the box
because some programs
require caution.
Select whether to assign each system device to output
functions of EN/ENO. Only functions enabled.
(Function block is disabled.
Only checked functions at [Generate Code That Holds
the Output of the Following] are enabled when the
output is bit type.
Section
10.4
12
MONITORING
AND_E, OR_E, XOR_E
13
GX Works2 Version 1 Operating Manual (Intelligent Function Module)
USING USER
LIBRARIES
Compile
Condition 3
EQ_E, NE_E, GT_E,
GE_E, LT_E, LE_E
GX Works2 Version 1 Operating Manual (Common)
Checking this option enables use of the option setting
Use MELSOFT Navigator of MELSOFT Navigator. The option setting specified in
MELSOFT Navigator at the time of opening this
Option Information
project is used.
System Label Name
Setting
Set how to name system labels. When system labels
are entered, system label names are determined
based on this setting at the time of project save.
Section
5.2
14
SETTING OPTIONS
Compile
Compile
Structured Condition 2
Ladder/
FBD/ST
Select whether to generate a code to keep bit type
output of objective function block.
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Use lower-case device
Description
SEARCHING FOR
SPECIFIC POSITION
9
Option tree item
*1: Not supported by FXCPU.
*2: Not supported by Simple Project.
*3: For FXCPU, this item is supported by FX3G, FX3U, and FX3UC only.
APPENDIX
A
INDEX
I
14 - 5
GX Works2
14 SETTING OPTIONS
MEMO
14 - 6
APPENDIX
SETTING OPTIONS
USING USER
LIBRARIES
MONITORING
Appendix 1
INDEX
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
CONVERTING/
COMPILING PROGRAMS
APPENDIX
SEARCHING FOR
SPECIFIC POSITION
9
10
11
List of Toolbars and Shortcut Keys. . . . . . . . . . . App-2
12
13
14
A
I
App - 1
GX Works2
APPENDIX
Appendix 1
List of Toolbars and Shortcut Keys
Q CPU L CPU
FX
This section shows the list of toolbars and shortcut keys that can be used in Structured project.
For (Common), (Simple), and (Intelligent) indicated in the Reference column, refer to the following manuals
respectively:
(Common).............GX Works2 Version 1 Operating Manual (Common)
(Simple)................GX Works2 Version 1 Operating Manual (Simple Project)
(Intelligent)............GX Works2 Version 1 Operating Manual (Intelligent Function Module)
Appendix 1.1 Common toolbars and shortcut keys
The following explains the toolbars that are available regardless of the editing target and the
corresponding shortcut keys.
■
"Standard" toolbar icons
The following table shows the "Standard" toolbar icons and the corresponding shortcut keys.
Toolbar
icon
-
App - 2
Shortcut key
-
Corresponding menu
Description
+
New
Create a new project.
+
Open
Open an existing project.
+
Save
Save the project.
GX Works2 Help
Display the GX Works2 Help screen.
Find Help for GX Works2
Search for help items with an entered
keyword on the GX Works2 Help screen.
Appendix 1.1 Common toolbars and shortcut keys
Reference
(Common)
Appendix 1 List of Toolbars and Shortcut Keys
Reference
+
Cut
Cut the selected data.
+
Copy
Copy the selected data.
+
Paste
Paste the cut/copied data at the cursor
position.
+
Undo
Cancel the previous operation.
+
Redo
Perform the operation canceled by
[Undo].
+
Find Device
Search for a device.
Find Instruction
Search for an instruction.
Find Contact or Coil
Search for a contact or coil
corresponding to a specified device.
-
Write to PLC
Write data to the programmable
controller CPU.
-
Read from PLC
Read data from the programmable
controller CPU.
-
Start Monitoring (All
Windows)
Start monitoring all windows being
opened.
-
-
Stop Monitoring (All
Windows)
Stop monitoring all windows being
opened.
-
Start Monitoring
Start monitoring the window being
operated.
+
Stop Monitoring
Stop monitoring the window being
operated.
-
Device/Buffer Memory
Batch Monitor
Batch monitor device/buffer memories.
Modify Value
For ladder and SFC (Zoom) programs,
change the ON/OFF and value of a
device/label used in a program.
Build
Convert/compile the program being
edited.
Online Program Change
Convert/compile a sequence program
and write it to the programmable
controller CPU.
Rebuild All
Compile/convert all programs in the
project.
Start/Stop Simulation
Start/stop simulation.
+
+
+
+
+
+
-
Section
6.2.3
(Common)
Chapter 11
Section 12.1
10
11
12
13
(Common)
Section 10.1
(Common)
Section 10.2
(Common)
14
A
APPENDIX
-
-
CONVERTING/
COMPILING PROGRAMS
Description
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Corresponding menu
USING USER
LIBRARIES
Shortcut key
I
INDEX
Toolbar
icon
MONITORING
The following table shows the "Program Common" toolbar icons and the corresponding shortcut keys.
SEARCHING FOR
SPECIFIC POSITION
9
"Program Common" toolbar icons
SETTING OPTIONS
■
Appendix 1.1 Common toolbars and shortcut keys
App - 3
GX Works2
APPENDIX
■
"Docking Window" toolbar icons
The following table shows the "Docking Window" toolbar icons.
Toolbar
icon
■
Shortcut key
Corresponding menu
Description
Reference
-
Navigation Window
Display/hide the Navigation window.
-
Function Block Selection
Window
Display/hide the Function Block
Selection window.
Section
6.2.1
-
Output Window
Display/hide the Output window.
Section 10.6
-
Cross Reference
Display/hide the Cross Reference
window.
-
Device List
Display/hide the Device List window.
-
Watch 1 to 4
Display/hide the Watch window.
-
Intelligent Function Module Display/hide the Intelligent Function
Monitor
Module Monitor window.
-
Intelligent Function Module Display/hide the Intelligent Function
Guidance
Module Guidance window.
-
Find/Replace
Display/hide the Find/Replace window.
(Common)
(Common)
(Intelligent)
(Common)
"Intelligent Function Module" toolbar icons
The following table shows the "Intelligent Function Module" toolbar icons.
Toolbar
icon
App - 4
Shortcut key
Corresponding menu
Description
-
QD75/LD75 Positioning
Module Wave Trace
Execute a wave trace of the QD75/LD75
positioning module.
-
QD75/LD75 Positioning
Module Location Trace
Execute a location trace of the QD75/
LD75 positioning module.
-
Serial Communication
Module Circuit Trace
Execute a circuit trace of the serial
communication module.
-
QD75/LD75 Positioning
Module Test Monitor
Execute a positioning monitor of the
QD75/LD75 positioning module.
-
QD75/LD75 Positioning
Module Test Monitor
Execute a positioning test of the QD75/
LD75 positioning module.
-
Offset/Gain Setting of
Temperature Input Module
Execute offset/gain setting of the
temperature input module.
-
Offset/Gain Setting of
Analog Module
Execute offset/gain setting of the analog
module.
Appendix 1.1 Common toolbars and shortcut keys
Reference
(Intelligent)
Appendix 1 List of Toolbars and Shortcut Keys
The following table shows the "Debug Function" toolbar icons.
■
Description
-
Cancel
Cancel the step execution.
-
Break Execution
Execute the break execution.
-
Step Execution
Execute the step execution.
-
Execution Option
Display the "Execution Option" screen of
the step execution.
-
Set/Cancel Break Point
Set a break point at the cursor position,
or cancel the set break point.
-
Enable/Disable Break
Point
Enable/disable the break point at the
cursor position.
-
Cancel All Break Points
Cancel all break points.
-
Break Point Window
Display the Break Point window.
-
Cancel All Break Devices
Cancel all break devices.
-
Break Device Window
Display the Break Device window.
-
Set/Cancel Skip Range
Set a skip range, or cancel the set skip
range.
-
Enable/Disable Skip
Range
Enable/disable the skip range at the
cursor position.
-
Cancel All Skip Ranges
Cancel all skip ranges.
-
Skip Range Window
Display the Skip Range window.
Reference
Stop the step execution.
10
(Common)
12
Other shortcut keys
The following table shows other shortcut keys that are available regardless of the editing target.
Corresponding menu
Description
-
Rename
Change the name of the selected data or
library in the Navigation window.
-
Delete
Delete the selected data.
-
+
+
Copy
Copy data in the project.
-
+
+
Paste
Paste the copied data to a folder.
Add New Module
Add the intelligent function module data
to the project being edited.
Exit
Close the project being edited and exits
GX Works2.
-
+
-
+ E
+
-
+ E
Cross Reference
Create the cross reference information.
-
+ D
Device List
Display the device usage list.
-
Move to the next cross reference
information.
-
Move to the previous cross reference
information.
-
Move focus between the Cross
Reference window and work windows.
+
+
-
/
+
+
/
+
13
14
(Common)
A
I
INDEX
/
-
Reference
USING USER
LIBRARIES
Shortcut key
APPENDIX
Toolbar
icon
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Stop
CONVERTING/
COMPILING PROGRAMS
Corresponding menu
-
MONITORING
Shortcut key
SEARCHING FOR
SPECIFIC POSITION
9
"Debug Function" toolbar icons
SETTING OPTIONS
■
Appendix 1.1 Common toolbars and shortcut keys
App - 5
GX Works2
APPENDIX
Toolbar
icon
Shortcut key
-
Corresponding menu
+
-
+
+
-
+
-
+
+
Description
Find Device
Search for a device/label in the program.
Find String
Search for a string.
Replace Device
Replace a device/label in the program.
Replace String
Replace a string.
-
+
+
-
Search for an item in the downward
direction.
-
+
+
-
Search for an item in the upward
direction.
-
+
-
+
-
+
+
Start Watching
Start monitoring the current values of
registered devices/labels and intelligent
function module.
Stop Watching
Stop monitoring the current values of
registered devices/labels and intelligent
function module.
Register Device Test with
Execution Condition
Register the device test with execution
condition.
-
+
-
Close the window displayed on the
uppermost position.
-
+
-
Move to the next uppermost window.
Reference
(Common)
Appendix 1.2 "Navigation Window" toolbar icons
The following table shows the "Navigation Window" toolbar icons.
Toolbar
icon
Shortcut key
Description
-
Add New Data
Add data to the project.
-
Copy
Copy selected data.
-
Paste
Paste copied data.
-
Property
Display a property of the selected data.
-
Refresh
Update the display content of the Navigation
window.
Project Property
Display a property of the open project.
Expand All Uncompiled
Data
Expand all uncompiled data in the tree on the
Project view and the User Library view.
Collapse All
Collapse all data in the tree on the Project view
and the User Library view.
-
App - 6
Corresponding menu
Appendix 1.2 "Navigation Window" toolbar icons
Reference
(Common)
-
(Common)
Appendix 1 List of Toolbars and Shortcut Keys
The following explains the toolbar icons and the corresponding shortcut keys used for setting labels.
"Label" toolbar icons
Shortcut key
Corresponding menu
Description
New Declaration (Before)
Add a row above the cursor position.
-
New Declaration (After)
Add a row below the cursor position.
+
Delete Row
Delete the row at the cursor position.
-
Read from CSV File
Read label settings from the CSV file.
-
Write to CSV File
Write label settings to the CSV file.
-
Confirm Update of System
Label Database
Reflect system label information
changed in another project on global
labels.
-
Import System Label
Import system label information and
reflect it on global labels.
-
Register Device Name of
System Label
Register a selected global label as a
system label.
-
Disable System Label
Relation
Disable the relation between a selected
global label and a system label.
+
Reference
Section
5.5.4
Section 5.8
■
12
MONITORING
Section 5.2
13
Other shortcut keys
The following table shows other shortcut keys for setting labels.
Toolbar
icon
Shortcut key
11
Corresponding menu
Description
-
+
-
+
-
Display all lines of comment and remark
of the selected line.
-
+
-
Display only the first line of comment and
remark of the selected line.
Select All
Reference
Select all rows.
Section
5.5.4
USING USER
LIBRARIES
Toolbar
icon
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
The following table shows the "Label" toolbar icons and the corresponding shortcut keys.
CONVERTING/
COMPILING PROGRAMS
10
14
SETTING OPTIONS
■
SEARCHING FOR
SPECIFIC POSITION
9
Appendix 1.3 Toolbar icons and shortcut keys for setting labels
APPENDIX
A
INDEX
I
Appendix 1.3 Toolbar icons and shortcut keys for setting labels
App - 7
GX Works2
APPENDIX
Appendix 1.4 Toolbar icons and shortcut keys for setting device
memory
The following explains the toolbar icons and the corresponding shortcut keys for setting device
memory.
■
"Device Memory" toolbar icons
The following table shows the "Device Memory" toolbar icons and the corresponding shortcut keys.
Toolbar
icon
Shortcut key
Description
-
Display Mode/Binary
Change display format to binary.
-
Display Mode/Octal
Change display format to octal.
-
Display Mode/Decimal
Change display format to decimal.
-
Display Mode/
Hexadecimal
Change display format to hexadecimal.
-
Display Mode/Float
Change display format to real numbers.
-
Display Mode/String
Change display format to string.
-
Display Mode/String
(ASCII only)
Change display format to ASCII.
-
Register/16-bit
Display data in units of words.
-
Register/32-bit
Display data in units of double words.
-
Register/64-bit
Display data in units of 64 bits.
Input Device
Enter a device.
-
FILL
Set the same value to continuous
devices.
-
Read Device Memory from Read data in device memory from a
PLC
programmable controller CPU.
-
Write Device Memory to
PLC
Write data in device memory to a
programmable controller CPU.
-
Read from Excel File
Read data from an Excel file.
-
Write to Excel File
Write data to an Excel file.
+
■
Corresponding menu
Reference
(Common)
Other shortcut key
The following table shows other shortcut key for setting device memory.
Toolbar
icon
-
App - 8
Shortcut key
Corresponding menu
Insert Row
Description
Insert a row at the cursor position.
Appendix 1.4 Toolbar icons and shortcut keys for setting device memory
Reference
(Common)
Appendix 1 List of Toolbars and Shortcut Keys
Shortcut key
Corresponding menu
Description
+
Next Unmatch
Move to the next mismatched data.
+
Previous Unmatch
Move to the previous mismatched data.
Return to Result List
Display the <<Verify Result List>>.
Close Detail Result
Close the <<Detail Verify Result>> being
displayed.
Close All Detail Result
Close all <<Detail Verify Result>>.
Write to CSV File
Write verification result to a CSV file.
+
+
+
+
-
Reference
(Common)
10
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Toolbar
icon
SEARCHING FOR
SPECIFIC POSITION
The following table shows the toolbar icons and the corresponding shortcut keys for the verification
result.
9
CONVERTING/
COMPILING PROGRAMS
Appendix 1.5 Toolbar icons and shortcut keys for verification result
Appendix 1.6 Toolbar icons for executing sampling trace
12
Corresponding menu
Description
-
Trace Setting
Display the Trace Setting screen.
-
Start Trace
Start sampling trace. To start sampling
trace, the trace ready signal (SM800)
must be ON.
-
Stop Trace
Stop sampling trace.
-
Display Trace Buffer
Condition
Display the Trace Data Storage Status
screen.
-
Monitor Status
Reference
(Common)
13
USING USER
LIBRARIES
Shortcut key
Execution Failed
-
Before Trigger
Indicate the status sampling trace is
executed but a trigger is not generated.
-
After Trigger
Indicate the status sampling trace is
executed and a trigger is generated.
-
Stop
Indicate the status sampling trace is
interrupted.
-
Completion
Indicate the status sampling trace has
ended normally by acquiring trace data
up to the specified total number of
samplings after generation of a trigger.
-
Error
Indicate the status a sampling trace error
occurred during sampling trace.
-
Buffer Status
Displayed when the trace data have
been acquired up to the specified total
number of samplings.
APPENDIX
Display the current sampling trace status
Indicate the sampling trace stop status,
or the status sampling trace has not
started.
-
Trigger Occurrence
Displayed when a trigger is generated
during sampling trace.
I
14
-
SETTING OPTIONS
-
A
INDEX
Toolbar
icon
MONITORING
The following table shows the toolbar icons for executing sampling trace.
Appendix 1.5 Toolbar icons and shortcut keys for verification result
App - 9
GX Works2
APPENDIX
Toolbar
icon
Shortcut key
Corresponding menu
-
Zoom Out Timing Chart
-
Zoom In Timing Chart
-
Zoom Out Trend Graph
-
Zoom In Trend Graph
-
Switch Chart/Detail
Description
Reference
Zoom the scale of timing chart
Zoom the scale of trend graph
(Common)
Switch the trace result display on the
Sampling Trace screen between the
timing chart (graph) and the detailed
data (value).
Appendix 1.7 Toolbar icons and shortcut keys for program editors
The following explains the toolbar icons and the corresponding shortcut keys for program editors.
■
"Ladder" toolbar icons and shortcut keys
The following table shows the toolbar icons and the corresponding shortcut keys for the ladder editor.
Toolbar
icon
Shortcut key
Description
Open Contact
Insert an open contact at the cursor
position.
Open Branch
Insert an open contact branch at the
cursor position.
Close Contact
Insert a closed contact at the cursor
position.
Close Branch
Insert a closed contact branch at the
cursor position.
Coil
Insert a coil at the cursor position.
Application Instruction
Insert an application instruction at the
cursor position.
Horizontal Line
Insert a horizontal line at the cursor
position.
+
Vertical Line
Insert a vertical line at the cursor
position.
+
Delete Horizontal Line
Delete the horizontal line at the cursor
position.
+
Delete Vertical Line
Delete the vertical line at the cursor
position.
+
Rising Pulse
Insert a rising pulse at the cursor
position.
+
Falling Pulse
Insert a falling pulse at the cursor
position.
+
Rising Pulse Branch
Insert a rising pulse branch at the cursor
position.
+
Falling Pulse Branch
Insert a falling pulse branch at the cursor
position.
+
+
App - 10
Corresponding menu
+
+
Rising Pulse Close
Insert a rising pulse close at the cursor
position.
+
+
Falling Pulse Close
Insert a falling pulse close at the cursor
position.
Appendix 1.7 Toolbar icons and shortcut keys for program editors
Reference
(Simple)
Appendix 1 List of Toolbars and Shortcut Keys
Insert a rising pulse close branch at the
cursor position.
+
+
Falling Pulse Close Branch
Insert a falling pulse close branch at the
cursor position.
Operation Result Rising
Pulse
Insert an operation result rising pulse at
the cursor position.
Insert an operation result falling pulse at
the cursor position.
+
+
+
Operation Result Falling
Pulse
+
+
Invert Operation Results
Insert an operation result inversion at the
cursor position.
Edit Line
Input a line at the cursor position.
Delete Line
Delete the line at the cursor position.
Insert Inline Structured
Text Box
Insert an inline structured text box.
-
Device Comment
Edit device comments.
-
Statement
Edit statements.
-
Note
Edit notes.
Statement/Note Batch Edit
Batch edit the statements/notes in the
program.
Line Statement List
Display the list of line statements used in
the program.
Display Template
Insert a template corresponds to the
instruction/function/control syntax.
+
Mark Template (Left)
Set an argument of the template in the
selected status from the left by selecting
the menu each time.
+
Mark Template (Right)
Set an argument of the template in the
selected status from the right by
selecting the menu each time.
+
Read Mode
Switch the mode of the open window to
"Read Mode".
Write Mode
Switch the mode of the open window to
"Write Mode".
Monitor Mode
Switch the mode of the open window to
"Monitor Mode" during monitoring.
Monitor (Write Mode)
Switch the mode of the open window to
"Monitor (Write Mode)" during
monitoring.
Device Display
Display devices assigned by
compilation.
Zoom
Change the display magnification ratio of
the ladder.
Insert Row
Insert a row at the cursor position.
Delete Row
Delete the row at the cursor position.
Insert Column
Insert a column at the cursor position.
Delete Column
Delete the column at the cursor position.
+
+
+
+
+
+
+
+
-
-
+
-
+
-
+
-
+
+
+
-
+
+
Connect Line to Left-Side
Symbol
Connect a horizontal line to the ladder
symbol at the left of the cursor position.
+
Enter/Delete HLine
Rightward
Enter/delete a line at the right of the
cursor position.
-
+
Enter/Delete HLine
Leftward
Enter/delete a line at the left of the
cursor position.
-
+
Enter/Delete VLine
Downward
Enter/delete a line at the downward of
the cursor position.
-
(Simple)
11
12
Section
7.1.4
13
14
(Simple)
A
I
INDEX
-
Connect Line to Right-Side Connect a horizontal line to the ladder
symbol at the right of the cursor position.
Symbol
10
CONVERTING/
COMPILING PROGRAMS
Rising Pulse Close Branch
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
+
MONITORING
+
Reference
USING USER
LIBRARIES
Description
SETTING OPTIONS
Corresponding menu
APPENDIX
Shortcut key
SEARCHING FOR
SPECIFIC POSITION
9
Toolbar
icon
Appendix 1.7 Toolbar icons and shortcut keys for program editors
App - 11
GX Works2
APPENDIX
Toolbar
icon
Shortcut key
Corresponding menu
Reference
-
+
Enter/Delete VLine
Upward
Enter/delete a line at the upward of the
cursor position.
-
+
Switch Open/Close
Contact
Switch a open contact to closed contact,
and vice versa.
-
+
Switch Statement/Note
Type
Change the type of a statement/note.
Instruction Partial Edit
Open the Enter Symbol screen in which
the first argument is in the selected
status.
-
+
+
Select a device/label on the Enter
Symbol screen. Switches the device/
-
+
/
-
-
+
/
-
Increment/decrement a device/label on
the Enter Symbol screen.
-
Display options of instruction/label on the
Enter Symbol screen.
-
Move the cursor on the editing screen
while the Enter Symbol screen is
displayed.
-
+
+
/
-
/
/
Jump
+
-
-
label to be selected using the
button.
+
+
Jump to Next Ladder Block Jump a cursor from the current position
Start
to the start of the next ladder block.
+
+
Jump to Previous Ladder
Block Start
Jump a cursor from the current position
to the start of the previous ladder block.
+
Comment
Display device comments.
-
+
Statement
Display statements.
-
+
Note
Display notes.
-
+
Non-Display Ladder Block
Hide a ladder block.
-
+
Display Ladder Block
Display a hidden ladder block.
-
+ turn mouse scroll Bigger
wheel upward
-
+ turn mouse scroll Smaller
wheel downward
+
-
+
+
+
+
/
-
/
/
+
-
Change the display size of text smaller
on the editing screen.
Tile FB Horizontally
Tile the ladder editor and the function
block program editor horizontally.
Back to Zoom SFC Block
Open the SFC diagram corresponds to
the program on the Zoom editor window.
Moves up/down/left/right
Move a cursor toward up/down/left/right
of the SFC diagram.
Open Instruction Help
Display the Instruction Help screen.
Instruction Help
+
+
(Simple)
Change the display size of text larger on
the editing screen.
-
-
/
Display the specified row.
-
-
App - 12
Description
-
Display the Find screen.
Display details of instructions.
Enter an assignment operator (:=) when
editing the inline structured text program.
Appendix 1.7 Toolbar icons and shortcut keys for program editors
(Common)
Section
7.1.1
Appendix 1 List of Toolbars and Shortcut Keys
Shortcut key
+
Corresponding menu
+
Description
Reference
List Operands
Display the Label Registration/Selection
screen.
Section
6.2.2
Display Template
Insert a template corresponds to the
instruction/function/control syntax.
+
+
Mark Template (Left)
Set an argument of the template in the
selected status from the left by selecting
the menu each time.
+
+
Mark Template (Right)
Set an argument of the template in the
selected status from the right by
selecting the menu each time.
+
Toggle Bookmark
Set a bookmark at the cursor line. If a
bookmark has already been set, delete
the set bookmark.
-
Bookmark List
Jump to the specified bookmark from the
bookmark list.
Next Bookmark
Display the next bookmark position.
Previous Bookmark
Display the previous bookmark position.
Delete All Bookmarks
Delete all bookmarks.
+ Num
*1
Increase Zoom
Zoom in the screen one level.
+ Num
*1
Decrease Zoom
Zoom out the screen one level.
+
+
11
Section
9.1.2
12
Section
6.2.4
-
+
Jump
Jump to the specified line.
-
+
Zoom Header/Body
Header
Open the label setting screen of the
selected POU.
-
MONITORING
+
Section
7.1.4
10
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Toolbar
icon
CONVERTING/
COMPILING PROGRAMS
The following table shows the toolbar icons and the corresponding shortcut keys for the ST editor.
SEARCHING FOR
SPECIFIC POSITION
9
"ST" toolbar icons and shortcut keys
Copy
Copy the selected data.
-
13
Cut
Cut the selected data.
-
Paste
Paste the cut/copied data at the cursor
position.
-
Instruction Help
Display details of instructions.
-
+
-
+
-
+
-
+
-
+
Enter an assignment operator (:=) when
editing the inline structured text program.
Section
9.1.1
(Common)
Section
7.1.1
14
SETTING OPTIONS
*1: ‘Num' indicates keys in the numeric keypad.
USING USER
LIBRARIES
■
APPENDIX
A
INDEX
I
Appendix 1.7 Toolbar icons and shortcut keys for program editors
App - 13
GX Works2
APPENDIX
■
"Structured Ladder/FBD" toolbar icons and shortcut keys
The following table shows the toolbar icons and the corresponding shortcut keys for the structured
ladder/FBD editor.
Toolbar
icon
Shortcut key
Reference
Change the input format for positioning
contacts/coils.
Section 8.4
Guided Mode/Guided
Editing
Change the input format for entry with
keyboard.
Section 8.10
Interconnect Mode
Change the input mode for drawing
lines.
Section
8.3.2
Guided Mode/Auto
Comment
Add a comment entry field at the start of
the ladder block added in Guided editing.
Section
8.10.9
+
Insert Row
Insert a row in the ladder being edited.
+
Insert Column
Insert a column in the ladder being
edited.
+
New Ladder Block Before
Insert a new ladder block in front of the
ladder block being edited.
+
New Ladder Block After
Insert a new ladder block in back of the
ladder block being edited.
-
Input Instruction
Display the Input Instruction screen.
Section
8.2.2
-
Left Power Rail
Display/hide the left power rail.
Section
8.8.7
Open Contact
Insert an open contact at the cursor
position.
Close Contact
Insert a closed contact at the cursor
position.
Open Branch
Insert an open contact branch at the
cursor position.
Close Branch
Insert a closed contact branch at the
cursor position.
Vertical Line Segment
Insert a vertical line at the cursor
position.
Horizontal Line Segment
Insert a horizontal line at the cursor
position.
Coil
Insert a coil at the cursor position.
Function Block Selection
Window
Display the Function Block Selection
window.
Input Label
Insert an input variable at the cursor
position.
Output Label
Insert an output variable at the cursor
position.
-
Rising Pulse
Insert a rising pulse at the cursor
position.
-
Falling Pulse
Insert a falling pulse at the cursor
position.
-
Rising Pulse Close
Insert a rising pulse close at the cursor
position.
-
Falling Pulse Close
Insert a falling pulse close at the cursor
position.
+
Jump
Insert a jump at the cursor position.
+
Return
Insert a return at the cursor position.
+
Comment
Insert a comment entry field.
Ladder Block Label
Display the Ladder Block screen.
List Operands
Display the Label Registration/Selection
screen.
+
+
+
+
+
+
+
App - 14
Description
Select Mode
+
+
Corresponding menu
+
Appendix 1.7 Toolbar icons and shortcut keys for program editors
Section
8.3.6
Section 8.8
Section
8.2.1
Section
6.2.2
Appendix 1 List of Toolbars and Shortcut Keys
-
-
Decrease Zoom
Zoom out the screen one level.
-
-
/
Signal Configuration/
Toggle
Change the type of contact and coil in
the order shown below:
• Contact: Open Contact → Close
Contact
• Coil: Normal → Negation → Set →
Reset
Jump
Jump to the specified ladder block
number.
+
Change Label-DeviceAddress Mode
Switch the display format in order (label,
device address).
+
Change Label-Comment
Mode
Switch the display between label and
comment.
Zoom Header/Body/
Header
Open the label setting screen for the
selected POU.
Copy
Copy the selected data.
-
Cut
Cut the selected data.
-
Paste
Paste the cut/copied data at the cursor
position.
-
Auto Connect
Connect the start and end points to draw
a line.
Guided Mode
/Overwrite, Insert Mode
Switch the input mode between
Overwrite/Insert in the guided mode.
Guided Mode/Line Mode
Change the input mode for drawing lines
in Guided editing.
Instruction Help
Display details of instructions.
+
+
+
+
+
+
+
+
-
Set the type of contact and coil.
+
+
Section
6.2.4
Signal Configuration/
Configure
+
+
Narrow and widen the width of ladder
block in the guided mode.
Section
8.6.3
Section 8.5
Section
9.2.1
Section 8.7
10
CONVERTING/
COMPILING PROGRAMS
*1
Reference
11
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
+ Num
-
Delete the number of arguments of
functions and function blocks.
Zoom in the screen one level.
-
Delete Pins
Increase Zoom
-
Increment the number of arguments of
functions and function blocks.
*1
+
-
Increment Pins
+ Num
+
-
Description
12
Section
6.2.9
Section
8.3.2
Section 8.10
(Common)
13
14
SETTING OPTIONS
*1: ‘Num' indicates keys in the numeric keypad.
MONITORING
-
Corresponding menu
USING USER
LIBRARIES
Shortcut key
SEARCHING FOR
SPECIFIC POSITION
9
Toolbar
icon
APPENDIX
A
INDEX
I
Appendix 1.7 Toolbar icons and shortcut keys for program editors
App - 15
GX Works2
APPENDIX
■
"SFC" toolbar icons and shortcut keys
The following table shows the toolbar icons and the corresponding shortcut keys for the SFC editor.
Toolbar
icon
Shortcut key
Description
[STEP] New Step
Insert
at the cursor position.
[B] Block Start Step (with
END check)
Insert
at the cursor position.
[BS] Block Start Step
(without END check)
Insert
at the cursor position.
[JUMP] Jump
Insert
at the cursor position.
[END] END Step
Insert
at the cursor position.
[DUMMY] Dummy Step
Insert
at the cursor position.
[TR] Transition
Insert
at the cursor position.
[--D] Selection Divergence
Insert a selection divergence.
[==D] Simultaneous
Divergence
Insert a simultaneous divergence.
[--C] Selection
Convergence
Insert a selection convergence.
[==C] Simultaneous
Convergence
Insert a simultaneous convergence.
+
[ | ] Vertical Line
Insert a vertical line.
+
No Attribute
Set the step attribute to no attribute.
+
Stored Coil
Set the step attribute to Stored Coil.
+
Stored Operation (without
Transition Check)
Set the step attribute to Stored Operation
(SE).
+
Stored Operation (with
Transition Check)
Set the step attribute to Stored Operation
(ST).
+
Reset
Reset the step attribute.
+
Vertical Line (Draw Line)
Insert
at the cursor position.
+
Selection Divergence
(Draw Line)
Insert
at the cursor position.
+
Simultaneous Divergence
(Draw Line)
Insert
at the cursor position.
+
Selection Convergence
(Draw Line)
Insert
at the cursor position.
+
Simultaneous
Convergence
(Draw Line)
Insert
at the cursor position.
+
Delete Line
Delete a line at the cursor position.
-
SFC Step/Transition
Comment
Edit the SFC step/transition comments.
+
+
App - 16
Corresponding menu
-
Sort SFC Step No.
Sort the SFC block step numbers.
-
SFC All Block Batch
Monitoring
Batch monitor all blocks in the SFC
program.
Appendix 1.7 Toolbar icons and shortcut keys for program editors
Reference
(Simple)
Appendix 1 List of Toolbars and Shortcut Keys
+
-
+
-
+
-
+
-
+
Scroll the screen to display active steps
automatically when they are out of the
screen during monitoring.
Read Mode
Switch the mode of the open window to
"Read Mode".
Write Mode
Switch the mode of the open window to
"Write Mode".
Monitor Mode
Switch the mode of the open window to
"Monitor Mode" during monitoring.
Monitor (Write Mode)
Switch the mode of the open window to
"Monitor (Write Mode)" during
monitoring.
Zoom
Change the display magnification ratio of
the SFC diagram.
Insert Row
Insert a row at the cursor position.
Delete Row
Delete a row at the cursor position.
Insert Column
Insert a column at the cursor position.
Delete Column
Delete a column at the cursor position.
-
+
Jump
Move a cursor to the SFC step number/
transition number in the specified block.
-
+
Find Jump Step
Move a cursor to the step of the jump
source.
-
Numeric key
-
+
-
+
/
double-click
-
+
Display the SFC step/transition
comments.
Open Zoom/Start
Destination Block
Display the Zoom editor window or the
start destination block.
-
-
+
+
+
11
(Simple)
12
Move a cursor to the SFC step number/
transition number.
SFC Step/Transition
Comment
-
10
CONVERTING/
COMPILING PROGRAMS
+
SFC Auto Scroll
Reference
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
-
Description
MONITORING
Corresponding menu
13
Display the start destination block.
Back to Start SFC Block
Display the start source block.
Program Display
Display programs on the SFC diagram
when editing in MELSAP-L.
USING USER
LIBRARIES
Shortcut key
SEARCHING FOR
SPECIFIC POSITION
9
Toolbar
icon
■
SFC block list shortcut keys
The following table shows the shortcut keys for the SFC block list.
+
-
Numeric key
-
+
Corresponding menu
Description
Reference
Jump to the specified block number/data
name.
Jump
SFC Block List Comment
Jump to the selected block number.
A
(Simple)
Display comments of the SFC block list.
APPENDIX
-
Shortcut key
I
INDEX
Toolbar
icon
SETTING OPTIONS
14
Appendix 1.7 Toolbar icons and shortcut keys for program editors
App - 17
GX Works2
APPENDIX
■
Other shortcut keys
The following table shows other shortcut keys for program editors.
Toolbar
icon
-
Shortcut key
Description
-
Move the cursor in the arrow direction.
-
-
Scroll up the screen.
-
-
Scroll down the screen.
/
/
/
-
+
-
Scroll the screen to the left.
-
+
-
Scroll the screen to the right.
-
-
Move the cursor to its leftmost position in
the row.
-
-
Move the cursor to its rightmost position
in the row.
-
Move the cursor to the start of the
program.
-
Move the cursor to the end of the
program.
-
Set a range.
-
Select the range from the current
position up to the start of the program.
-
Select the range from the current
position down to the end of the program.
-
Delete the selected target.
-
+
-
-
-
App - 18
Corresponding menu
+
+
/
/
/
+
+
+
+
Appendix 1.7 Toolbar icons and shortcut keys for program editors
Reference
-
Appendix 1 List of Toolbars and Shortcut Keys
The following table shows the toolbar icons and the corresponding shortcut keys for the I/O system
setting function.
New
Create a new I/O system setting.
+
Open
Open an existing I/O system setting.
+
Save
Save the I/O system setting.
+
Cut
Cut the selected data.
+
Copy
Copy the selected data.
+
Paste
Paste the cut/copied data at the cursor
position.
-
Execute I/O System
Setting
Execute the I/O system setting function
and starts simulation.
-
Disable I/O System Setting
Disable the execution of the I/O system
setting function.
-
Start Monitoring
Start monitoring the I/O System Setting
screen.
-
Stop Monitoring
Stop monitoring the I/O System Setting
screen.
+
Exit I/O System Settings
Exit the I/O system setting.
10
CONVERTING/
COMPILING PROGRAMS
+
Reference
11
(Common)
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
Description
12
MONITORING
Corresponding menu
USING USER
LIBRARIES
13
SETTING OPTIONS
14
A
APPENDIX
-
Shortcut key
I
INDEX
Toolbar
icon
9
SEARCHING FOR
SPECIFIC POSITION
Appendix 1.8 Toolbar icons and shortcut keys for I/O system setting
function
Appendix 1.8 Toolbar icons and shortcut keys for I/O system setting function
App - 19
GX Works2
APPENDIX
Appendix 1.9 Shortcut keys for operating intelligent function module
The following explains the toolbar icons and the corresponding shortcut keys for editing intelligent
function module data.
■
Toolbar icons for positioning monitor function
The following table shows the toolbar icons for the positioning monitor function.
Toolbar
icon
Shortcut key
Corresponding menu
-
-
Monitor the operating status of
positioning module.
-
-
Monitor the start history.
-
-
Monitor the error history.
-
-
Monitor the warning history.
-
Start the positioning monitor.
-
Stop the positioning monitor.
+
■
Description
Reference
(Intelligent)
Toolbar icons and shortcut keys for editing predefined protocol support function
data
The following table shows the toolbar icons and the corresponding shortcut keys for editing predefined
protocol support function data.
Toolbar
icon
App - 20
Shortcut key
Corresponding menu
Description
+
New
Create a new protocol setting .
+
Open
Open an existing protocol setting .
+
Save
Save the protocol information.
+
Copy
Copy the selected data.
+
Paste
Paste the cut/copied data at the cursor
position.
-
Print
Print the protocol information.
-
Write to Module
Write data to a module.
-
Read from Module
Read data from a module.
Appendix 1.9 Shortcut keys for operating intelligent function module
Reference
(Intelligent)
INDEX
APPENDIX
SETTING OPTIONS
USING USER
LIBRARIES
MONITORING
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
CONVERTING/
COMPILING PROGRAMS
INDEX
SEARCHING FOR
SPECIFIC POSITION
9
10
11
12
13
14
I
I
Index - 1
GX Works2
INDEX
[A]
input variable .................................................................. 8-18
Instance ....................................................... 8-19, 8-22, 12-3
address .................................................................. 5-4, 8-23
Application Instruction ............................................ A-21, 6-5
array ............................................................................... 5-16
Auto connect .......................................................... 8-8, 8-11
[J]
[B]
[L]
bit specification of word device ...................................... 5-22
Label Name ..................................................... 5-4, 5-9, 5-11
label setting .............................................................5-2, 5-13
Labels ............................................................................... 5-2
Ladder .............................................................................. 1-2
ladder block header ........................................................ 8-28
ladder block label ........................................................... 8-28
ladder block title ............................................................. 8-28
ladder symbol ................................................................... 8-4
Left power rail ................................................................... 8-2
library help .................................................................... 13-16
library passwords ........................................................... 13-9
line .................................................................................... 8-8
List format ............................................................ A-21, 6-14
List of Functions ............................................................... 1-5
local labels ..............................................................5-9, 5-11
[C]
Checking for Errors and Warnings ............................... 10-22
Class ............................................................... 5-4, 5-9, 5-11
Close Contact ................................................................. 8-15
Coil ......................................................................... 8-4, 8-15
comment ......................................................... 5-4, 5-19, 6-4
Compile condition ........................................................... 14-5
Conditions of Monitoring ................................................ 12-4
Constant .................................................5-4, 5-9, 5-11, 5-20
Contact ........................................................................... 8-15
CSV file .......................................................................... 5-29
current value display ...................................................... 12-4
current values ................................................................. 12-2
[D]
data type ....................................................... 5-4, 5-14, 5-15
decimal and hexadecimal ............................................... 12-4
device ..................................................................... 5-4, 8-23
device memory ............................................................... 11-3
display format ................................................................. 8-23
Docking window ............................................................... 2-2
[E]
editing mode ..................................................................... 8-3
errors .............................................................................. 10-6
executing conditions ......................................................... 4-7
[F]
FBD .................................................................................. 1-2
function ...................................................4-14, 6-3, 6-5, 8-18
function block .........................................4-14, 6-3, 6-5, 8-18
Function Block Selection Window ................... 2-2, 4-15, 6-5
[G]
Global label ...................................................................... 5-3
grid ................................................................................. 8-31
[I]
indention ........................................................................... 7-3
Index - 2
Jump ................................................................. 8-4, 9-2, 9-4
[M]
menu bar .......................................................................... 2-2
[N]
Navigation window ........................................................... 2-2
Negation ......................................................................... 8-15
[O]
Open Contact ................................................................. 8-15
output variable ................................................................ 8-18
Output window ............................................ 2-2, 10-3, 10-22
[P]
POUs .....................................................................4-10, 4-14
Priority .............................................................................. 4-8
Program ........................................................................... 6-2
Program blocks ............................................... 4-4, 4-14, 6-3
Program Configuration ..................................................... 4-2
Program Editor ................................................................. 6-2
program files .................................................................... 4-3
programming language .............................................1-2, 6-3
Project view ...................................................................... 4-2
Property ............................................................................ 4-8
[R]
9
SEARCHING FOR
SPECIFIC POSITION
reading symbolic information from programmable controller
CPU ................................................................................11-5
Reset ..............................................................................8-15
Return ...............................................................................8-4
[S]
10
CONVERTING/
COMPILING PROGRAMS
Select Mode ......................................................................8-4
Set ..................................................................................8-15
Setting Ranges for Devices Assigned Automatically ......5-26
SFC ..................................................................................6-3
Shortcut Keys .............................................................. App-2
Simple project ................................................................ A-21
Special instruction ..................................................A-21, 6-5
ST ............................................................................. 1-2, 7-2
ST editor ................................................................... 6-5, 7-2
structure ..........................................................................5-20
Structure Setting .............................................................5-20
structured data type ........................................................5-20
structured ladder ...............................................................1-2
Structured ladder editor ....................................................6-5
structured ladder/FBD ......................................................8-2
structured ladder/FBD editor .................................... 6-5, 8-2
Structured project .............................................................1-2
Symbolic information ......................................................11-5
WRITING/READING DATA TO/FROM
PROGRAMMABLE CONTROLLER CPU
11
MONITORING
12
[T]
13
USING USER
LIBRARIES
tabulator ............................................................................7-4
tasks .................................................................................4-3
templates ..........................................................................7-5
tool hint ...........................................................................6-15
toolbar ...................................................................2-2, App-2
[U]
14
SETTING OPTIONS
user library ......................................................................13-3
User Library view ............................................................13-4
[V]
variable ................................................................. 8-19, 8-37
I
[W]
APPENDIX
warning ................................................................. 10-6, 10-7
Work window ....................................................................2-2
writing symbolic information from programmable controller
CPU ................................................................................11-5
INDEX
I
Index - 3
Microsoft, Windows are registered trademarks of Microsoft 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.
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement