Labels - Mitsubishi Electric MELSEC FX Series Structured Programming Manual

Hide thumbs Also See for MELSEC FX Series:
Table of Contents

Advertisement

FXCPU Structured Programming Manual
(Application Functions)
3.2

Labels

Label types
Labels are classified into two types, global and local.
• Global labels can be used in program components and function blocks.
• Local labels can be used only in declared program blocks.
Label class
The label class indicates how each label can be used from which program component.
The table below shows label classes.
Class
VAR_GLOBAL
VAR_GLOBAL_CONSTANT Common constant available in all program components
VAR
VAR_CONSTANT
VAR_INPUT
VAR_OUTPUT
VAR_IN_OUT
Label definition
It is necessary to define a label to use the label.
An error will occur when a program in which labels are not defined is converted (compiled).
• When defining a global label, set the label name, class and data type, and assigns a device.
• When defining a local label, set the label name, class and data type.
You do not have to specify devices for local labels. Assignment of devices is automatically executed
during compiling.
In the example below, the label "VAR_D10" is set for the function "BOOL_TO_STR_E".
BOOL_TO_STR_E
X000
EN
_BOOL
M0
• When using "VAR_D10" as a global label
Set the class, label name, data type and device (or address).
• When using "VAR_D10" as a local label
Set the class, label name and data type.
Description
Common label available in all program components
Label available within declared program components, and not
available in any other program component
Constant available within declared program components, and
not available in any other program component
Label which receives a value, and cannot be changed in
program components
Label output from a function block
Local label which receives a value, outputs it from a program
component, and can be changed in program components
ENO
VAR_D10
3 Function Construction
3.2 Labels
Applicable program component
Program
Function
Function
block
block
1
2
3
4
5
6
A
29

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Fx-kp-ok-e09r927

Table of Contents