Restrictions On Function Blocks - Omron CX-PROGRAMMER 5.0-FUNCTION BLOCK OPERATION Operation Manual

Function blocks
Table of Contents

Advertisement

Restrictions on Function Blocks

Operation when the
Instance Is Not Executed
!Caution An instance will not be executed while its EN input variable is OFF, so Differ-
2-3
Restrictions on Function Blocks
Ladder Programming
Restrictions
Instructions Prohibited in
Function Block Definitions
When the input to the function block's EN input variable is OFF, the function
block is not called, so the internal variables of the instance do not change (val-
ues are retained). In the same way the output variables do not change when
EN is OFF (values are retained).
Program
P_Off
1.0
FB
EN
ENO
Execution results:
Output variable 1.0 is turned OFF, but
internal variable a retains its previous value.
Program
P_Off
P_On
1.0
Internal
variable a
entiation and Timer instructions will not be initialized while EN is OFF. If Differ-
entiation or Timer instructions are being used, use the Always ON Flag
(P_On) for the EN input condition and include the instruction's input condition
within the function block definition.
Nesting
A function block cannot be called from another function block, i.e., nesting is
not supported.
Program
Instance A
FB1
There are some restrictions on instructions used in ladder programs.
The following instructions cannot be used in function block definitions. A com-
pile error will occur if any of these instructions is used.
• Block Programming Instructions (All instructions, including BPRG and
BEND)
• Subroutine Instructions (SBS, GSBS, RET, MCRO, SBN, GSBN, and
GRET)
• Jump Instructions (JMP, CJP, CJPN, and JME)
• Step Instructions (STEP and SNXT)
• Immediate Refresh Instructions (!)
• I/O REFRESH Instruction (IORF)
• TMHH and TMHHX Instructions
• CV Address Conversion Instructions (FRMCV and TOCV)
FB definition
Body
P_On
ENO
Internal
variable a
If the programming were entered
directly into the program instead of in a
function block definition, both bit 1.0
and variable a would be turned OFF.
Instance A: FB1
Instance X: FB2
FB2
Section 2-3
37

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cx-programmer 5.0Sysmac ws02-cxpc1-e-v50Cs1-hCj1-hCj1m

Table of Contents