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.
Summary of Contents for SYSMAC CX-Programmer 9
Page 2: ......
Page 4: ...iv ...
Page 6: ...vi ...
Page 8: ......
Page 16: ...xvi ...
Page 20: ...xx ...
Page 26: ...xxvi Application Precautions 4 ...
Page 27: ...Part 1 Function Blocks ...
Page 28: ......
Page 154: ...128 Procedures Section 3 2 ...
Page 155: ...Part 2 Structured Text ST ...
Page 156: ......
Page 160: ...134 CX Programmer Specifications Section 4 2 ...
Page 206: ...180 Procedures Section 6 1 ...
Page 208: ...182 System defined external variables supported in function blocks Appendix A ...
Page 230: ...204 Revision History ...
Page 231: ......