EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-F FX5 - Page 19

Mitsubishi Electric MELSEC iQ-F FX5
64 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
3 PROGRAM ORGANIZATION UNIT (POU)
3.2 Function Block (FB)
17
3
Internal variable
For the function block, internal variables can be used.
For classes for which internal variables can be set, refer to the following.
Page 23 Class
External variable
For the function block, external variables can be used.
For classes for which external variables can be set, refer to the following.
Page 23 Class
Instances
Instances
To use the function block, instances must be created.
By creating instances of the function block, the function block can be used by calling from a program or another function
block. Multiple instances can be created from one function block definition.
To create an instance, define it as a global label or local label of the POU that uses the function block. The instance can be
defined as an array.
The same function block can be used in different instances in one POU. For each instance of a function block, labels are
assigned to different areas in memory. Even though the same label names are used, different states are held for each
instance.
Ex.
The above function block starts counting current value when the input variables (Count contact) turn on and turns on the
output variable (Output contact) when the current value held in the internal variable reaches the set value.
Instance A and B are the same function blocks, but instances A and B hold different states because the instance is different.
In the above example, output variable (Output contact) of instance B is already turned ON, but output variable (Output
contact) of instance A is not turned ON. Because the current value of instance A does not reach the set value, output variable
(Output contact) of instance A is not turn ON.
Structure of instance
An instance consists of the following data areas.
Capacity of instance
The capacity of each data area of an instance should be calculated as follows.
Local label area
Capacity of local label area of instance = Total capacity of data of non-latched local labels
+ Capacity of reserved area
Data area Description
Local label area Used to assign local labels of the function block.
Local latch label area Used to assign latched local labels of the function block.
Breakdown Description
Capacity of non-latched local labels Total capacity of the data areas used for local labels.
bLabel3
bLabel1
uLabel2
bLabel6
bLabel4
uLabel5
Instance A
Function block
Count contact
Set value
Output contact
Current value
Count contact
Set value
Output contact
Current value
Instance B
uLabel13 ON
uLabel12 500
uLabel10 ON
uLabel11 500
uLabel12 10
uLabel10 ON
uLabel11 7
uLabel13 OFF

Other manuals for Mitsubishi Electric MELSEC iQ-F FX5

Related product manuals