How To Create A Template - bcnp59990029b
How To Create A Template - bcnp59990029b
1. GX Works2 Project
Refer to Chapter2 “GX Works3 Project” if you make a PLC project with GX Works3.
1.1. Prerequisites
A project is created as a Structured project in the single file format.
Before After
EEE Equipment name
UUU Unit name
Example: initial value for function block, setting value for function block
Program Interface Other labels used in a user program after the SCADA generation
・Local label
Equipment Parameter is defined as local label.
1.2.1.3. The format of the label information for MC AppBuilder in the label editor of GX Works2
The label information for MC AppBuilder is written in the remark of global label or the comment of
local label according to the following format.
These settings are used by MC AppBuilder when registering the template. They can be edited with
MC AppBuilder after the registration of template.
Examples
(1) Defining the type as IO Access Interface, and the property name as RUNFB.
type=IO;name=RUNFB
(2) Defining the type as Monitoring Interface, and the property name as SDT_EqMotor for label
of structured data with 19 members. attr should be set in the order of the defined members.
type=M;attr=R,RW,RW,R,RW,RW,R,R,RW,RW,R,R,R,R,R,R,R,R,RW;name=SDT_EqMotor
(3) Defining the type as Equipment Parameter, and the property name as ENABLE_INTLK.
type=param;name=ENABLE_INTLK
When setting an initial value to Monitoring Interface or the internal parameter of function block,
the initialization logic should be implemented on the function block.
The latch information should be stored in the function block by using VAR_RETAIN in local label.
In the Mitsubishi template, values are copied from latched device in the first scan, and they are
written to the latched device in the end of every scan.
Example of latch program:
Do not use labels with “EEE” or “UUU” in a function block. When they are used in a function block,
the SCADA generation process does not work correctly.
When a user applies online program change to a user’s template, there are restrictions to use rise,
fall, and SCJ instructions.
Refer to the section 15.9.4 “Considerations for Online program change of rise, fall, or SCJ
instruction” in “GX Works2 Version 1 Operating Manual (Common)” for detailed information.
Before After
EEE Equipment name
UUU Unit name
Example: initial value for function block, setting value for function block
Program Interface Other labels used in a user program after the SCADA generation
・Local label
Equipment Parameter is defined as local label.
These settings are used by MC AppBuilder when registering the template. They can be edited with
MC AppBuilder after the registration of template.
The label information is according to the following format.
Examples
(1) Defining the type as IO Access Interface, and the property name as RUNFB.
type=IO;name=RUNFB
(2) Defining the type as Monitoring Interface, and the property name as SDT_EqMotor for label
of structured data with 19 members. attr should be set in the order of the defined members.
type=M;attr=R,RW,RW,R,RW,RW,R,R,RW,RW,R,R,R,R,R,R,R,R,RW;name=SDT_EqMotor
(3) Defining the type as Equipment Parameter, and the property name as ENABLE_INTLK.
type=param;name=ENABLE_INTLK
When setting an initial value to Monitoring Interface or the internal parameter of function block,
the initialization logic should be implemented on the function block.
Do not use labels with “EEE” or “UUU” in a function block. When they are used in a function block,
the SCADA generation process does not work correctly.
When a user applies online program change to a user’s template, there are restrictions to use rise,
fall, and SCJ instructions.
Refer to the section 13.3 “Writing Programs While CPU is in RUN” in “GX Works3 Operating
Manual” for detailed information.
Faceplate example
Writing example
(1) Displaying the equipment name
<??Name()?>
(3) Switching the strings between “REMOTE” and “LOCAL” on the faceplate
x=IF {{<??Path(SDT_EqMotor/Remote)?>}} THEN "REMOTE" ELSE "LOCAL"
1. Select “Add Template” from the target folder to register the template on the “Templates” tree.
3. Press the “Import” button on the “General” tab to register the GX Works2/GX Works3 project.
5. Press the “Add” button on the “Symbols” tab to register the symbol. Multiple symbols can be
registered to a single template.
8. Press the “General” tab, and set the description, the equipment type, the default symbol, the
default faceplate information, the version, and the author.