Omron CX-PROGRAMMER V8.1 Operation Manual page 65

Function blocks/ structured text
Table of Contents

Advertisement

Function Block Specifications
Note
Algorithm
Operand Input
Restrictions
Note
40
ting the data in each array element, specify the first or last element in the
array variable for the operand.
Example:
Function block definition
Variable
SCL
WORD[10]
Algorithm
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
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.
Enter the logic programming using the registered variables.
Addresses cannot be directly input into instruction operands within function
blocks. Addresses that are directly input will be treated as variable names.
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 #.
Instance
SCL
EN
ENO
S
D
SCL
Specifying this array element in
0
#0000
the SCL instruction is the same
as specifying the first address.
1
&0
2
#0300
3
&4000
Write the operand data
to the array variables.
Specify the beginning of the
array in the SCL instruction.
Section 2-1
100

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the CX-PROGRAMMER V8.1 and is the answer not in the manual?

This manual is also suitable for:

Sysmac ws02-cxpc1-v8Sysmac cx-programmer 8.1

Table of Contents

Save PDF