Syntax In St Language - Mitsubishi Electric MELSEC Q Series Structured Programming Manual

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

Advertisement

5.1.3

Syntax in ST language

The following table shows the syntax that can be used in the ST program.
Type of syntax
Assignment syntax
Conditional syntax
Iteration syntax
Other control syntax
(1) Assignment syntax
(a) Format
(b) Description
(c) Example
5.1 ST
5-4
5.1.3 Syntax in ST language
Table 5.1.3-1 Syntax in the ST language
Assignment syntax
IF THEN conditional syntax, IF ELSE conditional syntax, and IF ELSIF conditional syntax
CASE conditional syntax
FOR DO syntax
WHILE DO syntax
REPEAT UNTIL syntax
RETURN syntax
EXIT syntax
<Left side> := <Right side>;
The assignment syntax assigns the result of the right side expression to the label or
device of the left side.
The result of the right side expression and data type of the left side need to obtain the
same data when using the assignment syntax.
Array type labels and structure labels can be used for the assignment syntax.
Note the data types of left side and right side.
• Array type labels
The data type and the number of elements need to be the same for left side and
right side.
When using array type labels, do not specify elements.
< Example >
intAry1 := intAry2;
• Structure labels
The data type (structured data type) needs to be the same for left side and right
side.
< Example >
dutVar1 := dutVar2;
Description

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l seriesMelsec-f

Table of Contents