Mitsubishi Electric MELSEC Q Series Programming Manual page 28

Structured. fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

Creating instances
When using function blocks, create instances to reserve internal variables. Variables can be called from programs and other
function blocks by creating instances for function blocks.
To create an instance, declare as a label in a global label or local label of POU that uses function blocks. Same function
blocks can be instantiated with different names in a single POU.
Instance A
Function block
D6200
D10
Input label1
D6201
D11
Input label2
D6202
D12
Input label3
Instance A
Function block
D6200
D10
Input label1
D6201
D11
Input label2
D6202
D12
Input label3
Function blocks perform operations using internal variables assigned to each instance.
If the same function is called in the circuit multiple times, the value of internal variables or output variables is
overwritten everytime the function is called. To hold the value of internal variables or output variables when
the function is called, edit programs to use function blocks or to save the values as different valuables.
4 PROGRAM CONFIGURATION
26
4.2 POUs
D6203
Output label
D13
D6204
Local label
Uses same internal variables
for same instances
D6203
Output label
D13
D6204
Local label
Instance B
Function block
D6210
D10
Input label1
D6211
D11
Input label1
D6212
D12
Input label1
Uses different internal variables
for different instances
D6213
Output label
D13
D6214
Local label

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec f seriesMelsec l series

Table of Contents