![Mitsubishi Electric CR750 Series Instruction Manual Download Page 201](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840201.webp)
Detailed explanation of command words
4-181
Clr (Clear)
[Function]
This instruction clears general-purpose output signals, local numerical variables in a program, and numeri-
cal external variables.
[Format]
[Terminology]
<Type>
It is possible to specify either a constant or a variable.
0 : All steps 1 to 3 below are executed.
1 : The general-purpose output signal is cleared based on the output reset pattern.
The output reset pattern is designated with parameters ORST0 to ORS18160.
Refer to
Page 487, "5.14 About the output signal reset pattern"
( 0: OFF, 1: ON, *: Hold )
2 : All local numeric variables and numeric array variables used in the program are cleared
to zero
3 : Clears all external numerical variables (External system variables and user-defined
external variables) and external numerical array variables, setting them to 0. External
position variables are not cleared.
[Reference Program]
(1) The general-purpose output signal is output based on the output reset pattern.
1 Clr 1
(2) The local numeric variables and numeric array variables in the program are cleared to 0.
1 Dim MA(10)
2 Def Inte IVAL
3 Clr 2
' Clears MA(1) through MA(10), IVAL and local numeric variables in the program to 0.
(3) All external numeric array variables and external numeric array variables are cleared to 0
1 Clr 3
(4) (1) though (3) above are performed simultaneously.
1 Clr 0
[Related parameter]
ORST0 to ORS18160
[Related system variables]
M_Out/M_Outb/M_Out8/M_Outw/M_Out16
Clr[]<Type>