Mitsubishi Electric MELSEC Q Series Programming Manual page 31

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

Advertisement

3 HANDLING OF CHARACTERS AND NUMERIC VALUES IN ST PROGRAMS
3 - 7
(2) Structure
A structure is a data type defined by combining the data of any types.
Each element can be referred to individually by describing the element name
after the variable (label) name defined for the structure type, with a period (.)
placed between them.
The element name is also called a member variable.
[Format]
Structure name.structure element name
[Image diagram]
When the setting is as follows
Structure name stocking,
Structure element:
[Description example]
(* 100 is assigned to structure element Unit No *)
Stocking.Unit No := 100;
(* 98.2 is assigned to structure element Unit price *)
Stocking.Unit price := E98.2;
(* "APPLE" is assigned to structure element Name of article *)
Stocking.Name of article := "APPLE";
Precaution for use of the member variables of a structure
The number of members that can be entered on the structure variable setting
screen is 128.
One word type Structure element name Unit No
One real number type Structure element name unit price
One character string type Structure element name name of
article
Stocking
100
Unit No
98.2
Unit price
"APPLE"
Name of
article
3 - 7

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents