Labels And Devices - Mitsubishi Electric MELSEC iQ-R Series Programming Manual

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

Advertisement

Labels and devices

Specification method
Labels and devices can be directly described on ST programs. Labels and devices can be used for the left or right side of an
expression or as an argument or return value of a standard function/function block.
For the applicable labels, refer to the following.
Page 38 LABELS
For the applicable devices, refer to the following.
 MELSEC iQ-R CPU Module User's Manual (Application)
■ Notation of devices with a type specifier
A word device can be used as any data type by adding a device type specifier to its name.
Device specifier
None
:U
:D
:UD
:E
:ED
The following devices can use a device type specifier.
• Data register (D)
• Link register (W)
• Link direct device (J\W)
• Module access device (U\G)
• CPU buffer memory access device (U3E\G/U3E\HG)
• File register (R/ZR)
• Refresh data register (RD)
A device type specifier cannot be added to a digit-specified or index-modified device.
■ Device specification method
Devices can be specified in the following methods.
• Index modification
• Bit specification
• Digit specification
• Indirect specification
For details, refer to the following.
 MELSEC iQ-R CPU Module User's Manual (Application)
 MELSEC iQ-R Programming Manual (Instructions, Standard Functions/Function Blocks)
6 STRUCTURED TEXT LANGUAGE
72
6.1 Configuration
Data type
Generic data type ANY16.
Word [signed], when only devices are used in such as an arithmetic
operational expression.
However, when it is specified as a device without a type specifier in a
FUN/FB argument, it becomes a argument-defined data type.
Word [unsigned]/bit string [16 bits]
Double word [signed]
Double word [unsigned]/bit string [32 bits]
Single-precision real number
Double-precision real number
Example
Description of example
D0
D0 without a type specifier
D0:U
D0 specified as the word [unsigned]/bit
string [16 bits]
D0:D
D0 and D1 specified as the double word
[signed]
D0:UD
D0 and D1 specified as the double word
[unsigned]/bit string [32 bits]
D0:E
D0 and D1 specified as the single-precision
real number
D0:ED
D0, D1, D2, and D3 specified as the
double-precision real number

Advertisement

Table of Contents
loading

Table of Contents