St Program Expressions; Assignment Statement - Mitsubishi Electric MELSEC Q Series Programming Manual

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

Advertisement

4 ST PROGRAM EXPRESSIONS

4 ST PROGRAM EXPRESSIONS

4.1 Assignment Statement

An assignment statement has a function to assign the result of an expression in the
right member to a label or device in the left member.
In the assignment statement, the result of the expression in the right member must be
equal to the data type in the left member. If they are different, a conversion error will
occur.
[Description example]
4 - 1
• When actual device is used
D0 : = 0;
When this expression is executed, a decimal number of 0 is assigned to D0.
• When label is used
When the character string type label of Stest is used
Stest : = "APPLE";
When this expression is executed, character string "APPLE" is assigned to Stest.
Precaution for assigning a character string
A character string of up to 32 characters can be assigned. A conversion error
will occur if a character string of more than 32 characters is assigned.
Precaution for use of a device in the left member of an assignment statement
The TS, TC, STS, STC, CS, CC, BL, DX, BL\S, or BL\TR device cannot be used
in the left member of an assignment statement. A conversion error will occur if
any of the above devices is used in the left member.
4
4 - 1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melsec l series

Table of Contents