GX Works2 Eng Man
GX Works2 Eng Man
GX Works2 Eng Man
INDUSTRIAL AUTOMATION
MITSUBISHI ELECTRIC
GX Works2
Programming and
Documentation System
Beginner's Manual
10 08 2011
Version A
About this Manual
The texts, illustrations, diagrams and examples in this manual are only
intended as aids to help explain the functioning, operation,
use and programming of the GX Works2 programming
and documentation system.
For using and usage of this software only the user his own is responsible.
If you have any questions regarding the installation and operation
of the software described in this manual, please do not hesitate to contact your
sales office or one of your Mitsubishi distribution partners.
You can also obtain information and answers to frequently asked questions
from our Mitsubishi website under
www.mitsubishi-automation.com.
The GX Works2 software is supplied under a legal license
agreement and may only be used and copied subject to the terms of this
License Agreement.
No part of this manual may be reproduced, copied, stored in any kind
of information retrieval system or distributed without the prior express written
consent of MITSUBISHI ELECTRIC.
MITSUBISHI ELECTRIC reserves the right to change the specifications of its
products and/or the contents of this manual at any time and without prior notice.
August 2011
Beginner's Manual for
MELSOFT GX Works2
Version Changes / Additions / Corrections
A 08/2011 pdp First issue
GX Works2 I
Typographic Conventions
Use of notes
Notes containing important information are clearly identified as follows:
Use of examples
Examples containing important information are clearly identified as follows:
Numbering in figures and illustrations
Reference numbers in figures and illustrations are shown with white numbers in a black circle and the
corresponding explanations shown beneath the illustrations are identified with the same numbers,
like this:
Procedures
In some cases the setup, operation, maintenance and other instructions are explained with numbered
procedures. The individual steps of these procedures are numbered in ascending order with black
numbers in a white circle, and they must be performed in the exact order shown:
Text
Text
Text
Footnotes in tables
Footnote characters in tables are printed in superscript and the corresponding footnotes shown be-
neath the table are identified by the same characters, also in superscript.
If a table contains more than one footnote, they are all listed below the table and numbered in as-
cending order with black numbers in a white circle, like this:
Text
Text
Text
Character formatting and orientation aids
Menu names, menu commands, submenu commands, and dialog box options are printed in bold-
face type. Examples: The menu item New in the menu Project or the options PLC interface and Com-
puter Link in the dialog box Transfer-Setup.
Please keep this manual in a place where it is always available for the users.
NOTE Note text
Example Example text
II
Contents
GX Works2 III
Contents
1 Introduction
1.1 This manual. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
1.2 If you are not yet familiar with Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
1.3 If you get stuck. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
1.4 Manuals. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
1.4.1 Displaying operating manuals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
2 Getting to Know GX Works2
2.1 Main functions of GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
2.1.1 Programming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1
2.1.2 Setting parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2.1.3 Writing/reading data to/from a programmable controller CPU . . . . . . . . . . . . 2-2
2.1.4 Monitoring/debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
2.1.5 Diagnostics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3
2.2 Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
2.2.1 Project types in GX Works2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
2.2.2 Programming using labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
2.2.3 Enhanced use of program assets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
2.2.4 Sharing Program Organization Unit (POU) registered as libraries . . . . . . . . . . 2-6
2.2.5 Wide variety of programming languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
2.2.6 Other features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
3 Utilizing projects from GX Developer or GX IEC Developer
3.1 Utilizing Projects and Data in Other Formats. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
3.1.1 Utilizing projects and data created with GX Developer or GX IEC Developer in
GX Works23-1
3.1.2 Utilizing files created using the Export function of GX IEC Developer . . . . . . 3-2
3.1.3 Utilizing projects and data created with GX Works2 in GX Developer . . . . . . 3-2
3.1.4 Storage of utilized data in GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.1.5 Security level of GX IEC Developer. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.1.6 Compatible applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-4
Contents
IV
3.2 Opening projects in other formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-5
3.3 Reading ASC format data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7
3.4 Saving projects in other formats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
4 Installation
4.1 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.1.1 Recommended Hardware Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.1.2 Software Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.2 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
4.3 Precautions on the installation of GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4.3.1 Installing a MELSOFT product for the first time. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-2
4.3.2 Procedure for continuing installation when it is not completed correctly . . 4-2
4.3.3 Precautions when installing on Windows Vista. . . . . . . . . . . . . . . . . . . . . . . . . . . 4-3
4.4 Installing GX Works2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
4.4.1 Installing GX Works2 on your hard disk . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
4.4.2 Starting GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
4.4.3 Quitting GX Works2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5
5 The User Interface
5.1 The Elements of the User Interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
5.1.1 The Menu Bar. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5.1.2 The Toolbar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5.1.3 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
5.1.4 The Status Bar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
5.2 Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-6
5.3 Program Organisation Units (POUs) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-9
5.4 Programs, Function Blocks and Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-10
6 Getting Started
6.1 Simple Project and Structured Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
6.1.1 Simple Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
6.1.2 Structured Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
6.2 Program Creation Procedure in a Simple Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
Contents
GX Works2 V
6.3 Program Creation Procedure in a Structured Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
7 Sample Program: Simple Project
7.1 Creating a Program of LADDER . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
7.1.1 Operations of program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
7.1.2 Created program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
7.1.3 Starting GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
7.1.4 Creating a new project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-2
7.1.5 Setting parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-3
7.1.6 Setting labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
7.1.7 Creating a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
7.1.8 Converting ladder blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-11
7.1.9 Compiling a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-12
7.1.10 Saving a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13
7.2 Creating a Program of SFC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15
7.2.1 Operations of program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-15
7.2.2 Created program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
7.2.3 Starting GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-16
7.2.4 Creating a new project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17
7.2.5 Setting parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17
7.2.6 Setting labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-17
7.2.7 Creating a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-18
7.2.8 Compiling a program (for QCPU/LCPU) or converting a SFC diagram (for FX-
CPU)7-29
7.2.9 Saving a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-29
8 Sample Program: Structured Project
8.1 Creating a Program of STRUCTURED LADDER. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
8.1.1 Operations of program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
8.1.2 Created program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-1
8.1.3 Starting GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
8.1.4 Creating a new project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-2
8.1.5 Setting parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
8.1.6 Setting labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-4
8.1.7 Creating a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-7
8.1.8 Compiling a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-16
8.1.9 Saving a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-17
Contents
VI
8.2 Creating a Program of ST LANGUAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
8.2.1 Operations of program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
8.2.2 Created program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
8.2.3 Starting GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
8.2.4 Creating a new project. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
8.2.5 Setting parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-19
8.2.6 Setting labels. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-20
8.2.7 Creating a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-21
8.2.8 Compiling a program. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-24
8.2.9 Saving a project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8-24
Introduction This manual
GX Works2 1 - 1
1 Introduction
1.1 This manual
...is a compact guide to using GX Works2, suitable both for beginners and experienced users upgrad-
ing from other systems. The "Getting Started" chapter provides a step-by-step description of how to
use GX Works2, followed by some precisely descriped sample projects. These executable applications
are used to demonstrate the operation of a program with the help of the exercises provided in this
manual.
1.2 If you are not yet familiar with Windows
please at least read the Windows Fundamentals section in the Windows User's Guide, or work
through the Windows Tutorial accessible through the Help menu of the Windows Program Man-
ager. This will teach you what you need to know about using the basic elements of Microsoft Win-
dows , and the operating procedures that are identical in all Windows application programs.
1.3 If you get stuck
do not despair, help is never far away! If you run up against seemingly insoluble problems, or if you
have questions about GX Works2 or the connected programmable controller (PLC) configuration,
please first refer to the manuals and documentation. Many answers and solutions can also be found
directly in the GX Works2 online help system, which can always be accessed by pressing the key.
Make use of the Search command in the Help menu as well, as this will often locate the information
you need.
If you cannot find answers to your questions in any of these places, contact your local MITSUBISHI
ELECTRIC representative or call our European headquarters in Ratingen directly. The addresses and
phone numbers are provided on the back covers of all our manuals.
NOTE
Microsoft, Windows, Windows Vista, and Excel are either registered trademarks or trademarks of
Microsoft Corporation in the United States and/or other countries.
Manuals Introduction
1 - 2
1.4 Manuals
Related manuals are separately issued according to the purpose of their functions in GX Works2.
The manuals related to this product are shown below.
Refer to the following table when ordering required manuals.
1.4.1 Displaying operating manuals
To display the operating manuals select Help Operating Manual [manual name].
Manual name
Manual number
(Model code)
GX Works2 Operating Manual (Simple Project)
Explains operation methods such as creating and monitoring programs in Simple project
of GX Works2.
SH-080780ENG
(13JU64)
GX Works2 Operating Manual (Structured Project)
Explains operation methods such as creating and monitoring programs in Structured project
of GX Works2.
SH-080781ENG
(13JU65)
GX Works2 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.
SH-080921ENG
(13JU69)
Tab. 1-1: Manuals related to Operation of GX Works2
Getting to Know GX Works2 Main functions of GX Works2
GX Works2 2 - 1
2 Getting to Know GX Works2
GX Works2 is a programming tool for designing, debugging, and maintaining programs on Win-
dows
.
GX Works2 has improved functionality and operability, with easier-to-use features compared to ex-
isting GX Developer.
2.1 Main functions of GX Works2
GX Works2 can manage programs and parameters in units of projects for each programmable con-
troller CPU.
The following explains the main functions.
2.1.1 Programming
Programs can be created in a Simple project in a similar way with existing GX Developer. Structured
programming in a Structured project is also available with GX Works2.
GX Works2 increases your productivity:
The modular architecture of GX Works2 brings big advantages for complex programming projects.
Frequently-needed program blocks and functions only need to be created once. Thanks to the build-
ing block system you can then insert them again and again wherever and whenever required. This sig-
nificantly reduces your programming overheads, enabling you to make major changes to your pro-
grams with just a few simple operations.
Fig. 2-1: Sample program
Main functions of GX Works2 Getting to Know GX Works2
2 - 2
2.1.2 Setting parameters
Programmable controller CPU parameter and Network parameter can be set with GX Works2.
Intelligent function module parameter can be set as well.
(For FXCPU, Network parameter setting is not available.).
2.1.3 Writing/reading data to/from a programmable controller CPU
Created sequence programs can be written to/read from a programmable controller CPU using the
Read from PLC/Write to PLC function. Also, using the Online program change function, the sequence
programs can be changed even when the programmable controller CPU is in RUN.
Fig. 2-2: Setting parameters
Fig. 2-3: Writing/reading data
Writing data
Reading data
Getting to Know GX Works2 Main functions of GX Works2
GX Works2 2 - 3
2.1.4 Monitoring/debugging
Created sequence programs can be written to the programmable controller CPU and device value at
operation can be monitored online/offline.
2.1.5 Diagnostics
The current error status and error history of the programmable controller CPU can be diagnosed. Us-
ing the diagnostics function, the recovery work is completed in a short time.
Using the System monitor function (for QCPU (Q mode)/LCPU), detailed information on such as in-
telligent function modules can be obtained. This helps to shorten the recovery work time at error oc-
currence.
Fig. 2-4: Monitoring/debugging
Fig. 2-5: Diagnostics
Programs can be monitored and debugged.
Diagnosing the programmable controller
CPU status (PLC diagnostics screen)
Diagnosing the
programmable controller
CPU status
Features Getting to Know GX Works2
2 - 4
2.2 Features
This section explains the features of GX Works2.
2.2.1 Project types in GX Works2
In GX Works2, the project type can be selected from either of Simple project or Structured project.
Simple project
The Simple project creates sequence programs using instructions for Mitsubishi programmable con-
troller CPU.
Programs in a Simple project can be created in a similar way with existing GX Developer.
Programming without labels and label programming are supported as in GX Developer and
GX IEC Developer.
Fig. 2-6: Simple project
Program file
Programs are created using programmable controller
CPU instructions.
Created programs can be operated as sequence
programs.
Programming in a similar way with existing
GX Developer is possible.
Program MAIN
Program SUB1
Program SUB2
Getting to Know GX Works2 Features
GX Works2 2 - 5
Structured project
In a Structured project, programs can be created by structured programming.
By segmenting a whole control process program into common program parts, highly manageable
and usable programming (structured programming) is possible.
Only label programming is supported.
2.2.2 Programming using labels
Using the label programming, programs can be created without regard for the device numbers.
By compiling a program created with the label programming, devices are automatically assigned and
the program becomes available as an actual program.
Created global labels can be utilized for other programs.
In addition, global labels can be registered as system labels and be shared within iQ Works compliant
products (GX Works2, MT Developer2, and GT Designer3).
For details of system labels, refer to the following manual:
iQ Works Beginner's Manual
Fig. 2-7: Structured project
Fig. 2-8: Programming using labels
Program MAIN Program block A
Program block B
Program block C
Program block D
Program block E
Function block 1
Function block 2
Function 1
Function 2
Program SUB1
Program file POU
Sequence programs are created
by combining POU (Program
Organization Unit) s.
Created labels can be
utilized for other programs.
Features Getting to Know GX Works2
2 - 6
2.2.3 Enhanced use of program assets
Projects created with existing GX Developer or GX IEC Developer can be utilized in GX Works2.
GX Developer projects are opened as Simple projects and GX IEC Developer projects, as Structured
projects. Utilizing the past assets improves the efficiency of program design.
For further details please see Cap. 3.
2.2.4 Sharing Program Organization Unit (POU) registered as libraries
In a Structured project, programs, global labels, and structures frequently used can be registered as
libraries. Utilizing these libraries reduces time required for creating programs.
Fig. 2-9: Utilizing existing projects
Fig. 2-10: Sharing POUs
Project created
with GX Developer
<GX Developer> <GX Works2>
Can be used in
GX Works2.
Library file
Project A
Project B
Project C
Project D
Getting to Know GX Works2 Features
GX Works2 2 - 7
2.2.5 Wide variety of programming languages
GX Works2 is a multi-language system:
GX Works2 supports programming in different languages. Several graphical and text-based editors
help you to write tailor-made programs quickly and easily, choosing the language that best suits the
problem.
The wide variety of programming languages available with GX Works2 enables to select the optimum
programming language depending on control.
ST programs can be used on the ladder editor of GX Works2 using the Inline structured text function.
Fig. 2-11: Programming languages
<SFC>
Programming to clarify the procedure
<Ladder>
Programming similar to existing GX Developer
<Structured ladder>
Programming a ladder program graphically
<ST>
Programming in a text language similar to
C language
Features Getting to Know GX Works2
2 - 8
2.2.6 Other features
Offline debugging
Offline debugging using the simulation function is possible with GX Works2. This enables debugging
to ensure the normal operation of created sequence programs without connecting GX Works2 to the
programmable controller CPU.
The screen layout can be customized to the user's preference
The docking windows enable to change the screen layout of GX Works2 without restriction.
Fig. 2-12: Offline debugging
Fig. 2-13: Customizing the screen layout
Simulation function
Without connecting to the programmable controller CPU, programs can
be monitored and debugged in the same way with debugging by the
programmable controller CPU.
Connecting to the
programmable
controller is unnecessary.
Screen layout can be
changed without restriction.
Utilizing projects from GX Developer or GX IEC Developer Utilizing Projects and Data in Other Formats
GX Works2 3 - 1
3 Utilizing projects from GX Developer or
GX IEC Developer
3.1 Utilizing Projects and Data in Other Formats
This section explains the method for utilizing projects created with GX Developer or GX IEC Devel-
oper, and files (ASCII files) created using the Export function of GX IEC Developer in GX Works2.
Projects edited with GX Works2 can also be utilized in GX Developer.
For FXCPU, only projects created with GX Developer can be utilized.
3.1.1 Utilizing projects and data created with GX Developer or GX IEC Developer in
GX Works2
Projects created with GX Developer or GX IEC Developer can be utilized in GX Works2 by using the
Open Other Project function (see Section 3.2).
NOTE Precautions for utilizing older projects
For a detailed description of the precautions when using GX Works2 and the differences between
GX Works2 and GX Developer or GX IEC Developer please see the Appendix of the GX Works2
Operating Manual (Common).
Fig. 3-1: Utilizing older projects
Project created with
GX Developer
Project created with GX
IEC Developer
Open Other Project function.
Open Other Project function.
Opened as a GX Works2 project.
Utilizing Projects and Data in Other Formats Utilizing projects from GX Developer or GX IEC Developer
3 - 2
3.1.2 Utilizing files created using the Export function of GX IEC Developer
ASCII files created using the Export function of GX IEC Developer can be added as projects in GX
Works2 by using the Read ASC Format File function (see Section 3.3).
This function is not supported by FXCPU.
.
3.1.3 Utilizing projects and data created with GX Works2 in GX Developer
Files created/edited in Simple project with GX Works2 can be utilized in GX Developer by using the Ex-
port to GX Developer Format File function (see Section 3.4).
Fig. 3-2: Utilizing projects created in GX IEC Developer using the Export function
Fig. 3-3: Export from GX Works2 to GX Developer
Read ASC
Format File
[Export to GX Developer
Format File]
Utilizing projects from GX Developer or GX IEC Developer Utilizing Projects and Data in Other Formats
GX Works2 3 - 3
3.1.4 Storage of utilized data in GX Works2
Each project and data created with GX Developer or GX IEC Developer are stored in the areas shown
in the table below with GX Works2.
GX Developer projects are opened as Simple projects and GX IEC Developer projects, as Structured
projects.
Comparison of projects and data storage locations between GX Developer and GX Works2
Comparison of projects and data storage locations between GX IEC Developer and GX Works2
3.1.5 Security level of GX IEC Developer
The security level in the GX IEC Developer project is cleared after reading the project.
When the GX IEC Developer project is read using GX Works2, the following Enter Password screen is
displayed.
GX Developer
GX Works2
(Simple project)
GX Works2
(Structured project)
Parameter Parameter Parameter
Device Comment Global Device Comment Global Device Comment
Global variables Global Label Global Label
Program Program POU
FB FB_Pool FB/FUN
Structure Structured Data Types Structured Data Types
Device memory Device Memory Device Memory
Device initial value Device Initial Value Device Initial Value
Tab. 3-1: Comparison between GX Developer and GX Works2
GX IEC Developer
GX Works2
(Structured project)
User Library User Library
Parameter (Programmable controller parameter) Parameter
DUT_Pool (Structure) Structured Data Types
Global_Vars (Global variable) Global Label
Task_Pool POU in Project tree window Program setting
POU_Pool POU in Project tree window Program setting
Tab. 3-1: Comparison between GX IEC Developer and GX Works2
Fig. 3-4:
Dialog window Enter Password
Utilizing Projects and Data in Other Formats Utilizing projects from GX Developer or GX IEC Developer
3 - 4
3.1.6 Compatible applications
For Open Other Project and Export to GX Developer Format File, the supported versions may differ
depending on the CPU type.
For the application compatibility, refer to: GX Works2 Operating Manual (Common)
Utilizing projects from GX Developer or GX IEC Developer Opening projects in other formats
GX Works2 3 - 5
3.2 Opening projects in other formats
This section explains the method for opening a project created with GX Developer or GX IEC Devel-
oper in GX Works2.
For FXCPU, only projects created with GX Developer can be opened in GX Works2.
Select Project Open Other Data Open Other Project.
Specify the project, and click the button Open.
Select '*.gpj' for a GX Developer project and '*.pro' for a GX IEC Developer project.
The selected project is opened.
Fig. 3-5: Dialogue window Open Other Project
Opening projects in other formats Utilizing projects from GX Developer or GX IEC Developer
3 - 6
NOTES Status after opening projects in other formats
After opening a project in another format, the project is in the uncompiled status. Compile all pro-
grams in the project before executing online operations such as writing data and monitoring.
When a compile error occurs, correct the corresponding program following the programming
manual.
Opening the project in other format that contains SFC programs
The block information, such as the block information devices, the block titles and the block state-
ments, is set in the block data properties.
Opening the GX IEC Developer project
When the GX IEC Developer project that contains user library is opened, the following message
may be displayed and the user library may not be read. If the following message is displayed,
select Project Library Install in GX Works2 to obtain the user library.
Utilizing projects from GX Developer or GX IEC Developer Reading ASC format data
GX Works2 3 - 7
3.3 Reading ASC format data
This section explains the method for adding ASC format data to a GX Works2 project being edited.
Data can be added only to Structured projects.
Select Project Open Other Data Read ASC Format File.
Specify the file, and click the button Open.
Select '*.asc' for the file.
The specified data is added to the project.
Fig. 3-6: Dialogue window Open Other Project
NOTES Importing project data of different programmable controller type
Project data having a different programmable controller type can be imported to a project being
open.
In this case, instructions and devices not supported in the open project are also imported.
After importing the data, compile the programs to check and correct errors.
Importing data whose name already exists in the project
A number is appended in serial order (starting from one) to the end of the data name to be
imported, and then the data is added to the project.
Importing global labels
When the global labels are imported, the "Device" column of the global label may be blank. If the
"Device" column is blank, check the items in the <<Device>> tab of the PLC parameter.
Saving projects in other formats Utilizing projects from GX Developer or GX IEC Developer
3 - 8
3.4 Saving projects in other formats
This section explains the method for saving a Simple project of GX Works2 in the GX Developer for-
mat.
Select Project Export to GX Developer Format File.
Select the save destination of the GX Developer format project.
Enter the project name, and click the button Save.
Fig. 3-7: Dialogue window Export to GX Developer Format File
NOTE Precautions for saving projects
For the restrictions other than the ones described below, refer to the
GX Works2 Operating Manual (Common).
Programs are saved in the uncompiled status.
The data whose access level is set to other than 'Administrators' cannot be saved. Change the
access level before saving the data.
The data with a block password cannot be saved. Unlock the block password before saving the
data.
Installation Hardware Requirements
GX Works2 4 - 1
4 Installation
4.1 Hardware Requirements
4.1.1 Recommended Hardware Configuration
PC-AT compatible personal computer
Microsoft Windows 2000, Microsoft Windows XP SP2, Microsoft Windows Vista
Microsoft Windows 7
1 GB RAM or more recommended
Serial interface (RS-232)
USB port
Hard disk with at least 1 GB free space
DVD-ROM drive
17" (43 cm) XGA monitor (1024x768 pixels)
4.1.2 Software Requirements
GX Works2 is a 32-bit product.
Versions of Microsoft Windows which are based on double-byte character sets (e. g. Japanese) are
not supported.
4.2 Copyright
E
WARNING:
This software is protected by copyright. By opening the distribution disks package you auto-
matically accept the terms and conditions of the License Agreement. You are only permitted to
make one single copy of the original distribution CD-ROM for your own backup and archiving
purposes.
Precautions on the installation of GX Works2 Installation
4 - 2
4.3 Precautions on the installation of GX Works2
4.3.1 Installing a MELSOFT product for the first time
At the first installation of a MELSOFT product, the following screen may be displayed during instal-
lation. To continue the installation, click the button on the Software Installation
screen. (We have checked the operation and assured that the system operates without any problems
by performing this procedure.)
The Software Installation screen may be displayed behind another screen. Press the +
keys to bring it to the front.
4.3.2 Procedure for continuing installation when it is not completed correctly
When the installation of a MELSOFT product or another software is not completed correctly, the fol-
lowing screen is displayed and the installation cannot continue unless the personal computer is re-
started.
In this case, restart the personal computer and start the installation again.
Fig. 4-1:
Dialog window Software Installation
Fig. 4-2:
Dialog window Software Installation
Installation Precautions on the installation of GX Works2
GX Works2 4 - 3
4.3.3 Precautions when installing on Windows Vista
When installing on Windows Vista, the following screen may be displayed after the completion of the
installation.
In this case, select "This program installed correctly" and restart the personal computer.
When "Reinstall using recommended settings" is erroneously selected, the Windows XP SP2 compat-
ibility mode is automatically set. Disable the Windows XP SP2 compatibility mode by following the
procedure described on the following page, and perform the reinstallation.
Fig. 4-3:
Dialog window Programm Compatibility
Assistent
Precautions on the installation of GX Works2 Installation
4 - 4
Right-click on the setup.exe icon
of the installation target in the
Windows explorer.
The Setup Properties screen is
displayed.
Click the button in the Compatibility tab.
Uncheck "Run this program in
compatibility mode for:" and click
the button.
Click the button.
Installation Installing GX Works2
GX Works2 4 - 5
4.4 Installing GX Works2
During the installation procedure the setup program will create a directory on your hard disk to copy
all the GX Works2 files into.
4.4.1 Installing GX Works2 on your hard disk
Make sure that the correct Microsoft Windows version is properly installed on your computer.
For information on using Microsoft Windows please refer to the Windows User's Guide.
Start Microsoft Windows.
Insert the installation DVD-ROM in the DVD-ROM drive.
The GX Works2 installation program starts automatically (if not, execute the file SETUP.EXE on the
installation DVD-ROM).
Follow the instructions that appear on the screen.
Enter the user name, company name, and serial number of the software.
Follow the instructions that appear on the screen.
When the installation procedure is finished the program will create a new program group in the
Start menu containing the GX Works2 program icon.
For further details on the necessary Microsoft Windows procedures please refer to your Microsoft
Windows documentation.
4.4.2 Starting GX Works2
In the Start menu click on the GX Works2 program icon. The icon is located in: Start > Programs
> MELSOFT Application > GX Works2. This starts GX Works2 and displays the start-up screen.
Confirm with the key.
4.4.3 Quitting GX Works2
You can quit GX Works2 directly at any point in the program by pressing the key combination .
Or:
Click on the Quit command in the Project menu.
Installing GX Works2 Installation
4 - 6
The User Interface The Elements of the User Interface
GX Works2 5 - 1
5 The User Interface
5.1 The Elements of the User Interface
The Project Navigator window and the complete menu bar are both only displayed after opening an
existing project or creating a new one. The illustration below shows a variety of different windows:
The Project Navigator, the work window, and docking windows of a project. You can resize and ar-
range the windows on the screen to suit your individual preferences.
Fig. 5-1: Elements of the user interface
Title bar
Menu bar
Toolbar
Navigation
window
Status bar
Work window
Docking window
The Elements of the User Interface The User Interface
5 - 2
Name Description
Title bar Displays a project name.
Menu bar Displays menu options for executing each function.
Toolbar Displays 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
Navigation window Displays contents of a project in tree format.
Function Block Selection window
Displays a list of functions (such as function blocks) used for
programming.
Output window Displays compilation and check results (errors and warnings).
Cross Reference window Displays cross reference results.
Device List window Displays 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
Screens used for monitoring intelligent function modules.
Find/Replace window A screen used for searching and replacing character strings in the project.
Status bar Displays information about a project being edited.
Tab. 5-1: Display contents
NOTE Focus point indication in Windows Vista
When using Windows Vista, the focus point may not be indicated on the screen.
To display the focus point, set the following setting.
Select Start Control Panel Ease of Access Ease of Access Center.
Select "Make the keyboard easier to use".
Select "Underline keyboard shortcuts and access keys".
The User Interface The Elements of the User Interface
GX Works2 5 - 3
5.1.1 The Menu Bar
The GX Works2 menu bar uses the standard Windows procedures. When you select one of the menu
titles in the menu bar, a drop-down list of available commands is displayed. Commands with an arrow
symbol open a submenu of additional commands. Selecting a command opens a dialogue or data en-
try box. The menu structure and the available options are context-sensitive, changing depending on
what you are currently doing in the program. Options displayed in light grey are not currently avail-
able for selection.
5.1.2 The Toolbar
The toolbar is a block of on-screen buttons for executing frequently-used functions included in a
menu and enables you to select the most important menu commands directly by clicking on the cor-
responding icons. The toolbar is context-sensitive, i.e. different tool icons are displayed depending on
what you are currently doing in GX Works2.
5.1.3 Windows
GX Works2 allows you to edit multiple objects at the same time (e.g. work window, parameter setting,
etc.). A window is opened on the screen for each object. You can change the size and position of the
windows on the screen as you wish. Objects often contain more information than can be displayed in
the window; when this happens, horizontal and vertical scroll bars are included that can be used to
"scroll" the contents of the windows up and down and from side to side.
Work windows
A work window is a main screen used for operations such as programming, parameter setting, and
monitoring in GX Works2.
NOTE
A list of all menu commands (functions) with explanations is provided in the GX Works2 Operating
Manual (Common) and in the Help menu of the application.
NOTE
A complete list of all the available tools and icons is provided in the GX Works2 Operating Manual
(Common) and in the Help menu of the application.
Fig. 5-2: Work windows in cascade view
Scroll button Tool hint Tab
Work window
switching button
The Elements of the User Interface The User Interface
5 - 4
Navigation window
The Navigation window displays the contents of a project in tree format.
The Navigator is the "control centre" used for selecting and handling the objects used in GX Works2.
This is the starting place for all operations performed on GX Works2 objects. The Navigator window
is not displayed until you open a project.
Operations such as creating new data or displaying editing screens can be performed in the Naviga-
tion window.
In the Navigator tree you can expand a branch by clicking on its [+] symbol and collapse a branch by
clicking on its [] symbol. Expanded and collapsed branches are identified by different symbols [] or
[+] in the tree. You can also expand or collapse branches by double-clicking on the appropriate
branch icons. Double-clicking on the lowest level opens the window of the object on that level.
Fig. 5-3:
Navigation window
Name Description
Title bar Displays a title of a view being displayed.
Toolbar Displays tool buttons of functions to be executed in each view.
View selection area Area for selecting a view to display.
Project Displays the Project view.
User Library Displays the User Library view.
Connection Destination Displays the Connection Destination view.
Tab. 5-2: Display contents
Title bar
Toolbar
View
selection
area
The User Interface The Elements of the User Interface
GX Works2 5 - 5
5.1.4 The Status Bar
The status bar at the bottom of the screen is used to display information on the current status of your
project. You can disable the status bar if you wish, and you can also configure the information to be
displayed to suit your needs.
Fig. 5-4: Status bar information
Item Description
Project type
Displays the project type.
Unlabeled : Simple project that does not use labels
Simple : Simple project that uses labels
Structured : Structured project
Security information Displays the login user name when security is set for the project.
Programmable controller
type
Displays the programmable controller type of the project.
Connection destination Displays the set contents of the Transfer setup screen.
Cursor position Displays the cursor position in the editing screen.
Insert/Overwrite Displays the current mode (insert or overwrite).
Caps Lock Displays the effective status of the Caps Lock.
Num Lock Displays the effective status of the Num Lock.
Tab. 5-3: Status bar information to be displayed
Project type Security information
Programmable
controller type
Connection destination Cursor position
Insert/
Overwrite
Caps
Lock
Num
Lock
Projects The User Interface
5 - 6
5.2 Projects
Project contents displayed in the Project view in tree format are as follows.
Contents displayed in the view may vary depending on programmable controller types and project
types.
For (Simple), (Structured), and (Intelligent) indicated in the reference destinations, refer to the fol-
lowing manuals respectively:
(Simple) ..................GX Works2 Operating Manual (Simple Project)
(Structured) ...........GX Works2 Operating Manual (Structured Project)
(Intelligent) ............GX Works2 Operating Manual (Intelligent Function Module)
The following are examples for QCPU (Q mode).
For FXCPU, execution types are not classed. The only one category 'Execution Program' is dis-
played.
Fig. 5-5: Project view in a simple project without labels
<Simple project (without labels)>
For FXCPU, execution types are not classed. The only one category 'Execution Program' is dis-
played.
Fig. 5-6: Project view in a simple project with labels
Fig. 5-7: Project view in a structured project
<Simple project (with labels)>
:
Libraries: ALL
Type Class: Simple Types
Types: Word [Signed]
Array Element: Not checked
:
Libraries: ALL
Type Class: Simple Types
Types: Word[Signed]
Array Element: Not checked
",
and set the input variables.
Settings
TCoil : TC0
TValue: 10
, X0) OR
Y10) AND NOT (TS0
);" directly,
and click the key.
You can use the Function Block Se-
lection window for the input.
Settings:
Y10:= (LDP(TRUE
, X0) OR
Y10) AND NOT (TS0
);
,10);" di-
rectly, and click the key.
You can select "Function"
"OUT_T" on the Function Block Se-
lection window.
Settings:
OUT_T(Y10,TC0
,10);
);" di-
rectly, and click the key.
You can select "Function"
"MOVP" on the Function Block Se-
lection window.
Settings:
MOVP(X1,10,VAR1
);
)" di-
rectly .
You can select "Function"
"MOVP" on the Function Block Se-
lection window.
Settings:
MOVP(X2,20,VAR1