MOTOR {ON | OFF} (Statement) [Version 1.98 or later]


Turns the motor power on or off.


MOTOR {ON|OFF} [,<MOTOR option>]


If <MOTOR option> is "RESULT=variable," the program execution does not stop even if an internal error occurs during the execution of the MOTOR ON statement. (Note that the MOTOR OFF statement stops the program execution and issues an error message for safety.) In Ver. 2.6 or later, the error code is stored in the variable specified by RESULT.



If the "296: Motor command setting" is modified from "0" to "1" on the User Preferences window*, the MOTOR OFF statement stops the motor but does not stop the program being executed.
The MOTOR OFF statement cannot execute when the robot is in operation. Attempting to do so will result in an error, quitting the program execution.
However, the "296: Motor command setting" does not affect the execution of the MOTOR ON statement.
*The User Preferences window can be called up by pressing the [F2 Arm]-[F6 Aux.]-[F7 Config.].


PROGRAM PRO1
--------
MOTOR ON
'Turn on the motor power.
--------
MOTOR OFF
'Turn off the motor power.
--------
MOTOR ON, RESULT = I1
'Turn on the motor power.
'If power-on sequence fails, store the error code
'in variable I1 and proceed to the next line.
--------
MOTOR OFF, RESULT = I2
'Turn off the motor power.
'If power-off sequence fails, store
'the error code in variable I2.
'Display an error message and stop the program
'execution.
--------
END


Top