Structures - Mitsubishi Electric MELSEC Q Series Structured Programming Manual

Fundamentals
Hide thumbs Also See for MELSEC Q Series:
Table of Contents

Advertisement

4.4.8

Structures

A structure is an aggregation of different data type labels.
Structures can be used in all POUs.
To use structures, first create the configuration of structure, and define a structure label name for
the created structure as a new data type
(
GX Works2 Version 1 Operating Manual (Structured Project))
To use each element of structure, append an element name after the structure label name with '.'
as a delimiter in between.
Example) When using the element
Structure
label name
Structures can also be used as arrays. When a structure is declared as an array, append an
index enclosed by '[ ]' after the structure label name. When arrays are used and accessed using
array indices to specify a label or device, the maximum value in an array is 32767.
The arranged structured data can be specified as arguments of functions and function blocks.
When arrays are used and accessed using array indices to specify a label or device, a bit-
specified word device can not be specified for a bit type element.
Example) When using the element
Structure
label name
Creating structures
Structure name
samp_fb1
Bit bo00
Bit bo01
Word (signed) in00
Expression in a program
dut_a1.bo00
dut_a1.in00
of the structured data
dut_a1 . in00
Element name
of the arranged structured data
dut_b1 [0] . in00
Index Element
name
Element
Define labels
dut_a1.bo01
MOV
EN
ENO
s
d
idata1
Structure name
Structure label name
dut_a1
samp_fb1
4.4 Method for Specifying Data
4.4.8 Structures
4
4-37

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l seriesMelsec-f

Table of Contents