24
Usage Procedures
Section 1-5
4.
Set the variables’ input source addresses and/or constants and output
destination addresses and/or constants as the parameters to pass data for
each instance.
5.
Select the created instance, select
Function Block Memory - Function
Block Memory Allocation
from the
PLC
Menu, and set the internal data
area for each type of variable.
6.
Transfer the program to the CPU Unit.
7.
Start program execution in the CPU Unit and the instance will be called and
executed if their input conditions are ON.
1-5-2
Reusing Function Blocks
Use the following procedure to save a function block definition as a file and
use it in a program for another PLCs.
1,2,3...
1.
Select the function block that you want to save and save it as a function
block definition file (*.cxf).
2.
Open the other PLC’s project and open/read the function block definition
file (*.cxf) that was saved.
3.
Insert the function block definition in the program when creating the new
program.
Note
In the CX-Programmer Ver. 5.0, each function block definition can be com-
piled and checked as a program. We recommend compiling to perform a pro-
gram check on each function block definition file before saving or reusing the
file.
a
b
c
1. Algorithm
2. Variables
Standard
program section
with variable
names a, b, c,
etc.
Table defining usage
and properties of
variables a, b, c, etc.
Input 0.00
Function block definition A
Program
Insert in
program.
Input
condition
The instance is
executed if the input
condition is established.
3. Input instance name
Output 2.00
Output 3.00
Instance of function block definition A
5. The system automatically allocates
the addresses used by these
variables. Set the data area area in
which these addresses are allocated.
4. Specify the input source and
output destination addresses.
a
b
c
1. Algorithm
2. Variables
Standard
program section
with variable
names a, b, c,
etc.
Table defining usage
and properties of
variables a, b, c, etc.
Input 1.00
Function block definition A
Program
Input
condition
Output 5.00
Output 6.00
Instance of function block definition A
Save
Read and
insert.
Function
block
definition
A
Function block
definition file (*.cxf)
Содержание SYSMAC CX-Programmer 9
Страница 2: ......
Страница 4: ...iv ...
Страница 6: ...vi ...
Страница 8: ......
Страница 16: ...xvi ...
Страница 20: ...xx ...
Страница 26: ...xxvi Application Precautions 4 ...
Страница 27: ...Part 1 Function Blocks ...
Страница 28: ......
Страница 154: ...128 Procedures Section 3 2 ...
Страница 155: ...Part 2 Structured Text ST ...
Страница 156: ......
Страница 160: ...134 CX Programmer Specifications Section 4 2 ...
Страница 206: ...180 Procedures Section 6 1 ...
Страница 208: ...182 System defined external variables supported in function blocks Appendix A ...
Страница 230: ...204 Revision History ...
Страница 231: ......