40
Function Block Specifications
Section 2-1
ting the data in each array element, specify the first or last element in the
array variable for the operand.
Example:
Note
For details, refer to
2-6 Precautions for Instructions with Operands Specifying
the First or Last of Multiple Words
.
Initial Values
When an instance is executed the first time, initial values can be set for input
variables, internal variables, and output variables. For details, refer to
Initial
Value
under the preceding descriptions of input variables, internal variables,
and output variables.
Retaining Data through Power Interruptions and Start of Operation
The values of internal variables can be retained through power interruptions
and the start of operation. When the Retain Option is selected, the variable
will be allocated to a region of memory that is retained when the power is
interrupted and PLC operation starts.
Algorithm
Enter the logic programming using the registered variables.
Operand Input
Restrictions
Addresses cannot be directly input into instruction operands within function
blocks. Addresses that are directly input will be treated as variable names.
Note
Exception: Input directly or indirectly specified addresses for Index Registers
IR0 to IR15 and Data Registers DR0 to DR15 directly into the instruction
operand. Do not input variables.
Input constants directly into instruction operands.
• Ladder programming: Enter decimal values after the &, and enter
hexadecimal numerical values after the #.
S D
100
0
#0000
1
&0
2
#0300
3
&4000
Function block definition
Instance
Variable
Algorithm
SCL
WORD[10]
SCL-BODY
LD P_On
MOV #0000 SCL[0]
MOV &0SCL[1]
MOV #0300 SCL[2]
MOV &4000 SCL[3]
SCL S SCL[0]
D
SCL
SCL
EN
ENO
Write the operand data
to the array variables.
Specifying this array element in
the SCL instruction is the same
as specifying the first address.
Specify the beginning of the
array in the SCL instruction.
Содержание 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: ......