Professional Documents
Culture Documents
Course Prerequisites
The training course is not designed to teach the basic first principles of PLC programming; it teaches the
features and functions of GX Works3 software.
Hardware requirements
Laptop i5 Core
15 GB hard drive free space
CDRom on laptop
Software requirements
Windows 7 Pro or higher
Basic understanding of Windows Operating System environment
Course Outcomes
On completion of the course the delegate will:
NOTE: Delegates will not be expert programmers but will have gained programming experience.
NOTE: This is the software key provided for you in the software package.
6. The instructions displayed on the screen will ask to install additional tools.
7. Select both options. This is the latest update of the software available.
8. On the next screen, select that all the software gets installed in the same folder as the GX Works3 folder.
9. Leave the software to install.
NOTE: The GX Works3 screen consists of many components. Many of these components, such as toolbars
and certain windows, can be docked at various locations around the screen, or their display can be turned
off.
The purpose of creating a project is to teach the basic principles of programming. For this project use the
programing language, Function Block Diagram (FBD) and Structured Ladder Diagram (LD) programming,
FBD/LD.
IEC 61131 is an international standard for programmable controller systems. Programming languages for
PLCs are standardised by IEC 61131-3. Each language has different features to accommodate your
application and programmers skill. The IEC 6113 programming methods are supported in GX Works3:
The variables and devices used in each program can be shared across multiple platforms.
User-defined function blocks are supported.
Use any language in the same project.
NOTE: In GX Works3, the two methods of programming a PLC are both still supported but they can both be
implemented within the same project and the choice does not have to be made at the beginning of a project.
NOTE: The labels can be up to 32 characters long, but cannot include spaces, special characters, device
numbers and cannot begin with a number.
Local Labels
Local labels (variables) can ONLY be used in each Program Organization Units (POU). Local labels that are
not included in POUs cannot be used. When setting a local label, set the label name, class, and data type.
The local label consist of 9 classes:
VAR: Label that can be used within the range of declared POUs. This label cannot be used in other POUs.
VAR_CONSTANT: Constant that can be used within the range of declared POUs. This label cannot be used in
other POUs.
VAR_RETAIN: Latch type label that can be used within the range of declared POUs This label cannot be used
in other POUs.
VAR_INPUT: Label that inputs to a function or a Function Block. This label receives a value, and cannot be
changed in POUs.
VAR_OUTPUT: Label that outputs a value from a function or a Function Block.
VAR_OUTPUT_RETAIN: Latch type label that outputs a value from a function or a Function Block.
VAR_IN_OUT: Local label which receives a value, outputs it from a POU, and can be changed in POUs.
VAR_PUBLIC: Label that can be accessed from other POUs.
VAR_PUBLIC_RETAIN: Latch type label that can be accessed from other POUs.
Global Labels
Global labels (variables) are labels that can be shared by programs in a project. Global labels can be used
in all the programs in a project. Global labels can be used in program blocks and Function Blocks. When
setting a global label, set the label name, class and data type, and assign a device. A global label consist of
3 types of classes:
VAR_GLOBAL: Common label that can be used in program blocks and Function Blocks.
VAR_GLOBAL_CONSTANT: Common constant that can be used in program blocks and Function Blocks.
VAR_GLOBAL_RETAIN: Latch type label that can be used in program blocks and Function Blocks.
Module Labels
Module labels are unique to a specific module or CPU, and are automatically generated. They are created
as Global Labels. (M+Global)
System Labels
System labels are controlled by the MELSOFT iQ Navigator and provide the same data to all projects
compatible with iQ Works. They can be referenced from other devices such as GOT, Motion Controllers,
CPU’s, etc. and used for monitoring and setting data. System labels can be created by registering Global
labels as System labels on the Global Label Editor.
3. Select the FX5CPU series from the Series drop down menu.
4. Select FX5U from the Type drop down menu.
5. Select FBD/LD from the Program Language drop down menu.
6. The programing language we will be using is Function Block diagram and structured ladder programming.
7. The GX Works3 screen should look like this now. (Figure 4)
9. Now just to show you how easy it is to select the correct FX5U PLC, simply double click on Module
Configuration. (Figure 6)
13. Right click on the PLC and click on “Check” and then select “System Configuration”. This will do a very simple
check of your configuration. If there is an error, right click on the PLC again, click on “Parameters” and select
“Fix”. This will explain what needs to be fixed.
It is easy to configure the PLC with additional I/O and this is not part of the training at all.
14. Close the Module Configuration tab. Do not save it. Return to the ProgramBody sheet.
NOTE: The goal of today’s training is to create a simple motor Function Block with a start, stop, latching and
interlocking signals and a working instance of it.
5. Click Check.
6. Close the window.
Prerequisites
A created motor Function Block
This will add the columns Class, Assign (Device/Label), Initial Value and Constant.
9. For the Motor_1_Data label you created, you should have the Data Type as MOTOR_DUT, class as
VAR_GLOBAL and in Assign, you should see Detailed Setting in pink.
10. Click on Detailed Setting and the following window will appear; (Figure 13).
11. Deselect Use Bit Specfication.
In this window you can assign you I/O addresses according to where it is allocated.
Structured Data Types are very easy to add and change PLC I/O addressing from one central point. It is not
necessary to go and change the values in different places within the program.
NOTE: We are now going to use simple ladder to write the Function Block. When you start with your first
contact function and start typing in the first 2 letters of the label, it gives you a drop down of the labels
starting with those 2 letters.
Program:
Start latch condition:
Start input must be true, stop and fault input false, then start latch is true.
14. Browse to the menu tool bar, click on “Convert” and select “Rebuild All”.
NOTE: If the project compiles without any errors, then save the project. The Motor_FB Function Block and
MOTOR_DUT stays red. This is fine as it is not used in the program yet.
15. Click on Project in the menu bar and click Save. Name the project “GX Works3 Motor program”.
16. Browse to the C:\ drive and create a directory called Training.
17. Save the program in that directory.
3. Select it and drag it onto your program body workplace. Name the Function Block. Type in Demo_Motor_1.
(Figure 19).
4. Click on the dot at IN_Interlock and start typing motor and a drop down will appear. Select Motor_1_Data.
(Figure 21).
5. Press dot(.) and another dropdown window appears. Specify the I/O input or output to use. (Figure 22). Select
and press Enter.
7. Do a Rebuild All and check that there is no errors. If there are no errors then save the project.
Prerequisites
A created motor Function Block
A created instance of a motor Function Block
1. After a successful build right click on your Function Block instance and select “Register to Watch Window” and
select “Watch 1”.
2. This will open another window tab at the bottom of your screen called Watch 1.
3. Click on the expand (+) sign. This will expose all the signals within the Function Block. (Figure 24)
4. This window is great for monitoring purposes. We will use it for simulation purposes.
12. If you modify the IN_Interlock signal by changing it to 1, the Out_Run signal should fall away.
In the watch window, the Fault_Latch signal is ON. (Figure 28)
You have successfully created and simulated a simple Function Block with an instance of it.
You can now download this program to your PLC and it should work if you change the inputs manually.
This concludes the GX Works 3 basic programming introduction training. For more information please feel
free to consult the mymitsubishi web portal where you can find a variety of manuals, program examples
and Function Blocks for cards or controllers and software updates.
NOTE: The e-manual viewer is also available as an APP for android based tablet devices.
4. On installation of the GX Works3, the e-manual viewer application is also installed along with all the GX Works3,
iQ-R, and iQ-F product manuals.
5. The e-manual viewer can be run and used as a separate standalone application and by selecting help in GX
Works3 the application will also run.
6. From the Help menu, you will find a link to the Mitsubishi Electric FA global website, as well as the software
version of GX Works3. (Figure 30)
NOTE: For the current iQ-R and iQ-F PLC products and also for the GX-Works3 software, the e-manual
viewer application is so comprehensive that it can almost be used as a training aid because it includes a step-
by-step guide to creating a PLC project.