49
Instance Specifications
Section 2-3
2-3-3
Operating Specifications
Calling Instances
The user can call an instance from any location. The instance will be executed
when the input to EN is ON.
Operation when the
Instance Is Executed
The system calls a function block when the input to the function block’s EN
input variable is ON. When the function block is called, the system generates
the instance’s variables and copies the algorithm registered in the function
block. The instance is then executed.
The order of execution is as follows:
1.
Read data from parameters to input variables.
2.
Execute the algorithm.
3.
Write data from output variables to parameters.
Data cannot be exchanged with parameters in the algorithm itself.
In addition, if an output variable is not changed by the execution of the algo-
rithm, the output parameter will retain its previous value.
0.0
1.0
D10
EN ENO
A B
D0
Instance
In this case, the input to EN is bit 0.0 at the left of the diagram.
•
When the input to EN is ON, the instance is executed and
the execution results are reflected in bit 1.0 and word D10.
•
When the input to EN is OFF, the instance is not executed,
bit 1.0 is turned OFF, and the content of D10 is not changed.
P_On
1.0
&10
CLOCK PULSE
EN ENO
ON_TIME
OFF_TIME
&20
Pulse_2sON_1sOFF
---
---
&20
&10
TIMX tim_a OFF_TIME
tim_b
TIMX tim_b ON_TIME
tim_a
ENO
1. The FB is called.
2. The system generates the instance
variables and copies the algorithm.
FB instance (Pulse_2sON_1sOFF)
Algorithm (Body)
Name
Internal
Internal
Input
Input
Value
200-100ms_PULSE_tim_a
200-100ms_PULSE_tim_b
200-100ms_PULSE_ON_TIME
200-100ms_PULSE_OFF_TIME
3. The contents of the
instance are executed.
Algorithm (Image)
Pulse_2sON_1sOFF tim_a
Pulse_2sON_1sOFF OFF_TIME
Pulse_2sON_1sOFF tim_b
Pulse_2sON_1sOFF ON_TIME
Pulse_2sON_1sOFF ENO
Pulse_2sON_1sOFF tim_b
Pulse_2sON_1sOFF tim_a
Usage
Input to EN is ON.
Parameters
1. Read values from parameters
to input variables.
2. Execute the algorithm.
3. Write values from output
variables to parameters.
Parameters
Содержание CX-PROGRAMMER V8.1
Страница 3: ...iv...
Страница 5: ...vi...
Страница 7: ......
Страница 15: ...xvi...
Страница 19: ...xx...
Страница 25: ...xxvi Application Precautions 4...
Страница 26: ...Part 1 Function Blocks...
Страница 27: ......
Страница 153: ...128 Procedures Section 3 2...
Страница 154: ...Part 2 Structured Text ST...
Страница 155: ......
Страница 159: ...134 CX Programmer Specifications Section 4 2...
Страница 205: ...180 Procedures Section 6 1...
Страница 207: ...182 System defined external variables supported in function blocks Appendix A...
Страница 229: ...204 Revision History...
Страница 230: ......