Mitsubishi Electronics SW1DNC-GXW2-E User Manual

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
CAUTION
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.
Indicates that incorrect handling may cause hazardous conditions, resulting in death or severe injury.
Indicates that incorrect handling may cause hazardous conditions, resulting in minor or moderate injury or property damage.
[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 and 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)-080788ENG-A First edition
Jan., 2009 SH(NA)-080788ENG-B
Jul., 2009 SH(NA)-080788ENG-C
Oct., 2009 SH(NA)-080788ENG-D
Model Addition
Q00UJ, Q00U, Q01U, Q10UDH, Q10UDEH, Q20UDH, Q20UDEH, FXCPU
Addition
MANUALS, Section 1.1, Section 3.6
Correction
GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL, Section 1, Section 2.2, Section 3, Section 3.2.1, Section 3.2.2, Section 3.2.3, Section 3.2.5, Section 3.2.6, Section 3.2.7, Section 3.3.1, Section 3.3.2, Section 3.4.1, Section 3.4.2, Section 3.7.2, Section 4, Section 4.2.6, Section 4.4.1, Section 4.7, Section 5, Section 5.2.5, Section 5.2.6, Section 5.4.1, Section 5.7
Model Addition
Q00J, Q00, Q01
Addition
MANUALS, Section 1.1
Correction
MANUALS, Section 3.1, Section 3.2, Section 3.3, Section 3.4, Section 3.5, Section 3.6, Section 3.7, Section 3.8, Section 3.9, Section 4.1, Section 4.2, Section 4.4, Section 4.7, Section 5.1, Section 5.2, Section 5.4, Section 5.7
Correction
SAFETY PRECAUTIONS, Section 1.2, Section 3.2.2, Section 3.2.3, Section 3.2.5, Section 3.2.6, Section 3.7.1, Section 3.7.2, Section 3.7.3, Section 3.8, Section 4.9, Section 5.2.6, Section 5.9
Jan., 2010 SH(NA)-080788ENG-E
Apr., 2010 SH(NA)-080788ENG-F
Model Addition
L02, L26-BT
Addition
CONDITIONS OF USE FOR THE PRODUCT
Correction
MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL, Section 3.2.1, Section 3.2.2, Section 3.2.3, Section 3.2.4, Section 3.2.5, Section 3.2.6, Section 3.2.7, Section 3.3.2, Section 3.4.1, Section 3.4.2, Section 3.5, Section 3.6, Section 3.7.2, Section 3.7.4, Section 4.2.5, Section 4.2.6, Section 4.4.1, Section 5.2.5, Section 5.2.6, Section 5.2.7, Section 5.4.1
Correction
SAFETY PRECAUTIONS, MANUALS, GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL, Section 3.2.1, Section 3.2.2, Section 3.2.3, Section 3.2.7, Section 3.3.1, Section 3.3.2, Section 3.4.1, Section 3.4.2, Section 3.5, Section 3.9, Section 4.2.6, Section 4.4.1, Section 5.4.1
A - 3
Print date Manual number Revision
Sep., 2010 SH(NA)-080788ENG-G
Jan., 2011 SH(NA)-080788ENG-H
Jul., 2011 SH(NA)-080788ENG-I
Correction
GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL, Section 3.2.3, Section 3.2.6, Section 3.3.1, Section 3.3.2, Section 3.5, Section 3.6
Correction
MANUALS, Section 2.1, Section 3.2.1, Section 3.2.2, Section 3.2.3, Section 3.2.4, Section 3.2.5, Section 3.2.6, Section 3.2.7, Section 3.3.1, Section 3.3.2, Section 3.4.1, Section 3.4.2, Section 3.5, Section 3.6, Section 3.7.2, Section 3.7.4, Section 3.8, Section 4.2.6, Section 4.4.1, Section 5.2.5, Section 5.2.7, Section 5.4.1
Addition
Section 3.2.8
Correction
MANUALS, Section 1.1, Section 2.2, Section 3.1.2, Section 3.2.1, Section 3.2.2, Section 3.2.3, Section 3.2.6, Section 3.3.2, Section 3.4.1, Section 3.4.2, Section 3.6, Section 3.7.1, Section 3.7.2, Section 3.7.3, Section 3.8, Section 3.9, Section 4.2.6, Section 4.4.1, Section 5.1.2, Section 5.2.5, Section 5.2.7, Section 5.4.1
Japanese Manual Version SH-080734-K
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 - 4

INTRODUCTION

Thank you for purchasing the Mitsubishi integrated FA software, MELSOFT series. Before using the 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 - 5
CONTENTS ........................................................................................................................................... A - 5
MANUALS.............................................................................................................................................. A - 8
GENERIC TERMS AND ABBREVIATIONS IN THIS MANUAL........................................................... A - 16
1OVERVIEW 1 - 1 to 1 - 6
1.1 Simple Project and Structured Project 1 - 2
1.2 Program Creation Procedure 1 - 4
2 CREATED PROGRAM AND SYSTEM CONFIGURATION 2 - 1 to 2 - 4
2.1 System Configuration 2 - 2
2.2 Overview of Program Creation 2 - 2
3 CREATING PROGRAM IN STRUCTURED LADDER/FBD LANGUAGE 3 - 1 to 3 - 48
3.1 Created Program 3 - 2
3.1.1 Operations of program..................................................................................................................3 - 2
3.1.2 Created program ..........................................................................................................................3 - 2
3.2 Creating a Project 3 - 3
3.2.1 Starting GX Works2......................................................................................................................3 - 3
3.2.2 Screen configuration in GX Works2 .............................................................................................3 - 4
3.2.3 Creating a new project..................................................................................................................3 - 5
3.2.4 Setting parameters .......................................................................................................................3 - 7
3.2.5 Setting labels ................................................................................................................................3 - 8
3.2.6 Creating a program.....................................................................................................................3 - 11
3.2.7 Compiling a program .................................................................................................................. 3 - 19
3.2.8 Creating an FBD program ..........................................................................................................3 - 20
3.3 Writing a Project to the programmable controller 3 - 21
3.3.1 Connecting the personal computer to the programmable controller........................................... 3 - 21
3.3.2 Writing a project to the programmable controller........................................................................3 - 26
3.4 Monitoring Operations 3 - 29
3.4.1 Monitoring a program .................................................................................................................3 - 29
3.4.2 Batch monitoring of device values.............................................................................................. 3 - 34
A - 5
3.5 Diagnosing the programmable controller 3 - 38
3.6 Reading a Project from programmable controller 3 - 39
3.7 Printing 3 - 41
3.7.1 Setting the printer....................................................................................................................... 3 - 41
3.7.2 Previewing a program ................................................................................................................ 3 - 42
3.7.3 Printing a program...................................................................................................................... 3 - 44
3.7.4 Previewing a PLC Parameter..................................................................................................... 3 - 45
3.7.5 Printing a PLC Parameter .......................................................................................................... 3 - 46
3.8 Saving a Project 3 - 47
3.9 Exiting GX Works2 3 - 48
4 CREATING PROGRAM IN ST LANGUAGE 4 - 1 to 4 - 12
4.1 Created Program 4 - 2
4.1.1 Operations of program ................................................................................................................. 4 - 2
4.1.2 Created program .......................................................................................................................... 4 - 2
4.2 Creating a Project 4 - 3
4.2.1 Starting GX Works2 ..................................................................................................................... 4 - 3
4.2.2 Screen configuration in GX Works2 ............................................................................................. 4 - 3
4.2.3 Creating a new project ................................................................................................................. 4 - 3
4.2.4 Setting parameters....................................................................................................................... 4 - 3
4.2.5 Setting labels................................................................................................................................ 4 - 3
4.2.6 Creating a program ...................................................................................................................... 4 - 4
4.2.7 Compiling a program.................................................................................................................... 4 - 6
4.3 Writing a Project to the programmable controller 4 - 7
4.4 Monitoring Operations 4 - 7
4.4.1 Monitoring a program ................................................................................................................... 4 - 7
4.4.2 Batch monitoring of device values ............................................................................................. 4 - 10
4.5 Diagnosing the programmable controller 4 - 11
4.6 Reading a Project from programmable controller 4 - 11
4.7 Printing 4 - 11
4.8 Saving a Project 4 - 11
4.9 Exiting GX Works2 4 - 11
5 CREATING TWO OR MORE PROGRAM BLOCKS 5 - 1 to 5 - 19
5.1 Created Program 5 - 2
5.1.1 Operations of program ................................................................................................................. 5 - 2
5.1.2 Created program .......................................................................................................................... 5 - 3
5.2 Creating a Project 5 - 4
5.2.1 Starting GX Works2 ..................................................................................................................... 5 - 4
5.2.2 Screen configuration in GX Works2 ............................................................................................. 5 - 4
5.2.3 Creating a new project ................................................................................................................. 5 - 4
5.2.4 Setting parameters....................................................................................................................... 5 - 4
A - 6
5.2.5 Preparing (creating) the program configuration............................................................................5 - 5
5.2.6 Setting labels ................................................................................................................................5 - 8
5.2.7 Creating a program.......................................................................................................................5 - 9
5.2.8 Compiling a program .................................................................................................................. 5 - 11
5.3 Writing a Project to the programmable controller 5 - 12
5.4 Monitoring Operations 5 - 12
5.4.1 Monitoring a program .................................................................................................................5 - 12
5.4.2 Batch monitoring of device values.............................................................................................. 5 - 18
5.5 Diagnosing the programmable controller 5 - 18
5.6 Reading a Project from programmable controller 5 - 18
5.7 Printing 5 - 19
5.8 Saving a Project 5 - 19
5.9 Exiting GX Works2 5 - 19
A - 7

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) Operation of GX Works2
Manual name
GX Works2 Version 1 Operating Manual (Common) Explains the system configuration of GX Works2 and the functions common to a Simple project and Structured project such as parameter setting, operation method for the online function. (Sold separately)
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)
GX Works2 Version 1 Operating Manual (Structured Project) Explains operation methods such as creating and monitoring programs in Structured project of GX Works2.
(Sold separately)
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)
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)
2) Structured Programming
Manual name
MELSEC-Q/L/F Structured Programming Manual (Fundamentals) Explains the programming method, types of programming languages and other information required to create structured programs. (Sold separately)
Manual number
(Manual code)
SH-080779ENG
(13JU63)
SH-080780ENG
(13JU64)
SH-080781ENG
(13JU65)
SH-080921ENG
(13JU69)
SH-080787ENG
(13JZ22)
Manual number
(Manual code)
SH-080782ENG
(13JW06)
A - 8
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)
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)
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)
FXCPU Structured Programming Manual (Device & Common) Explains the devices and parameters provided in GX Works2 for structured programming. (Sold separately)
FXCPU Structured Programming Manual (Basic & Applied Instruction) Explains the sequence instructions provided in GX Works2 for structured programming. (Sold separately)
FXCPU Structured Programming Manual (Application Functions) Explains the application functions provided in GX Works2 for structured programming. (Sold separately)
SH-080783ENG
(13JW07)
SH-080784ENG
(13JW08)
SH-080785ENG
(13JW09)
JY997D26001
(09R925)
JY997D34701
(09R926)
JY997D34801
(09R927)
3) Operation of iQ Works
Manual name
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)
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.
Manual number
(Manual code)
SH-080902ENG
(13JZ44)
A - 9
Purpose of this manual
This manual explains the operation for creating sequence programs in Structured project, one of the functions supported with GX Works2. Manuals for reference are listed in the following table according to their purpose. For information such as the contents and manual number of each manual, refer to the list of 'Related manuals'.
1) Operation of GX Works2
Installation
Operation of GX Works2
Purpose
Learning the operating environment and installation method
Learning all functions of GX Works2
Learning the project types and available languages in GX Works2
Learning the basic operations and operating procedures when creating a simple project for the first time
Learning the basic operations and operating procedures when creating a structured project for the first time
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
GX Works2 Installation
Instructions
Details
GX Works2
Beginner’s Manual
Simple Project
Details
Structured
Project
Details
Common
Outline
Outline
Details
Outline
GX Works2 Version 1
Operating Manual
Simple
Project
Details Details
Structured
Project
Intelligent
Function
Module
Details
A - 10
2) Operation of GX Works2
For details of instructions used in each programming language, refer to the section 3 on the next page.
Purpose
Ladder
Simple Project
SFC
ST
Ladder
SFC Structured Project
Structured Ladder/FBD
ST
*1: MELSAP3 and FX series SFC only
GX Works2 Installation
Instructions
GX Works2
Beginner’s Manual
Simple Project
Outline
*1
Outline
Outline
*1
Outline
Structured
Project
Outline
Outline
Outline
Common
GX Works2 Version 1
Operating Manual
Simple
Project
Details
Details
Details
Details
Structured
Project
Details
Details
Details
Intelligent
Function
Module
A - 11
3) Details of instructions in each programming language (for QCPU (Q mode)/LCPU)
All languages
Using ladder language
Using SFC language
Using Structured Ladder/ FBD or ST language
Purpose
Learning details of programmable controller CPU error codes, special relays, and special registers
Learning the types and details of common instructions
Learning the types and details of instructions for intelligent function modules
Learning the types and details of instructions for network modules
Learning the types and details of instructions for the PID control function
Learning details of specifications, functions, and instructions of SFC (MELSAP3)
Learning the fundamentals for creating a structured program
Learning the types and details of common instructions
Learning the types and details of instructions for intelligent function modules
Learning the types and details 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
MELSEC-
Q/L/F
Structured
Programming
Manual
Fundamentals
Details
MELSEC-Q/L Structured
Programming Manual
Common
Instructions
Details
Instructions
Special
Outline
Outline
Outline
Application
Functions
Details
MELSEC-
Q/L
Programming
Manual
Common
Instructions
Details
Details
MELSEC-Q/L/QnA
Programming Manual
PID Control
Instructions
Details
Details
SFC -
Details
Manual for
module to
be used
Details
Details
Details
Details
A - 12
Using ladder language
Using SFC language
Using Structure d Ladder/FBD or ST language
4) Details of instructions in each programming language (for FXCPU)
MELSEC-
Q/L/F
Purpose
Learning the types and details of basic/application instructions, descriptions of devices and parameters
Learning details of specifications, functions, and instructions of SFC
Learning the fundamentals for creating a structured program
Learning the descriptions of devices, parameters, and error codes
Learning the types and details of sequence instructions
Learning the types and details of application instructions
Structured
Programming
Manual
Fundamentals
Details
FXCPU Structured Programming Manual
Device & Common
Details
Basic & Applied
Instruction
Details
Application
Functions
Details
FXCPU Programming Manual
FX0, FX0S, FX
0N, FX1,
FX
U, FX2C
Details Details Details
Details Details Details
FX1S, FX1N,
FX
2N, FX1NC,
FX
2NC
FX3G, FX3U,
FX
3UC
A - 13
How to read this manual
Section title
Clarifies the section of currently opened page.
Chapter heading
Index on the right of the page number clarifies the chapter of currently opened page.
Reference location
leads to the reference
location and reference manuals.
Section title
Clarifies the section of currently opened page.
* Since the above page was created for explanation purpose, it differs from the actual page.
A - 14
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.
Symbols used in this manual
The following shows the symbols used in this manual with descriptions and examples.
No. Symbol Description Example
(1) [ ] Menu name on a menu bar [Project]
(2) Toolbar icon
(3) << >> Tab name in a screen <<PLC System>>
(4) Button on a screen
(5) " " Item name in a screen "Timer Limit Setting"
Keyboard key
button
A - 15

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 model names are also
listed if needed.
Generic terms and
Abbreviations
GX Works2
Existing application -
GX Developer
GX Simulator
iQ Works Abbreviation for iQ platform supporting engineering environment MELSOFT iQ Works
Personal computer
Q series Abbreviation for Mitsubishi programmable controller MELSEC-Q series
L series Abbreviation for Mitsubishi programmable controller MELSEC-L series
FX series Abbreviation for Mitsubishi programmable controller MELSEC-F series
Basic model QCPU Generic term for Q00J, Q00, Q01
High Performance model QCPU
Universal model QCPU
QCPU (Q mode)
LCPU Generic term for L02, L02-P, L26-BT and L26-PBT
FXCPU
CPU module Generic term for QCPU (Q mode), LCPU, and FXCPU
SFC Generic term for MELSAP3, MELSAP-L, and FX series SFC
Generic product name for SWnDNC-GXW2-E model (n: version)
Generic product name for SWnD5C-GPPW-E, SWnD5C-GPPW-EA, SWnD5C-GPPW-EV, and SWnD5C-GPPW-EVA (n: version)
Generic product name for SWnD5C-GPPW-E, SWnD5C-GPPW-EA, SWnD5C-GPPW-EV, and SWnD5C-GPPW-EVA (n: version)
Generic term for personal computers on which Windows
Generic term for Q02, Q02H, Q06H, Q12H, and Q25H
Generic term for Q00UJ, Q00U, Q01U, Q02U, Q03UD, Q03UDE, Q04UDH, Q04UDEH, Q06UDH, Q06UDEH, Q10UDH, Q10UDEH, Q13UDH, Q13UDEH, Q20UDH, Q20UDEH, Q26UDH, Q26UDEH, Q50UDEH, and Q100UDEH
Generic term for Basic model QCPU, High Performance model QCPU, and Universal model QCPU
Generic term for FX and FX
3UC
0, FX0S, FX0N, FXU, FX2C, FX1S, FX1N, FX1NC, FX2N, FX2NC, FX3G, FX3U,
Description
®
operates
A - 16
1
OVERVIEW

1OVERVIEW

This manual explains the procedures to actually create a program (Structured Project) using GX Works2 and operate the programmable controller using the created program. If this is your first time creating a Structured Project using GX Works2, you are recommended to read this manual first, and then use GX Works2. Refer to the following manual for Simple Projects:
GX Works2 Beginner’s Manual (Simple Project)
1.1 Simple Project and Structured Project . . . . . . . . . . . . . . . . . . . 1-2
1.2 Program Creation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
2
CREATED PROGRAM
AND SYSTEM
CONFIGURATION
3
CREATING PROGRAM IN
STRUCTURED LADDER/
FBD LANGUAGE
4
CREATING
PROGRAM IN ST
LANGUAGE
5
CREATING TWO OR
MORE PROGRAM
BLOCKS
1 - 1
GX Works2
1 OVERVIEW

1.1 Simple Project and Structured Project

Simple Project
In a Simple Project, you can create sequence programs using instructions for the Mitsubishi programmable controller CPU. The Simple Project offers the same operability for program creation as the conventional GX Developer.
You can create sequence programs using the following programming languages:
Graphic languages
• Ladder Use this graphic language to describe programs as ladders consisting of contacts, coils, etc., using the same operating procedures as the conventional GX Developer.
•SFC Use this graphic language to describe sequence control in a way easy to understand. Describe steps which specify the processing and transition conditions which specify conditions for proceeding to the next step. You can describe steps and transition conditions using the ladder language.
Text language
• ST (Structured Text) This text language allows you to describe controls by syntax including alternative sequences offered by conditional sentences and repetition offered by repetition sentences in the same way as high-level languages such as the C language. Accordingly, you can briefly create programs easy to look at.
Structured Project
In a Structured Project, you can create programs by structured program. By dividing controls into small portions and making parts of common contents, you can create programs easy to understand and applicable to many cases (by structured program.)
You can create sequence programs using the following programming languages:
Graphic languages
• Ladder Use this graphic language to describe programs as ladders consisting of contacts, coils, etc., using the same operating procedures as the conventional GX Developer.
• Structured Ladder/FBD Structured Ladder is created based on the relay circuit design technology. Because this language is easy to understand intuitively, it is used generally for sequence programs. Every ladder always starts from a base line on the left. Structured Ladder consists of contacts, coils, function blocks and functions which are connected each other with vertical lines and horizontal lines. FBD connects functions and function blocks with ruled lines to describe ladders.
•SFC Use this graphic language to describe sequence control in a way easy to understand. Describe steps which specify the processing and transition conditions which specify conditions for proceeding to the next step. You can describe steps and transition conditions using the ladder language.
1 - 2
1.1 Simple Project and Structured Project
Text language
• ST (Structured Text) This text language allows you to describe controls by syntax including alternative sequences offered by conditional sentences and repetition offered by repetition sentences in the same way as high-level languages such as the C language. Accordingly, you can briefly create programs easy to look at.
Restrictions
The FXCPU does not support the ST language in Simple Project, and does not support the ladder language and SFC language in Structured Project.
1
OVERVIEW
2
CREATED PROGRAM
AND SYSTEM
CONFIGURATION
3
CREATING PROGRAM IN
STRUCTURED LADDER/
FBD LANGUAGE
4
CREATING
PROGRAM IN ST
LANGUAGE
5
CREATING TWO OR
MORE PROGRAM
BLOCKS
1 - 3
GX Works2
1 OVERVIEW

1.2 Program Creation Procedure

The figure below shows how to create a program with a Structured Project and execute it in a programmable controller CPU.
1. Opening a project
Procedure Reference
Start GX Works2. 3.2.1
Create a new Structured Project. Or open an existing Structured Project. 3.2.3
2. Setting parameters
Procedure Reference
Set the parameters. 3.2.4
3. Creating the program configuration
Procedure Reference
Create Program File. --
Create Task in Program File. --
Create POU.
Register program block of POU to Task in Program File.
5.2.5
4. Setting labels
Procedure Reference
Define global labels. 3.2.5
Define local labels. --
5. Editing the program
Procedure Reference
3.2.6
Edit the program in each POU.
4.2.6
5.2.7
1 - 4
(To the next page)
6. Conversion
1.2 Program Creation Procedure
1
Procedure Reference
Compile the program. 3.2.7
7. Connecting the programmable controller CPU
Procedure Reference
Connect the personal computer to the programmable controller CPU.
Set the connection destination.
3.3.1
8. Writing to the programmable controller
Procedure Reference
Write the parameters to the programmable controller CPU.
Write the program to the programmable controller CPU.
3.3.2
9. Checking operations
Procedure Reference
3.4
Monitor the sequence program execution status, and check operations.
Check for errors in the programmable controller. 3.5
4.4
5.4
OVERVIEW
2
CREATED PROGRAM
AND SYSTEM
CONFIGURATION
3
CREATING PROGRAM IN
STRUCTURED LADDER/
FBD LANGUAGE
4
CREATING
PROGRAM IN ST
LANGUAGE
5
10.Printing
Procedure Reference
Print the program and parameters.
11.Exiting GX Works2
Procedure Reference
Save the project. 3.8
Exiting GX Works2. 3.9
3.7
4.7
5.7
CREATING TWO OR
MORE PROGRAM
BLOCKS
1 - 5
GX Works2
1 OVERVIEW
MEMO
1 - 6
1
OVERVIEW
2 CREATED PROGRAM AND
SYSTEM CONFIGURATION
This chapter explains the system configuration and gives an overview of the program created by using this manual.
2.1 System Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2.2 Overview of Program Creation. . . . . . . . . . . . . . . . . . . . . . . . . . 2-2
2
CREATED PROGRAM
AND SYSTEM
CONFIGURATION
3
CREATING PROGRAM IN
STRUCTURED LADDER/
FBD LANGUAGE
4
CREATING
PROGRAM IN ST
LANGUAGE
5
CREATING TWO OR
MORE PROGRAM
BLOCKS
2 - 1
GX Works2
2 CREATED PROGRAM AND SYSTEM CONFIGURATION

2.1 System Configuration

This manual uses GX Works2 and the Q Series programmable controller for explanation.
Programmable controller (QCPU)
GX Works2
USB cable

2.2 Overview of Program Creation

This manual explains the following program creation procedures using the simple example program shown in the table below.
• Creating a new project
• Setting parameters
• Setting labels
• Creating a program (inputting contacts and application instructions, converting ladder blocks and compiling the program)
• Writing to the programmable controller
• Monitoring ladder, etc.
• Preview, Printing
Program
language
Number of
program
blocks
Table 2.1 Overview of created program
Operation overview Reference
Structured
Ladder
1 Chapter 3
3 Chapter 5
2 - 2
2.2 Overview of Program Creation
Table 2.1 Overview of created program
Program
language
FBD 1 Chapter 3
ST 1 Chapter 4
Number of
program
blocks
Operation overview Reference
1
OVERVIEW
2
CREATED PROGRAM
AND SYSTEM
CONFIGURATION
3
CREATING PROGRAM IN
STRUCTURED LADDER/
FBD LANGUAGE
4
Ladder
SFC
Refer to the following manual.
GX Works2 Beginner's Manual (Simple Project) You can create the Inline ST Box that displays ST language programs in the Ladder Editor, and edit and monitor ST language programs. Refer to the following manual for the details.
GX Works2 Version 1 Operating Manual (Simple Project)
Refer to the following manual.
GX Works2 Beginner's Manual (Simple Project)
CREATING
PROGRAM IN ST
LANGUAGE
5
CREATING TWO OR
MORE PROGRAM
BLOCKS
2 - 3
GX Works2
2 CREATED PROGRAM AND SYSTEM CONFIGURATION
MEMO
2 - 4
1
OVERVIEW
3 CREATING PROGRAM IN
STRUCTURED LADDER/ FBD LANGUAGE
This chapter explains how to create a program in the Structured Ladder/FBD language with a Structured Project using a simple Structured Ladder program. Refer to the following manuals for the details on structured programs including programming languages, labels, data types and functions (instructions):
MELSEC-Q/L/F Structured Programming Manual (Fundamentals) Structured Programming Manual of the programmable controller CPU
3.1 Created Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-2
3.2 Creating a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-3
3.3 Writing a Project to the programmable controller . . . . . . . . . 3-21
3.4 Monitoring Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-29
3.5 Diagnosing the programmable controller. . . . . . . . . . . . . . . . 3-38
3.6 Reading a Project from programmable controller . . . . . . . . . 3-39
3.7 Printing. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-41
3.8 Saving a Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-47
3.9 Exiting GX Works2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-48
2
CREATED PROGRAM
AND SYSTEM
CONFIGURATION
3
CREATING PROGRAM IN
STRUCTURED LADDER/
FBD LANGUAGE
4
CREATING
PROGRAM IN ST
LANGUAGE
5
CREATING TWO OR
MORE PROGRAM
BLOCKS
3 - 1
GX Works2
3 CREATING PROGRAM IN STRUCTURED LADDER/FBD LANGUAGE

3.1 Created Program

This section explains the operations of the program to be created and ladder programs.
3.1.1 Operations of program
When X0 turns ON, the programmable controller turns ON Y10, and then turns OFF Y10 1 second later.
When X1 turns ON, the programmable controller transfers K10 to D0 (which is defined with the LABEL "VAR1").
When X2 turns ON, the programmable controller transfers K20 to D0 (which is defined with the LABEL "VAR1").

3.1.2 Created program

In the case of Structured Ladder
In the case of FBD
3 - 2

3.1.1 Operations of program

Loading...
+ 80 hidden pages