EasyManua.ls Logo

Mitsubishi Electric MELSEC iQ-F FX5 - Constant; Label and Device

Mitsubishi Electric MELSEC iQ-F FX5
64 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6 ST LANGUAGE
6.1 Configuration
47
6
When a master control instruction is used
Shown here is the operation when the master control is OFF.
The statement in a selection statement (an IF statement or a CASE statement) or in a iteration statement (a FOR
statement, a WHILE statement, or a REPEAT statement) is not processed.
Outside of a selection statement or a iteration statement, assignment statement is not processed and statement other than
assignment statement is not executed.
A statement in a selection statement (IF statement)
A statement out of a selection statement or a iteration statement (in the case of a bit assignment statement)
A statement out of a selection statement or a iteration statement (in the case of an OUT instruction)
Constant
Methods for expressing constants
The following table shows the expression methods for setting a constant in a ST program.
For the expression methods other than the one described the above, refer to the following.
Page 30 Constant
Label and device
Specification method
Labels and devices can be directly described in the ST program. 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 available labels, refer to the following.
Page 22 LABELS
For available devices, refer to the following.
User's manual (Application)
Device expression with type specification
A word device can be used in ST language as an arbitrary data type by adding a device type specifier to its name.
Data type Expressing method Example
String(32) STRING Enclose character strings with single quotation ( ' ). Stest := 'ABC';
Device type specifier Data type Example Description
N/A Generic data type ANY16.
When only devices are used in arithmetic operations,
the data type is Word [signed].
However, when the data is specified as a device
without the type specification in the argument part of
FUN/FB, the data type is the one of the argument
definition.
D0 When no type specifier is added to D0
:U Word [Unsigned]/Bit String [16-bit] D0:U The value when D0 is Word [unsigned]/Bit string [16-bit]
:D Double Word [Signed] D0:D The value when D0 and D1 are Double word [signed]
:UD Double Word [Unsigned]/Bit String [32-bit] D0:UD The value when D0 and D1 are Double word [unsigned]/Bit
string [32-bit]
Ex.
MC(M0,N1,M1); //Master control OFF
IF M2 THEN
M3:=M4; //No processing is executed when the master control is OFF. So, M3 maintains the value at the time of a previous scan.
END_IF;
M20:=MCR(M0,N1);
Ex.
MC(M0,N1,M1); //Master control OFF
M3:=M4; //
No processing is executed when the master control is OFF. So, M3 maintains the value at the time of a previous scan.
M20:=MCR(M0,N1);
Ex.
MC(M0,N1,M1); //Master control OFF
OUT(M2,M3); //No execution is made when the master control is OFF.
M20:=MCR(M0,N1);

Other manuals for Mitsubishi Electric MELSEC iQ-F FX5

Related product manuals