Mitsubishi Electric MELSEC iQ-F Series Programming Manual page 22

Hide thumbs Also See for MELSEC iQ-F Series:
Table of Contents

Advertisement

Input variables, output variables, and input/output variables
Input variables, output variables, and input/output variables need to be defined in function blocks.
A function block can output multiple operation results. It can also be set not to output operation results.
Instance
SR
_S1
Q1
RESET
Instance
CTD
CD
Q
LOAD
CV
PV
Input variables are set in the VAR_INPUT class, output variables are set in the VAR_OUTPUT class and
VAR_OUTPUT_RETAIN class, and input/output variables are set in the VAR_IN_OUT class.
Internal variables
Function blocks use internal variables. For each instance of a function block, labels are assigned to the different areas. Even
though the same label names are used, different states are held for each instance.
Ex.
Instance A
Function block
bLabel1
bLabel10
Count contact
uLabel12
uLabel2
Count set value
The above function block starts counting when the input variables turn on and turns on the output variable when the current
value held in the internal variable reaches the set value. Even though the same function block is used, the output timings differ
because the instances A and B hold different states.
Internal variables are set in the VAR, VAR_CONSTANT and VAR_RETAIN class.
External variables and public variables
Function blocks can use external variables (global label) and public variables.
Public variables are set in the VAR_PUBLIC and VAR_PUBLIC_RETAIN class.
3 PROGRAM ORGANIZATION UNITS
20
3.3 Function Blocks (FB)
Instance
SAMPLE_FB1
IN_Bool
iTim
lCnt
(1)
bLabel13
bLabel3
Counting-up
cdLabel11
Current value
(1) The operation result(s) is output.
(2) No operation result is output.
(2)
Instance B
Function block
bLabel4
bLabel10
Count contact
uLabel12
uLabel5
Count set value
cdLabel11
Current value
bLabel13
bLabel6
Counting-up

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec iq-f fx5

Table of Contents