GX WORK3 - 操作手冊 - 英文 PDF
GX WORK3 - 操作手冊 - 英文 PDF
GX WORK3 - 操作手冊 - 英文 PDF
-SW1DND-GXW3-E
SAFETY PRECAUTIONS
(Read these precautions before using this product.)
Before using this product, please read this manual carefully and pay full attention to safety to handle the product correctly.
The precautions given in this manual are concerned with this product only. For the safety precautions for the programmable
controller system, refer to the user's manual for the module used and the MELSEC iQ-R Module Configuration Manual.
In this manual, the safety precautions are classified into two levels: " WARNING" and " CAUTION".
Under some circumstances, failure to observe the precautions given under " CAUTION" may lead to serious
consequences.
Observe the precautions of both levels because they are important for personal and system safety.
Make sure that the end users read this manual and then keep the manual in a safe place for future reference.
[Design Precautions]
WARNING
● When data change, program change, or status control are 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.
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.
2
INTRODUCTION
Thank you for purchasing the Mitsubishi FA software, MELSOFT series.
This manual describes the programming and functions required when using GX Works3.
Before using this product, please read this manual carefully, and develop familiarity with the functions and performance of GX
Works3 to handle the product correctly.
3
CONTENTS
SAFETY PRECAUTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .1
CONDITIONS OF USE FOR THE PRODUCT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .2
INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .3
RELEVANT MANUALS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
TERMS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4
Property . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
3.4 Changing Module Type of Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 64
3.5 Verifying Projects . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Performing verification. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Checking verification result . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66
Exporting data to file . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
3.6 Project Revision . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Registering revision information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68
Displaying revision list . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
CONTENTS
3.7 Registering Profiles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
5
Verifying system label information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
Importing the changes of system label database . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106
PART 3 PROGRAMMING
6
Interaction with device initial value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
7.4 Writing/Reading Data to/from CPU Module. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 163
CONTENTS
9.1 Searching/Replacing Devices/Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 169
9.2 Searching/Replacing Instructions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171
9.3 Searching/Replacing Character Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 172
9.4 Changing Contacts Between Open Contact and Closed Contact. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173
9.5 Batch Replacing of Devices and Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 174
9.6 Displaying Reference Information List of Devices/Labels . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 175
Creating/displaying cross reference information . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 176
9.7 Displaying Device Usage List. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178
7
12.5 Accessing via Serial Communication Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Connection on a 1:1 basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 200
Connection on a 1:n basis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
12.6 Accessing via GOT (GOT Transparent Function). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Accessing via GOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
Accessing via module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 202
12.7 Accessing to Multiple CPU System . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203
12.8 Considerations of Communication with CPU module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 205
8
Copying security key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 248
Registering security key in program files. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249
15.3 Preventing Illegal Program Execution. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 250
How to use the Security key authentication function (execution prevention) . . . . . . . . . . . . . . . . . . . . . . . . . . 250
Writing/deleting security key to/from CPU module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 251
15.4 Preventing Illegal Data Reading/Writing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
File password function. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253
How to use file password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254
Setting file password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 255
CONTENTS
15.5 Restricting Access from Other Than Specific Communication Route. . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Remote password function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
How to use remote password . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 256
Setting remote password. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257
APPENDIX 275
Appendix 1 Functions Added to/Changed from Previous Version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 275
Appendix 2 Character Strings that cannot be Used for Label Names and Data Names . . . . . . . . . . . . . . . . . . . 277
Appendix 3 List of Applicable Devices in GX Works3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
For RCPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 278
For FX5CPU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 280
Appendix 4 Using Simulation Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 281
Supported CPU module functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 282
Supported devices. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 284
Supported instructions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 290
Enabled/disabled parameter items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 292
Module buffer memory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Link devices of network module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 293
Considerations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 294
9
Appendix 5 USB Driver Installation Procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 296
INDEX 297
REVISIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .299
TRADEMARKS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .300
10
RELEVANT MANUALS
Manual name [manual number] Description Available form
GX Works3 Operating Manual Explains the system configuration of GX Works3, parameter e-Manual
[SH-081215ENG] (this manual) setting, and operation method for the online function. EPUB
PDF
e-Manual refers to the Mitsubishi FA electronic book manuals that can be browsed using a dedicated tool.
e-Manual has the following features:
• Required information can be cross-searched in multiple manuals.
• Other manuals can be accessed from the links in the manual.
• The hardware specifications of each part can be found from the product figures.
• Pages that users often browse can be bookmarked.
TERMS
Unless otherwise specified, this manual uses the following terms.
Term Description
Built-in Ethernet CPU A generic term for a CPU that has an Ethernet port
Control CPU A CPU module that controls connected I/O modules and Intelligent function modules. In a multiple CPU system, a CPU
module by which a module is controlled can be set for each module.
Direct connection A connection using a USB/serial/Ethernet port of a CPU module
Execution program A converted program that can be executed on a CPU module
FB instance A function block pasted on a sequence program
FX5CPU A generic term for FX5UCPU and FX5UCCPU
GX Configurator A generic product name for GX Configurator-AD/DA/SC/CT/TC/TI/FL/PT/AS/QP
GX Developer A generic product name for SWnD5C-GPPW, SWnD5C-GPPW-A, SWnD5C-GPPW-V, and SWnD5C-GPPW-VA ('n'
indicates version.)
GX Works2 A generic product name for SWnDNC-GXW2 ('n' indicates version.)
GX Works3 A generic product name for SWnDND-GXW3 ('n' indicates version.)
Intelligent function module A generic term for modules which has functions other than input and output, such as A/D converter module and D/A
converter module
MELSOFT Library A generic term for components (FB library, sample programs, drawing data) which provide easy operation of
programmable controller related modules and GOTs, and various devices that are connected to them
To obtain components of MELSOFT Library, please consult your local Mitsubishi representative.
MELSOFT Navigator A product name for the integrated development environment included in SWnDND-IQWK (MELSOFT iQ Works) ('n'
indicates version.)
Member A local label defined in a structure or a function block.
Personal computer A generic term for personal computer on which Windows operates
RCPU A generic term for RnCPU and RnPCPU
RnCPU A generic term for R04CPU, R08CPU, R16CPU, R32CPU, and R120CPU
RnPCPU A generic term for R08PCPU, R16PCPU, R32PCPU, and R120PCPU
Slave station Stations other than master station (local station, remote I/O station, remote device station, intelligent device station, etc.)
Universal model High-speed Type A generic term for Q03UDVCPU, Q04UDVCPU, Q06UDVCPU, Q13UDVCPU, and Q26UDVCPU
QCPU
Universal model QCPU A generic term for Q00UJCPU, Q00UCPU, Q01UCPU, Q02UCPU, Q03UDCPU, Q03UDECPU, Q04UDHCPU,
Q04UDEHCPU, Q06UDHCPU, Q06UDEHCPU, Q10UDHCPU, Q10UDEHCPU, Q13UDHCPU, Q13UDEHCPU,
Q20UDHCPU, Q20UDEHCPU, Q26UDHCPU, Q26UDEHCPU, Q50UDEHCPU, and Q100UDEHCPU
Windows 7 A generic term for Microsoft Windows 7 Starter Operating System,
Microsoft Windows 7 Home Premium Operating System,
Microsoft Windows 7 Professional Operating System,
Microsoft Windows 7 Ultimate Operating System,
and Microsoft Windows 7 Enterprise Operating System
Windows 7 or later A generic term for Windows 7, Windows 8, and Windows 8.1
11
Term Description
Windows 8 A generic term for Microsoft Windows 8 Operating System,
Microsoft Windows 8 Pro Operating System,
and Microsoft Windows 8 Enterprise Operating System
Windows 8.1 A generic term for Microsoft Windows 8.1 Operating System,
Microsoft Windows 8.1 Pro Operating System,
and Microsoft Windows 8.1 Enterprise Operating System
Windows 8 or later A generic term for Windows 8 and Windows 8.1
Windows Vista A generic term for Microsoft Windows Vista Home Basic Operating System,
Microsoft Windows Vista Home Premium Operating System,
Microsoft Windows Vista Business Operating System,
Microsoft Windows Vista Ultimate Operating System,
and Microsoft Windows Vista Enterprise Operating System
Windows Vista or later A generic term for Windows Vista, Windows 7, Windows 8, and Windows 8.1
Windows XP A generic term for Microsoft Windows XP Home Edition Operating System,
and Microsoft Windows XP Professional Operating System
12
PART 1
PART 1 FUNDAMENTALS OF GX
Works3
This part explains the screen configuration and basic operations of GX Works3.
13
1 BEFORE USING THIS PRODUCT
GX Works3 is an engineering tool for configuring the settings, programming, debugging, and performing the maintenance for
programmable controllers such as MELSEC iQ-R series/MELSEC iQ-F series.
The usability is much better than the existing GX Works2 because the functions and their operability have been improved.
<Ladder program>
<ST program>
<FBD/LD program>
Writing data
Reading data
Monitor/debug function
After writing the created sequence programs to a CPU module, device values at operation can be monitored online/offline.
The virtual programmable controller (the Simulation function) is used for the offline monitoring/debugging.
Start
1. Create a project.
Start GX Works3.
3. Create a program.
Perform conversion.
5. Connect a personal computer to CPU module, and set the connection destination.
Monitor the execution status and device contents of the sequence program
to check the operation.
Displaying Help
Display Help to learn about operations and functions, and check the error codes of a CPU module.
Operating procedure
Select [Help] [GX Works3 Help] ( ).
e-Manual Viewer is started up and a manual is displayed.
■Program editor
• Place the cursor on the instruction (ladder editor: the cell with the instruction, ST editor: the character string of the
instruction), press the key.
• Place the cursor on the element on the FBD/LD editor, and press the key.
• Place the cursor on the FB cell on the ladder editor, and press the key
Operating procedure
Select [Help] [Connection to MITSUBISHI ELECTRIC FA Global Website].
Operating procedure
Select [Help] [Version Information].
GX Works3
(SW1DND-GXW3-E)
USB miniB type
RCPU
For the considerations when accessing a CPU module, refer to the following section.
Page 205 Considerations of communication with the CPU module using a USB cable
<Inapplicable configurations>
Connection to several programmable controller CPUs from the personal computer with several USB ports
CPU module
USB cable
USB
cab CPU module
le
GX Works3
(SW1DND-GXW3-E)
FX5-232ADP
RS-232 cable
FX5CPU
GX Works3
(SW1DND-GXW3-E)
RS-232 cable
FX5CPU
(FX5-232-BD)
Starting GX Works3
Operating procedure
Select [MELSOFT Application] [GX Works3] [GX Works3] from Windows Start*1.
*1 Select [All apps] on the Start screen or [Start] [All Programs].
Exiting GX Works3
Operating procedure
Select [Project] [Exit GX Works3].
Window
[View] [Switch Display Language]
Precautions
If the display language differs from the one for the operating system, the text may get cut off.
Main frame
2
The main frame configuration is shown below.
The following screen shows a main frame configuration on which a work window and docked windows are displayed.
Title bar
Menu bar
Toolbar
Work window
Status bar
Docked window
Window operation
■Displaying docked windows
[View] [Docking Window] [(target item)]
Window
[Window] [Window]
Drag a dockable window to the guidance A new tab appears after the window is docked.
• Floating display: Drag the title bar of a docked window and drop it to the arbitrary position to float from the main frame.
Docked windows can be switched from docked to floating or vice versa by double-clicking the title bar.
Operating procedure
2
■Customizing toolbar
1. Click on the toolbar, and select [Show/Hide Buttons] [(toolbar name)].
■Resetting toolbar
Click on the toolbar, and select [Show/Hide Buttons] [Reset].
Window
[View] [Docking Window] [Navigation] ( )
Toolbar
Status icons
Project view
The character color on the Project view displays red when the program is not converted.
Displayed items
Name Description Reference
Status icons Displays icons which indicate status of the project. Page 27 Status icons
Sorting data
Sort the data displayed in tree format.
Operating procedure
1. Open a folder on the Project view and select the data for sorting.
2. Right-click and select [Sort] [(sort type)] from the shortcut menu.
Data can be sorted by dragging and dropping the data or selecting [Order] [Move Up]/[Move Down] from
the shortcut menu.
Operating procedure
1. Select a program file and [Project] [Data Operation] [New Folder]. 2
2. Change a folder name.
3. Select the program to be stored, and drag and drop it to the created folder.
Simple display
Click on the toolbar to hide the unused folders.
Status icons
The icons that indicate the state of the project are as follows:
Icon Status Display timing Item Description
Parameter Offline Module folder Displays when a mismatch is detected between the system parameters
mismatched and the property of module.
Unconfirmed Module parameter Displays when the [Apply] button has never been pressed on the setting
required settings screen of module parameter (network) that is required to be set.
Window
[View] [Docking Window] [Element Selection] ( )
Toolbar
The focus is moved to the element of which character string match with the entered character string (element name or
keyword included in the element description) to the toolbar.
The elements which are included in the selected category is displayed from the display target.
For ST editor, select an element and press the key to paste the element at the cursor position.
Favorites
The frequently used elements (devices, labels, instructions, FB instances, functions) can be registered to [Favorites] tab by
classification.
Create a folder to be classified by clicking on the toolbar, and drag and drop it to move or change the name.
Operating procedure
■Adding from element list
Instructions, functions, and function blocks can be added to Favorites.
1. Select an element to be added from the list of the Element Selection window, and click on the toolbar.
2. Select the registration destination on the "Register to Favorites" screen, and click the [OK] button.
1. Select an element to be added on the Project view, and drag and drop it onto the Element Selection window.
2. Select the registration destination on the "Register to Favorites" screen, and click the [OK] button.
1. Select the cell of the element to be added, and drag the border of the cell and drop it onto the Element Selection window.
2. Select the registration destination on the "Register to Favorites" screen, and click the [OK] button.
1. Select the token of a part to be added, and drag and drop it onto the Element Selection window.
2. Select the registration destination on the "Register to Favorites" screen, and click the [OK] button.
1. Select the element to be added, and drag and drop it onto the Element Selection window with the key held down.
2. Select the registration destination on the "Register to Favorites" screen, and click the [OK] button.
1. Select a line header of the label to be added, and drag and drop it onto the Element Selection window.
2. Select the registration destination on the "Register to Favorites" screen, and click the [OK] button.
By importing the exported file (*.xml), the elements registered as favorite can be used on other personal
computer.
Select on the toolbar [Export Favorites]/[Import Favorites]
History
By selecting the [History] tab, the previously used elements are displayed in order of the date used.
The display order can be changed in order of the number of times used from the pulldown list.
Module
By selecting the [Module] tab, the module labels and the module FBs which have been registered in the project are displayed.
For details on how to register module labels and module FBs, refer to the following section.
Page 103 Registering Module Labels, Page 182 Importing module FBs in project
Library
By selecting the [Library] tab, the POUs which have been registered in the library file are displayed.
For details on how to register POUs, refer to the following section.
Page 187 Registering to library list
Basic menus
[Project]
[New] Page 53 Creating projects
[Open] Page 54 Opening projects
[Close]
[Save] Page 59 Overwriting projects
[Save As] Page 59 Saving projects under the specified name
[Delete] Page 60 Deleting projects
[Project Verify] Page 65 Verifying Projects
[Project Revision] [Register Revision] Page 68 Registering revision information
[Project Revision] [Revision List] Page 69 Displaying revision list
[Change Module Type] Page 64 Changing Module Type of Project
[Data Operation] [New Data] Page 61 Creating project
[Data Operation] [New Folder] Page 27 Creating folders
[Data Operation] [Rename Data] Page 62 Changing data names
[Data Operation] [Delete Data] Page 62 Deleting data
[Data Operation] [Copy Data] Page 62 Copying/pasting data
[Data Operation] [Paste Data]
[Data Operation] [Add New Module] Page 85 Setting parameters of I/O module and Intelligent
function module
Page 91 Setting by simple motion module setting tool
[Data Operation] [Properties] Page 63 Property
[Intelligent Function Module] [Module Parameter List] Page 87 Checking/changing the number of Intelligent
function module parameters
[Open Other Format File] [Open GX Works2 Format Project] Page 55 Opening GX Works2 format projects
[Open Other Format File] [Open GX Works3 Format Library] Page 186 Editing libraries
[Library Operation] [Export Library] Page 186 Creating libraries
[Library Operation] [Register to Library List] Page 187 Registering libraries to be referenced
[Library Operation] [Delete from Library List] Page 187 Deleting libraries/updating display information
[Library Operation] [Update the Display Information of Library]
[Security] [Security Key Setting] Page 249 Registering security key in program files
Page 251 Writing/deleting security key to/from CPU
module
[Security] [Security Key Management] Page 247 Creating/deleting security keys
[Security] [Block Password Setting] Page 244 Setting block password
[Security] [File Password Setting] Page 255 Setting file password
[Printer Setup] Page 44 Printing Data
[Page Setup]
[Print Preview]
[Print]
[Recent Projects] [(recently used project 1 to 10)]
[Start GX Works2]
[Exit GX Works3] Page 22 Exiting GX Works3
[Edit]
[Undo]
[Redo]
[Cut]
[Copy]
[Paste]
[Convert]
[Convert] Page 153 Converting/converting all programs
[Online Program Change] Page 216 Writing data after changing programs partially
while CPU module is in RUN (Online program change)
[Rebuild All] Page 153 Converting/converting all programs
[Setting]
[View]
[Toolbar] [Standard] Page 23 Main frame
[Toolbar] [Program Common]
[Toolbar] [Docking Window]
[Toolbar] [Monitor Status]
[Statusbar]
[Color and Font] Page 41 Checking and Changing Colors and Fonts
[Docking Window] [Navigation] Page 26 Navigation window
[Docking Window] [Element Selection] Page 27 Element Selection window
[Docking Window] [Output] Page 23 Main frame
[Docking Window] [Progress]
[Docking Window] [Find/Replace]
[Docking Window] [Find Results]
[Docking Window] [(Cross Reference 1 to 2)] Page 176 Creating/displaying cross reference
information
[Docking Window] [Device List] Page 178 Displaying Device Usage List
[Docking Window] [Device Reference] Page 86 Checking refresh devices assigned to modules
[Docking Window] [Input the Configuration Detailed Information]
[Docking Window] [Result of Power Supply Capacity and I/O Points Check]
[Docking Window] [Module Start I/O No. Related Area]
[Docking Window] [(Watch 1 to 4)] Page 229 Checking Current Values by Registering
Devices/Labels
[Docking Window] [Intelligent Function Module Monitor] [(Intelligent Function Module Page 234 Checking Current Values in Intelligent Function
Monitor 1 to 10)] Module
[Zoom] [Set Zoom Factor]
[Zoom] [Zoom In]
[Zoom] [Zoom Out]
[Switch Display Language] Page 22 Switching Displayed Language
[Multiple Comment Display Setting] Page 42 Setting Comment Display
[Online]
[Specify Connection Destination] Page 193 Specification of Connection Destination
[Read from PLC] Page 206 Writing/Reading Programmable Controller
Data
[Write to PLC]
[Debug]
[Simulation] [Start Simulation] Page 191 Starting/Stopping Simulation
[Simulation] [Stop Simulation]
[Simulation] [Simulation Environmental Setting] Page 191 Environmental setting
[Modify Value] Page 225 Changing current values
[Change History of Current Value]
[Memory Dump] [Setting] Page 236 Saving and Checking Device Value
[Memory Dump] [Read Results]
[Memory Dump] [Display Result]
[Diagnostics]
[System Monitor] Page 259 Checking Module Status of System
[Module Diagnostics (CPU Diagnostics)] Page 260 Diagnosing CPU Module
[Ethernet Diagnostics] Page 262 Ethernet diagnostics
[CC-Link IE Control Diagnostics (Optical Cable)] Page 263 CC-Link IE Controller Network diagnostics
[CC-Link IE Control Diagnostics (Twisted Pair Cable)]
[CC-Link IE Field Diagnostics] Page 265 CC-Link IE Field Network diagnostics
[MELSECNET Diagnostics] Page 266 MELSECNET Diagnostics
[CC-Link Diagnostics] Page 267 CC-Link diagnostics
[Tool]
[Check Program] Page 152 Checking Programs
[Check Parameter] Page 82 Checking parameters
[Module Tool List] Page 91 Displaying module tool list
[Register Profile] Page 71 Registering Profiles
[Sample Library Registration] Page 188 Utilizing sample libraries
[Shortcut Key] Page 40 Checking and Changing Shortcut Keys
[Predefined Protocol Support Function] Page 92 Predefined Protocol Support Function
[Circuit Trace] Page 93 Circuit Trace Function
[Options] Page 43 Setting Options
[Help]
[GX Works3 Help] Page 19 Displaying Help
[Connection to MITSUBISHI ELECTRIC FA Global Website] Page 19 Connecting to MITSUBISHI ELECTRIC FA
Global Website
[Version Information] Page 19 Checking version of GX Works3
[View]
[Toolbar] [Module Configuration Diagram]
[Online]
[Read Module Configuration from PLC] Page 75 Reading module configuration from actual
system
[View]
[Toolbar] [Ladder]
[Comment Display] Page 122 Entering/editing comments
[Statement Display] Page 123 Entering/editing statements
[Note Display] Page 125 Entering/editing notes
[Display Lines of Monitored Current Value]
[Display Format for Device Comment]
[Change Display Format of Device/Label Name] [1 Cell Display] Page 110 Configuration of ladder editor
[Change Display Format of Device/Label Name] [Wrapping Ladder Display]
[Outline] [Expand/Collapse of Outlines]
[Outline] [Expand/Collapse of All Outlines]
[Outline] [Show/Hide of Outlines] Page 110 Configuration of ladder editor
[Display Device]
[Text Size] [Bigger]
[Text Size] [Smaller]
[Open Label Setting of Selected Element] [Open in Front]
[Open Label Setting of Selected Element] [Tile Horizontally]
[Open Program Body of Selected Element] [Open in Front]
[Open Program Body of Selected Element] [Tile Horizontally]
[Open Label Setting] [Open in Front]
[Open Label Setting] [Tile Horizontally]
[Instruction Help] Page 130 Displaying instruction help
[Find/Replace]
[Jump] Page 137 Jump
[View]
[Toolbar] [ST]
[Open Label Setting of Selected Element] [Open in Front]
[Open Label Setting of Selected Element] [Tile Horizontally]
[Open Program of Selected Element] [Open in Front]
[Open Program of Selected Element] [Tile Horizontally]
[Open Label Setting] [Open in Front]
[Open Label Setting] [Tile Horizontally]
[Outline] [Expand/Collapse of Outlines]
[Outline] [Expand/Collapse of All Outlines]
[Outline] [Show/Hide of Outlines] Page 132 Configuration of ST editor
[View]
[Toolbar] [FBD/LD]
[Comment]
[Display Execution Order]
[Open Label Setting of Selected Element] [Open in Front]
[Open Label Setting of Selected Element] [Title Horizontally]
[Open Program Body of Selected Element] [Open in Front]
[Open Program Body of Selected Element] [Title Horizontally]
[Open Label Setting] [Open in Front]
[Open Label Setting] [Title Horizontally]
Applicable menus for label editors (global label, local label, task, structure)
[Edit]
[Delete]
[Select All]
[New Declaration (Before)] Page 96 Editing rows
[New Declaration (After)]
[Delete Row]
[View]
[Toolbar] [Label]
[Show/Hide of Label Item]
[Display Program Editor]
[View]
[Display Format Detailed Setting]
[Find/Replace]
[Next Unmatched] Page 66 Checking verification result 2
[Previous Unmatched]
[View]
[Return to Result List]
[Close Detailed Result]
[Close All Detailed Result]
Window
[Tool] [Shortcut Key]
Operating procedure
1. Double-click the command cell that will change the shortcut key to edit.
By importing the exported file (*. gks), the settings can be utilized in other personal computers.
The setting files exported from GX Works2 can be imported.
Window 2
[View] [Color and Font]
Operating procedure
1. Select "User Setting" in the pull-down list of "Font Setting".
2. Set the items on the "Font" screen, and click the [OK] button.
3. Select the color from "Color Setting" to be changed, and click the [Apply] button.
By importing the exported file (*. gcs), the settings can be utilized in other personal computers.
The setting files exported from GX Works2 can be imported. However, the name of the color may differ.
Precautions
Some fonts may be displayed as garbled characters.
Change the setting to another font if this happens.
Window
[View] [Multiple Comment Display Setting]
Operating procedure
1. Select "Enable Multiple Comments Display".
3. Select the comment to be displayed on the program editor or each monitor screen in "Target", click the [OK] button.
Window 2
[Tool] [Options]
Operating procedure
Set the items and click the [OK] button.
By importing the exported file (*. gos), the settings can be utilized in other personal computers.
The setting files exported from GX Works2 can be imported.
The setting items set to "Project" "Device Comment Reference/Reflection Target" are not exported.
Precautions
After changing the following option setting, performing "Rebuild All" is required.
• [Tool] [Options] "Other Editor" "Label Editor Common" "Data Type Setting"
As a precautionary measure, perform the following operation before switching the CPU module to RUN.
Window
[Project] [Print] ( )
When no data exist or only read protect data exist in "Print" and "Do Not Print" list, is displayed on the checkbox of the Print
Item.
Operating procedure
1. Select the data to be printed, and configure each setting.
2. Set the printer and page by clicking the [Printer Setup] button and [Page Setup] button.
Window
2
Operating procedure
1. Select [Project] [Print Preview].
3. When switching the data to be previewed, select "Print Item" and "Data Name", and click the [Display] button.
Considerations
■Display of print previews and printing data
Displaying print previews and printing data cannot be performed in the following situations.
• The print target data do not exist
• The print target screen is being monitored (Start printing after stopping the monitoring.)
This part explains the system design such as project management and parameter/label settings.
3 PROJECT MANAGEMENT
5 REGISTERING LABELS
47
3 PROJECT MANAGEMENT
This chapter explains basic operations and management of projects.
File format
Workspace format
A workspace manages multiple projects at once.
When configuring a system containing multiple CPU modules, a project needs to be created for each CPU module.
However, by saving projects in the workspace format, projects in the same system can be managed.
Ethernet
<Control B>
Alarm processing A
Control B
····· Project
Conveyor control C
Additional processing D
3 PROJECT MANAGEMENT
48 3.1 Project Files and Data Configuration
■Configuration of workspace/project
Folder configuration
Workspace
3 PROJECT MANAGEMENT
3.1 Project Files and Data Configuration 49
Data configuration
■Program data
Creation method: Page 61 Managing Project Data
Figure Item Description
Execution types A setting for when a program operates.
When executing programs in CPU module, registering to
Execution type any of the execution types is required.
Page 108 Setting method
Program file
Program block Program file A file that manages programs.
Local label Create the file in unit of execution process.
Program The created files are written to a CPU module in unit of
program files.
Program block A data that composes a program.
Worksheet (POU)
(Program)
Local label A label data that can be used only in the defined program
Execution type block.
Program A program data that is created using Ladder Diagram or
Unregistered Structured Text.
program Worksheet A program data that is created using Function Block
(Program) Diagram/Ladder Diagram.
Unregistered program A folder that temporarily stores program files of which
execution type is undefined. The stored program files will
not be executed even when writing them to a programmable
controller.
FB file A file that manages function blocks.
The FB files are written to a CPU module in unit of FB file.
FB file Page 180 Creating Function Blocks
Function block
Function block A data that configures the program of function block.
Local label
(POU)
Program
Local label A label data that can be used only in the defined function
Worksheet block.
(Program)
Program A function block data that is created using Ladder Diagram
FUN file or Structured Text.
Function This data is referred to as 'FB program' in this manual.
Local label
Program Worksheet A function block data that is created using Function Block
(Program) Diagram/Ladder Diagram.
FUN file A file that manages functions.
Worksheet The function files are written to a CPU module in unit of
(Program) FUN file.
Page 183 Creating Functions
Function A data that configures programs of function.
(POU)
Local label A label data that can be used only in the defined function.
Program A function data that is created using Ladder Diagram or
Structured Text.
This data is referred to as 'FUN program' in this manual.
Worksheet A function data that is created using Function Block
(Program) Diagram/Ladder Diagram.
3 PROJECT MANAGEMENT
50 3.1 Project Files and Data Configuration
Precautions
The program blocks in the program file is executed in order of the name of the program blocks.
When changing the execution order of the programs, change the program name on the Project view.
The execution order of the program can be checked by right-clicking the program file and select [Sort] [Name] to sort the
program block names in ascending order.
Ex.
Program file
Program block
■Label data
Creation method: Page 61 Managing Project Data
Figure Item Description
Global label A label data that can be accessed from all the program
blocks and function blocks in the project.
Page 95 Registering Labels
Global label
Module label Module label A label to access I/O signals or buffer memory of modules.
Page 103 Registering Module Labels
System structure System structure A structure registered in the system label database.
Defined structure
Defined structure A data that defines structure as data type.
Structures required
This can be used as a data type for all labels which can be
for module labels
defined in the project except for recursive definitions in the
defined structure.
Structures required for The structures required for module labels are registered
module labels automatically.
■Device data
Creation method: Page 61 Managing Project Data
Figure Item Description
Each program A device comment data that can be used in the program
device comment files which have the same name.
Page 145 Registering Device Comments
Each program
Common device comment A device comment data that can be commonly used in
device comment
Common device multiple programs.
comment Page 145 Registering Device Comments
Device memory Device memory A data that includes the values to be written to/read from
devices in a CPU module.
Device initial value Page 158 SETTING DEVICE MEMORY
Device initial value A data that defines values which are set to devices when
CPU module is in RUN.
Page 164 SETTING DEVICE INITIAL VALUES
3 PROJECT MANAGEMENT
3.1 Project Files and Data Configuration 51
■Parameter data
The structure of the tree and the creation methods: Page 81 Setting Parameters
■Other data
Figure Item Description
Module POU (Shortcut) A shortcut to the module POU that has been registered to
the Element Selection window.
Remote password By setting a password for the CPU module, accessing from
Module POU the modules other than specified RJ71EN71, serial
(Shortcut) communication module, and built-in Ethernet CPU can be
Remote password prohibited.
Page 256 Restricting Access from Other Than Specific
Communication Route
3 PROJECT MANAGEMENT
52 3.1 Project Files and Data Configuration
3.2 Creating Project Files
This section explains basic operations of GX Works3 such as creating, opening, and saving projects.
Creating projects
Window
[Project] [New] ( )
3
When the series (QCPU (Q mode), LCPU, FXCPU) which are not supported by GX Works3 is selected, GX Works2 is started
up and create a new project in it.
Operating procedure
Set the items and click the [OK] button.
Operating procedure
1. Start GX Works3 and select [Online] [Read from PLC] ( ).
2. Select the series to be read on the "Series Selection" screen, and click the [OK] button.
3. Set the communication route to access the CPU module on the "Specify Connection Destination" screen, and click the
[OK] button.
4. Perform the Read from PLC function on the "Online Data Operation" screen.
For the method for performing the Read from PLC function on the "Online Data Operation" screen, refer to the following
section.
Page 211 Reading data from programmable controller
Precautions
When parameters are not read from the programmable controller with data to create a new project, default parameters will be
set. Check the parameter setting.
3 PROJECT MANAGEMENT
3.2 Creating Project Files 53
Opening projects
Read the project saved on the personal computer or another data storage device.
Window
[Project] [Open] ( )
Operating procedure
Set the items and click the [Open] button.
Precautions
■Changing work space name and folder configuration
Do not change the file names and storage location of a workspace and project folders and files using an application such as
Windows Explorer.
3 PROJECT MANAGEMENT
54 3.2 Creating Project Files
Opening GX Works2 format projects
Open the project created in GX Works2 by changing the module type with GX Works3.
This function is supported by the projects of Universal model QCPU/Universal model High-speed Type QCPU/FXCPU(FX3U/
FX3UC) only.
The module type of each project will be changed as below.
Module type before change Module type after change
Universal model QCPU/Universal model High-speed Type QCPU R120CPU
FXCPU(FX3U/FX3UC) FX5UCPU 3
The supported version of GX Works3 differs depending on the module type. For details, refer to the following section.
Page 275 Functions Added to/Changed from Previous Version
Window
[Project] [Open Other Format File] [Open GX Works2 Format Project]
Operating procedure
1. Specify the project and click the [Open] button.
Precautions
• If a program that contains a compilation error exists in GX Works2, the project cannot be opened. Check if the program can
be compiled in GX Works2.
• The project to which the user management or access authority is set cannot be opened. Clear the setting in GX Works2.
• Once the module type is changed, "Label Area Capacity" and "Latch Label Area Capacity" of the CPU parameters are set
to "0 K Word". Set the capacity in accordance with the label capacity of the project.
3 PROJECT MANAGEMENT
3.2 Creating Project Files 55
■Data that is changed at changing module type
Operation at changing Setting items of GX Works2 Remarks
module type
Changed in accordance with the • PLC Parameter PLC Name Check the settings after the change.
target module type
PLC System*1,*2
PLC File Setting
PLC RAS*1
Program*1
Device*1,*2
I/O Assignment*3
Multiple CPU Setting*1,*3
Built-in Ethernet Port Setting
• Network Parameter CC-Link IE setting
Ethernet setting
CC-Link setting*2
• Intelligent Function Module*1,*2 Switch Setting
Parameter
Auto Refresh
• FB/FUN
• Structured Ladder/FBD program*4
• Device comment for devices other than SM/SD*5
Returns to default/ • PLC Parameter Boot File Set with GX Works3.
Data are deleted
• Options (other than "Device Comment Reference/Reflection Target")
• System label
• Device comments of SM/SD*5
• Connection destination
• Remote password
Deleted • PLC Parameter Communication Head Setting Not supported by GX Works3.
SFC
Built-in I/O Function Setting
Serial Communication
Built-in Serial Setting
Adapter Serial Setting
Memory Capacity
Special Function Block
Positioning
Operation Setting
• Redundant Parameters Operation mode setting
Tracking setting
• Network Parameter MELSECNET/10 and MELSECNET/H
setting
MELSECNET/H Remote I/O setting
• Programs of user library that are not registered to the program setting
• SFC program
• Task settings
• Device/Label Automatic-Assign Setting
• Project Revision
• Device memory (Only when the module type is changed to FX5UCPU)
*1 Check/set with GX Works3 after the change since some items are returned to the default or their data are deleted.
*2 The data are deleted when the module type is changed to FX5UCPU.
*3 The items which are not supported by GX Works3 are deleted.
*4 To read Structured Ladder/FBD programs, GX Works2 of which version is 1.519R or later is required to be installed on the personal
computer.
*5 The data are moved to SM8000 or higher/SD8000 or higher when the module type is changed to FX5UCPU.
3 PROJECT MANAGEMENT
56 3.2 Creating Project Files
■Instructions that are not supported by MELSEC iQ-R series/MELSEC iQ-F series modules
If an instruction which is not supported by MELSEC iQ-R series/MELSEC iQ-F series modules is included in the program
created with GX Works2, the instruction will be changed to the program in which SM4095/SD4095 is used.
In addition, the FBs/FUNs that are not supported by the FBD/LD editor will be undefined FBs/FUNs.
Modify the program with the instruction equivalent to the one supported by MELSEC iQ-R series/MELSEC iQ-F series.
MELSEC iQ-R Programming Manual (Instructions, Standard Functions/Function Blocks)
MELSEC iQ-F FX5 Programming Manual (Instructions, Standard Functions/Function Blocks)
■Increase of the number of device points due to the differences in local device setting units
Although the bit devices and word devices of local devices are set in one point units for Q series, the bit devices, word devices
(excluding T/ST/C), and T/ST/C for MELSEC iQ-R series are set in 64-point units, 4-point units, and 32-point units,
respectively. Since the setting units are different between Q series and MELSEC iQ-R series, the CPU parameters are
automatically changed after changing the module type, resulting in the increase of the number of device points.
■Devices that are not supported by MELSEC iQ-R series/MELSEC iQ-F series module
• When the devices, which are not supported by MELSEC iQ-R series/MELSEC iQ-F series module, are used in a program
created with GX Works2, they are changed to SM4095/SD4095. In addition, when GX Works2 project consists of ladder
programs, the devices which are changed to character string by an instruction are changed to "SM4095"/"SD4095". To
search character strings, refer to the search function. (Page 172 Searching/Replacing Character Strings)
• When S devices or R devices have been set to the device memory data/device initial value data created with GX Works2,
they are deleted.
■Execution order
The execution order is handled differently between Structured Ladder/Function Block Diagram language in GX Works2 and
Function Block Diagram/Ladder Diagram language in GX Works3. Display the execution order and check it.
■Return element
A return element operates differently between Structured Ladder/Function Block Diagram language in GX Works2 and
Function Block Diagram/Ladder Diagram language in GX Works3. For details on the return element in GX Works3, refer to the
following section.
Page 140 Common element
3 PROJECT MANAGEMENT
3.2 Creating Project Files 57
■Inverting contact in Function Block Diagram/Ladder Diagram
Inverting the contact is available for I/O arguments of function elements/function block elements in Function Block Diagram/
Ladder Diagram language in GX Works3. For more details, refer to the following section.
Page 143 Inverting contact on the input/output
When the contact on the elements other than above is inverted in a Structured Ladder/FBD program of GX Works2, the
connectors of those elements are deleted. Correct the program to provide the equivalent operation to the Structured Ladder/
FBD program.
■Wired OR
Function Block Diagram/Ladder Diagram language in GX Works3 does not support wired OR of FBD elements. Correct the
program to provide the equivalent operation to the Structured Ladder/FBD program of GX Works2 since a conversion error is
caused.
■Program layout
The program layout may be slightly changed due to the difference between the Structured Ladder/FBD editor of GX Works2
and the FBD/LD editor of GX Works3. Correct the layout.
3 PROJECT MANAGEMENT
58 3.2 Creating Project Files
Saving projects
Save the project on the personal computer or another data storage device.
When saving the project with the workspace format, click the [Save as a Workspace Format Project] button to switch the
screen.
Operating procedure
Set the items and click the [Save] button.
Overwriting projects
Operating procedure
Select [Project] [Save] ( ).
3 PROJECT MANAGEMENT
3.2 Creating Project Files 59
Deleting projects
Delete the project saved on the personal computer or another data storage device.
Window
[Project] [Delete]
Operating procedure
Select the project ( ) to be deleted, and click the [Delete] button.
Precautions
When the project file does not exist after deleting a workspace format project, the message to confirm whether to delete the
workspace itself is displayed. If the project is deleted, the workspace folder is deleted, but workspacelist.xml remains.
3 PROJECT MANAGEMENT
60 3.2 Creating Project Files
3.3 Managing Project Data
This section explains how to create each data.
Precautions
For data names, use the characters in the Unicode Basic Multilingual Plane.
If the characters outside the Unicode Basic Multilingual Plane are specified, they may not be edited in the program.
Creating project
Create a new data in the project.
Window
[Project] [Data Operation] [New Data] ( )
Operating procedure
Set the items and click the [OK] button.
For the setting items when "Function Block" or "FB File" is selected as data type, refer to the following section.
Page 180 Creating function blocks
For the setting items when "Function" is selected as data type, refer to the following section.
Page 183 Creating functions
3 PROJECT MANAGEMENT
3.3 Managing Project Data 61
Precautions
When function block and function data are added by the above method, the FB file and FUN file will be in the unconverted
state.
Once the FB file and FUN file is changed from the converted state to the unconverted state, all programs in which the function
blocks and functions are used will be in the unconverted state.
Editing project
Copying/pasting data
Utilize data of a project being edited or other projects.
For projects in which module type is different between copy source and copy destination, data cannot be copied/pasted.
Operating procedure
1. Select the data name to be copied on the Project view.
3. Select the target folder (one-level upper hierarchy of the copy source data) on the Project view or other project.
Precautions
• The pasted program will be in the unconverted state.
• The structures/function blocks used in the global label cannot be copied.
If the same structure/function block name does not exist in the folder where the data is to be pasted, the pasted data will be
an undefined data type.
• Pasting of global label data is canceled when the maximum number of labels (20480) is exceeded. Adjust the number of
global labels in the copy destination and the copy source, and retry pasting data.
■Program file
When copying a program file, the program blocks under the selected program file will be copied.
When pasting data to other project, the common device comments can also be copied by setting the following option.
• [Tool] [Options] "Edit" "Copy" "Operational Setting"
Deleting data
Delete a data in the open project.
Operating procedure
1. Select the data name to be deleted on the Project view.
3 PROJECT MANAGEMENT
62 3.3 Managing Project Data
Property
Display the properties of data such as folders, parameters, and programs.
Titles and comments can be added to each data.
Window
[Project] [Data Operation] [Properties] ( )
Operating procedure
Set the items and click the [OK] button.
Titles
The title set to a data is displayed with a data name on the Navigation window.
The title is also displayed on the "Online Data Operation" screen when writing/reading data to/from the programmable
controller.
3 PROJECT MANAGEMENT
3.3 Managing Project Data 63
3.4 Changing Module Type of Project
Change the module type of the project being edited to other module type.
When a revision has been registered in the project revision, the revision will be succeeded after the change of module type.
The module type cannot be changed while performing monitoring function such as program monitor and the Device/buffer
memory batch monitor.
FX5CPU does not support this function.
Window
[Project] [Change Module Type]
Operating procedure
Select the module type to be changed, and click the [OK] button.
Precautions
• The changed module type cannot be restored. Save the project data in advance before changing the module type.
Note that, the project after the change will be in unsaved state.
• When module labels of CPU module are used, the module labels before changing the module type are deleted, and the
module labels after changing the module type are added. Therefore, the program may be required to be corrected after the
module type is changed.
3 PROJECT MANAGEMENT
64 3.4 Changing Module Type of Project
3.5 Verifying Projects
Verify the open project against the other project.
Use this function to compare the content of two projects or to locate the changes made in programs.
Performing verification
Window
3
[Project] [Project Verify]
Operating procedure
1. Specify the project to "Verify Destination" in [Verification Data Selection].
The target project file can be specified by dragging and dropping it.
Precautions
• Verification with GX Works2/GX Developer project cannot be performed.
• Projects to which the security is set can be verified when both verify source data and verify destination data are not read-
protected.
Parameters
■Verification levels
Select the parameter verification level from [Options] tab on the "Project Verify" screen.
3 PROJECT MANAGEMENT
3.5 Verifying Projects 65
Checking verification result
Check the details of mismatched data on the Verify Result screen.
Updated verify source data is displayed in the verification results.
Therefore, the verification result of updated verify source data can be checked without performing the Project Verify function
again after mismatched data is modified.
Operating procedure
1. Double-click the row of the data to display the details on the Verify Result screen.
Precautions
For verification of program files, the verification result may be inconsistent due to the difference of the conversion results if the
version of GX Works3 with which the program files have been converted differs between the verify source and verify
destination. In this case, convert the all programs in both the verify source and the verify destination with the same version GX
Works3, and perform the verification again.
Ladder programs
Double-click a program displayed on the Verify Result screen to display the details of the ladder program of the verification
target in a list format.
ST programs
■Detailed display
By double-clicking a row on the verification result, the cursor is moved to the corresponding row on the ST editor.
FBD/LD programs
Double-click a FBD/LD program displayed on the Verify Result screen to display the details of the FBD/LD program of the
verification target in a list format.
However, the detailed display in a list format is not available for the Verify with PLC function, or the Project Verify function
without performing "Rebuild All" to the FBD/LD programs read from the CPU module.
3 PROJECT MANAGEMENT
66 3.5 Verifying Projects
Parameters
When the same profile is not registered to the verify destination and the verify source, the verification result may be a
mismatch.
Double-click a parameter displayed on the Verify Result screen to display the details of the parameter of the verification target
in a table format.
Operating procedure
Select [Edit] [Export to File] ( ).
3 PROJECT MANAGEMENT
3.5 Verifying Projects 67
3.6 Project Revision
Register the project revision and manage the revision information.
The old project status can be restored using the registered revision information.
Window
[Project] [Project Revision] [Register Revision]
Operating procedure
Set the items and click the [OK] button.
3 PROJECT MANAGEMENT
68 3.6 Project Revision
Displaying revision list
Window
[Project] [Project Revision] [Revision List]
The "Detailed Revision Information" screen is displayed by selecting the revision information, and then right-clicking and
selecting [Details] in the shortcut menu.
Registering revision
Click the [Register] button to register the project revision.
Operating procedure
1. Select the revision to be restored, and click the [Restore] button.
Precautions
Before restoring a project, register the revision of the project being edited. If any of revision registered before is restored and
the project is saved without registering the revision of the project being edited, the project before the restoration will be
overwritten.
Operating procedure
Select the revision to be deleted, and click the [Delete] button.
3 PROJECT MANAGEMENT
3.6 Project Revision 69
Verifying revision
Check the revision information against revision information registered before or the project being edited.
Operating procedure
Select the revision to be verified, and click the [Verify] button.
By selecting only one revision, the selected revision information is checked against the project being edited. To verify between
revisions registered before , select two revisions.
The operation method of the verification result is the same as the Project Verify function. For more details, refer to the
following section.
Page 66 Checking verification result
3 PROJECT MANAGEMENT
70 3.6 Project Revision
3.7 Registering Profiles
Register profiles in GX Works3.
Profiles are the data in which the connected device information (such as model names) is stored.
The profiles are managed by each personal computer, and shared within GX Works3 and MELSOFT Navigator. Therefore,
profiles registered in GX Works3 are applied to MELSOFT Navigator.
Before registering profiles, log on the personal computer as the user having the administrator authority, and close the project
in advance.
3
Operating procedure
1. Select [Tool] [Register Profile].
2. Select the file on the "Register Profile" screen, and click the [Register] button.
3 PROJECT MANAGEMENT
3.7 Registering Profiles 71
4 CREATING MODULE CONFIGURATION
DIAGRAM AND SETTING PARAMETERS
In GX Works3, parameters of a programmable controller can be set on the Module Configuration Diagram, as if to configure
the actual system.
The parameters can be configured on the Project view in the same manner as GX Works2.
Window
Double-click "Module Configuration" on the Project view.
●Toolbar
Connection point
Empty
Placing error
Placing objects
2. Select a module from the Element Selection window, and drag and drop it on the base unit placed on the Module
Configuration Diagram in the Step 1.
The available locations are highlighted while dragging the module.
Precautions
• GOT2000/GOT1000 series, general modules, image diagrams, and link files supported by MELSOFT Navigator are not
supported.
• Only bus cables are available. Network connection and serial connection are not available.
• For FX5CPU, bus cables are not supported. In addition, a base unit (slot) is not required. Select the module, and drag and
drop it on the Module Configuration Diagram directly.
Operating procedure 4
Select a figure in "Figure" in the Element Selection window, and drag and drop it onto the Module Configuration Diagram.
Change the text and color of a symbol object on the "Properties" screen.
Operating procedure
1. Select the placed CPU module. Then, right-click and select [Change CPU Model Name] from the shortcut menu.
2. Select the model name after the change on the "Change CPU" screen.
Operating procedure
Select the module to be set to empty, and [Edit] [Module Status Setting (Empty)].
Operating procedure
Select [Online] [Read Module Configuration from PLC].
Operating procedure
Select a module on the Module Configuration Diagram, right-click and select [Property] from the shortcut menu.
Operating procedure
1. Select the module to edit the parameters.
2. Set the items on the Input the Configuration Detailed Information window.
■Fixing parameters
After editing an object on the Module Configuration Diagram, the parameters of the edited object will be undefined status. The 4
operations that the parameters become undefined are as follows:
• Adding or deleting a module
• Removing a module from the slot, or placing the removed module on the slot
For FX5CPU, removing/connecting a module from/to the CPU module
• Cutting and pasting modules
• Connecting modules
• Performing undo/redo
• Changing property of a module
• Performing the Start XY Batch Input function
• Performing the Default Points Batch Input function
• Setting the Module status setting (empty)
• Operations on the Input the Configuration Detailed Information window
The fixed parameters are reflected to the following screens.
• Project view (For a new module information, the module information is added to the Project view.)
• Parameter editor
• I/O Assignment Setting screen
Item Description
Host CPU module For a multiple CPU configuration, only one project which is set as a host CPU can be set.
Other CPU module Set the CPU module which is not set as a host CPU to other station.
The module is displayed in a pale color, same as when the module state setting (empty) is set.
Module controlled by the host CPU module A module that is controlled by the CPU module set as a host CPU.
Module controlled by the other station CPU A module that is controlled by the CPU module set as other station.
module The module is displayed in a pale color, same as when the module state setting (empty) is set.
Available slots for CPU modules Up to four CPU modules can be placed for CPU slot and slot 0 to 6.
The placed CPU modules will be in order from CPU No.1 to 4, from left to right.
CPU module (CPU No.1) = host CPU Module controlled by host CPU module (CPU No.1)
CPU module (CPU No.2) = other CPU Module controlled by other CPU module (CPU No.2)
If the CPU No. of “Control CPU” for the module which has been
controlled by other CPU results in the same number as the host
CPU, the module will be controlled by the host CPU.
Operating procedure
Select [Edit] [Start XY Batch Input] ( ).
Operating procedure
Select [Edit] [Default Points Batch Input].
Operating procedure
1. Select [Edit] [Check] [Power Supply Capacity and I/O Points] ( ).
2. Check the result displayed on the Result of Power Supply Capacity and I/O Points Check window.
Operating procedure
1. Select [Edit] [Check] [System Configuration] ( ).
2. Check the result displayed on the Output window.
No errors
Default setting: Blue/White
Other than default: Black/White
With errors: White/Red
No settings required: Black/Gray
Status icons
Checking parameters
There are two methods for checking parameters:
• Check if there is an input error on the parameter editor.
Click the [Check] button on the parameter editor.
• Check if there is an error in the parameter set in the project.
Select [Tool] [Check Parameter].
Setting parameters
Operating procedure
1. Double-click "Parameter" "System Parameter" on the Project view.
2. Select the items to be set in the [I/O Assignment] tab, [Multiple CPU Setting] tab, or [Synchronization Setting within the
Modules] tab.
Setting parameters
Operating procedure
1. Double-click "Parameter" "(PLC type of the project)" "CPU Parameter"/"Module Parameter"/"Memory Card
Parameter" on the Project view.
The setting screen can also be opened by double-clicking the object of a module on the Module Configuration
Diagram.
Precautions
For the setting values of the parameters, use the characters in the Unicode Basic Multilingual Plane.
If the characters outside the Unicode Basic Multilingual Plane are specified, they may not be edited in the program.
• File Register Setting in File Setting: File Name
• Initial Value Setting in File Setting: Global Device Initial Value File Name
• Program Setting in Program Setting: Program Name
• FB/FUN File Setting in Program Setting: FB/FUN File Name
Setting parameters
Operating procedure
1. Select "Parameter" "Module Information" in the Project view, and select [Project] [Data Operation] [Add New
Module].
Window
The configuration setting screen is displayed from one of the following module parameter items.
• Ethernet: External Device Configuration of Basic Settings
• CC-Link IE Field (master station)*1: Network Configuration Settings of Basic Settings
• CC-Link (master station)*1: Network Configuration Settings of Basic Settings
*1 Not supported by FX5CPU.
For CC-Link IE Field Network, connected devices are detected automatically and also the information can be
reflected to the configuration setting using the [Detect Now] button on the CC IE Field Configuration window.
For details, refer to the following manual.
iQ Sensor Solution Reference Manual
Window
[View] [Docking Window] [Device Reference] ( )
"Displayed Content for Model Name" and "Buffer Memory Display Format" can be selected by clicking the [Display Option]
button.
Displayed items
Item Description
Start I/O No. Select the start I/O number of master station or local station to be displayed on the list.
Slave Station List Displays the information of the slave stations and the range of the refresh devices assigned to the own station.
Multiple devices are displayed in accordance with the link refresh settings of the Module Parameter.
When refresh devices are not assigned, the cells of the refresh device range will be blank.
Link Device List Displays the assignment status of refresh devices on the own station and link devices on the target station.
When link devices are not assigned, the cells of the link device range will be blank.
The cells of "Explanation" will be blank when profile is not registered.
Window
[Project] [Intelligent Function Module] [Module Parameter List]
Operating procedure
Set the items and click the [Close] button.
Item Description
Initial Setting (Count) Unselect the item if it is not set as an intelligent function module parameter.
For a module with no initial settings, "-" is displayed.
Auto-refresh (Count) Unselect the item if it is not set as an intelligent function module parameter.
For a module for which auto refresh is not set, "No Setting" is displayed.
Module Parameter Setting Counts Initial Setting Displays the number of initial settings set as intelligent function module parameters.
Auto Refresh Setting Displays the number of auto refreshes set as intelligent function module parameters.
Window
Select "Parameter" "Module Information" "(module name)" on the Project view, and select [Project] [Data Operation]
[Properties] ( ).
Operating procedure
Set the items and click the [OK] button.
■Q series
Supported module Function name Reference
Analog module Offset/gain setting User's manual of the module used
Q61LD two-point calibration
setting
Q61LD default setting
Create wave output data
Temperature input module Offset/gain setting
Temperature control module Auto-tuning
Sensor correction function
Counter module Preset
Window
[Tool] [Module Tool List]
Operating procedure
1. Select "Parameter" "Module Information" in the Project view, and select [Project] [Data Operation] [Add New
Module].
Precautions
The simple motion module settings are saved in the project of GX Works3 when saving the GX Works3 project.
The files saved in GX Works2 can be read using the Predefined Protocol Support Function of GX Works3.
2. Set the items on the "Predefined Protocol Support Function" screen, and click the [OK] button.
Window
[Tool] [Circuit Trace]
For details on the label types, classes, and data types, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
5 REGISTERING LABELS
94 5.1 About Labels
5.2 Registering Labels
This section explains how to register the labels.
The display format and details of operation settings for each function can be set by setting the following
option.
[Tool] [Options] "Other Editor" "Label Editor Common"
Window
5
■Global label
Project view "Label" "Global Label" "(global label)"
■Local label
Project view "Program" "(execution type)" "(program file)" "(program block)" "Local Label"
●Toolbar
5 REGISTERING LABELS
5.2 Registering Labels 95
Editing rows
■Adding rows
When using the New Declaration (After) function, the selected label is copied and added it to the row right after the specified
row, with a value appended.
If a value is already appended after the label name, the data is copied with an incremented value.
When devices are set for global labels, the data is copied with an incremented device number.
For adding blank rows or setting increment regulation (decimal/hexadecimal), set the following option.
• [Tool] [Options] "Other Editor" "Label Editor Common" "Editor Setting"
Operating procedure
Select [Edit] [New Declaration (Before)]( )/[New Declaration (After)]( ).
Operating procedure
Select [Edit] [Delete Row]( ).
■Sorting labels
Labels can be sorted by clicking a title name of label editor.
For ascending order, is displayed, and as for descending order, is displayed in the title name.
■Filtering display
• If the wild card ('*', '?') is specified as a filtering condition, it is not applied as a filtering condition but displayed strings which
are used '*' and '?'.
• To select the filtering target column, click the boundary on the right side of the column to as shown below and perform
filtering.
• When filtering columns by selecting "Access from External Device", specify '1' after selecting "Access from External
Device". As for it is not selected, specify '0'.
Operating procedure
Select [Edit] [Delete Blank Rows]. ( )
5 REGISTERING LABELS
96 5.2 Registering Labels
Entering information
Label name
Set label names except for the following names:
• A label name that includes a space.
• A label name that begins with a numeral.
• A label name which is same as the one used for devices.
Precautions
For label names, constants, and device initial values, use the characters in the Unicode Basic Multilingual Plane.
If the characters specified with the characters outside the Unicode Basic Multilingual Plane are specified for label names and
constants, they may not be used in programs (ladder, ST, and FBD/LD).
The initial values specified with the characters outside the Unicode Basic Multilingual Plane may not be edited in the program.
■Alias
5
An alternative name for label that is assigned to a label is referred to as 'alias'.
For the data types, classes, initial values, and constants to which the alias function is set, the information of assigned devices/
labels will be succeeded.
Label2 is an arias of
Label1.
●Defined characters
String (the string which is not enclosed by '%' is set without enclosed by '%')
%Type%%Prefix%Label%Row%%Device%
Character string in "Assign (Device/Label)"
Label row number
Prefix by class
Prefix by data type
*The character other than the defined one enclosed by '%' will be blank.
5 REGISTERING LABELS
5.2 Registering Labels 97
Data type Prefix
Counter cd
Long Counter lcd
Retentive Timer std
Long Retentive Timer lstd
Long Timer ltd
Structure st
FB fb
The prefixes that are added depending on the selected class are as follows.
Class Prefix
VAR_GLOBAL G_
VAR_GLOBAL_RETAIN GR_
VAR_GLOBAL_CONSTANT GC_
VAR Not added.
VAR_RETAIN r_
VAR_CONSTANT c_
VAR_INPUT i_
VAR_OUTPUT o_
VAR_IN_OUT io_
VAR_OUTPUT_RETAIN or_
VAR_PUBLIC pb_
VAR_PUBLIC_RETAIN pbr_
●Setting example
■Automatic synchronization
When label names/alias names are changed on the label editor, the changed label names/alias names used in a program
editor or each editor will also be replaced automatically.
The labels are distinguished between global labels and local labels in the automatic synchronization. (Page 109 Entering
global labels/local labels)
The programs in which the replaced labels are used will be in the unconverted state.
If labels names/alias are changed, check if the change affects control programs using the Cross Reference function.
5 REGISTERING LABELS
98 5.2 Registering Labels
Data type
A data type can be selected on the "Data Type Selection" screen displayed by clicking [...] in the data type column on each
label editor as well as the direct input.
There are three kinds of data types; "Simple Types", "Structured Data Type", and "Function Block". The data types that can be
specified differ.
Array can be set for the specified data type.
For details on the data types, structures, and arrays, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
■Simple type
Specify a data type in "Data Type".
The initial value of the data length of a string data type can be set in the option setting.
• [Tool] [Options] "Other Editor" "Label Editor Common" "Data Type Setting"
■Structure
When specifying a structure data as a data type, creating a definition of the structure is required in advance. (Page 101
Creating structure definition)
After creating a structure definition, specify the structure name in "Data Type".
■Function block
When specifying a function block data as a data type, creating a function block is required in advance.
For details, refer to the following section.
Page 180 Creating Function Blocks
After creating a function block, specify the function block name in "Data Type".
Change the array to a two- or Enter the array declaration directly in text.
three-dimensional array For details, refer to the following manual.
MELSEC iQ-R Programming Manual (Program Design)
Class
Select the class in the pull-down list of "Class".
For details on the classes, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
5 REGISTERING LABELS
5.2 Registering Labels 99
Assignment (devices/labels)
Assign the arbitrary devices/labels to the global labels. (Undefined labels can also be assigned.)
A digit-specified bit device (K4M0) and digit-specified word device (D0.1) can be specified. The module labels can also be
assigned as a label.
If do not assign a device/label to the label, a label memory is assigned instead. For details on the label memory, refer to the
following manuals.
MELSEC iQ-R CPU Module User's Manual (Application)
MELSEC iQ-F FX5 User's Manual (Application)
Precautions
When specifying a timer or counter device to "Assign (Device/Label)", the assigned device is regarded as a contact (TS, STS,
CS) if a bit type device is specified to "Data Type".
When "Data Type" is a word type, specified devices are regarded as current values (TN, STN, CN).
Initial value
Set an initial value to the label.
FX5CPU does not support it.
However, if a device is assigned to a global label, the label does not operate with the initial value of the label.
The availability of initial values differs depending on the data types and classes.
The entry method of an initial values is the same as that of the constants of labels. For details, refer to the following manual.
MELSEC iQ-R Programming Manual (Program Design)
Constant
Constant can be set when "VAR_GLOBAL_CONSTANT" or "VAR_CONSTANT" is specified to the class.
The availability of the constants differs depending on the data type and class.
For details on how to enter the constants, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
Comment
Append a comment to the defined labels.
When entering comments on the label editor, press the key and key to insert a line feed (two characters are used)
in a cell.
Two or more comments can be set for one label. Set the display settings of the multiple comments on the "Multiple Comments
Display Setting" screen.
For details, refer to the following section.
Page 42 Setting Comment Display
5 REGISTERING LABELS
100 5.2 Registering Labels
■Copying device comments
The comment of the device assigned to the selected label can be copied to the label editor.
Operating procedure
Select [Edit] [Copy Device Comment] ( ).
Window
Project view "Label" "Structured Data Types" "(structure)"
5 REGISTERING LABELS
5.2 Registering Labels 101
Importing/exporting files
Import/export the data of the label editor to/from a file.
Operating procedure
1. Open the label editor.
5 REGISTERING LABELS
102 5.2 Registering Labels
5.3 Registering Module Labels
This section explains how to register the module labels.
5
To use a module label under arbitrary name, set alias to the module label.
Precautions
■Considerations when registering module labels
Since all the registered module labels are written to a CPU module, the memory capacity of the CPU module may be
exceeded. In this case, perform any of the following operations.
• Delete the module labels that are not used. (Page 96 Deleting rows (deleting labels))
• Change the write target of the global labels to SD memory card.
• For FX5CPU, the writable capacity is the same as that of the CPU module even when data is written to an SD memory
card.
Ex.
'Instance name'_'Module number'.'Label name' GF11_1.zReserveAreaSB00007
Editing structures
When module labels are registered, the definition of the structure in the module labels are registered in "Structured Data
Types" of the Project view.
A defined structure can be copied on the Project view. The copied defined structure name of the module label is changed from
"+" to "_".
5 REGISTERING LABELS
5.3 Registering Module Labels 103
5.4 Registering System Label
This section explains how to register the global labels as the system labels.
System label
Using the system labels controlled by MELSOFT Navigator enables programming with the same label names among the iQ
Works supported products (GX Works3, MT Developer2, GT Designer3).
Once a workspace is saved with MELSOFT Navigator, a database to manage system labels is created in the workspace.
System labels cannot be used in a workspace without the system label database.
Precautions
Since module labels are read only, they cannot be registered as system label.
Displayed items
Item Description
System Label Relation Displays the relation between the global label and the system label.
• Disclose: The status in which the global labels are open as the system labels
• Reference: The status in which the system labels opened by other projects are imported in the global labels
• Blank: The status in which the global labels is not related to the system labels
System Label Name Displays the system label name related to the global labels.
Attribute Displays the attribute of the system label which is related to the global labels.
5 REGISTERING LABELS
104 5.4 Registering System Label
Registering labels in system label database
Disclose global labels created with GX Works3 as system labels.
When registering in the system label database at the first time, create a workspace with MELSOFT Navigator and save
projects of GX Works3 in the workspace in advance.
Operating procedure
1. Display the global label editor.
2. Select the labels to be registered as system label, and click the [Reservation to Register System Label] button.
4. Check the list of labels to be registered, and click the [Register] button.
Precautions
5
The structure array type global labels to which "Structure Array Offset Value" is set cannot be registered as system labels.
Operating procedure
1. Display the global label editor.
3. Select the system labels to be imported, and click the [Import] button.
Operating procedure
1. Display the global label editor.
2. Select the labels of which relation is to be released from the labels registered as system labels.
5. Check the list of labels to be released, and click the [Register] button.
5 REGISTERING LABELS
5.4 Registering System Label 105
Verifying system label information
Compare the system label information of GX Works3 projects to the system label database, and check if there is any
difference.
If differences exist, correct the system label information of the GX Works3 projects, and synchronize the information with the
system label database.
Operating procedure
1. Select [Edit] [System Label] [Execute Verification Synchronous with System Label].
2. Check and correct information on the "Execute Verify and Synchronize with system label" screen.
Operating procedure
1. Select [Edit] [System Label] [Check the changes of System Label Database].
2. Check the information on the "Import Change Contents of System Label Database" screen.
5 REGISTERING LABELS
106 5.4 Registering System Label
PART 3
PART 3 PROGRAMMING
This part explains the functions of the editor to edit a sequence program and the settings of device memory/
device initial values.
6 CREATING PROGRAMS
9 SEARCHING DATA
10 SEGMENTING PROGRAMS
107
6 CREATING PROGRAMS
This chapter explains how to create programs.
■Setting method
To set the execution type, right-click the program name of which execution type to be set, and select [Register Program]
[Initial]/[Scan]/[Fixed Scan]/[Event]/[Standby] from the shortcut menu or drag and drop it on the Project view.
The execution type set on the Project view is applied to "Program" of the CPU parameter.
6 CREATING PROGRAMS
108 6.1 About Programming Function
Entering global labels/local labels
When a label with the same name exists in both global labels and local labels, the label in a program is handled as follows:
• After a global label and a local label are registered, the label names are entered in the program: Treated as a local label.
• After a global label is registered, the label name is entered in the program, and then a local label with the same name is
registered: Treated as a global label.
• After a local label is registered, the label name is entered in the program, and then a global label with the same name is
registered: Treated as a local label.
The global labels and local labels can be distinguished by setting the different color on the "Color and Font" screen.
6 CREATING PROGRAMS
6.1 About Programming Function 109
6.2 Creating Ladder Programs
This section explains how to create ladder programs.
The display format and detailed operations for each function can be set by the following option setting.
[Tool] [Options] "Program Editor" "Ladder Editor"
6 CREATING PROGRAMS
110 6.2 Creating Ladder Programs
●Toolbar
●Ladder editor
Note
Separation bar
(horizontal)
Device assigned
to label
6
Line statement
displayed in the tree
P statement
Operand
I statement
FB instance
Wrapping symbol
(wrapping source)
Inline structured
Wrapping symbol text box
(wrapping destination)
Separation bar
Step number (vertical)
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 111
Displayed items
Item Description Related operation
Mode display area An area that displays mode such as Write/Read/Write ■Switching mode
Mntr/Read Mntr. Page 113 Read mode/Write mode/Monitor read
mode/Monitor write mode
Step number. The start step number of a ladder block.
Device assigned to label A device assigned to a label. ■Settings
Editing and searching/replacing labels displayed on a Page 95 Registering Labels
ladder editor are available. ■Displaying/hiding
A device with any of the following conditions is not [View] [Display Device] ( )
displayed.
• A device that is assigned by converting the program
• When a label is used for array elements
• When using a structure label
Alias An alternative name for a label.
Editing and searching/replacing can be performed for the
labels displayed on the ladder editor.
Comment A comment set to a device/label. ■Entering elements
Page 122 Entering comments/statements/notes
Line statement A comment that is appended to a ladder block.
■Displaying/hiding
Line statement displayed in the tree A line statement that is displayed in the tree of the Project [View] [Comment Display]/[Statement Display]/[Note
view. Display]
P statement A comment that is appended to a pointer number.
I statement A comment that is appended to an interrupt pointer
number.
Note A comment that is appended to a coil/application
instruction in the program.
Inline structured text box An area that can edit ST programs on the ladder editor. ■Insertion
Page 120 Inserting inline structured text
FB instance An entity of a function block used in a ladder program. ■Insertion
Page 115 Inserting function blocks, Page 119
Inserting functions
Operand A value or label name/device name to be operated.
Outline display A symbol that indicates the status (collapse/expand) of a ■Displaying/hiding
ladder block. • [Tool] [Options] "Program Editor" "Ladder
Editor" "Ladder Diagram" "Display Format"
• [View] [Outline] [Show/Hide of Outlines]
1 cell display The rest of a device/label name is omitted by ellipses "..." ■Switching display
in order for the name to be fit in one cell. [View] [Change Display Format of Device/Label Name]
[1 Cell Display]/[Wrapping Ladder Display]
Wrap display A long device/label name is wrapped to be fit in one cell.
If the label name still cannot be displayed in one cell, the
rest of the name is omitted by ellipsis "...".
Left power rail The power rails of a ladder program.
Right power rail
Tool hint The information on device/label where the mouse cursor ■Changing display contents
is placed over is displayed. [Tool] [Options] "Program Editor" "Ladder Editor"
The display contents can be changed. "Tool Hint"
Number of contacts displayed in a The maximum number of cells which are occupied with ■Changing number of contacts
column contacts, coils, and instructions. [Tool] [Options] "Program Editor" "Ladder Editor"
When the maximum number of contacts is exceeded, the "Ladder Diagram" "Display Format"
line will be wrapped automatically.
Wrapping symbols The wrapping symbols are displayed at wrapping source
and wrapping destination.
The same numbers (serial numbers) are assigned to the
wrapping source symbol and the wrapping destination
symbol that are created in pairs.
Wrapping lines cannot be created on the input and output
circuits of an FB instance.
6 CREATING PROGRAMS
112 6.2 Creating Ladder Programs
Read mode/Write mode/Monitor read mode/Monitor write mode
The program cannot be edited directly when the mode is switched to the Read mode/Monitor read mode.
However, performing any of the following operations changes the programs.
• When the source function block name is changed or the function block is deleted
• When input/output labels of the source function block are changed and converted
• When the devices/labels are replaced with the replacement function by specifying the whole project
To prohibit editing the program, use the security function.
• The mode can be changed from the pull-down list on the mode display area.
• When "No" is selected in the following option, the ladder editor can be edited directly same as Write mode in
Read mode.
[Tool] [Options] "Program Editor" "Ladder Editor" "Ladder Diagram" "Display Format" "Use
the Switching Ladder Edit Mode (Read, Write, Monitor, Monitor (Write))"
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 113
Entering ladder programs
This section explains how to enter ladder programs.
For details of ladder symbols, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
or or or
6 CREATING PROGRAMS
114 6.2 Creating Ladder Programs
Drawing lines
Draw a line in the program.
If a line has already been drawn, the line will be deleted.
Operation Draw line
Drag and drop
Keyboard +///
Press the ++ keys/ key to enter the horizontal lines from the cursor position to the next contact/coil/line connection
point consecutively.
Operating procedure
1. Drag and drop a function block element to an arbitrary cell on the sequence program from the Project view or Element
Selection window.
2. Select which to register the function block either as a global label or as a local label in the list of "FB Instance Name"
screen.
When the function block is pasted, the FB instance name is automatically registered as a label on the selected label setting
screen.
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 115
• By entering 'fb.' in the element entry dialog, the options of function block elements are displayed. A function
block element can be entered by selecting it from the options.
• To insert a function block between two consecutive FB instances, select [Edit] [Insert Row] above the
second FB instance first, and then insert the function block on the inserted row.
Place the cursor in the row on which the second FB instance exists, and insert a row.
• To insert a row above an FB instance/function, select a cell on the row with the definition name as shown
below, and select [Edit] [Insert Row].
• To insert a row when either of the input argument or output argument for FB instance/function is other than
BOOL data type, convert the argument to BOOL data type and insert a row, and then return the data type to
the one other than BOOL.
Precautions
Pasting a function block to a sequence program causes the file size to increase.
Pasting the same function blocks to one sequence program repeatedly also causes the size increase of the sequence
program in accordance with the number of pasted function blocks.
6 CREATING PROGRAMS
116 6.2 Creating Ladder Programs
■Displaying FB instance
On the pasted FB instance, label names of I/O variables and their corresponding data types are displayed.
FB instance name
The initial values set on the label editor when creating FB program are also displayed. The initial values set to each FB
instance are not displayed.
Operating procedure
1. Move the cursor to an FB instance.
• The name can be changed directly by moving the cursor on the FB instance and pressing the key.
• The data of the function block can be edited directly by moving the cursor on the FB instance and pressing
the key.
■Replacing FB instances
Operating procedure
1. Move the cursor to an FB instance.
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 117
■Creating input and output circuits of FB instances
Create input and output circuits of the FB instance pasted to a sequence program.
The number of contacts occupied by input circuits/output circuits of an FB instance differs depending on the setting of the
following option.
• [Tool] [Options] "Program Editor" "Ladder Editor" "Ladder Diagram" "Display Format" "Display Connection
of Ladder Diagram"
Setting of the number of displayed contacts Number of contacts in input circuit Number of contacts in output circuit
9 contacts 4 contacts 3 contacts + 1 coil
11 contacts 5 contacts 4 contacts + 1 coil
13 contacts 6 contacts 5 contacts + 1 coil
17 contacts 8 contacts 7 contacts + 1 coil
21 contacts 10 contacts 9 contacts + 1 coil
33 contacts 16 contacts 15 contacts + 1 coil
45 contacts 22 contacts 32 contacts + 1 coil
Operating procedure
1. Select [Convert] [Convert] ( ).
The ladder block is converted, and lines are connected to the input and output labels of the FB instance.
3. Enter elements to the output circuit in the same manner as the input circuit.
Edit the program other than function blocks as well. After complete editing, convert the program.
6 CREATING PROGRAMS
118 6.2 Creating Ladder Programs
■Considerations for using function blocks
• A single function block can be pasted to a single ladder block.
The output of an FB instance cannot be directly connected to the input of another FB instance.
When connecting function blocks each other, use a coil to initially receive the output of a single function block, and then
connect the contact of the coil to the input of the other function block.
• When the label settings of a function block is changed, convert the program or all programs.
• If the function block in which 'VAR_IN_OUT' is existed in the class is used, use the same device/label to both the input and
output which are connected to the label of 'VAR_IN_OUT'. If the same device/label is not used, the program will not be
performed properly. 6
Inserting functions
Insert a function in a ladder program.
For the creation methods of functions, refer to the following section.
Page 183 Creating Functions
Operating procedure
1. Drag and drop a function element to an arbitrary cell on the sequence program from the Project view or Element
Selection window.
• By entering 'fun.' in the element entry dialog, the options of function elements are displayed. A function
element can be entered by selecting it from the options.
• To insert a row after a function was inserted, refer to the point in "Inserting function blocks". (Page 115
Inserting function blocks)
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 119
■Adding/deleting arguments
Only for functions of which number of arguments can be changed, the arguments can be added/deleted.
Operating procedure
1. Move the cursor to a function.
■Replacing functions
Operating procedure
1. Move the cursor to a function.
Operating procedure
Select [Edit] [Inline Structured Text] [Insert Inline Structured Text Box] ( ).
The editing method of the inline structured text program is the same as that of Structured Text. (Page 134 Entering
programs)
• Enter 'STB' on the element entry dialog to insert an inline structured text box.
• When inserting inline structured text as a parallel circuit, draw lines for the parallel circuit first, and then
insert the inline structured text box.
Insert an inline structured text box on the position of the parallel circuit.
Precautions
• Both an FB and inline structured text box cannot be used entered in a ladder block.
• Inline structured text box cannot be connected to the input/output of FB instance.
• The label of which data type is pointer cannot be used in the inline structured text.
• If the row that includes an inline structured text box is deleted, the whole ladder block is deleted.
6 CREATING PROGRAMS
120 6.2 Creating Ladder Programs
Pasting from each screen
Paste a label name/device name by dragging and dropping from the editor such as label editor and device comment editor.
By dragging and dropping a bit type label/device in a blank cell, a contact is inserted automatically and its label name/device
name is displayed.
Additionally, when dragging and dropping a bit type label/device to the right end of the cell, a coil is inserted automatically and
its label name/device is displayed.
A word type device/label can be pasted by dragging and dropping on the operand of an instruction.
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 121
Entering comments/statements/notes
This section explains the basic operations for editing comments, statements, and notes.
Entering/editing comments
Enter or edit a device/label comment.
To check the entered comments on the ladder editor, change the setting to display comments.
• [View] [Comment Display]
The device comments edited or added on the ladder editor are reflected to the device comments set to the following option.
• [Tool] [Options] "Project" "Device Comment Reference/Reflection Target"
How to enter/edit Operating procedure
On the "Input Device Comment" 1. Select [Edit] [Documentation] [Edit Device/Label Comment]. ( )
screen 2. Select the cell and press the key or double-click it.
3. Enter a comment in the "Comment" column.
After entering comments is completed, select [Edit] [Documentation] [Edit Device/Label Comment] ( ) again.
On the element entry dialog 1. Select a cell and press the key.
2. Click on the element entry dialog and click the [OK] button.
3. Enter the comment to "Comment" column.
6 CREATING PROGRAMS
122 6.2 Creating Ladder Programs
Entering/editing statements
Add a comment to a ladder block using the statement (line statement, P statement, or I statement) in order to make the
processing flow easy to understand.
To check the entered statements on the ladder editor, change the setting to display the statements.
• [View] [Statement Display]
For details on the statements, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
How to enter/edit Operating procedure
On the Enter Statement screen 1. Select [Edit] [Documentation] [Statement]. ( )
2. Select the cell and press the key, or double-click it.
3. Enter a statement.
Before entering P statement/I statement, select the cell of a pointer number or interrupt pointer number.
When "Display in Navigation Window" is selected, "[Title]" is added in front of the line statement. 6
After entering statements is completed, select [Edit] [Documentation] [Edit Statement] ( ) again.
On the element entry dialog 1. Select the cell and press the key.
2. Enter a statement after entering ';' for 'In PLC' and ';*' for 'In Peripheral'.
When displaying a statement on the Navigation window, enter [Title] after ';' or ';*'.
For P statement/I statement, enter a statement following the entry of the displayed pointer number or interrupt pointer
number.
Precautions
';' cannot be prefixed to a line statement.
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 123
■Editing statements
After editing a statement, the program will be in the unconverted state.
■Displaying list
Display the line statements used in the ladder program in a list format.
The cursor is moved to the location where the selected line statement is used.
Window
[Find/Replace] [Line Statement List] ( )
k
clic
b le-
D ou
Double-click
6 CREATING PROGRAMS
124 6.2 Creating Ladder Programs
Entering/editing notes
Append a comment to coils/application instructions using Note in the program in order to make it easier to understand the
content of program.
To check the entered notes on the ladder editor, change the setting to display the notes.
• [View] [Note Display]
For details on the notes, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
How to enter/edit Operating procedure
On the "Enter Note" screen 1. Select [Edit] [Documentation] [Edit Note]. ( )
2. Select the cell and press the key or double-click it.
3. Enter a note.
After entering notes is completed, select [Edit] [Documentation] [Edit Note] ( ) again.
On the element entry dialog 1. Press the key. 6
2. Enter notes following the displayed device/instruction after entering ';' for 'In PLC' and ';*' for 'In Peripheral'.
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 125
Inserting/deleting NOP instruction
Insert or delete a NOP instruction to adjust step numbers of a program.
The step number changed by the NOP instruction is reflected to the ladder editor after converting the program.
Operating procedure
■Batch insertion
1. Select a cell to be insert.
3. Set the number of NOPs on the "NOP Batch Insert" screen and click the [OK] button.
■Batch deletion
1. Select [Edit] [NOP Batch Delete].
Cutting/coping elements
Select an instruction, range, or ladder block, and cut/copy it.
Select a row when copying a function/function block.
Pasting elements
Paste the cut/copied elements.
For "Insert mode" (press the key to switch for "Overwrite mode"), the rung is inserted above the position of the cursor.
For "Overwrite mode", the row/column will be inserted automatically and pasted by selecting [Edit] [Insert and Paste].
Precautions
If the elements as shown below are selected to set a range, the vertical line on the right side cannot be pasted.
6 CREATING PROGRAMS
126 6.2 Creating Ladder Programs
Pasting device number/label name consecutively
Increment (+1) and paste a device number and label name consecutively in the cut/copied ladder block.
Operating procedure
1. Select [Edit] [Continuous Paste].
2. Set the items on the "Continuous Paste" screen, and click the [Execute] button.
Ex.
Set the following on the "Continuous Paste" screen.
Number of Continuous Pastings: 2, Increment Value: 1, Paste direction: Down
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 127
Changing ladder blocks temporarily
Change the operation of specific ladder block temporarily.
Using the temporary changing function, the program for debugging can be changed without losing the source program,
therefore the debug process will be improved efficiently.
Precautions
When opening the project, which contains the temporarily changed ladder program, in GX Works2 Version 1.008J or earlier,
the background color of disabled ladder block is not changed. Besides, the Apply the Changes operation and the Restore the
Changes operation can not be performed.
Temporary changing
Operating procedure
1. Select the ladder block to be changed, and then select [Edit] [Temporarily Change Ladders] [Temporarily Change
Ladders] ( ).
6 CREATING PROGRAMS
128 6.2 Creating Ladder Programs
3. Edit the copied ladder block.
Edit
Temporarily changed
ladder block
By changing the copied ladder block to the NOP instruction, the specified ladder block is disabled temporarily.
6
Precautions
In a program of function/function block, a pointer device can not be used temporarily. Only pointer type label is applicable.
Operating procedure
Select the ladder block from [TemporaryStart] statement to [TemporaryEnd] statement, and then select [Edit] [Temporarily
Change Ladders] [Apply the Changes] ( )/[Restore the Changes] ( ).
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 129
Considerations for editing the temporarily changed ladder block
When the temporarily changed ladder block is edited containing the contents listed in the following table, the program may not
be performed normally.
Description
Statement Delete/cut a statement.
Insert a ladder block between the [TemporaryModify] statement row and the temporarily changed ladder block (which is the row
setting a pointer).
Delete the [TemporaryEnd] statement row and NOPLF instruction.
Insert a ladder block/a statement/NOPLF instruction between the [TemporaryEnd] statement row and NOPLF instruction.
Insert a statement before and after the [TemporaryStart] statement row.
JMP instruction, Pointer Edit/delete a JMP instruction or a pointer.
Ladder block Edit a disabled ladder block.
Delete a disabled/temporarily changed ladder block.
Copy and past a disabled/temporarily changed ladder block.
Operating procedure
1. Select the cell where the target instruction is entered.
6 CREATING PROGRAMS
130 6.2 Creating Ladder Programs
Searching for/replacing data in programs
The search functions that can be used in ladder editor are as follows.
Function name Description Reference
Simple search for instruction Search for a device/label and move the cursor. Page 131 Simple search for instruction
devices/labels devices/labels
Jump Move the cursor on the specified step number. Page 131 Jump
Cross reference Checks the device and label declaration location and referenced location in a list. Page 167 SEARCHING DATA
Device list Checks the usage of devices.
Search and replace • Searches for and replaces a device name, label name, instruction name, and
character strings.
• Changes open/close contact.
• Replaces devices in batch.
Operating procedure
1. Press the key on the ladder editor. 6
2. Enter the device/label and click the [Find] button on the "Find" screen.
Jump
Specify the step number, and move the cursor on the ladder editor.
Operating procedure
1. Select [Find/Replace] [Jump].
2. Specify a step number on the "Jump" screen, and click the [OK] button.
On the program editor, pressing a numeric key on the keyboard enables to display the "Jump" screen.
6 CREATING PROGRAMS
6.2 Creating Ladder Programs 131
6.3 Creating ST Programs
This section explains how to create ST programs.
The display format and detailed operations for each function can be set by the following option setting.
[Tool] [Options] "Program Editor" "ST Editor"
Configuration of ST editor
The ST editor is a language editor in text format for creating programs in Structured Text.
Spaces, tabs, and line feeds can be entered between keywords and variable names of the ST control syntax.
Terms and symbols that configure the program is referred to as a token.
Window
Project view "Program" "(execution type)" "(program file)" "(program block)" "Program"
●Toolbar
●ST editor
Error display
Separation bar
Highlight display
Displayed items
Item Description Related operation
Icon display area The area to display icons. ■Types of icon
Page 133 Types of icon
Line number The line numbers of a program. ■Changing display contents
[Tool] [Options] "Program Editor" "ST Editor" "Editor Display
Highlighted display The line on which the cursor is placed is highlighted.
Items"
Error display A syntax error of the program is displayed.
Outline display Symbols to display/hide the text blocks are displayed. ■Displaying/hiding
• [Tool] [Options] "Program Editor" "ST Editor" "Editor
Display Items"
• [View] [Outline] [Show/Hide of Outlines]
Tool hint display The information where the mouse cursor is placed over is ■Checking/changing display contents
displayed. [Tool] [Options] [Program Editor] "ST Editor" "Tool Hint"
The display contents can be checked and changed by the
option setting.
6 CREATING PROGRAMS
132 6.3 Creating ST Programs
■Colors of programs (default)
Figure Description Default color
(1) Syntax Blue
(2) Device Black
(3) Operator Black
(4) Global label Magenta
(5) Error Red
(6) Local label Magenta
(7) Constant Black
(8) String constant Black
(9) Comment Green
■Types of icon
Icon Description
This icon is displayed on the line jumped from the Cross Reference window. 6
This icon is displayed on the error line jumped from the Output window.
6 CREATING PROGRAMS
6.3 Creating ST Programs 133
Entering programs
This section explains how to enter ST programs.
For the functions/instructions used in ST programs, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
Precautions
When an ST editor is set to read-only or monitoring, the program cannot be edited.
6 CREATING PROGRAMS
134 6.3 Creating ST Programs
Inserting function blocks
Insert a function block to an ST program.
For the creation methods of a program in a function block, refer to the following section.
Page 180 Creating Function Blocks
Operating procedure
1. Drag and drop a function block to an arbitrary position on the ST editor from the Project view or Element Selection
window.
2. Enter the information of a label (FB instance) on the "Undefined Label Registration" screen.
3. Enter the values for the input variables and output variables.
Ex.
When the defined function block is "MYTIMER"
[Details of defined function block]
Label name: FB_MYTIMER
Input variable: Setting_value_1_second, Setting_value_10_seconds, Setting_value_100_seconds, Start, Stop
Output variable: In_operation, Timer_up_1, Timer_up_2
6
The example of entering ST program are shown below.
Label name Input variable Device that assigns a value to an input variable
The output of the function block can be obtained by specifying the output variable name with a period (.) suffixed to the
function block name.
Enter an instruction to obtain the output after performing the function block call.
Inserting functions
Insert a function in an ST program.
For the creation methods of FB programs, refer to the following section.
Page 183 Creating Functions
Operating procedure
1. Drag and drop a function to an arbitrary location on the ST editor from the Project view or Element Selection window.
Inserting indention
A tab is inserted as an indentation at the head of a new line automatically when a line feed is inserted during program editing.
The tabulator length can be set in the following option setting.
• [Tool] [Options] "Program Editor" "ST Editor" "Edit Operation"
6 CREATING PROGRAMS
6.3 Creating ST Programs 135
Inserting comments
Enter comments which do not affect the program processing. Or, comment out/uncommented the already entered programs
in batch.
Operating procedure
■Entering a comment
• When the line is one: Enter a comment after entering slashes '//'.
• When specifying the range: Enclose the comment in '/*' and '*/', or '(*' and '*)'.
2. [Edit] [Comment Out of Selected Range] ( )/[Disable Comment Out of Selected Range] ( )
Operating procedure
1. Enter the label name to be registered on the ST editor.
2. Select the token of a label name, and select [Edit] [Register Label] ( ).
3. Set the items on the "Undefined Label Registration" screen, and click the [OK] button.
Operating procedure
1. Select the token of which syntax is to be displayed.
Select [Edit] [Mark Template (Left)] ( )/[Mark Template (Right)] ( ), or press the + + keys/
keys to set an argument of the template in the selected status one by one.
6 CREATING PROGRAMS
136 6.3 Creating ST Programs
Displaying instruction help
Check the instructions used in an ST program on e-Manual Viewer.
To check the instructions, the files of the corresponding programming manual must be registered to e-Manual Viewer.
The applicability of help display is shown below.
Token type Applicability
Operator
Control syntax
FB
Function
Constant, variable, comment
Operating procedure
1. Place the cursor on the token of the target instruction.
*1 Search with a device name except for the device suffix part.
Jump
Specify the line number and move the cursor on the ST editor.
Operating procedure
1. Select [Find/Replace] [Jump].
2. Enter a line number of the program on the "Jump" screen, and click the [OK] button.
6 CREATING PROGRAMS
6.3 Creating ST Programs 137
6.4 Creating FBD/LD Programs
This section explains how to create FBD/LD programs.
The display format and detailed operations for each function can be set by the following option setting.
[Tool] [Options] "Program Editor" "FBD/LD Editor"
Window
Project view "Program" "(execution type)" "(program file)" "(program block)" "(worksheet)"
●Toolbar
●FBD/LD editor
Comment
LD element
FBD element
Connection point
Connector
Tool hint
Displayed items
Item Description Related operation
Comment A comment set to a device/label. ■Displaying/hiding
[View] [Comment Display]
LD element An element that constitutes a ladder program. ■Types of element
Page 139 LD element
FBD element An element that constitutes a FBD program. ■Types of element
Page 139 FBD element
Common element A common element used regardless of program language. ■Types of element
Page 140 Common element
Connector A line that connects the connection points between elements.
It is displayed by placing an element to be connected closer to the
connection point on the connection target.
Network A single network (a single block) composed of all elements connected ■Releasing from a network
together. Select the element to be released, and move it with the
key held down.
6 CREATING PROGRAMS
138 6.4 Creating FBD/LD Programs
Item Description Related operation
Execution order The execution order of a program is displayed. ■Displaying/hiding
[Display] [Display Execution Order]
Automatic When a connector cannot be displayed due to the conditions where an
connector element is placed, a number is displayed automatically.
The same number of automatic connector indicates that they are
connected.
Connection point A terminal point to connect elements with a connector. ■Inverting contact
By adding an element while a connection point is being selected, the Page 143 Inverting contact on the input/output
element can be added with it connected already.
Smart tag An operation button displayed around the selected element. ■Displaying/hiding
Relevant functions can be performed by clicking it. [Tool] [Options] "Program Editor" FBD/LD Editor"
"Smart Tag"
Tool hint The information on device/label and FB/FUN where the mouse cursor ■Changing display contents
is placed over is displayed. [Tool] [Options] "Program Editor" "FBD/LD Editor"
"Tool Hint"
A font color, and fonts can be changed. However, this dose not apply to the comment elements.
Page 41 Checking and Changing Colors and Fonts
Element
6
The elements that can be used in FBD/LD program are shown below:
■LD element
Element Name of each part Description
Left power rail element (1) Output connection point The position of a left power rail can be placed at will, and it will be the
(2) Left power rail starting point for creating a ladder program.
(1)
(2)
■FBD element
Element Name of each part Description
Variable element (1) Input connection point Specify the device/label.
(2) Output connection point Information can be obtained/stored in the specified device/label.
(3) (3) Label comment/device comment*1 It is switched to a constant element by entering a constant.
(4) (4) Device/label
(1) (2)
Constant element (1) Output connection point Specify a constant.
(2) Constant value The specified constant can be output.
(2)
It is switched to a variable element by entering a device/label.
(1)
6 CREATING PROGRAMS
6.4 Creating FBD/LD Programs 139
Element Name of each part Description
Function block element (1) Input connection point It indicates a block for function corresponding to the data type.
(2) Output connection point It is used with an FB instance name assigned to each element.
(4)
(3) (3) FB instance name (label) For details on the element, refer to the following section.
(5) (4) Label comment Page 179 SEGMENTING PROGRAMS
(5) Data type
(6) Input/output label (VAR_IN_OUT)
(7) Input/output label (other than
VAR_IN_OUT)
(6)
(1) (7) (2)
Function element (1) Input connection point It indicates a block for function corresponding to the data type.
(2) Output connection point The name is not displayed in the return value.
(3) (3) Data type For details, refer to the following section.
(4) Input/output label (argument) Page 179 SEGMENTING PROGRAMS
(5) Return value
(4)
(5)
■Common element
For a jump element and a return element, inverting contact on its connection point is not available.
Element Name of each part Description
Jump element (1) Input connection point It is used to jump the execution processing from a jump element to a
(2) Label*1 jump label element.
(2)
(1)
Jump label element (1) Label*1 Enter a label to be specified as the jump destination.
(1)
Connector element (1) Input connection point It is used instead of a connector when placing a network in the display
(2) Output connection point range/print range on the editor. The same connector label indicates
(3) (3) Connector label that they are connected.
(2)
(1)
Return element (1) Input connection point It is used to suspend the processing in the middle of processing.
(2) Character string, "RETURN"
(2) (Uneditable)
(1)
6 CREATING PROGRAMS
140 6.4 Creating FBD/LD Programs
Entering programs
This section explains how to enter FBD/LD programs.
Adding an element
Operating procedure
■Using the edit box
Select*1 a cell to which an element is to be added, and enter a label name or data type of FB/FUN directly.
An element name and label name can be edited directly by selecting a placed element and pressing the key.
The following items can be entered:
• Device/label
• Constant
• FB/FUN
*1 The options of instruction/label can be displayed by pressing the and keys.
Inverting contact on connection point of FB/ Only when the data type of the connection point
FUN is one of the following:
• Bit
• Word [Unsigned]/Bit String [16-bit]
• Double Word [Unsigned]/Bit String [32-bit]
• ANY_BIT
• ANY_BOOL
6 CREATING PROGRAMS
6.4 Creating FBD/LD Programs 141
Common operation of element
Operation Operating procedure
Mouse Keyboard
Select To select a single Click the element to be selected. Place the cursor on the element to be selected.
element
To select multiple • Click multiple elements with the / key held down. Select multiple elements by moving the cursor with
elements • Click the background of the FBD/LD editor, and drag the key held down.
diagonally.
To select in unit of Select an element and press the + +
network keys.
To select whole The operation is same as the one to select multiple Press the key and key.
elements elements.
Change a name Double-click the element of which name is to be changed, Select the element of which name is to be changed,
and enter a name. and press the*1/ key, or enter a name.
Move Click the element to be moved, and drag and drop it on the Select the element to be moved, and press the +
desired position. + /// keys.
(By moving an element with the key held down, it can
be separated from the network and moved.)
Connector To connect • Click a connection point, and drag it to a target connection
point.
• Click the element to be connected, and drag it closer to a
target connection point.
To replace Select a connector with the key held down, and
drag and drop it on a connection point of an element.
To insert an element Click an element, and move it to a connected connector with
the key held down. (Only an element which has a
connection point on the same level at the input/output side)
*1 For function element and function block element, this follows the operation for double-clicking, which is selected from [Tool] [option]
"Program Editor" "FBD/LD Editor".
2. Select [Edit] [Change FB/FUN Data], and enter the data type to be changed.
The element also can be replaced by dragging an element from the Element Selection window and dropping it
on the element to be changed.
For function elements, similarly, the data type can be changed by selecting a function element and entering a
new data type directly.
Adding/deleting arguments
Only for functions of which number of arguments can be changed, the arguments can be added/deleted.
Operating procedure
1. Move the cursor to a function element.
6 CREATING PROGRAMS
142 6.4 Creating FBD/LD Programs
Updating undefined FB/FUN
When a definition of a pasted element is unsure due to its deletion or change, or an element without the definition information
is pasted, it is displayed as shown below resulting in an error.
Select [Edit] [Update FB/FUN], and update the definition information.
When the data type of FB/FUN has been changed, select [Edit] [Update FB/FUN].
Operating procedure
Select the element of which contact is to be inverted, and select [Edit] [Easy Edit] [Invert Contact (Open/Close)] ( ).
Displaying Help
Check the elements used in the FBD/LD program on e-Manual Viewer.
To check, the files of the corresponding programming manuals are required to be registered in e-Manual Viewer.
Operating procedure
1. Select the element to be checked.
6 CREATING PROGRAMS
6.4 Creating FBD/LD Programs 143
Searching for/replacing data in programs
The search functions that can be used in FBD/LD editor are as follows.
Function name Description Reference
Cross reference Checks the device and label declaration location and referenced location in a Page 167 SEARCHING DATA
list.
Device list Checks the usage of devices.
Search and replace • Searches for and replaces a device name, label name, and character
strings.
• Changes open/close contact.
• Replaces devices in batch.
6 CREATING PROGRAMS
144 6.4 Creating FBD/LD Programs
6.5 Registering Device Comments
This section explains the features and setting methods for device comments.
Device comments
There are two kinds of device comments; Common device comment and device comment for each program ('Each program
device comment').
GX Works3 supports global device comment/local device comment of GX Works2, and comment/comment by program of GX
Developer.
Up to 16 comments can be set for one device. (Page 42 Setting Comment Display)
Set the comments in Japanese, English, and Chinese and apply then by switching the language.
Difference between device comment and label comment
Device comment is a comment data to be added to devices, and read from/write to CPU module.
Label comment is a comment to be added to the defined labels.
'Each program device comment' can be created under the different data name from the sequence program. However, the
comment will not be linked with the sequence program.
To make the comments relate to the sequence program, the comments should have the same data names as the program
name.
Precautions
For FX5CPU, 'each program device comment' cannot be written to the CPU module.
6 CREATING PROGRAMS
6.5 Registering Device Comments 145
■Setting device comments for each program
When comments are set both in Common Device Comment and in Each Program Device Comment, specify the comment to
be displayed on the program editor by setting the following option.
• [Tool] [Options] "Project" "Device Comment Reference/Reflection Target"
Ex.
When different device comments are set for the same device (M)
Common device comment (COMMENT) Device comments for each program (MAIN)
●When the reference of the device M in the sequence ●When the reference of the device M in the sequence program
program MAIN is set to the common device comment MAIN is set to the device comment for each program
<Options> <Options>
The global device comment, 'Initial Start 1', is The local device comment, 'Stop Device 1', is
displayed as a device comment for M1. displayed as a device comment for M1.
If a comment does not exist in the device comment set for "Device Comment Reference/Reflection Target", the other
comment is displayed.
6 CREATING PROGRAMS
146 6.5 Registering Device Comments
Configuration of device comment editor
Window
• For common device comment: Project view "Device" "Device Comment" "Common Device Comment"
• For device comment for each program: Project view "Device" "Device Comment" "Each Program Device Comment"
"(data name)"
Separation bar
6
Pressing the + keys creates a line break in a comment column.
Double-click
• Fonts can be changed. (Page 41 Checking and Changing Colors and Fonts)
6 CREATING PROGRAMS
6.5 Registering Device Comments 147
Creating device comments
Create device comments for each device on the device comment editor.
Adding device comments make it easy to understand the content of program processing.
When less number of characters are entered, the data size to be written to CPU module can be reduced.
Set the applicable number of characters in the following option.
• [Tool] [Options] "Other Editor" "Device Comment Editor" "Number of Device Comment Editing/Displaying
Characters"
When creating device comments for each program, create a device comment data in advance. (Page 61 Creating
project)
The comments can be entered on a ladder editor. For details, refer to the following section.
Page 122 Entering/editing comments
Operating procedure
1. Enter the device of which comment is to be set in "Device Name".
• By selecting two or more consecutive cells in which the comment with number is inserted, and dragging the
'+' symbol displayed at the lower right corner of the cell, the data of which number is incremented can be
entered.
• When cutting/copying the hidden bit-specified word device comments, select the range and [Edit] [Cut
the Range Including Hidden Bit Specification Information]/[Copy the Range Including Hidden Bit
Specification Information].
The bit-specified comments can also be pasted regardless of the setting of display/hidden by selecting [Edit]
[Paste the Range Including Hidden Bit Specification Information].
Operating procedure
■Detect comments from device data being displayed on the device comment editor
Select "Display Only the Mismatched Comment" in the filter condition on the device comment editor.
■Detect comments from all device data in the device comment data
Select [Edit] [Detect the Mismatched Comment].
Double-click "NG" on the displayed "Detect the Matched Comment of All Devices" screen to edit the device comment editor.
6 CREATING PROGRAMS
148 6.5 Registering Device Comments
Deleting unused device comments
Delete unused comments in batch in a program. To delete the comments, open the device comment editor.
Operating procedure
Select [Edit] [Delete Unused Device Comment].
Deletion target
Device comment type Deletion target
Common device comment Unused device comments in all programs
Each program device comment Unused device comments in the corresponding program
Device comments in all programs
Operating procedure 6
■Delete all device data in the device comment data
Select [Edit] [Clear All (All Devices)].
6 CREATING PROGRAMS
6.5 Registering Device Comments 149
Importing to/exporting from files
Export/import device comments from/to file.
When multiple comments are set, the comments selected in "Available" on the "Multiple Comments Display Setting" screen
are output.
Operating procedure
1. Open the device comment editor.
4. Set the items on the "Device Comment Extended Setting" screen, and click the [OK] button.
Precautions
When a device comment, for which number of characters exceeds applicable amount, is set on the device comment editor, a
warning message is displayed on the Output window and characters exceeded the applicable amount are deleted.
6 CREATING PROGRAMS
150 6.5 Registering Device Comments
Reading sample comments
Set the sample comments of special relays/special registers/CPU buffer memory and Intelligent function modules
automatically.
Open the device comment editor in advance.
FX5CPU does not support sample comments of CPU buffer memory.
Window
[Edit] [Read from Sample Comment]
Precautions
When reading sample comments of Intelligent function module, the data size may exceed the memory capacity of the CPU
module and data may not be written to a CPU module. In this case, prepare an SD memory card.
For FX5CPU, the writable capacity is the same as that of the CPU module even when data is written to an SD memory card.
6 CREATING PROGRAMS
6.5 Registering Device Comments 151
6.6 Checking Programs
This section explains how to check if improper input or inconsistency of programs exists.
FX5CPU does not support this function.
Window
[Tool] [Check Program]
When the check result has an error, the error message is displayed on the Output window. Take corrective actions according
to the displayed contents.
6 CREATING PROGRAMS
152 6.6 Checking Programs
6.7 Converting Programs
This section explains how to convert a created program into a code that can be executed.
The unconverted program name is displayed red in the Project view.
6
Operating procedure
1. Select [Convert] [Convert] ( )/[Rebuild All] ( ).
2. For converting all programs, specify the respective items for "Label Assignment" and "Check Program" on the "Rebuild
All" screen, and click the [OK] button.
The unconverted data can be displayed on the Project view by selecting global label/POU/program file, and
right clicking it and selecting [Expanded/Collapse Tree] [Open Unconverted Data] from the shortcut menu to
display the status of unconverted data.
6 CREATING PROGRAMS
6.7 Converting Programs 153
Considerations after converting (reassigning) all programs
When all programs are converted (reassigned), the label memory area is reassigned to all POUs. If all the converted
programs are written to the CPU module and RUN as they are, the programs may be processed with the device values set
before the program change.
After converting all programs, initialize the labels by the following procedure.
Operating procedure
1. Switch the CPU module to STOP.
2. Select "Device/Label Memory" on the "Memory Management" screen displayed by selecting [Online] [CPU Memory
Operation] to clear the values.
3. Select [Online] [Write to PLC] ( ) to write the changed program files. When the initial values are set to the labels
used in the program, write the label initial value file as well.
Ex.
Assignment
Padding
Padding
Padding
2. In the packing block, the labels are 3. When the data overlaps 64-bit address 4. The data which requires
assigned in order of the label row boundary in one data, a free space 2-word assignment is assigned
number without the label editor sorted. (padding) is inserted. from the start position of 32-bit
boundary.
6 CREATING PROGRAMS
154 6.7 Converting Programs
Assignment Packing block Data type Remarks
order
8 FLOAT [Single FLOAT [Single Precision]
Precision]
9 Timer Timer Page 156 Assignment of timer/retentive timer/counter
10 Retentive Timer Retentive Timer
11 Counter Counter
12 FLOAT [Double FLOAT [Double Precision]
Precision]
13 Long Timer Long Timer Page 156 Assignment of timer/retentive timer/counter
14 Long Retentive Timer Long Retentive Timer
15 Long Counter Long Counter
16 Array All Page 155 Assignment of array
17 Structure All Page 156 Assignment of structure
18 FB instance All
Ex.
6
Assignment
■Assignment of array
For a bit type array, the memory is assigned from the start address (0 bit) of the array, and continuous bits for one-dimensional
element are assigned in word unit. As for the two-dimensional element or later, the same area as the one-dimensional
element is assigned for the number of the dimensional elements continuously.
For an array other than bit type, the area which is required for the element is assigned for the memory of the data type
continuously. A padding is not inserted between the array elements.
Ex.
<Assignment example of bit type two-dimension array_Bit (0..n, 0..m)> <Assignment example of word type two-dimension array_Word (0..n, 0..m)>
Two-dimension Two-dimension
6 CREATING PROGRAMS
6.7 Converting Programs 155
■Assignment of structure
A member of structure is assigned in order of the assignment of the packing blocks. When a structure is declared in the
member of structure, it will be assigned in the order of the packing block. The start assignment position will be decided
depending on the data type which has the largest data length in the structure to be assigned.
Ex.
Assignment
Padding
Padding
Since the largest data length in the member is 2-word, the member
will be assigned from the start position of 32-bit boundary.
Lower address
Upper address
6 CREATING PROGRAMS
156 6.7 Converting Programs
● Long timer, long retentive timer, long counter
Long timer type, long retentive timer type, and long counter type are the maker-defined structures that have the same data
type as MELSEC 32-bit timer device (LT), bit retentive timer device (LST), and bit counter device(LC). The member
configurations of each data type are as follows:
Type Member Data type Description
Long timer S Bit type The same operation as the contact (LTS) of the timer device.
C Bit type The same operation as the coil (LTC) of the timer device.
N Double Word [Unsigned]/Bit String [32-bit] The same operation as the current value (LTN) of the timer device.
Long retentive timer S Bit type The same operation as the contact (LSTS) of the retentive timer
device.
C Bit type The same operation as the coil (LSTC) of the retentive timer device.
N Double Word [Unsigned]/Bit String [32-bit] The same operation as the current value (LSTN) of the retentive timer
device.
Long counter S Bit type The same operation as the contact (LCS) of the counter device.
C Bit type The same operation as the coil (LCC) of the counter device.
N Double Word [Unsigned]/Bit String [32-bit] The same operation as the current value (LCN) of the counter device.
Each of long timer, long retentive timer, and long counter requires 4 words.
Upper address
Operating procedure
1. Double-click the error/warning message displayed on the Output window.
2. Check the corresponding error location and modify the error as instructed by the error/warning message.
Precautions
When error occurs in a function and macro type function block, it may not be possible to jump to the corresponding error
location. In this case, use a function such as the cross reference to check the error.
6 CREATING PROGRAMS
6.7 Converting Programs 157
7 SETTING DEVICE MEMORY
This chapter explains the features and settings of the device memory.
Window
Project view "Device" "Device Memory" "(data name)"
●Toolbar
Separation bar
7
Only the range of the device initial value is displayed when selecting "Specify Range" from "Device Initial Value".
Operating procedure
1. Select [View] [Display Format Detailed Setting] ( ).
2. Set the items on the "Display Format" screen, and click the [OK] button.
The setting can be performed by clicking .
Precautions
• If a deletion is executed after selecting a cell, the device value is cleared to '0'.
• When performing the copy/paste operation on the Device Memory editor, the result is as follows:
The value is pasted in a 16-bit integer [signed] or decimal format string delimited by tab, and displayed with the format of
the editor to be pasted.
• The entering method by prefixing '#' to a device name to regard it as a local device is not supported.
Select "Global Label" or "Local Label" when reading device memory from the CPU module.
Ex.
Set the following value in a word multi-point format.
Device: D2, Device value: 12
Operating procedure
1. Set the display format. (Page 159 Setting display
format)
When the display unit format is bit, the device value can be changed by double-clicking a cell.
Ex.
Set the following values in a word multi-point format.
Device: D8 to D11, Device value: 1234
Operating procedure
1. Set the display format. (Page 159 Setting display
format)
4. Set the items on the "FILL" screen, and click the [OK]
button.
Ex.
Set the following value in a word multi-point format.
Device: D20, Character string: Device memory
Operating procedure
1. Set the display format. (Page 159 Setting display
format)
Precautions
For device memory, use the characters in the Unicode Basic Multilingual Plane.
If the characters outside the Unicode Basic Multilingual Plane are specified, they may not be edited in the program.
Operating procedure
■Delete all data in the device memory data
Select [Edit] [Clear All (All Devices)].
Operating procedure
1. Click the [Detailed Conditions] button.
Window
Project view "Device" "Device Initial Value" "(data name)"
When editing start/last/comment column, press the key and key to display the shortcut menu.
Start
Completed
Operating procedure
1. Set the items on the Device Initial Value editor.
2. Select the data to be utilized from the pull-down list in "Device Memory for Register Diversion", and click the [Register to
Device Memory] button.
■Device range
The devices that can be set for device initial values are within the range set to "Memory/Device Setting" of the CPU
Parameter.
Operating procedure
1. Select "Device Memory for Register Diversion".
To check the values of the device initial values, create a new device memory data and perform "Register to
Device Memory" to it.
• The Find/Replace window can also be displayed by selecting [View] [Docking Window] [Find/Replace] ( ).
• Search/replace can also be switched by selecting from the pull-down list on the "Find and Replace" screen.
• One point of device can be searched/replaced when searching/replacing labels.
• The search starts from the top of the program in the inline structured text box regardless of the cursor position.
Precautions
• The program will be in converted state after the replacement.
• The Replace function cannot be performed during monitoring. Perform the function after ending the monitoring. However, it
can be performed when the ladder editor is in the Monitor write mode.
• The Find/Replace function cannot be performed for the read-protected data. Perform the function after setting the data in
editable mode by disabling the security.
9 SEARCHING DATA
167
Displaying results and error logs
After the All Find/Replace All function is performed, the results and error logs are displayed.
Window
Click the [All Find] button/[Replace All] button on each Find/Replace screen.
Status
Search/replace results
Error logs
Displayed items
Item Description
Status Displays the number of error logs and the search error.
Search/replace results Displays the position information to specify the location where the search/replace function is performed.
Sub status bar Displays the search/replace result.
Error logs Displays the errors in search/replace results.
The jump function is used to jump from any row of search/replace results or logs to the corresponding
character strings.
Right-click the selected row and select [Jump] from the shortcut menu, or double-click the selected line.
9 SEARCHING DATA
168
9.1 Searching/Replacing Devices/Labels
Search for/replace devices/labels in the program.
9
Supported editors: Ladder editor, ST editor, FBD/LD editor, and label editor
When searching a device name, the global label to which the device is assigned will also be found.
Window
[Find/Replace] [Find Device/Label]/[Replace Device/Label] ( )
Operating procedure
Set the items on the screen and click the [Find Next] button.
Item Description
Find/Replace Search Device point Enter the number of points to be searched/replaced, counted from the device entered in the "Find Device/
Options Label" field.
When a label is entered for "Find Device/Label" or "Replace Device/Label", enter 1.
Example) When X50 for "Find Device", X100 for "Replace Device", 3 for "Device Point", and "DEC" for
entered value are set
The devices are replaced as follows:
X50X100, X51X101, X52X102
Digit Select this to search for the entered device and digit-specified bit devices that include the entered device.
Multiple word Select this to search for the entered device and the double-word format word devices that include the
entered device.
Replace Device comment Select this to move a device comment of "Find Device/Label" to "Replace Device/Label". When multiple
comments are set, only the display target comment is moved.
9 SEARCHING DATA
9.1 Searching/Replacing Devices/Labels 169
Examples of device search
■Options
• Option: None
Device specification Search result
M0 M0, K4M0, M0Z0, K4M0Z0
K4M0 K4M0, K4M0Z0
D0 D0, D0Z0, D0.1
D0.1 D0.1
J1\B0 J1\B0, J1\B0Z0, J1Z0\B0, J1Z0\B0Z0, J1\K4B0, J1\K4B0Z0, J1Z0\K4B0, J1Z0\K4B0Z0
• Option: Digit
Device specification Search result
X0 to X3 K1X0
X0 to X0F K4X0
X0 to X1F K8X0
X0Z0 X0Z0, K1X0Z0, K4X0Z0, K8X0Z0
9 SEARCHING DATA
170 9.1 Searching/Replacing Devices/Labels
9.2 Searching/Replacing Instructions
Search for/replace instructions in a program.
9
Supported editors: ladder editor, ST editor, and FBD/LD editor (LD element and FBD element (FB/FUN) only)
The NOP instructions used in the ladder programs cannot be searched.
The following application instructions can also be searched as an output instruction.
SET, RST, PLS, PLF, FF, SFT, SFTP, MC
Window
[Find/Replace] [Find Instruction] ( )/[Replace Instruction]/[Find Contact or Coil] ( )
Element selection area Device instruction input area Element selection area Device instruction input area
Operating procedure
Set the items on the screen and click the [Find Next] button.
9 SEARCHING DATA
9.2 Searching/Replacing Instructions 171
9.3 Searching/Replacing Character Strings
Search for/replace character strings of the data in the project.
Target editor Searchable character string Replaceable character string
Ladder editor All character strings *1 Character strings except for instruction names
ST editor Character strings except for the following
• Monitoring part (displayed on the right side of the screen during monitoring)
• The omitted portion of the collapsed display (example: IF...END_IF)
FBD/LD editor All character strings Character strings except for the following
• Data type of a function
• Data type of a function block
• Input/output label of FB/FUN
• Character string, "RETURN" of a return element
Label editor Character strings except for class name Character strings except for the following
• Class name, data type, device name
Device comment editor Character strings in the comment column
Window
[Find/Replace] [Find String]/[Replace String]
Operating procedure
Set the items on the screen and click the [Find Next] button.
Ex.
Search for a device comment 'abc ; def' by the following character strings.
String to be searched for Search result
Unselected Selected
a abc; def Nothing is found.
abc abc; def abc; def
bc abc; def Nothing is found.
abc ; def abc; def abc; def
9 SEARCHING DATA
172 9.3 Searching/Replacing Character Strings
9.4 Changing Contacts Between Open Contact and
Closed Contact 9
Change contact types from open contact to closed contact, and vise versa.
Supported editors: Ladder editor and FBD/LD editor
Window
[Find/Replace] [Change Open/Close Contact]
Operating procedure
1. Set the items on the screen and click the [Find Next] button.
Item Description
Find/Replace Device Point Enter the number of points to be replaced, counted from the device/label entered in the "Replace Device/Label" field.
Options When a label is entered for "Replace Device/Label", enter 1.
Example) When X100 for "Replace Device", 3 for "Device Point", and "DEC" for entered value are set
The open/close contact of X100, X101, and X102 will be replaced.
2. Click the [Replace] or [Replace All] button to change the contact type.
9 SEARCHING DATA
9.4 Changing Contacts Between Open Contact and Closed Contact 173
9.5 Batch Replacing of Devices and Labels
For devices that can be replaced in batch, refer to the following section.
Page 169 Searching/Replacing Devices/Labels
Supported editors: Ladder editor, ST editor, and FBD/LD editor
Window
[Find/Replace] [Device Batch Replace]
Operating procedure
Set the items on the screen, and click the [Replace All] button.
Item Description
Points Points: Enter the number of points to be replaced, counted from the device specified for "Find Device".
When a label is entered for "Find Device" or "Replace Device", enter 1.
Point Format
Example) When X0 for "Find Device", X10 for "Replace Device", 5 for "Points", and "DEC" for "Point Format" are set
The devices are replaced as:
X0 X10, X1 X11, X2 X12, X3 X13, X4 X14
Replace Options Device Comment Select whether to copy/move a device comment in "Find Device" to "Replace Device".
Select a range of device/label on the program editor by a drag-and-drop operation to register multiple devices/
labels in batch.
9 SEARCHING DATA
174 9.5 Batch Replacing of Devices and Labels
9.6 Displaying Reference Information List of Devices/
Labels 9
Search for devices/labels and display information where the selected devices/label are used in the project in a list.
The Cross Reference window is displayed horizontally when it is docked on top or bottom of the main frame, and displayed
vertically when it is docked on left or right of the main frame.
The display format and detailed operations for each function can be set by the following option setting.
[Tool] [Options] "Find/Replace" "Cross Reference"
9 SEARCHING DATA
9.6 Displaying Reference Information List of Devices/Labels 175
Creating/displaying cross reference information
Create and display the cross reference information of the devices/labels used in the project.
Supported editors: Ladder editor, ST editor, FBD/LD editor, label editor, and parameter editor
Window
[View] [Docking Window] [Cross Reference1/Cross Reference2] ( )
Right-click
Operating procedure
1. Set the display format from the pull-down list displayed by clicking [View] as necessary.
• Pressing the key (+) moves the focus between the editor and the Cross Reference window.
• Pressing the key (+)/+ keys (++) moves the cursor to the previous/next
row.
■Displaying comments
For a ladder, the comments specified in [Tool] [Options] "Project" "Device Comment Reference/Reflection Target" are
displayed as device comments.
Page 145 Device comments
■Automatic synchronization
A function to create the cross reference information of devices/labels selected on the editor automatically.
By clicking "Option" on the Cross Reference window, the Cross Reference window to display the result of automatic
synchronization can be specified in "Operational Setting" of Option.
9 SEARCHING DATA
176 9.6 Displaying Reference Information List of Devices/Labels
Displaying cross reference information
■Display after creation of cross reference information is completed 9
• The data protected by security function cannot be displayed.
• If the program or the option setting is changed, the cross reference information does not correspond with the program.
In order to update the cross reference information, create it again.
• The columns can be sorted in ascending/descending order by clicking the column header. However, the sort cannot be
performed if the structure/array/function block is displayed in the tree.
To clear the display in the tree, unselect [Display Hierarchically] from the pull-down list of [View].
Filtering display
Filter the created cross reference information.
Operating procedure
Enter/select the filter condition, and press the key.
■Filtering condition
The previously entered keywords can be selected from the pull-down list.
For "Data Name" and "Program File Name", search results can also be selected from the list as well as previously entered
keywords.
Ex.
When the filtering condition is set for the device/label column.
Wild card Search target Example Search result
* Specify any character string. *30* ready301, K4X30, K1Y30, K4Y30
? Specify any one character. K4?30 K4X30, K4Y30
[] Specify any one of those characters. [XY]8 X8, Y8
[! ] Specify any one of characters except for the characters in the K4X[!3]0 K4X40
bracket.
[-] Specify character strings within the range in the bracket. D[0-2] D0, D1, D2
9 SEARCHING DATA
9.6 Displaying Reference Information List of Devices/Labels 177
9.7 Displaying Device Usage List
Display the usage of the specified devices.
Supported editors: Ladder editor, ST editor, FBD/LD editor, label editor, and parameter editor
Window
[Find/Replace] [Device List].
Right-click
Operating procedure
Set the items and press the key.
To specify the range to be searched, select the search location of devices/labels by clicking on the tool bar. (Two or more
locations can be selected.)
■Displaying comments
• When searching for data with a selection of one program, the comments specified for "Device Comment Reference/
Reflection Target" under [Tool] [Options] "Project" "Device Comment Reference/Reflection Target" are displayed.
(Page 145 Device comments)
• When searching for data with a selection of multiple programs, common device comments are displayed.
9 SEARCHING DATA
178 9.7 Displaying Device Usage List
10 SEGMENTING PROGRAMS
Segmenting a processing program which is used repeatedly in programs into elements, the elements can be utilized in
sequence programs.
The efficient program development reduces program errors, thus the program quality will be improved. 10
Segmented program file is referred to as POU (Page 50 Data configuration).
Besides, multiple POUs can be organized into a separate file from a project. The file is referred to as a library.
POUs
Two types of POU are able to utilize repeatedly: function blocks and functions.
■Function block
Function block is a program component (POU) created by segmenting a program, which outputs an operation result in
accordance with a value of the internal memory and an input value, into components.
It is classified into the following three types.
POU Description Reference
Function block A function block which is created from a program using the labels which are defined as Page 180 Creating Function
(User-created) input labels, internal labels, and output labels. Blocks
Standard function block A function block which can be used in general. It is prepared in GX Works3 in advance. Page 27 Element Selection
window
Module FB A function block which is created by segmenting a dedicated processing for modules. It Page 182 Enhanced use of
is prepared in GX Works3 in advance. module FBs
■Function
Function is a program component (POU) created by segmenting a program, which always outputs the same operation results
against the same input value without internal memory.
It is classified into the following two types.
POU Description Reference
Function A function block which is created from a program using the labels which are defined as Page 183 Creating Functions
(User-created) input labels and output labels
Standard function A function which can be used in general. It is prepared in GX Works3 in advance. Page 27 Element Selection
window
Library
Library is an element collection of multiple POUs and structures. The elements in the library can be used in multiple projects.
FX5CPU does not support it.
■User library
User library is an element collection which is composed of created POUs and structures.
For details, refer to the following section.
Page 185 Enhanced Use of User Library
10 SEGMENTING PROGRAMS
179
10.1 Creating Function Blocks
This section explains how to create sequence programs using function blocks.
Function blocks
For details of the function blocks, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
Procedure to use
1. Create a data of function block. (Page 180 Creating function block data)
2. Set the local labels to be used in the program of a function block. (Page 181 Setting labels)
3. Create a program using labels. (Page 181 Creating function block programs)
4. Paste the function block on the sequence program. (Page 115 Inserting function blocks, Page 135 Inserting function
blocks)
Precautions
When changing line statements of a function block on the tree, all programs in which the changed FB instances are used will
be in the unconverted state.
*1 This item can be selected only when both "Yes" is selected to "Use EN/ENO" and "FB Type" is "Macro Type".
10 SEGMENTING PROGRAMS
180 10.1 Creating Function Blocks
Precautions
If the function block in which the MC/MCR instruction is used is not executed, the outputs and the current values of timers in
the function block will be reset. (If the instruction is not used, the current values are retained).
Setting labels 10
Set the labels to be used in the program on the label editor.
The operations on the screen is the same as that of other label editor. For details, refer to the following section.
Page 95 Registering Labels
Operating procedure
Select "FB/FUN" "(file name)" "(FB)" "Local Label" on the Project view.
Operating procedure
1. Select "FB/FUN" "(file name)" "(FB)" "Program" on the Project view.
■When using function blocks for a sequence program to be executed multiple times in a single
scan
If a function block, which contains a rising instruction/falling instruction, or an instruction that requires multiple scans before
the execution completion, is used in a sequence program to be executed multiple times in a single scan, the program may not
operate normally.
Item Description
Program type to be executed multiple times in a single • Fixed scan execution type program
scan • Interrupt program
• Subroutine program
• FOR-NEXT instruction program
Unusable instructions for FBs which are used for above Instructions which require multiple scans before the execution completion
programs (JP.READ/JP.WRITE instruction, SORT instruction, SP.FREAD/SP.FWRITE instruction, etc.)
Rising instruction
(P instruction (such as MOVP instruction), PLS, etc.)
Falling instruction
(PLF, LDF, ANDF, ORF, MEF, FCALLP, EFCALLP, etc.)
10 SEGMENTING PROGRAMS
10.1 Creating Function Blocks 181
Enhanced use of module FBs
In GX Works3, Module FB which is composed of the segmented processing for each module (function block), is prepared.
By using the module FBs, the operation settings can easily be performed without programming the processing of each
module.
The manual of a module FB can be displayed from the Element Selection window.
Select a module FB and right-click it and select [Help] from the shortcut menu.
Precautions
Registering the module FBs to be used in advance (at creation of new project) is recommended.
If the module FB to be used is not registered, it may take time to display the module FB after dragging and dropping it.
Editing module FB
The local label and program of a module FB cannot be edited.
However, a module FB can be copied in the Project view and it can be edited.
The copied module FB name is changed from '+' to '_'.
10 SEGMENTING PROGRAMS
182 10.1 Creating Function Blocks
10.2 Creating Functions
This section explains how to create a sequence program using functions.
Functions
10
For details of the functions, refer to the following manuals.
MELSEC iQ-R Programming Manual (Program Design)
MELSEC iQ-F FX5 Programming Manual (Program Design)
Procedure to use
1. Create a data of function. (Page 183 Creating function data)
2. Set the local labels to be used in the FUN program. (Page 183 Setting labels)
3. Create a FUN program using labels. (Page 184 Creating function programs)
4. Paste the function onto a sequence program. (Page 119 Inserting functions, Page 135 Inserting functions)
Creating functions
The following explains how to create functions.
Number of function blocks that can be created
RCPU (other than R04CPU): Up to 8192 in conjunction with function block data
R04CPU: Up to 4096 in conjunction with function block data
FX5CPU: Up to 960 in conjunction with function block data
However, the maximum number of data that can be created may not be reached depending on the configuration of FB files
and FUN files.
Setting labels
Set the labels to be used in the program on the label editor.
The operations on the screen is the same as that of other label editor. For details, refer to the following section.
Page 95 Registering Labels
Operating procedure
Select "FB/FUN" "(file name)" "(Function)" "Local Label" on the Project view.
10 SEGMENTING PROGRAMS
10.2 Creating Functions 183
Creating function programs
Create a program of a function using labels.
The labels set to the local label of the function can be used.
The method for entering programs is the same as that of ladder programs, ST programs, or FBD/LD programs.
Operating procedure
1. Select Project view "FB/FUN" "(file name)" "(function)" "Program".
Converting functions
• Functions (POUs) will not be in the converted state even if the conversion was attempted as long as functions are not used
in the program, or functions are used only in unregistered programs.
• The FUN file will be in the unconverted state when functions are edited. Once the FUN file is changed from the converted
state to the unconverted state, all programs in which the functions are used will be in the unconverted state.
10 SEGMENTING PROGRAMS
184 10.2 Creating Functions
10.3 Enhanced Use of User Library
This section explains how to store created elements in a library file and utilize them in sequence programs.
User library
10
User library collects the elements which are used generally in multiple projects to make them easy to use. It can be used by
importing elements in the library to each project.
The following data can be registered in the user library.
• POUs (Program block, Function block, Function)
• Structures
Project A
Library
Importing only necessary elements
and utilizing them
Element 1 Element 4
Element 2 Element 5
Project B
Element 3 Element 6
Project C
Procedure to use
1. Create a library file. (Page 186 Creating libraries)
3. Utilize elements from a library to projects. (Page 187 Utilizing the elements)
Precautions
When using the library file which is on a network drive or a removable media, save the file in the hard disk of a personal
computer before using.
10 SEGMENTING PROGRAMS
10.3 Enhanced Use of User Library 185
Creating libraries
The following explains about the operations of library such as how to creating and editing.
Creating libraries
Library can be created by exporting a project as a library file.
Library file is a file in which data related with elements in projects is stored.
To prevent libraries and elements from manipulation, set the password when exporting them.
Operating procedure
After creating POUs in the project, select [Project] [Library Operation] [Export Library].
Editing libraries
Elements in a library file can be edited, added and deleted same as project.
When editing the library which is set a password, the password authentication is required.
For details on the maximum number that can be created for each data, refer to the following section.
Page 61 Maximum number of data that can be created in one project
Operating procedure
1. Select [Project] [Open Other Format File] [Open GX Works3 Format Library].
2. Edit POUs.
The editing method is same way as elements of the project.
10 SEGMENTING PROGRAMS
186 10.3 Enhanced Use of User Library
Enhanced use of libraries
Elements in a library can be utilized by registering the library to the library list.
The reference to the library files are registered in the library list.
The information of library files is saved not in a project unit but in a logon user unit on personal computer.
Library 1
10
Library list
Element 1 Element 3
Project
ce Element 2 Element 4
en
fer
Re
Library 2
Library 3
Utilize
(Copy)
Operating procedure
■Registering libraries to be referenced
Select the [Library] tab on the Element Selection window, and select [Library Operation] [Register to Library List] ( ).
Operating procedure
■Paste the element onto the Project view
Drag and drop the element onto the Project view from the [Library] tab on the Element Selection window.
2. For function blocks, select either the global label or the local label to register the elements from the list on the "FB
Instance Name" screen.
Precautions
Elements written in FBD/LD languages, which are utilized from the password protected library, are editable by opening the
project with GX Works3 Version 1.008J.
10 SEGMENTING PROGRAMS
10.3 Enhanced Use of User Library 187
10.4 Enhanced use of MELSOFT Library
Utilizing sample libraries
The following explains how to utilize the sample libraries of GX Works3 prepared as MELSOFT Library in GX Works3.
To obtain the sample libraries, please consult your local Mitsubishi representative.
FX5CPU does not support it.
2. Select a sample library file on the "Open Sample Library" screen and click the [OK] button.
The function blocks of the sample library is displayed on the Project view (for the sample libraries of Mitsubishi Electric FA
products, 'M_FBLIB' is attached, and as for that of the partner products, 'P_FBLIB' is attached).
Precautions
Before utilizing sample libraries, confirm that the types of the current project (CPU module) used is supported by the sample
libraries.
10 SEGMENTING PROGRAMS
188 10.4 Enhanced use of MELSOFT Library
PART 4
PART 4 DEBUGGING AND
OPERATION
This part explains the communication route setting to access a CPU module, reading/writing data, and
monitoring the execution status.
11 SIMULATING PROGRAMS
189
11 SIMULATING PROGRAMS
This chapter explains how to debug programs offline using the Simulation function.
For information on CPU modules supporting the Simulation function, refer to the following section.
Page 281 Using Simulation Function
Writing data
The two simulators interact with
one another to simulate the
sequence control and motion
control.
GX Works3 project
Simulator Simulator
of CPU module of simple motion module
CAUTION
■The Simulation function simulates the actual module to debug a created sequence program. However, this function does not guarantee the operation of the
debugged program.
■The Simulation function uses the memory for simulation to input and output data to/from the I/O module and Intelligent function module. Some instructions/
functions and device memory are not supported. Therefore, the operation results obtained with the virtual programmable controller may differ from those
obtained using the actual module.
After debugging programs using the Simulation function, the normal program debugging, which is performed with the module
connected before the actual operation, is required.
11 SIMULATING PROGRAMS
190 11.1 Simulation Function
11.2 Starting/Stopping Simulation
Start/stop the Simulation function.
The connection destination is GX Simulator3 during simulation, and "Simulation ((system number of the simulator).(CPU
number))" is displayed on the status bar.
Window
[Debug] [Simulation] [Start Simulation] ( )/[Stop Simulation] ( )
11
Operating procedure
Select the checkbox of the data to be written on the "Online Data Operation" screen displayed, and click the [Execute] button.
Cooperative simulation
The cooperative simulation between the simulator of a simple motion module (SMM Simulator) and the simulator of GX
Works3 (GX Simulator3) is available.
Environmental setting
Specify the target before starting simulation in order to simulate the cooperative operations of a sequence program and a
motion control (simple motion module).
Window
[Debug] [Simulation] [Simulation Environmental Setting] ( )
Operating procedure
Select the target module to be run together, and click the [OK] button.
11 SIMULATING PROGRAMS
11.2 Starting/Stopping Simulation 191
Starting cooperative simulation
The following shows how to operate GX Simulator3 and SMM Simulator with them interacted with each other.
■Starting simulation
Operating procedure
1. Select [Debug] [Simulation] [Start Simulation] ( ).
11 SIMULATING PROGRAMS
192 11.2 Starting/Stopping Simulation
12 SETTING ROUTE TO CPU MODULE
This chapter explains how to set the connection destination for accessing a CPU module from GX Works3.
Window 12
[Online] [Specify Connection Destination]
CC-Link
PC side I/F CC-Link IE Field Network
• Double-click the items underlined on the screen to set the details of each item.
• The icons colored yellow indicate that the settings have been applied.
• For FX5CPU, the icons of the unsettable connection destination route are not displayed.
Displayed items
Item Description
Other No Specification Specify this to access the CPU module directly connected to a personal computer.
Station
Other Station (Single Specify this to access the CPU module on other station via only one kind of network (including a multi-tier
Setting Network) *1 system).
Since Ethernet is regarded as equivalent to CC-Link IE Controller Network, CC-Link IE Field Network, and
MELSECNET/10(H), specify "Single Network" for a system in which those are mixed.
Other Station (Co-existence Specify this to access the CPU module on other station via two kinds of network.
Network) *1
Click the [CPU Module Direct Coupled Setting] button on the "Specify Connection Destination" screen to
change the settings to direct connection.
USB connection
The following shows the setting example for accessing the CPU module on the own station with USB from GX Works3.
FX5CPU does not support this connection.
12
Host CPU module
USB port
Ethernet connection
The following shows the setting example for accessing the built-in Ethernet CPU with Ethernet from GX Works3.
For FX5CPU, the Ethernet adapter at the personal computer side, which is used for the Ethernet port direct
connection, can be specified.
Click the [CPU Module Direct Coupled Setting] button on the "Specify Connection Destination" screen, and
select an adapter displayed on the "CPU Module Direct Coupled Setting" screen.
Precautions
■Windows Vista or later
A warning message may appear.
Click the [Unblock] button for Windows Vista, and click the [Allow access] button for Windows 7 or later to unblock the
program (permit the access) and continue the operation.
■When the personal computer does not allow to communicate with GX Works3 by the
Windows Firewall
When the Windows Firewall is enabled and not allowed to communicate with GX Works3, a timeout may occur.
To allow the communication, set the personal computer as shown below.
When using other software with a firewall function, refer to the manual of the software and allow the communication with GX
Works3.
Ex.
For Windows Vista
1. Select [Control Panel] [Security] [Windows Firewall] [Allow a program through Windows Firewall] from the Start
menu of Windows.
3. Select "GX Works3" on the "Add a Program" screen, and click the [OK] button.
4. Select "GX Works3"*1 in the list, and click the [OK] button.
*1 'gxw3' may be displayed when RCPU/Ethernet module is searched on the network and access through the Windows firewall is set to
allow before Ethernet port direct connection.
Ex.
For Windows 7 or later
1. Select [Control Panel] [System and Security] [Windows Firewall] [Allow a program*1 or feature through Windows
Firewall] from Windows Start.
2. Click the [Change settings] button, and click the [Allow another program*1] button.
3. Select "GX Works3" on the "Add a Program*1" screen, and click the [Add] button.
4. Select "Domain", "Home/Work (Private)", and "Public" of the added GX Works3*2 in the list, and click the [OK] button.
*1 For Windows 8 or later, "Apps" is displayed.
*2 'gxw3' may be displayed when RCPU/Ethernet module is searched on the network and access through the Windows firewall is set to
allow before Ethernet port direct connection.
COM port
USB port
Network No.1
(192.167.0.2)
Station number: 2
RJ71EN71 (192.168.0.2)
Station number: 2 Ethernet port
RJ71EN71 (192.167.0.1)
Station number: 1
CC-Link
Ethernet
Network No.2
Network No.1 CC-Link IE Field Network
RJ71C24
COM port
RJ71C24 RJ71C24
Station number 0 Station number 1 12
COM port
RJ71C24 RJ71C24
Station number 0 Station number 1
USB port
Precautions
■Considerations when performing online operations from GX Works3
Do not perform online operations from GT Designer2 or GT Designer3 to GOT (such as downloading project data) when
online operations are being performed from GX Works3 to the CPU module using the GOT transparent function.
The availability of connection differs depending on the GOT series and the connection condition between the personal
computer and GOT.
For details, refer to the following manuals.
GOT2000 Series Connection Manual (Mitsubishi Products) For GT Works3 Version1
GOT1000 Series Connection Manual (Mitsubishi Products) for GT Works3
The availability of connection differs depending on the GOT series and the connection condition between the personal
computer and GOT.
For details, refer to the following manuals.
GOT2000 Series Connection Manual (Mitsubishi Products) For GT Works3 Version1
GOT1000 Series Connection Manual (Mitsubishi Products) for GT Works3
■Relay station
Set the parameters so that the module mounted on the relay station is controlled by the same CPU module. (In the figure
below, PLCNo. 2 is the control CPU.)
Other considerations
■High-speed communication using an RS-232 cable
Communication may fail depending on the performance of the personal computer when high-speed communication is
attempted by changing the transmission speed at the serial port of the personal computer (personal computer side interface).
Communication speed may also slow down due to communication retries.
Decrease the transmission speed if high-speed communication cannot be performed normally.
■Resume function, suspend setting, power saving function, and standby mode of the personal
computer
A communication error may occur during communication with the CPU module when any of the settings shown above are
enabled.
Disable these settings for communication with the CPU module.
• The data name displayed in gray indicates that it is in the unconverted state.
• When a data is written to the programmable controller, the target memory capacity may be displayed smaller than the
actual file size.
• Update the graph of the memory capacity by clicking the [Size Calculation] button.
Precautions
■Memory capacity display for FX5CPU
• Program memory (The capacity of program memory is displayed in unit of step.)
• Data memory (The program, restored information, parameters, and device comments are displayed separately.)
• SD memory card (The capacity of the entire SD memory card is displayed.)
• SD memory card (The program, restored information, parameters, and device comments are displayed separately.)
Operating procedure
1. Select the [Write] tab on the "Online Data Operation" screen.
3. Click the [Detail] button to set the details such as a range to be written.
When more than one program is written to the CPU module, the programs categorized as "No Execution
Type" will never be executed on the CPU module. For saving the memory capacity of the CPU module,
removing them from the target data at writing data is recommended.
Parameter
Write "Parameter" in accordance with the operation or change of the system.
■Relation between module parameter on the Project view and module parameter in CPU
module
Module parameters are written with all other parameters displayed on the Project view in one file.
CPU (SD card, module)
System parameter
CPU parameter
Memory card
parameter
Module parameter
Remote password
Therefore, when module parameters exist in the CPU module, the parameter file is overwritten.
Ex.
When writing four module parameters to the CPU module in which module parameters of five modules exist; the settings of
five modules are overwritten with the settings of four modules, and one setting that does not exist in the project will be deleted.
Programs 13
After creating a program (local label, program), write "Program".
When the column of "Initial Value" is set on the local label editor, write "Local Label Initial Value".
FX5CPU does not support initial value of label.
When a standard function or a standard function block is used in the program, write "SlibFbFile" of POU.
Global label
After setting global labels, write "Global Label Setting".
When the column of "Initial Value" is set in the global label editor, write "Global Label Initial Value".
When "Access from External Device" is selected on the global label editor, write "Global Label Assignment Information".
FX5CPU does not support the initial value of labels nor the setting for accessing from external device.
Precautions
The sample comments are included in the write target. If the data size to be written exceeds the memory capacity of the CPU
module at writing data, prepare an SD memory card.
For FX5CPU, the writable capacity of the SD memory card is the same as that of CPU module.
Device memory
When writing values to the device memory area of the CPU module after setting device memory, write "Device Memory".
The device memory which has the same name as the program is written to a local device.
In contrast, the device memory which has the different name as the program is written to a global device.
Only one device memory for a global device can be selected.
Precautions
FX5CPU does not support local devices.
The device memory is written to a global device regardless of whether or not it is consistent with the program name.
File register
When writing the device memory which has been set as a file register, write "File Register".
FX5CPU does not support this setting.
Device comment
After setting device comments, write "Common Device Comment" or "Each Program Device Comment".
For FX5CPU, each program device comment cannot be written to CPU module.
Precautions
When the sample comments are read to device comments, all the sample comments are written to the CPU module.
Therefore, the data size to be written may exceed the memory capacity of the CPU module. In this case, perform any of the
following operations.
• Delete the device comments of unused devices.
• Set the write destination of device comments to SD memory card.
For FX5CPU, the writable capacity of SD memory card is the same as that of CPU module.
• Set the range to be written.
Operating procedure
1. Select the [Read] tab on the "Online Data Operation" screen.
3. Click the [Detail] button to set the details such as a range to be read.
Precautions
• When accessing SD memory card frequently using the data logging function or database function, the reading operation
from the programmable controller (to open the "Online Data Operation" screen) may be slow.
• A project created with GX Works3 of which version is 1.005F or later cannot be read with Version 1.002C or earlier. In
addition, FBD/LD programs cannot be read with Version 1.006G or earlier.
Parameters
■Unsupported modules
The module parameters that are not supported by GX Works3 cannot be read.
Program
When reading a program (local labels, program), read "Program".
When reading only a program in which global labels are used, the label definitions used in the program may
not exist in the project. This may cause the disappearance of the labels on the ladder editor.
In this case, read the global label and program together.
Device memory
The device memory, which have the same name as the program, will be read as a file for a local device.
The device memory, which have the different name as the program, will be read as a file for a global device.
Only one device memory for a global device can be selected.
FX5CPU does not support local devices.
The device memory is read as a file for a global device regardless of whether or not it is consistent with the program name.
Device comment
■Setting read range
Set the range of Common device comments/Each program device comments to be read from a programmable controller on
the "Device Comment Detail Setting" screen displayed by clicking the [Detail] button.
Operating procedure
Select the file to be deleted from the list on the "Online Data Operation" screen, and click the [Execute] button.
13
Window
[Online] [Verify with PLC]
Operating procedure
Select the data to be verified, and click the [Execute] button.
The operation method for displaying the verification result is the same as the Project Verify function. Refer to the following
section.
Page 66 Checking verification result
Parameter
■Verification of module parameters
The data which can be selected as verification target are as follows: Ethernet modules, CC-Link modules, CC-Link IE
Controller Network modules, CC-Link IE Field Network modules, and MELSECNET/H network modules.
Considerations
• The program execution is suspended while performing online program change. The length of down time depends on the
number of the changed steps.
13
• When writing programs which includes the rise instructions, fall instructions, SCJ instructions, and STMR instructions while
the CPU module is in RUN, the system may not operate properly.
• Do not perform online program change for the same program from multiple GX Works3 at the same time.
• If failed to write data while the CPU module is in RUN, the project will be returned to the previous status before the
conversion in order to make it possible to perform online program change again.
• Before performing online program change, make sure that the parameters between in the CPU module and in the project
mach.
• Before performing online program change, make sure that the target files for writing are written to the CPU module.
• When "Check at Communication Time" has been set less than 90 seconds, the timeout will be checked in 90 seconds. If an
error occurred, extend the timeout time on the "Specify Connection Destination" screen.
• Online program change will be continued if a warning occurred at conversion.
• When online program change is performed after changing the label names which can be accessed from external devices,
the data before the change is remained in the global label assignment information. To delete the remaining data, write the
global label assignment information from the "Online Data Operation" screen.
• When global labels are changed, the online program change can be performed for the program using global labels.
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 CPU module, the corrective actions against a communication error due to such
as a cable connection fault should be predetermined as a system.
Startup/Maintenance Instructions
CAUTION
■The online operations performed from a personal computer to a running CPU module (program change while a CPU module is in RUN, operating status
change such as RUN-STOP switching, and remote control operation) have to be executed after the manual has been carefully read and the safety has been
ensured.
When changing a program while the CPU module is in RUN, it may cause a program corruption in some operating conditions. Fully understand the precautions
described in this section.
Operating procedure
1. Verify a program against a program on the programmable controller to ensure that they match.
If the program part to be written does not match with the program on the CPU module, online program change cannot be
performed. Perform online program change in units of files. (Page 218 Writing data in units of files while the CPU module
is in RUN (file batch online change))
2. Modify a program.
Check the processing procedure and precautions for online program change by clicking the [Notes] button.
However, online program change cannot be performed even if only device comments were edited with the program or labels
unchanged.
When writing only device comments while the CPU module is in RUN, write data to the programmable controller from the
"Online Data Operation" screen.
Online program change of global label/local label initial values (Version 1.000A only) 13
After adding/modifying global label initial values or local label initial values, writing the label initial value file to CPU module is
required.
FX5CPU does not support the initial value of label.
When clearing all initial values, deleting the label initial value file to CPU module is required.
Furthermore, under booting, writing the label initial value file to SD memory card is required and deleting the label initial value
file is also required from the Boot File Setting of the Memory Card Parameter when clearing all initial values. If do not write/
delete the label initial value file to/from the CPU module, an error occurs at powering ON, resetting, or changing the status
from RUN to STOP of the CPU module.
*1 The macro FB program used in the subroutine FB program is the same as subroutine FB program.
Operating procedure
Select [Online] [Write to PLC].
Precautions
The sequence program in which the global labels or FBs/FUNs are used and the global label setting file or FB files that are
referred from the sequence program cannot be written simultaneously in file units while CPU module is in RUN. Change the
CPU module status to STOP/PAUSE before writing the global label setting file or FB files.
Window
[Online] [User Data] [Write]/[Read]/[Delete]
The following screen is an example when writing data.
13
Operating procedure
1. Select [Write], [Read], or [Delete] tab on the "User Data Operation" screen.
■Creating folders
Select the folder in which a folder is to be created on the "Browse Folders" screen, right click it and select [Create Folder] from
the shortcut menu.
Operating procedure
Delete all files on the "CPU Memory Operation" screen. Refer to the following section.
Page 274 Initializing/Clearing Memory
Window
[Debug] [Change History of Current Value]
Starting/stopping monitoring
Start/stop monitoring by selecting one of the following menus.
• [Online] [Monitor] [Start Monitoring (All Windows)]/[Stop Monitoring (All Windows)]
• [Online] [Monitor] [Start Monitoring]/[Stop Monitoring]
• [Online] [Watch] [Start Watching]/[Stop Watching]
• Select [Online] [Monitor] [Monitor Mode] on the active ladder editor
For a ladder editor, start monitoring by selecting a mode in the pull-down menu on the mode display area located at the upper
left of the ladder editor.
■FB instance
When monitoring the devices/labels in an FB instance, open the FB program and select the FB instance to be monitored from
the monitor status bar.
Window
At the start of monitoring
USER status
ERROR status
CPU operation status
Connection status
Displayed items
Item Description Icon Detail
Connection Status Displays the connection status between a CPU module and personal computer.
The "Specify Connection Destination" screen is displayed by clicking the icon.
When connected to a CPU
module
14
For more details, refer to the following section.
Page 193 SETTING ROUTE TO CPU MODULE
Operation Status Displays the CPU module status operated by the key switch on the CPU RUN
module or the remote operation from GX Works3.
STOP
The "Remote Operation" screen is displayed by clicking the icon.
For more details, refer to the following section. PAUSE
Page 272 Remote Operation of CPU Module
ERROR Status Displays the ERROR LED status of CPU module. ERROR is OFF.
The "Module Diagnostics" screen is displayed by clicking the icon.
ERROR is ON.
For more details, refer to the following section.
Page 260 Diagnosing CPU Module ERROR is flashing.
USER Status Displays the USER.LED status of CPU module. USER is OFF.
The "Module Diagnostics" screen is displayed by clicking this icon.
USER is ON.
For more details, refer to the following section.
Page 260 Diagnosing CPU Module USER is flashing.
Scan time status Displays the current value, maximum value, and minimum value of the scan time by switching them from the pull-down list.
Monitor target When monitoring multiple FB programs, select the target FB instance to be monitored.
selection
Monitor mode
Ladder editors are switched to monitor mode during monitoring.
Page 110 Configuration of ladder editor
The display format and detailed operations for each function can be set by the following option setting.
[Tool] [Options] "Monitor"
Ladder editor
Operating procedure
Select [Online] [Monitor] [Start Monitoring] ( )/[Stop Monitoring] ( ).
When any values other than fixed value are specified to the element of an array, an indefinite value is displayed as the
monitored value of the array.
*1 Only comparison instructions that are equivalent to contacts and the instructions that are equivalent to coils are supported.
Comparison instructions equivalent to coil: BIN16-bit data comparison, BIN32-bit data comparison, floating-point data comparison, 64-
bit float data comparison
Instructions equivalent to coil: SET, RST, PLS, PLF, SFT, SFTP, MC, FF, DELTA, DELTAP
■Monitoring FB programs
Double-click the FB instance to monitor the FB program.
Operating procedure
Select [Online] [Monitor] [Start Monitoring] ( )/[Stop Monitoring] ( ).
Monitored value of D0
14
FBD/LD editor
Operating procedure
Select [Online] [Monitor] [Start Monitoring] ( )/[Stop Monitoring] ( ).
Precautions
When the type of the defined function block is macro type, monitoring the input label depends on the monitor condition of the
connected element. Therefore, the input label also cannot monitored when the connected element cannot be monitored.
Window
[Online] [Monitor] [Device/Buffer Memory Batch Monitor] ( )
●Toolbar
14
Up to 64 monitoring screens can be displayed. The number is displayed at the start of the screen title.
Operating procedure
■Monitoring devices in batch
By entering the target (start) in "Device name", monitor the device memory of CPU module.
• Target device is global device: Enter a device name. (Example: D10)
• Target device is local device: Enter a device name by prefixing '#' (Example: #D10) and specify "Program Reference".
• When checking the TC setting values: Enter a device of timer, retentive timer, long timer, long retentive timer, counter, or
long counter (Example: T10, ST10, LT10, LST10, C10, LC10) and specify "Program Reference".
Operating procedure
1. Click the [Detailed Conditions] and click [...] in "Program Reference" on the "Device/Buffer Memory Batch Monitor"
screen.
2. Set the items on the "Program Reference" screen, and click the [OK] button.
Window
[View] [Docking Window] [Watch 1] to [Watch 4] ( )
Right-click
14
The display format can be selected per row from the pull-down list displayed when selecting the display format.
Operating procedure
1. Register the devices/labels to be monitored. (Page 229 Register to Watch window)
Operating procedure
■Enter to register
1. Display the watch window.
Rectangular selection can be made by dragging the devices/labels while pressing the key on the ST
editor. The devices/labels only in the selected range can be registered.
Operating procedure
1. Set the following option.
[Tool] [Options] "Monitor" "Ladder Editor"/"ST Editor" "Setting for Automatic Registration to Watch Window"
2. During monitoring, select the range included in devices/labels to be registered to the Watch window.
Precautions
When "Use File Register of Each Program" is selected in "File Setting" of the CPU parameter, the file register file that is
available at END is changed. Therefore, changing the current values while specifying file registers for each program cannot
be performed.
Operating procedure
Select [Edit] [Import File]/[Export to File].
14
Window
[Online] [Monitor] [Program List Monitor]
Displayed items
Item Description
Execution Status of Programs Execution Time (ms) Displays the actual scan time (current value).
The display contents are differ depending on the program execution type.
At the program stop (standby) status: 0.000ms
Execution Count Displays the number of executions, counted from '0' at the point of turning the CPU module to
the RUN status.
It is stored even after the program stops.
Entire Execution Time Monitoring Time (ms) Displays the program execution monitoring time set to "PLC RAS" of the CPU parameter.
Total Execution Time (ms) Displays the total scan time of the programs executed in the CPU module.
Details of Execution Time for Program Processing Displays the total execution time of scan execution type program.
Scan Execution Time (ms)
END Processing Time Displays the END processing time.
(ms)
Constant Waiting Time Displays the waiting time of the constant scan when the constant scan is set.
(ms)
Window
[Online] [Monitor] [Interrupt Program List Monitor]
Operating procedure
Input the interrupt pointer number of which execution counts are to be displayed in "Interrupt Pointer".
14
Displayed items
Item Description
Execution Count Starts counting when the CPU module turns to the RUN status and displays the execution counts.
When reaching 65536, it returns to 0.
Window
[View] [Docking Window] [Intelligent Function Module Monitor] [Intelligent Function Module Monitor 1] to [Intelligent
Function Module Monitor 10]
Right-click
Operating procedure
1. Register the Intelligent function module to be monitored. (Registering Intelligent function modules)
Select and right click the module information, select [Copy] from the shortcut menu to paste it to a text file.
Precautions
The cut/copied items can only be pasted to the same project in the same window.
Precautions
The Intelligent Function Module Monitor updates current values only within the range displayed on the window for monitoring
acceleration.
When performing operation such as copy and paste on Excel, "--" or the previously monitored current value is displayed for
the data outside the range displayed on the window.
Operating procedure
■Register Intelligent function modules using shortcut menu from Project view
1. Select the Intelligent function module to be registered to the Intelligent Function Module Monitor window from the Project
view.
14
2. Right-click select [Register to Intelligent Function Module Monitor] from the shortcut menu.
2. Drag and drop it onto the Intelligent Function Module Monitor window.
■Register Intelligent function modules using shortcut menu from Intelligent Function Module
Monitor window
1. On the Intelligent Function Module Monitor window, right-click and select [Register Module Information] from the shortcut
menu.
2. Select the module to be registered in "Module List", and click the [OK] button.
When a positioning module is selected in "Module List", select the item displayed in "Monitor Item Category List".
The module information can be copied and pasted to a file such as a text file by right-clicking the arbitrary
module information and selecting [Copy] from the shortcut menu on the Intelligent Function Module Monitor
window.
2. Write the memory dump setting file. (Page 237 Writing memory dump settings)
Once it is written, the memory dump result file is saved to SD memory card when the set trigger conditions are satisfied.
3. Read the memory dump result file to the personal computer. (Page 238 Reading memory dump results)
4. Check the read memory dump result file. (Page 239 Displaying memory dump results)
Window
[Debug] [Memory Dump] [Setting]
14
Operating procedure
Set the items and click the [Write] button.
Item Description
Saved File Set a name of a file to be output when the Memory Dump function is performed.
A number, '00' to '99' is added to the end of the set name for the file name to be output actually.
Trigger Conditions Specify the trigger conditions to collect memory dump.
• Device: Specify this to set the timing when the bit data of a specified device turns OFF ON as the trigger condition.
• Error Code: Specify this to set an error code of CPU module as the trigger condition.
• Device/error Code: Specify this to set a device/error code as the trigger condition. The Memory Dump function is performed when
any of multiple conditions is satisfied.
Device Specify a device to be set as the trigger condition. Only global devices can be specified.
■Device representation that can be specified
• Bit device: X, Y, M, L, F, SM, V, B, SB, T (enter 'TS'), ST (enter 'SS/STS'), C (enter 'CS'), LT (enter 'LTS'), LST (enter 'LSS/LSTS'),
LC (enter 'LCS'), FX, and FY
• Word device (bit specification): D, SD, W, SW, R, ZR, FD, RD
Error Code Specify a 4-digit error code to be set as the trigger condition in hexadecimal.
The wild card, "*" can be specified for the 1st digit of an error code only.
The number for annunciator cannot be specified as the error code to be set as the trigger condition. Use the
device name in order to specify the number of annunciator.
Window
[Debug] [Memory Dump] [Read Results]
The current performance status of the Memory Dump function can be checked by selecting [Display Status].
Operating procedure
1. After clicking , specify the memory dump result file to be read.
2. Specify "Save Destination", and click the [Save to PC] button.
Window
[Debug] [Memory Dump] [Display Result]
14
Operating procedure
Enter the path for the memory dump result file to be displayed in "Memory Dump File Name".
• To specify a local device for "Device Name", select the program file to be referred in "Program File".
• To specify 'R' or 'ZR' for "Device Name", select the file register to be referred in "File Register File Name". When 'R' is
specified, the device for the first block is displayed.
• To specify 'Z' or 'LZ' for "Device Name", select the program file to be referred in "Program File".
This part explains the maintenance and inspection methods such as a function to protect data (prevent from
manipulation and data leakage) and display the system status of the CPU module.
15 PROTECTING DATA
16 DIAGNOSING MODULE
241
15 PROTECTING DATA
This chapter explains how to protect the data in a project.
The functions to save the data are as follows:
Target Purpose Function name Reference
Project Prevents illegal access to programs (in POU unit). Block password function Page 243 Preventing Illegal Access to
(Using password) Programs (Protected by Password)
Prevents illegal access to programs (in program file unit). Security key Page 245 Preventing Illegal Access to
(Using security key) authentication function Programs (Protected by Key)
CPU module Prevents illegal execution of programs. Page 250 Preventing Illegal Program
(Using security key) Execution
Prevents illegal read/write operation for files. File password function Page 253 Preventing Illegal Data
(Using password) Reading/Writing
Restricts access from other than specific communication route. Remote password Page 256 Restricting Access from
(Using password) function Other Than Specific Communication
Route
Identifies the IP address of external devices via Ethernet to block IP filter function MELSEC iQ-R Ethernet User's Manual
access from an illegal IP address. (Application)
(Setting with module parameters)
15 PROTECTING DATA
242
15.1 Preventing Illegal Access to Programs (Protected
by Password)
To prevent an illegal access to programs (in POU unit) by setting a password, use the Block password function.
15 PROTECTING DATA
15.1 Preventing Illegal Access to Programs (Protected by Password) 243
Setting block password
Register a block password to POUs.
Window
[Project] [Security] [Block Password Setting]
Right-click
Operating procedure
1. Select a POU to set a block password and click the [Register]/[Change] button.
2. Enter the password on the "Register Password" screen/"Change Password" screen, and click the [OK] button.
When a block password is registered, the icons are displayed on the Project view as shown below.
Registered Authenticated
By selecting multiple POUs in "Data Name", a block password can be registered to the selected POUs in
batch.
Operating procedure
1. Select the POU to authenticate the block password, and click the [Authentication] button.
2. Enter the password on the "Password Authentication" screen, and click the [OK] button.
Operating procedure
1. Select the POU to delete the block password, and click the [Delete] button.
2. Enter the password on the "Delete Password" screen, and click the [OK] button.
15 PROTECTING DATA
244 15.1 Preventing Illegal Access to Programs (Protected by Password)
15.2 Preventing Illegal Access to Programs (Protected
by Key)
To prevent an illegal access to programs (in program file unit) with a key, use the Security key authentication function.
Key A
No key, or key B
No key, or key B
The programs are not executed if any of the programs of which security key is
unmatched in the CPU module exist.
The security key written in the CPU module is retained after powering OFF.
Page 246 How to use the Security key authentication function (access Page 250 How to use the Security key authentication function (execution
prevention) prevention)
Copy of security key: The security key registered to a personal computer can be copied by exporting/importing it from/to other
personal computer. In addition, the expiration date of the security key can be set.
Data access/unlock
Program file
Key A
Key A
File of
key A
15 PROTECTING DATA
15.2 Preventing Illegal Access to Programs (Protected by Key) 245
Precautions
The security key registered to a personal computer is not deleted even if GX Works3 is uninstalled. Delete the security key on
the "Security Key Management" screen.
2. Register the security key in a program file. (Page 249 Registering security key in program files)
2. Register the security key in a personal computer from which a program file is to be accessed. (Page 248 Import)
15 PROTECTING DATA
246 15.2 Preventing Illegal Access to Programs (Protected by Key)
Creating/deleting security keys
Create/delete security keys on the "Security Key Management" screen.
Window
[Project] [Security] [Security Key Management]
Displayed items
Item Description
Creation Date Displays the registered date of the security key. 15
Expiration Date Displays the expiration date set when the security key was exported.
Export Displays "Enable/Disable" that indicates whether re-exporting the security key is enabled/disabled set when the security key
was exported.
Protection Target Selection Displays "Enable/Disable" that indicates whether selecting data to be protected is enabled/disabled set when the security key
was exported.
Key Registration to CPU Displays "Enable/Disable" that indicates whether writing data to CPU module is enabled/disabled set when the security key
was exported.
Operating procedure
1. Click the [New] button.
2. Enter the security key name on the "New Security Key" screen and click the [OK] button.
Operating procedure
1. Select the security key to be deleted on the "Security Key Management" screen.
15 PROTECTING DATA
15.2 Preventing Illegal Access to Programs (Protected by Key) 247
Copying security key
Copy (import/export) security keys on the "Security Key Management" screen.
Operating procedure
1. Select the security key to be exported on the "Security Key Management" screen.
4. Set the password to be required when importing the security key, and click the [Export] button.
Precautions
• The exported security key files should be tightly controlled.
• The security key files created with GX Works3 are not compatible with that of GX Works2.
Import
Import the exported security key file in a personal computer, and register the security key.
Operating procedure
1. Click the [Import] button on the "Security Key Management" screen.
2. Select a file (*.ity) on the "Import Security Key" screen, and click the [Open] button.
3. Enter the password set when the security key was exported on the "Password Authentication" screen, and click the [OK]
button.
■Expiration date
• If the expiration date of the security key registered in a personal computer is expired, accessing programs, re-exporting
security keys, registering security keys in program files, and writing security keys to CPU module cannot be performed.
• To use the same security key after the expiration date, export the security key from the exported personal computer again,
and import it to the personal computer.
15 PROTECTING DATA
248 15.2 Preventing Illegal Access to Programs (Protected by Key)
Registering security key in program files
Create a security key on the "Security Key Management" screen in advance.
A security key can be registered in program file unit, however, the same security key will be set to the program files in the
project.
Window
[Project] [Security] [Security Key Setting]
15
2. Select the program file to lock from the [Project] tab, and click the [Register] button.
The security key registered in program files will be validate after saving the project.
The program file of which security key is registered is displayed in the Project view as follows:
When the security keys between in the personal When the security keys between in the personal
computer and the project does not match computer and the project matches
15 PROTECTING DATA
15.2 Preventing Illegal Access to Programs (Protected by Key) 249
15.3 Preventing Illegal Program Execution
To prevent an illegal execution for programs (STOP/PAUSE RUN) written in a CPU module, use the Security authentication
function.
For details on the Security key authentication function, refer to the following section.
Page 245 Security key authentication function
2. Register the security key in the program file to be written to the CPU module. (Page 249 Registering security key in
program files)
3. Write the program files to the CPU module. (Page 208 Writing data to programmable controller)
A CPU module which does not have the same security key as the one registered in the program file cannot execute the
programs.
2. Write the same security key as the protected program file to the CPU module. (Page 251 Writing/deleting security
key to/from CPU module)
The programs can be executed unless otherwise the security key set to the program file or CPU module is changed.
15 PROTECTING DATA
250 15.3 Preventing Illegal Program Execution
Writing/deleting security key to/from CPU module
By writing the same security key to the CPU module, execution of the programs can be permitted.
Only one security key can be written to either a CPU module or an extended SRAM cassette.
FX5CPU does not support an extended SRAM cassette.
Additionally, one security key can be written to multiple CPU modules.
When writing a security key, create a key on the "Security Key Management" screen and connect a personal computer and
CPU module in advance. (Writing/deleting can be performed at 'STOP' status.)
Window
[Project] [Security] [Security Key Setting]
15
2. Select the target to be written in the [CPU] tab, and click the [Write] button.
15 PROTECTING DATA
15.3 Preventing Illegal Program Execution 251
Deleting security keys
The security key written in the CPU module can be deleted on the personal computer in which the security key is not
registered.
However, the program of which security key is registered in the CPU module exists, the security key cannot be deleted.
Operating procedure
Click the [Delete] button in the [CPU] tab.
15 PROTECTING DATA
252 15.3 Preventing Illegal Program Execution
15.4 Preventing Illegal Data Reading/Writing
To prevent data from being illegally read from/written to CPU module, use the File password function.
When accessing from external devices using function other than GX Works3
A file password is validate when accessing a file using the FTP server function. For details, refer to the following manual.
MELSEC iQ-R Ethernet User's Manual (Application)
A file password is validate when accessing a file using MC protocols. For details, refer to the following manual.
MELSEC iQ-R Serial Communication Module User's Manual (Application)
15 PROTECTING DATA
15.4 Preventing Illegal Data Reading/Writing 253
Precautions
• Keep passwords in a secure place.
If the registered password is lost, or "Permanent PLC Lock" set in FX5CPU is needed to be cancelled, initialize the CPU
module using the CPU Memory Operation function (Page 273 Checking Memory Usage) and write the project to the
CPU module.
• To set "Permanent PLC Lock" to both of "Read Protection" and "Write Protection", configure the both settings at the time of
the first registration. If only one of them was registered, the other cannot be registered later.
2. Set a file password to the file in the CPU module. (Page 255 Setting file password)
If the project in which the file password is set is closed, the file cannot be read and write when GX Works3 is started up next
time.
2. Authenticate the file password which has been set to the file in the CPU module. (Page 255 Setting file password)
The file can be write and read while the project is open.
The files can also be read/written when entering a correct password in the "File Password Setting" screen displayed when
accessing a file.
15 PROTECTING DATA
254 15.4 Preventing Illegal Data Reading/Writing
Setting file password
When registering a file password, connect a personal computer and CPU module in advance.
"Register", "Change", "Authentication", or "Delete" can be set on the setting screen of file password.
Setting Operation
Registration Restrict online operations by setting password to data in the CPU module.
A password set to data in the transfer source memory of boot operation remains set in the transfer destination memory.
Change Change the password set to data in the CPU module.
Authentication Unlock the data in the CPU module temporarily by authenticating the password.
By authenticating a password, the corresponding data in the CPU module can be read/written until the project is closed.
Deletion Delete a password set to data in CPU module.
Window
[Project] [Security] [File Password Setting]
15
Operating procedure
1. Select the target data and click the [Register]/[Change]/[Authentication]/[Delete] button.
2. Set the items on the displayed screen, and click the [Completed] button.
15 PROTECTING DATA
15.4 Preventing Illegal Data Reading/Writing 255
15.5 Restricting Access from Other Than Specific
Communication Route
To restrict the access from other than specific communication route, use the Remote password function.
2. Specify "Remote Password" and write the data to the CPU module. (Page 208 Writing data to programmable
controller)
The access to the CPU module will be restricted.
2. Unlock the remote password by following the message. (Page 257 Setting remote password)
When the entered password is correct, the access to the CPU module will be permitted.
15 PROTECTING DATA
256 15.5 Restricting Access from Other Than Specific Communication Route
Setting remote password
The remote password can be set for up to 8 modules. (Up to 8 CPU modules for a multiple CPU configuration)
Window
Project view "Parameter" "Remote Password"
Operating procedure
15
1. Click the [Password] button.
2. Set the items on the "Register Password" screen, and click the [OK] button.
Item Description
Product Name Select the module of which remote connection is to be enabled.
Start I/O No.*1 Enter the start I/O number*1. (The specification using module labels is applicable.)
Module conditions Set the remote password to enable/disable for the user connection number or system connection.
15 PROTECTING DATA
15.5 Restricting Access from Other Than Specific Communication Route 257
16 DIAGNOSING MODULE
This function displays the state of modules, networks, and whole system. At an error occurrence, it displays an error content
and corrective action.
The diagnostic functions of GX Works3 are as follows:
Function Reference
System monitor*1 Page 259 Checking Module Status of System
Diagnosing CPU module Page 260 Diagnosing CPU Module
Diagnosing network Page 262 Ethernet diagnostics
Page 263 CC-Link IE Controller Network diagnostics
Page 265 CC-Link IE Field Network diagnostics
Page 266 MELSECNET Diagnostics
Page 267 CC-Link diagnostics
16 DIAGNOSING MODULE
258
16.1 Checking Module Status of System
The System Monitor function displays the module configuration of the system in operation and detailed information of each
module.
In addition, the error status can be checked and the module in which the error occurred can be diagnosed.
FX5CPU does not support this function.
Window
[Diagnostics] [System Monitor]
Base Module
configuration configuration
16
• For Q series power supply, the model name is displayed as "Power" instead of their model name. Additionally, when using
Q series module, the network information and IP address are not displayed.
• '?' is displayed on the module with no profile.
• To display the network information and IP address of the port 2 of the modules who have two ports, click the [Display
Setting] button.
16 DIAGNOSING MODULE
16.1 Checking Module Status of System 259
16.2 Diagnosing CPU Module
This section explains how to display the status and error codes of modules.
FX5CPU only supports the following 'Diagnosing CPU modules'.
Window
■Diagnosing CPU modules
[Diagnostics] [Module Diagnostics (CPU Diagnostics)]
For Q series module, '-' is displayed in Occurrence Date, Status, and Overview.
Precautions
Since the occurrence date depends on the time zone selected in "Clock Related Setting" for "Operation Related Setting" of
the CPU parameter, it may be different from the time on the personal computer in use.
Error information
Display the error history registered to the diagnostic target module in the [Error Information] tab.
■Display content
The displayed information will differ depending on the module.
• CPU module: Up to 16 current errors will be displayed in the chronological order. The 17th and subsequence errors are not
displayed.
• Other than CPU module: Up to 16 current errors are displayed.
If the same error as already displayed error code occurred, the display content is not updated.
For the errors of Q series module, occurrence date is not displayed.
16 DIAGNOSING MODULE
260 16.2 Diagnosing CPU Module
■Error jump
Click the [Error Jump] button to jump to the selected error item.
Programs, function blocks, and each parameter are applicable for the Jump function.
A jump to parameters is available for the items supported by the Error jump function. The supported items differ depending on
the module.
Precautions
In the following conditions, an error may not be found at the error jump destination.
• When the open project does not match with the data on the CPU module.
• When diagnosing programmable controller other than the one set as a connection destination in the project.
Ex.
When selecting a module from the "CC-Link IE Control Diagnostics" screen and activating the System Monitor function, and
activating the "Module Diagnostics" screen from the activated "System Monitor" screen.
■Event history
Page 268 Checking Error History/Operation History
■Clearing errors
After the errors displayed on the "Module Diagnostics" screen are cleared, click the [Clear Error] button to clear the error
status of the module. (The LED that indicates error status on the front of the module turns OFF.)
The error content are also deleted from the list of the error information.
16 DIAGNOSING MODULE
16.2 Diagnosing CPU Module 261
16.3 Diagnosing Network
This section explains how to diagnose networks.
Ethernet diagnostics
Check the status of each connection, status of each protocol, and connection status.
For details, refer to the following manuals.
MELSEC iQ-R Ethernet User's Manual (Application)
MELSEC iQ-F FX5 User's Manual (Ethernet Communication)
Window
[Diagnostics] [Ethernet Diagnostics]
16 DIAGNOSING MODULE
262 16.3 Diagnosing Network
CC-Link IE Controller Network diagnostics
Monitor the network information, diagnose the network status, and perform a test.
FX5CPU does not support it.
For details, refer to the following manual.
MELSEC iQ-R CC-Link IE Controller Network User's Manual (Application)
Window
■Optical cable
[Diagnostics] [CC-Link IE Control Diagnostics (Optical Cable)]
16
16 DIAGNOSING MODULE
16.3 Diagnosing Network 263
■Twisted pair cable
[Diagnostics] [CC-Link IE Control Diagnostics (Twisted Pair Cable)]
16 DIAGNOSING MODULE
264 16.3 Diagnosing Network
CC-Link IE Field Network diagnostics
Monitor the network information, diagnose the network status, and perform a test.
FX5CPU does not support it.
For details, refer to the following manual.
MELSEC iQ-R CC-Link IE Field Network User's Manual (Application)
Window
[Diagnostics] [CC-Link IE Field Diagnostics]
16
16 DIAGNOSING MODULE
16.3 Diagnosing Network 265
MELSECNET Diagnostics
Monitor the network information for each station, diagnose the network status, and perform a test.
RnPCPU/FX5CPU do not support this function.
Considerations for using MELSECNET/H network module when performing the MELSECNET Diagnostics , refer to the
following manual.
MELSEC iQ-R Module Configuration Manual
For the operation method, refer to the following manual.
GX Works2 Version 1 Operating Manual (Common)
Window
[Diagnostics] [MELSECNET Diagnostics]
16 DIAGNOSING MODULE
266 16.3 Diagnosing Network
CC-Link diagnostics
Monitor the network information of each station, diagnose the network status, and perform a test.
FX5CPU does not support it.
For details, refer to the following manual.
MELSEC iQ-R CC-Link System Master/Local Module User's Manual (Application)
Window
[Diagnostics] [CC-Link Diagnostics]
16
16 DIAGNOSING MODULE
16.3 Diagnosing Network 267
16.4 Checking Error History/Operation History
The module error information, operation history, and history of system information can be displayed using the Event History
function.
The detailed information of the error history can be displayed when a CPU module and Intelligent function modules that
support the Module error history collection function are used.
For the versions of modules that support this function, refer to the user's manual of each module.
FX5CPU does not support this function.
Operating procedure
Click the [Event History] button on the "Module Diagnostics" screen or "System Monitor" screen.
Precautions
Since the occurrence date for the Event History function depends on the time zone selected in "Clock Related Setting" for
"Operation Related Setting" of the CPU parameter, it may be different from the time on the personal computer in use.
16 DIAGNOSING MODULE
268 16.4 Checking Error History/Operation History
17 SAMPLING DEVICE DATA 17
For MELSEC-iQ-R series CPU modules, data can be sampled by using the data logging function.
2. Configure the data logging settings with CPU Module Logging Configuration Tool, and write the setting to the CPU
module.
Window
[Online] [Set Clock]
Operating procedure
Set the items and click the [Execute] button.
Execution target Description
Currently Specified Station Select this to set the clock only upon the station specified in the connection destination setting.
All Stations Specified*1 Select this to perform the clock setting on the station specified in the connection destination setting and all the stations on the
same network. Set a target network with "Specify Network No.".
Specify Group No.*1 Select this to perform the clock setting on the station specified in the connection destination setting and each station of the
specific group on the specified network.
Set a target network in "Specify Target Network No.", and set a group number in "Specify Group No.".
The clock setting cannot be performed for CC-Link IE Field Network because it does not have group number.
Precautions
• The clock setting can be performed regardless of the ON/OFF status of the clock setting device 'SM210'.
Note that the ON/OFF status of 'SM210' does not change upon clock setting.
• In the clock setting, a time-lag may occur due to the time of transfer.
• When different time zones are specified between the connected station and other station, the same time in the CPU is set
to the target CPU module.
Window
[Online] [Remote Operation]
Operating procedure
Set the items and click the [Execute] button.
Execution target Description
Currently Specified Station Select this to perform the remote operation only on the station specified in the connection destination setting.
All Stations Specified *1 Select this to perform the remote operation on the station specified in the connection destination setting and all the stations on the
same network. Set a target network in "Specify Target Network No.".
Specify Group No. *1 Select this to perform the remote operation on the station specified in the connection destination setting and each station of the
specific group on the specified network.
Set a target network in "Specify Target Network No.", and set a group number in "Specify Group No.".
The remote operation cannot be performed for CC-Link IE Field Network because it does not have group number.
The operating status after RUN/STOP switching on the CPU module or remote RUN/STOP contact operation are as follows.
Remote operation CPU module switch Remote RUN/STOP contact is ON
RUN STOP (The CPU module is in STOP.)
*1 The remote reset operation must be enabled on "Operation Related Setting" of the CPU Parameter.
*2 Operable when the CPU module is switched to STOP by remote operation.
Window 18
[Online] [CPU Memory Operation]
Initializing data
Delete files in the data memory/device memory/label memory of the CPU module, or folders/files stored in the SD memory
card.
Operating procedure
1. Select [Online] [CPU Memory Operation]. (Page 273 Checking Memory Usage)
2. Select "Data Memory" or "File Storage Area" on the "Memory Management" screen, and click the [Initialization] button.
When initializing an SD memory card, select "SD Memory Card" displayed on the left of the screen.
Precautions
Format the memory card to be used for a CPU module by using this function.
If a memory card is formatted using the function such as Windows format function, it may not be used on the CPU module.
Clearing values
Clear the values of devices, labels, and file registers to '0', and perform latch clear operation.
Operating procedure
1. Select [Online] [CPU Memory Operation]. (Page 273 Checking Memory Usage)
2. Select "Device/Label Memory" on the "Memory Management" screen, and click the [Clear Value] button.
3. Set the items on the "Clear Value" screen, and click the [Execute] button.
When the device initial value file/label initial value file is written in the CPU module, it can be initialized by
resetting the CPU module.
APPENDICES APPENDIX
Appendix 1 Functions Added to/Changed from Previous Version 275
Supported Main functions Added/changed contents Reference
version
Version 1.010L Project Revision Project Revision function is supported. Page 68 Project Revision
Library User library is supported. Page 185 Enhanced Use of
User Library
Q series MELSECNET/H • Q series MELSECNET/H module is supported.
module • MELSECNET Diagnostics is supported. Page 266 MELSECNET
Diagnostics
Opening GX Works2 format Built-in Ethernet Port Setting is succeeded. Page 55 Opening GX Works2
projects format projects
Verification Verifying labels is supported. Page 65 Verifying Projects
Printing data Printing the following data is supported. Page 44 Printing Data
• Device comment, device memory, device initial value
• Statement/note
• Device list
• Cross reference
• Verification result
Changing ladder block Ladder block can be changed temporarily. Page 128 Changing ladder
temporarily blocks temporarily
*1 To use this function, it is required that MELSOFT Navigator supports the function. For information on the version of the supported
MELSOFT Navigator, refer to the Help of MELSOFT Navigator.
*2 To use this function, it is required that CPU module supports the function. For information on the firmware version of the supported CPU
modules, refer to the following manual.
MELSEC iQ-R CPU Module User's Manual (Application)
*3 To use this function, it is required that the module supports the function. For information on the firmware version of the supported
module, refer to the manual for respective modules.
APPENDICES APPENDIX
276 Appendix 1 Functions Added to/Changed from Previous Version
Appendix 2 Character Strings that cannot be Used
for Label Names and Data Names A
Character strings used for application function names, common instruction names, special instruction names, instructions and
so on are referred to as the reserved words.
These reserved words cannot be used for label names or data names.
If the character string defined as a reserved word is used for a label name or data name, an error occurs during registration or
conversion.
Category Character string
Symbol (blank), !, ", #, $, %, ', *, &, +, ,, ., /, :, ;, <, =, >, ?, @, [, \, ], ^, `, {, |, }, ~
Windows reserved word*1 COM1, COM2, COM3, COM4, COM5, COM6, COM7, COM8, COM9, LPT1, LPT2, LPT3, LPT4, LPT5, LPT6, LPT7, LPT8,
LPT9, AUX, CON, PRN, NUL, CLOCK$, END_MARK
Data type reserved words VAR, VAR_RETAIN, VAR_ACCESS, VAR_CONSTANT, VAR_INPUT, VAR_INPUT_RETAIN, VAR_OUTPUT,
VAR_OUTPUT_RETAIN, VAR_IN_OUT, VAR_IN_EXT, VAR_EXTERNAL, VAR_EXTERNAL_CONSTANT,
VAR_EXTERNAL_RETAIN, VAR_GLOBAL, VAR_GLOBAL_CONSTANT, VAR_GLOBAL_RETAIN, VAR_PUBLIC,
VAR_PUBLIC_RETAIN, BOOL, BYTE, INT, SINT, DINT, LINT, UINT, USINT, UDINT, ULINT, WORD, DWORD, LWORD, ARRAY,
REAL, LREAL, TIME, STRING, WSTRING, TIMER, LTIMER, RETENTIVETIMER, LRETENTIVETIMER, COUNTER,
LCOUNTER, POINTER, ANY, ANY_NUM, ANY_BIT, ANY_REAL, ANY_INT, ANY_DATE, ANY_SIMPLE, ANY16, ANY32,
DATE, DATE_AND_TIME, DT, TIME, TIME_OF_DAY, TOD, BODY_CCE, BODY_FBD, BODY_IL, BODY_LD, BODY_SFC,
BODY_ST, END_BODY, END_PARAMETER_SECTION, PARAM_FILE_PATH, PARAMETER_SECTION, POW,
LONGCOUNTER, LONGRETENTIVETIMER, LONGTIMER, Unknown, ANY_BITADDR, ANY_WORDADDR, ANY_STRING,
ANYSTRING_SINGLE, ANYSTRING_DOUBLE, ANY_ELEMENTARY, ANY_ELEMENTARY_IEC, ANY_MAGNITUDE,
ANY_BOOL, ANY_SIGNED, ANY_UNSIGNED, ANYREAL_64, ANYREAL_32, ANY_DERIVED, ANY16_S, ANY16_U,
ANY32_S, ANY32_U, ANY64, ANY64_S, ANY64_U, ANY_STRUCT, ANYWORD_ARRAY, ANY16_ARRAY, ANY16_S_ARRAY,
ANY16_U_ARRAY, ANY32_ARRAY, ANY32_S_ARRAY, ANY32_U_ARRAY, ANY64_ARRAY, ANY64_S_ARRAY,
ANY64_U_ARRAY, ANY_REAL_ARRAY, ANY_REAL_32_ARRAY, ANY_REAL_64_ARRAY, ANY_STRING_ARRAY,
ANYSTRING_SINGLE_ARRAY, ANYSTRING_DOUBLE_ARRAY, ANYBIT_ARRAY, UINT_WORD, UDINT_DWORD,
ULINT_LWORD, TIME2, KBIT64, KBIT32, KBIT16, WDEVICE, BDEVICE, DUMMYDEVICE, FB, FUN, STRUCT_MEMBER,
BIT_ARRAY, STRUCT_ARRAY, STRING_ARRAY, WSTRING_ARRAY, LINT_ARRAY, ULINT_LWORD_ARRAY, DINT_ARRAY,
UDINT_DWORD_ARRAY, INT_ARRAY, UINT_WORD_ARRAY, REAL_ARRAY, LREAL_ARRAY, TIME_ARRAY, NONE,
ANY16_OR_STRING_SINGLE, ANY_DT, ANY_TM, ANY_BOOL_OR_POINTER
IEC reserved word NOT, MOD, LD, LDN, ST, STN, S, S1, R, R1, AND, ANDN, OR, ORN, XOR, XORN, ADD, SUB, MUL, DIV, GT, GE, EQ, NE, LE,
LT, JMP, JMPC, JMPCN, CAL, CALC, CALN, RET, RETC, RETN, LDI, LDP, LDF, ANI, ANDP, ANDF, ANB, ORI, ORP, ORF,
ORB, MPS, MRD, MPP, INV, MEP, MEF, EGP, EGF, OUT, OUTH, SET, RST, PLS, PLF, FF, DELTA, DELTAP, SFT, SFTP, MC,
MCR, STOP, PAGE, NOP, NOPLF, RETURN, IF, THEN, ELSE, ELSIF, END_IF, CASE, OF, END_CASE, FOR, TO, BY, DO,
END_FOR, WHILE, END_WHILE, REPEAT, UNTIL, END_REPEAT, EXIT, TYPE, END_TYPE, STRUCT, END_STRUCT,
RETAIN, END_VAR, FUNCTION, END_FUNCTION, FUNCTION_BLOCK, END_FUNCTION_BLOCK, STEP, INITIAL_STEP,
END_STEP, TRANSITION, END_TRANSITION, FROM, UNTILWHILE, ACTION, END_ACTION, CONFIGURATION,
END_CONFIGURATION, CONSTANT, F_EDGE, R_EDGE, AT, PROGRAM, WITH, END_PROGRAM, READ_ONLY,
READ_WRITE, RESOURCE, END_RESOURCE, ON, TASK, EN, ENO, SINGLE, TRUE, FALSE, INTERVAL
Character string recognized X0, etc.
as device
(Device name + numerals)
Others Maker-defined FB/FUN, MELSEC instructions
Precautions
• A label name and data name are not case-sensitive.
• Device names cannot be used as function names.
APPENDICES APPENDIX
Appendix 2 Character Strings that cannot be Used for Label Names and Data Names 277
Appendix 3 List of Applicable Devices in GX Works3
For RCPU
: Applicable, : Display only, : Not applicable : Not available
Category Device name Symbol Digit Bit-specified Device Device Device
specification word device comment memory initial
value
User device Input X
Output Y
Internal relay M *1
Latch relay L
Link relay B
Annunciator F
Link special relay SB
Edge relay V*1
Timer T *1
Retentive timer ST *1
Long timer LT*1
Retentive long timer LST*1
Counter C *1
Long counter LC *1
Data register D *1
Link register W
Link special register SW
System device Function input FX
Function output FY
Special relay SM
Function register FD
Special register SD
Link direct device (J\) Link input X
Link output Y
Link relay B
Link special relay SB
Link register W
Link special register SW
Module access device (U\G) Module access device G
CPU buffer memory access CPU buffer memory access G/HG
device (U3E\G/HG) device
Index register Index register Z *1
Long index register LZ *1
File register File register R
ZR
Module refresh register Module refresh register RD
Nesting Nesting N
Pointer Pointer P *1
Interrupt pointer I
Others Network number specified J
device
I/O number specified device U
Constant Decimal constant K
Hexadecimal constant H
Real constant E
String constant
APPENDICES APPENDIX
278 Appendix 3 List of Applicable Devices in GX Works3
*1 Writing to local devices is available.
APPENDICES APPENDIX
Appendix 3 List of Applicable Devices in GX Works3 279
For FX5CPU
: Applicable, : Display only, : Not applicable : Not available
Category Device name Symbol Digit Bit-specified Device Device Device
specification word device comment memory initial
value
User device Input X
Output Y
Internal relay M
Latch relay L
Link relay B
Annunciator F
Link special relay SB
Timer T
Retentive timer ST
Counter C
Long counter LC
Data register D
Link register W
Link special register SW
System device Special relay SM
Special register SD
Module access device (U\G) Module access device G
Index register Index register Z
Long index register LZ
File register File register R
Nesting Nesting N
Pointer Pointer P
Interrupt pointer I
Others I/O number specified device U
Constant Decimal constant K
Hexadecimal constant H
Real constant E
String constant
APPENDICES APPENDIX
280 Appendix 3 List of Applicable Devices in GX Works3
Appendix 4 Using Simulation Function
Modules supporting the Simulation function are shown below: A
• Module names of the supported CPU module
Series Module name
MELSEC iQ-R series RnCPU R04CPU
R08CPU
R16CPU
R32CPU
R120CPU
RnPCPU R08PCPU
R16PCPU
R32PCPU
R120PCPU
• Supported modules
Series Module type
MELSEC iQ-R series Programmable controller CPU
Motion controller CPU
Input
Output
I/O
Analog input
Analog output
Simple motion
Pulse I/O, Positioning
Information module Serial communication
Ethernet
Network module CC-Link
CC-Link IE Field Network
CC-Link IE Controller Network
Q series Analog input
Analog output
Pulse I/O, Positioning
Information module
Network module
Analog I/O
Temperature input
Temperature control module
Loop control
Energy measuring module
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 281
Supported CPU module functions
The Simulation function of GX Works3 does not support some CPU module functions.
The following shows the functions that are supported by the Simulation function.
CPU module
Function name Remarks
Basic function Program related function Executing a program (ladder, ST, and FBD/LD)
Scan time monitoring time (WDT) setting The operation is not performed in
actual time.
Clock function Clock function Clock function The clock data is written to the
internal time of a simulator.
It differs from the time of a
personal computer.
Time zone setting The clock of a personal computer
is copied to the internal time and
used.
System clock function The operation is not performed in
actual time.
LED display function LED display function
Writing to PLC/Reading Writing to a programmable controller (including writing data while CPU
from PLC module is in RUN)
Reading from a programmable controller
Diagnostic function Self-diagnostic function Error detection function
Module diagnostic function Host CPU only.
Monitor and test function Basic monitor function Monitoring a program (Circuit monitor)
Test function Testing device and Testing device and
label data label data
(Changing values) (Changing values)
Testing local
device and local
label data
Debug function Changing program and Changing program while CPU module is
parameter while CPU in RUN (Changing ladder block)
module is in RUN
APPENDICES APPENDIX
282 Appendix 4 Using Simulation Function
Function name Remarks
Operation function Program related function Program execution setting Program execution type setting function
function
Device/file usage setting
A
Interrupt function Fixed cycle interval setting The operation is not performed in
actual time.
File register block number saving/
recovering setting
Interrupt permission setting during
instruction execution
PID control function
Process control function
Constant scan The operation is not performed in
actual time.
Operation function Remote operation function Operation change function
RUN-PAUSE contact setting function
Device/data related Device/label memory area Device/label memory area setting
function setting function function
(Device variable setting (Device variable setting function)
function)
Local device setting function
Refresh memory setting function
Internal buffer capacity setting function
Index register setting function
Device/label initial value setting function
Device comment function
File register setting function
Timer device limit setting function
Stop RUN operation setting function of output (Y)
Communication setting Device/label access service processing setting
function
RAS function Diagnostic function Self-diagnostic application Error clear function
function
History function Event history function (Error history/module error history collecting Host CPU only.
function)
Maintenance Applied monitor function (Interrupt) program list monitor The operation is not performed in
function actual time.
Scan time monitor The operation is not performed in
actual time.
Buffer memory monitor function
Applied test function Clearing device, label and file register
Clearing latch device and label
Series-common function
Function name Remarks
System System configuration Input/output number and point variable setting function
configuration setting function
function
Module Data communication Direct access function (U\G, J\) Access with module FB
programming function (dedicated instruction) and
common function module label is available.
Program creation Module label and module FB (device comment) auto-creation function
support function
Sample program display function (Template display function)
Parameter auto-creation function (Initial setting and refresh setting)
RAS function History function Event history function Event history function
(Error history/system error history
function)
Diagnostic function Module diagnostics Host CPU only.
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 283
Supported devices
The devices supported by the Simulation function are the same as that of CPU module.
APPENDICES APPENDIX
284 Appendix 4 Using Simulation Function
No. Name Description
SM420 User timing clock No.0
n2
SM421 User timing clock No.1
n1
scan
A
SM422 User timing clock No.2 scan
SM423 User timing clock No.3
SM424 User timing clock No.4
SM600 Memory card enabled/disabled flag OFF: Disabled
ON: Enabled
SM603 Memory card (drive 2) flag OFF: No SD memory card inserted
ON: SD memory card inserted
SM604 Memory card in-use flag OFF: Not used
ON: In use
SM626 Extended SRAM cassette insertion flag OFF: Extended SRAM cassette is not attached
ON: Extended SRAM cassette is attached
SM628 Program memory write error OFF: Write error
ON: No write operation/normal
SM629 Program memory write flag OFF: Writing is in progress
ON: No write operation
SM632 Data memory write error OFF: Write error
ON: No write operation/normal
SM633 Data memory write flag OFF: Writing is in progress
ON: No write operation
SM699 Dedicated instruction skip flag OFF: Instruction is executing or completed
ON: Instruction has not been executed
SM700 Carry flag OFF: Carry OFF
ON: Carry ON
SM701 Number of output characters selection OFF: Outputs until reaching NULL code
ON: Outputs 16 characters
SM702 Search method OFF: Sequential search
ON: Dichotomizing search
SM703 Sort order OFF: Ascending
ON: Descending
SM704 Block comparison OFF: Mismatch is detected
ON: Completely match
SM709 DT/TM instruction improper data detection flag OFF: No improper data
ON: Improper data is detected
SM752 Dedicated instruction End bit control flag OFF: End bit automatically controlled
ON: End bit not automatically controlled
SM753 File access in progress OFF: File access is not in progress
ON: File access is in progress
SM754 BIN/DBIN instruction error control flag OFF: Executes error detection
ON: No execute error detection
SM755 Scaling data check settings OFF: Performs data check
ON: Not perform data check
SM756 Module access completion wait control flag OFF: Not wait the completion
ON: Waits the completion
SM776 Local device setting at CALL OFF: Disables local devices
ON: Enables local devices
SM777 Local device setting in interrupt programs OFF: Disables local devices
ON: Enables local devices
SM816*1 Hold mode OFF: Value not held
ON: Value held
SM817*1 Hold mode OFF: Value not held
ON: Value held
SM1200 Auto logging setting file and registration status OFF: Mismatch
ON: Matching
SM1201 SD memory card setting file in use flag OFF: Not used
ON: In use
SM1202 Data memory setting file in use flag OFF: Not used
ON: In use
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 285
No. Name Description
SM1210 Data logging setting No.1 OFF: Not prepared
Data logging preparation ON: Prepared
SM1211 Data logging setting No.1 OFF: Suspended/waiting for start
Data logging start ON: Start
SM1212 Data logging setting No.1 OFF: No data logging collection operation
Data logging data collection in progress ON: Data logging data collection in progress
SM1213 Data logging setting No.1 OFF: Data logging is not completed
Data logging completion ON: Data logging is completed
SM1214 Data logging setting No.1 From off to on: triggering occurs
Data logging triggering
SM1215 Data logging setting No.1 OFF: Not post triggering
Post data logging triggering ON: Post triggering
SM1216 Data logging setting No.1 OFF: No error
Data logging error ON: Error state
SM1217 Data logging setting No.1 OFF: Data saving is not in progress
Data logging data saving into memory card in progress ON: Data saving is in progress
SM1218 Data logging setting No.1 OFF: Storage file switching is not in progress
Logging data storage file switching in progress ON: Storage file switching is in progress
SM1220 to SM1228 Data logging setting No.2 Same configuration as the setting No.1
SM1230 to SM1238 Data logging setting No.3 Same configuration as the setting No.1
SM1240 to SM1248 Data logging setting No.4 Same configuration as the setting No.1
SM1250 to SM1258 Data logging setting No.5 Same configuration as the setting No.1
SM1260 to SM1268 Data logging setting No.6 Same configuration as the setting No.1
SM1270 to SM1278 Data logging setting No.7 Same configuration as the setting No.1
SM1280 to SM1288 Data logging setting No.8 Same configuration as the setting No.1
SM1290 to SM1298 Data logging setting No.9 Same configuration as the setting No.1
SM1300 to SM1308 Data logging setting No.10 Same configuration as the setting No.1
SM1524 Initial processing successful completion state OFF: The initial processing was completed successfully.
ON: The initial processing was not completed successfully.
SM1525 Initial processing error completion state OFF: The initial processing was completed with an error.
ON: The initial processing was not completed with an error.
APPENDICES APPENDIX
286 Appendix 4 Using Simulation Function
List of special register
For details on special registers, refer to the following manual.
A
MELSEC iQ-R CPU Module User's Manual (Application)
No. Name Description
SD0 Latest self diagnostics error code Latest self diagnostics error code
SD1 Clock time for self diagnosis error occurrence Clock time for self diagnosis error occurrence
SD2
SD3
SD4
SD5
SD6
SD7
SD10 Self diagnostics error code Self diagnostics error code 1
SD11 Self diagnostics error code 2
SD12 Self diagnostics error code 3
SD13 Self diagnostics error code 4
SD14 Self diagnostics error code 5
SD15 Self diagnostics error code 6
SD16 Self diagnostics error code 7
SD17 Self diagnostics error code 8
SD18 Self diagnostics error code 9
SD19 Self diagnostics error code 10
SD20 Self diagnostics error code 11
SD21 Self diagnostics error code 12
SD22 Self diagnostics error code 13
SD23 Self diagnostics error code 14
SD24 Self diagnostics error code 15
SD25 Self diagnostics error code 16
SD62 Annunciator number Annunciator number
SD63 Number of annunciators Number of annunciators
SD64 to SD79 Table of detected annunciator numbers Detected annunciator number
SD80 Detailed information 1 information category Detailed information 1 information category code
SD81 to SD111 Detailed information 1 Detailed information 1
SD112 Detailed information 2 information category Detailed information 2 information category code
SD113 to SD143 Detailed information 2 Detailed information 2
SD200 Switch status CPU switch status
SD201 LED status CPU-LED state
SD203 CPU module operating status CPU module operating status
SD210 Clock data Clock data (year)
SD211 Clock data (month)
SD212 Clock data (day)
SD213 Clock data (hour)
SD214 Clock data (minute)
SD215 Clock data (second)
SD216 Clock data (day of the week)
SD218 Time zone setting value Time zone (in minutes)
SD241 Number of extension base units 0: base unit only
1 to 7: number of extension base units
SD242 Identification for whether or not Q series module Identification of the base type
can be mounted 0: Q series module cannot be mounted (There is no base unit that can mount the
Q series unit)
1: Q series module can be mounted (There is a base unit that can mount the Q
series unit)
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 287
No. Name Description
SD243 Number of base slots Number of base slots
SD244
SD250 Latest I/O for implemented unit Latest I/O number for implemented unit
SD260 Number of points assigned to bit devices X number of points assigned (L)
SD261 X number of points assigned (H)
SD262 Y number of points assigned (L)
SD263 Y number of points assigned (H)
SD264 M number of points assigned (L)
SD265 M number of points assigned (H)
SD266 B number of points assigned (L)
SD267 B number of points assigned (H)
SD268 SB number of points assigned (L)
SD269 SB number of points assigned (H)
SD270 F number of points assigned (L)
SD271 F number of points assigned (H)
SD272 V number of points assigned (L)
SD273 V number of points assigned (H)
SD274 L number of points assigned (L)
SD275 L number of points assigned (H)
SD280 Number of points assigned to word devices D number of points assigned (L)
SD281 D number of points assigned (H)
SD282 W number of points assigned (L)
SD283 W number of points assigned (H)
SD284 SW number of points assigned (L)
SD285 SW number of points assigned (H)
SD288 Number of points assigned to timer-type devices T number of points assigned (L)
SD289 T number of points assigned (H)
SD290 ST number of points assigned (L)
SD291 ST number of points assigned (H)
SD292 C number of points assigned (L)
SD293 C number of points assigned (H)
SD294 LT number of points assigned (L)
SD295 LT number of points assigned (H)
SD296 LST number of points assigned (L)
SD297 LST number of points assigned (H)
SD298 LC number of points assigned (L)
SD299 LC number of points assigned (H)
SD300 Number of points assigned to index registers Z number of points assigned
SD302 Number of points assigned to long index registers LZ number of points assigned
SD306 Number of points assigned to file registers ZR number of points assigned (L)
SD307 ZR number of points assigned (H)
SD308 Number of points assigned to refresh devices RD number of points assigned (L)
SD309 RD number of points assigned (H)
SD312 File register block number File register block number
SD412 One second counter The number of counts that is counted once per second.
SD414 2n second clock setting Unit setting for 2n second clock
SD415 2nms second clock setting Unit setting for 2nms second clock
SD420 Scan counter The number of counts that is counted once for each scan
SD500 Execution program number The execution type of the program being executed
SD518 Initial scan time Initial scan time (unit: ms)
SD519 Initial scan time (unit: s)
SD520 Current scan time Current scan time (unit: ms)
SD521 Current scan time (unit: s)
APPENDICES APPENDIX
288 Appendix 4 Using Simulation Function
No. Name Description
SD522 Minimum scan time Minimum scan time (unit: ms)
SD523 Minimum scan time (unit: s)
A
SD524 Maximum scan time Maximum scan time (unit: ms)
SD525 Maximum scan time (unit: (s)
SD526 END processing time END processing time (unit: ms)
SD527 END processing time (unit: s)
SD528 Constant scan waiting time Constant scan waiting time (unit: ms)
SD529 Constant scan waiting time (unit: s)
SD530 Scan program execution time Scan program execution time (unit: ms)
SD531 Scan program execution time (unit: s)
SD600 Memory card mounting status SD memory card type
SD604 SD memory card (drive 2) usage status SD memory card (drive 2) usage status
SD606 SD memory card (drive 2) capacity SD memory card (drive 2) capacity: the lower digit (unit: KB)
SD607 SD memory card (drive 2) capacity: the higher digits (unit: KB)
SD610 SD memory card (drive 2) free space SD memory card (drive 2) free space: the lower digit (unit: KB)
SD611 SD memory card (drive 2) free space: the higher digits (unit: KB)
SD614 Device/label memory (drive 3) usage status Device/label memory (drive 3) usage status
SD616 Device/label memory (drive 3) capacity Device/label memory (drive 3) capacity: the lower digits (unit: KB)
SD617 Device/label memory (drive 3) capacity: the higher digits (unit: KB)
SD618 Device/label memory (file storage area) capacity Device/label memory (file storage area) (drive 3) capacity: the lower digits (unit:
KB)
SD619 Device/label memory (file storage area) (drive 3) capacity: the lower digits (unit:
KB)
SD620 Data memory (drive 4) usage status Data memory (drive 4) usage status
SD622 Data memory (drive 4) capacity Data memory (drive 4) capacity: the lower digits (unit: KB)
SD623 Data memory (drive 4) capacity: the higher digits (unit: KB)
SD626 Extended SRAM cassette capacity identification Capacity identification information of the Extended SRAM cassette
information
SD629 Program memory write (transfer) status Write (transfer) status display (percent)
SD633 Data memory write (transfer) status Write (transfer) status display (percent)
SD757 Current interrupt priority Current interrupt priority
SD758 Interrupt disabling for each priority setting value Interrupt disabling for each priority setting value
SD771 Specification of the number of write instruction Specification of the number of write instruction executions to data memory
executions to data memory
SD816*1 Execution cycle Execution cycle
*1
SD817
SD818*1 Bumpless function availability setting for the 0: Enable
S.PIDP instruction 1: Disable
SD819*1 Dummy device Dummy device
SD820*1
SD1210 Data logging setting No.1 Latest storage file number
Latest storage file number
SD1211
SD1212 Data logging setting No.1 Oldest storage file number
Oldest storage file number
SD1213
SD1214 Data logging setting No.1 Internal buffer free space size (KB)
Internal buffer free space
SD1215 Data logging setting No.1 Number of processing overflow occurrences
Number of processing overflow occurrences
SD1216 Data logging setting No.1 Data logging error cause
Data logging error cause
SD1220 to SD1226 Data logging setting No.2 Same configuration as the setting No.1
SD1230 to SD1236 Data logging setting No.3 Same configuration as the setting No.1
SD1240 to SD1246 Data logging setting No.4 Same configuration as the setting No.1
SD1250 to SD1256 Data logging setting No.5 Same configuration as the setting No.1
SD1260 to SD1266 Data logging setting No.6 Same configuration as the setting No.1
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 289
No. Name Description
SD1270 to SD1276 Data logging setting No.7 Same configuration as the setting No.1
SD1280 to SD1286 Data logging setting No.8 Same configuration as the setting No.1
SD1290 to SD1296 Data logging setting No.9 Same configuration as the setting No.1
SD1300 to SD1306 Data logging setting No.10 Same configuration as the setting No.1
SD1400 to SD1463 Interrupt pointer mask pattern Mask pattern
SD1504 Open completion signal Open completion
SD1505 Open request signal Open request
Supported instructions
The instructions supported by the Simulation function are shown below:
Note that no processing is performed for unsupported instructions (NOP processing).
Sequence instruction
Category Symbol
Contact instruction AND, ANDF, ANDFI, ANDP, ANDPI, ANI, LD, LDF, LDFI, LDI, LDP, LDPI, OR, ORF, ORFI, ORI, ORP, ORPI
Association instruction ANB, EGF, EGP, INV, MEF, MEP, MPP, MPS, MRD, ORB
Output instruction FF, OUT, OUT C, OUT F, OUT LC, OUT LT/LST, OUT T/ST, OUTH T/ST, PLF, PLS, RST, RST F, SET, SET F
Shift instruction SFT(P)
Master control instruction MC, MCR
Termination instruction END, FEND
Stop instruction STOP
No operation instruction NOP, NOPLF
Basic instruction
Category Symbol*1
Comparison operation AND(_U), ANDD(_U), BKCMP(P)(_U), DBKCMP(P)(_U), LD(_U), LDD(_U), OR(_U), ORD(_U)
instruction
Arithmetic operation *(P)(_U), +(P)(_U), -(P)(_U), /(P)(_U), B*(P), B+(P), B-(P), B/(P), BK+(P)(_U), BK-(P)(_U), D*(P)(_U), D+(P)(_U), D-(P)(_U), D/
instruction (P)(_U), DB*(P), DB+(P), DB-(P), DB/(P), DBK+(P)(_U), DBK-(P)(_U), DDEC(P)(_U), DEC(P)(_U), DINC(P)(_U), INC(P)(_U)
Data transfer instruction BLKMOVB(P), BMOV(P), BMOVL(P), BXCH(P), CML(P), CMLB(P), DCML(P), DFMOV(P), DFMOVL(P), DMOV(P), DXCH(P),
FMOV(P), FMOVL(P), MOV(P), MOVB(P), SWAP(P), XCH(P)
Logical operation instruction BKAND(P), BKOR(P), BKXNR(P), BKXOR(P), DAND(P), DOR(P), DXNR(P), DXOR(P), WAND(P), WOR(P), WXNR(P),
WXOR(P)
Data shift instruction BSFL(P), BSFR(P), DSFL(P), DSFR(P), SFL(P), SFR(P), SFTBL(P), SFTBR(P), SFTWL(P), SFTWR(P)
Bit processing instruction BKRST(P), BRST(P), BSET(P), DTEST(P), TEST(P)
Data conversion instruction ASC2INT(P), BCD(P), BIN(P), BKBCD(P), BKBIN(P), BTOW(P), DABCD(P), DABIN(P)(_U), DBCD(P), DBIN(P),
DBL2DINT(P), DBL2INT(P), DBL2UDINT(P), DBL2UINT(P), DDABCD(P), DDABIN(P)(_U), DECO(P), DGBIN(P)(_U),
DGRY(P)(_U), DHABIN(P), DINT2INT(P), DINT2UDINT(P), DINT2UINT(P), DIS(P), DNEG(P), DVAL(P)(_U), EMOD(P),
ENCO(P), FLT2DINT(P), FLT2INT(P), FLT2UDINT(P), FLT2UINT(P), GBIN(P)(_U), GRY(P)(_U), HABIN(P), INT2DINT(P),
INT2UDINT(P), INT2UINT(P), NDIS(P), NEG(P), NUNI(P), SEG(P), UDINT2DINT(P), UDINT2INT(P), UDINT2UINT(P),
UINT2DINT(P), UINT2INT(P), UINT2UDINT(P), UNI(P), VAL(P)(_U), WTOB(P)
*1 indicates an operator.
Application instruction
Category Symbol*1
Program branch instruction CJ, GOEND, JMP, SCJ
Program execution control DI, EI, IMASK, IRET, SIMASK, WDT(P)
instruction
Rotation instruction DRCL(P), DRCR(P), DROL(P), DROR(P), RCL(P), RCR(P), ROL(P), ROR(P)
Data processing instruction DMAX(P)(_U), DMEAN(P)(_U), DMIN(P)(_U), DSERDATA(P), DSORTD(_U), DSUM(P), DWSUM(P)(_U), MAX(P)(_U),
MEAN(P)(_U), MIN(P)(_U), SERDATA(P), SORTD(_U), SUM(P), WSUM(P)(_U)
Structure creation instruction BREAK(P), CALL(P), ECALL(P), EFCALL(P), FCALL(P), FOR, NEXT, RET, XCALL
Data table operation instruction FDEL(P), FIFR(P), FIFW(P), FINS(P), FPOP(P)
APPENDICES APPENDIX
290 Appendix 4 Using Simulation Function
Category Symbol*1
Debugging and failure diagnostic LEDR
instruction
String processing instruction $+(P), $MOV(P), $MOV(P)_WS, AND$, BCDDA(P), BINDA(P)(_U), BINHA(P), DBCDDA(P), DBINDA(P)(_U),
A
DBINHA(P), DSTR(P)(_U), ESTR(P), INSTR(P), INT2ASC(P), LD$, LEFT(P), LEN(P), MIDR(P), MIDW(P), OR$,
RIGHT(P), SJIS2WS(P), SJIS2WSB(P), STR(P)(_U), STRDEL(P), STRINS(P), WS2SJIS(P)
Data control instruction BAND(P)(_U), DBAND(P)(_U), DLIMIT(P)(_U), DSCL(P)(_U), DSCL2(P)(_U), DZONE(P)(_U), LIMIT(P)(_U),
SCL(P)(_U), SCL2(P)(_U), ZONE(P)(_U)
File register operation instruction ADRSET(P), QDRSET(P), RSET(P), ZRRDB(P), ZRWRB(P)
Clock instruction ANDDT, ANDTM, DATE+(P), DATE-(P), DATERD(P), DATEWR(P), LDDT, LDTM, ORDT, ORTM,
S(P).DATE+, S(P).DATE-, S(P).DATERD, SEC2TIME(P), TIME2SEC(P)
Program control instruction POFF(P), PSCAN(P), PSTOP(P)
PID control instruction PIDCONT(P), PIDINIT(P), PIDPRMW(P), PIDRUN(P), PIDSTOP(P), S(P).PIDCONT, S(P).PIDINIT, S(P).PIDPRMW,
S(P).PIDRUN, S(P).PIDSTOP
Reading/writing data instruction S(P).DEVLD, SP.DEVST, SP.FREAD, SP.FWRITE
Real number instruction ACOS(P), ACOSD(P), ANDE, ANDED, ASIN(P), ASIND(P), ATAN(P), ATAND(P), BACOS(P), BASIN(P), BATAN(P),
BCOS(P), BDSQRT(P), BSIN(P), BSQRT(P), BTAN(P), COS(P), COSD(P), DBL2FLT(P), DEG(P), DEGD(P),
DINT2DBL(P), DINT2FLT(P), E*(P), E+(P), E-(P), E/(P), ED*(P), ED+(P), ED-(P), ED/(P), EDMAX(P), EDMIN(P),
EDMOV(P), EDNEG(P), EDSQRT(P), EMAX(P), EMIN(P), EMOV(P), ENEG(P), EREXP(P), ESQRT(P), EVAL(P),
EXP(P), EXPD(P), FLT2DBL(P), INT2DBL(P), INT2FLT(P), LDE, LDED, LOG(P), LOG10(P), LOG10D(P), LOGD(P),
ORE, ORED, POW(P), POWD(P), RAD(P), RADD(P), SIN(P), SIND(P), TAN(P), TAND(P), UDINT2DBL(P),
UDINT2FLT(P), UINT2DBL(P), UINT2FLT(P)
Random number instruction RND(P), SRND(P)
Index register instruction ZPOP(P), ZPUSH(P)
Special counter instruction UDCNT1, UDCNT2
Special timer instruction STMR, TTMR
Shortcut control instruction ROTC
Ramp signal instruction RAMPQ
Pulse related instruction PLSY, PWM, SPD
Matrix input instruction MTR
Direct read/write in 1-byte unit ZRRDB(P), ZRWRB(P)
Indirect address read ADRSET(P)
Timing check instruction DUTY, TIMCHK
Module access instruction DFROM(P), DFROMD(P), DTO(P), DTOD(P), FROM(P), FROMD(P), TO(P), TOD(P), TYPER(D), UNIINFRD(P)
Logging instruction LOGTRG, LOGTRGR
Process control instruction S.2PID, S., S.ABS, S.ADD, S.AMR, S.AT1, S.AVE, S.BC, S.BPI, S.BUMP, S.D, S.DBND, S.DED, S.DIV, S.DUTY,
(RnPCPU only) S.ENG, S.FG, S.FLT, S.HS, S.I, S.IENG, S.IFG, S.IN, S.IPD, S.LIMT, S.LLAG, S.LS, S.MID, S.MOUT, S.MUL, S.ONF2,
S.ONF3, S.OUT1, S.OUT2, S.PGS, S.PHPL, S.PID, S.PIDP, S.PSUM, S.R, S.SEL, S.SPI, S.SQR, S.SUB, S.SUM,
S.TPC, S.VLMT1, S.VLMT2
*1 indicates an operator.
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 291
Enabled/disabled parameter items
The Simulation function does not support some parameter setting items.
The following shows the parameter setting items that are supported by the Simulation function.
System parameter
Setting item
I/O Assignment Base/Power/Extension Cable Setting Slots
I/O Assignment Setting Module Name
Module Status Setting
Module/Points/Start XY
Control PLC Setting
CPU parameter
Setting item
Operation Related Timer Limit Setting
Setting
RUN-PAUSE Contact Setting
Remote Reset Setting
Output Mode Setting of STOP to RUN
Clock Related Setting
Interrupt Settings Fixed Scan Interval Setting
Fixed Scan Execution Mode Setting
Interrupt Enable Setting in Executing Instruction
Block No. Save/Recovery Setting
Service Processing Device/Label Access Service Processing Setting
Setting
File Setting File Register Setting
Initial Value Setting
File Setting for Device Data Storage
Memory/Device Setting Device/Label Memory Area Setting Extended SRAM Cassette Setting
Device/Label Memory Area Capacity Setting
Device/Label Memory Area Detailed Points
Setting
Local Device
Index Register Setting
Refresh Memory Setting
Pointer Setting
Internal Buffer Capacity Setting
RAS Setting Scan Time Monitoring Time (WDT) Setting
Constant Scan Setting
Error Detections Setting
CPU Module Operation Setting at Error Detected
LED Display Setting
Event History Setting
Program Setting Program Setting Program Setting Program Name
Execution Type
Detailed Setting Information (Fixed Scan)
Detailed Setting Information (Event)
Device/File Use or not
FB/FUN File Setting
APPENDICES APPENDIX
292 Appendix 4 Using Simulation Function
Module buffer memory
The following shows the number of points of buffer memory (U\G) for a module supported by the Simulation function. A
Series Module type Points
MELSEC iQ-R series Programmable controller CPU 524288
Motion controller CPU 524288
Input 512
Output 512
I/O 512
Analog input 131072
Analog output 131072
Simple motion 131072
Pulse I/O, Positioning 131072
Information module Serial communication 65536
Ethernet 2097152
Network module CC-Link 32768
CC-Link IE Field Network 65536
CC-Link IE Controller Network 2097152
Q series Analog input 131072
Analog output
Pulse I/O and Positioning
Information module
Network module
Analog I/O
Temperature input
Temperature control module
Loop control
Energy measuring module
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 293
Considerations
The following describes the considerations on debugging programs using the Simulation function.
Simulation time
Since the instruction processing speed differs between the Simulation function and CPU module, the simulator operates as
follows.
• The simulation time is calculated by adding the average execution time per one instruction, which is calculated based on
the PC MIX value, at every internal instruction execution of a CPU module.
The simulator operates behind the actual time when the simulation time takes longer than the actual time due to the
performance of the personal computer. The simulation time gains in accordance with the actual time when the actual time
takes longer than the simulation time.
100ms elapsed END 200ms elapsed END 300ms elapsed END 400ms elapsed END
Reference from reference processing from reference processing from reference processing from reference processing
time time time time
Module
■I/O module
Simulation of the operation does not support I/O module.
Network
The Simulation function does not support the network.
Watchdog timer
It operates in accordance with the simulation time.
APPENDICES APPENDIX
294 Appendix 4 Using Simulation Function
Drive usage
The data in the ROM drive of CPU module (program memory/data memory) is stored in a temporary folder in the hard disk of
A
a personal computer.
The ROM drive usage per data depends on the hard disk of a personal computer.
CPU number
The Simulation function only supports CPU No.1.
The Simulation function is performed by handling CPU No.1 as the host CPU when the host CPU is set to CPU No.2 to CPU
No.4 in "I/O Assignment Setting" of the system parameter.
Ex.
The host CPU is set to CPU No.4 in "I/O Assignment Setting".
CPU number I/O assignment setting Simulation
CPU No.1 R04CPU R32CPU (host CPU)
CPU No.2 R08CPU R08CPU
CPU No.3 R16CPU R16CPU
CPU No.4 R32CPU (host CPU) R32CPU
Clock function
It operates in accordance with the simulation time.
The clock of a personal computer is reflected to the time of the clock function every time the CPU module is reset.
APPENDICES APPENDIX
Appendix 4 Using Simulation Function 295
Appendix 5 USB Driver Installation Procedure
To communicate with a CPU module via USB, installing a USB driver is required.
The procedure of USB driver installation is as shown below.
If multiple MELSOFT products are installed previously, refer to their installed location.
Windows XP
Operating procedure
1. Connect the personal computer and a CPU module with a USB cable, and power the programmable controller CPU.
2. Select "Install from a list or specific location (Advanced)" on the "Found New Hardware Wizard" screen.
3. Select "Search for the best driver in these locations" on the next screen. Select "Include this location in the search", and
specify 'MELSOFT\Easysocket\USBDrivers' in the folder where GX Works3 has been installed.
Precautions
If the driver cannot be installed, check the following settings on Windows.
The USB driver may not be installed when "BlockNever install unsigned driver software" is selected in [Control Panel]
[System] [Hardware] [Driver Signing].
Select "Ignore Install the software anyway and don't ask for my approval", or "Warn Prompt me each time to choose an
action" in [Driver Signing], and execute the USB driver installation.
Windows Vista
Operating procedure
1. Connect the personal computer and a CPU module with a USB cable, and power the programmable controller CPU.
2. Select "Locate and install driver software (recommended)" on the "Found New Hardware Wizard" screen.
3. Select "Browse my computer for driver software (advanced)" on the "Found New Hardware" screen.
4. Select "Search for the best driver in these locations" on the displayed screen. Select "Include subfolders" and specify
'MELSOFT\Easysocket\USBDrivers' in the folder where GX Works3 has been installed.
Precautions
When "Windows can't verify the publisher of this driver software" is displayed during the installation, select "Install this driver
software anyway".
Windows 7 or later
Operating procedure
1. Connect the personal computer and a CPU module with a USB cable, and power the programmable controller CPU.
2. Select [Control Panel] [System and Security] [Administrative Tools] [Computer Management] [Device
Manager] from Windows Start*1. Right-click "Unknown device" and click "Update Driver Software".
3. Select "Browse my computer for driver software" on the "Update Driver Software" screen, and specify
'MELSOFT\Easysocket\USBDrivers' in the folder where GX Works3 has been installed on the next screen.
*1 Select [All apps] on the Start screen or [Start] [All Programs].
APPENDICES APPENDIX
296 Appendix 5 USB Driver Installation Procedure
INDEX
B P
Block password . . . . . . . . . . . . . . . . . . . . . . . 243 Processing time of program . . . . . . . . . . . . . . . .232
Profile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .71 I
C
R
Clearing to zero . . . . . . . . . . . . . . . . . . . . . . . 274
Clock . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 271 Refresh device . . . . . . . . . . . . . . . . . . . . . . . . . .86
Color . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 Remote operation . . . . . . . . . . . . . . . . . . . . . . .272
Comment . . . . . . . . . . . . . . . . . . . . . . . . . . . . 122 Remote password . . . . . . . . . . . . . . . . . . . . . . .256
Common device comment . . . . . . . . . . . . . . . . 145 RUN/STOP switch . . . . . . . . . . . . . . . . . . . . . .272
Current value . . . . . . . . . . . . . . . . . . . . . . . . . 229
S
D
Sample comment . . . . . . . . . . . . . . . . . . . . . . .151
Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 Sample library . . . . . . . . . . . . . . . . . . . . . . . . .188
Data Logging . . . . . . . . . . . . . . . . . . . . . . . . . 269 Security key authentication . . . . . . . . . . . . 245,250
Device intial value . . . . . . . . . . . . . . . . . . . . . . 164 Shortcut key . . . . . . . . . . . . . . . . . . . . . . . . . . . .40
Device memory . . . . . . . . . . . . . . . . . . . . . . . . 158 Single file format . . . . . . . . . . . . . . . . . . . . . . . . .49
Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . .123
Synchronous setting . . . . . . . . . . . . . . . . . . . . . .83
E
System monitor . . . . . . . . . . . . . . . . . . . . . . . .259
Each program device comment . . . . . . . . . . . . 145
Event history . . . . . . . . . . . . . . . . . . . . . . . . . 268 T
Execution count of interrupt program . . . . . . . . . 233
Title. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
F
U
File password . . . . . . . . . . . . . . . . . . . . . . . . . 253
Font. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 USB driver . . . . . . . . . . . . . . . . . . . . . . . . . . . .296
Function . . . . . . . . . . . . . . . . . . . . . . 119,135,183 User data . . . . . . . . . . . . . . . . . . . . . . . . . . . . .219
Function block . . . . . . . . . . . . . . . . . 115,135,180
W
G
Watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .229
Global device . . . . . . . . . . . . . . . . . . . . . . . . . 108 Workspace format . . . . . . . . . . . . . . . . . . . . . . .48
I
I/O assignment setting . . . . . . . . . . . . . . . . . . . . 83
Initialization . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Inline structured text . . . . . . . . . . . . . . . . . . . . 120
L
Latch clear . . . . . . . . . . . . . . . . . . . . . . . . . . . 274
Local device . . . . . . . . . . . . . . . . . . . . . . . . . . 108
M
MC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121
Memory dump . . . . . . . . . . . . . . . . . . . . . . . . 236
Module FB . . . . . . . . . . . . . . . . . . . . . . . . . . . 182
Module label . . . . . . . . . . . . . . . . . . . . . . . . . . 103
Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . . . 222
Multiple CPU setting . . . . . . . . . . . . . . . . . . . . . 83
N
Network configuration . . . . . . . . . . . . . . . . . . . . 85
NOP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
Note . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 125
297
MEMO
298
REVISIONS
*The manual number is given on the bottom left of the back cover.
Revision date *Manual number Description
June 2014 SH(NA)-081215ENG-A First edition
July 2014 SH(NA)-081215ENG-B Partial correction
October 2014 SH(NA)-081215ENG-C ■Added or modified parts
Section 1.2, Section 2.4, Section 2.8, Section 2.9, Section 3.1, Section 3.2, Section 4.2, Section 4.3,
Section 4.4, Section 5.1, Section 5.2, Section 5.4, Section 6.1, Section 6.5, Section 12.3, Chapter 13,
Section 13.2, Section 13.4, Section 13.8, Section 15.2, Section 15.3, Section 15.4, Section 16.1,
Section 17.3, Appendix 1
January 2015 SH(NA)-081215ENG-D ■Added or modified parts
TERMS, Chapter 1, Section 1.1, Section 1.2, Section 1.3, Section 1.4, Section 2.3, Section 2.4,
Section 2.9, Section 3.1, Section 3.2, Section 3.3, Section 3.4, Section 3.5, Chapter 4, Section 4.1,
Section 4.2, Section 4.3, Section 4.4, Section 5.1, Section 5.2, Section 5.3, Section 5.4, Section 6.1,
Section 6.2, Section 6.3, Section 6.4, Section 6.5, Section 6.6, Section 7.1, Section 8.1, Chapter 9,
Section 9.1, Section 9.2, Section 9.3, Section 9.4, Section 9.5, Section 9.6, Section 9.7, Chapter 10,
Section 10.1, Section 10.2, Chapter 11, Section 11.1, Section 11.2, Section 12.1, Section 12.2,
Section 12.3, Section 12.4, Section 12.5, Section 12.6, Section 12.7, Section 13.1, Section 13.3,
Section 13.4, Chapter 14, Section 14.1, Section 14.2, Section 14.5, Section 14.6, Section 14.7,
Section 14.8, Section 15.3, Section 15.4, Section 15.5, Chapter 16, Section 16.1, Section 16.2,
Section 16.3, Section 16.4, Section 18.1, Section 18.2, Section 18.4, Appendix 1, Appendix 3,
Appendix 4
April 2015 SH(NA)-081215ENG-E ■Added or modified parts
TERMS, Section 2.3, Section 2.4, Section 2.9, Section 3.2, Section 3.3, Section 3.4, Section 3.5,
Section 3.6, Section 4.2, Section 4.3, Section 4.4, Section 6.1, Section 6.2, Section 6.3, Section 6.7,
Chapter 10, Section 10.1, Section 10.3, Section 10.4, Section 13.2, Section 15.4, Chapter 16,
Section 16.2, Section 16.3, Appendix 1, Appendix 4
299
TRADEMARKS
Microsoft, Windows, Windows Vista, Windows NT, Windows XP, Windows Server, Visio, Excel, PowerPoint, Visual Basic,
Visual C++, and Access are either registered trademarks or trademarks of Microsoft Corporation in the United States, Japan,
and other countries.
Intel, Pentium, and Celeron are either registered trademarks or trademarks of Intel Corporation in the United States and other
countries.
Ethernet is a trademark of Xerox Corp.
The SD and SDHC logos are either registered trademarks or trademarks of SD-3C, LLC.
MODBUS is a registered trademark of Schneider Electric SA.
All other company names and product names used in this manual are either trademarks or registered trademarks of their
respective companies.
300
SH(NA)-081215ENG-E(1504)
MODEL: GXW3-O-E
HEAD OFFICE : TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
NAGOYA WORKS : 1-14 , YADA-MINAMI 5-CHOME , HIGASHI-KU, NAGOYA , JAPAN
When exported from Japan, this manual does not require application to the
Ministry of Economy, Trade and Industry for service transaction permission.