6 ST LANGUAGE
6.1 Configuration
59
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 40 Constant
Data type Expressing method Example
String(32) STRING Enclose character strings with single quotation ( ' ). Stest := 'ABC';
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);
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);
MC(M0,N1,M1); //Master control OFF
OUT(M2,M3); //No execution is made when the master control is OFF.
M20:=MCR(M0,N1);