Automatic Execution Of Program At Power Up - Mitsubishi MELFA CR1D Instruction Manual

Table of Contents

Advertisement

5Functions set with parameters

5.11 Automatic execution of program at power up

The following illustrates how to automatically run a robot program when the controller's power is turned on.
However, since the robot starts operating simply by turning the power on, exercise caution upon using this
function.
Related parameters
Parameter and value
SLT*
ALWENA
(1) First, create an ALWAYS program and an operating program.
<Program #2, ALWAYS program>
1 ' Auto Start Sample Program
2 '
3 ' Execute Program #1 if the key switch is AUTO (Ext.).
4 ' Stop the program and return the execution line to the beginning of the program if the key switch is not AUTO
(Ext.).
5 '
6 If M_Mode<>3 AND (M_Run(1)=1 OR M_Wai(1)=1) Then GoSub *MTSTOP
7 If M_Mode=3 AND M_Run(1)=0 AND M_Wai(1)=0 Then GoSub *MTSTART
8 If M_Mode=2 Then Hlt ' for DEBUG
9 End
10 '
11 *MTSTART
12 XRun 1,"1"
13 RETURN
14 '
15 *MTSTOP
16 XStp 1
17 XRst 1
18 RETURN
< Program #1, operating program > (this can be any program)
1 'Main Program
2 Servo On
3 M_Out(8)=0
4 Mov P1
5 M_Out(8)=1
6 Mov P2
7 End
P1=(+300.00,-200.00,+200.00,+0.00,+180.00,+0.00)(6,0)
P2=(+300.00,+200.00,+200.00,+0.00,+180.00,+0.00)(6,0)
(2) Set the parameter.
Parameter and value
SLT2
ALWENA
After the setting is complete, turn the controller's power OFF.
(3) Turn the power ON.
In the sample above, after the controller's power is turned on, when the key switch is turned to AUTO (Ext.),
program #1 is executed and the robot starts its operation.
5-371 Automatic execution of program at power up
Exmple) SLT2=2,ALWAYS,REP
Specifies the program name, start condition, and operation status. The point here is the start condition.
0->7
In the ALWAYS program, it is possible to execute multitask-related instructions such as XRun and
XLoad, and also the Servo instruction.
SLT2=2,ALWAYS,REP 'Execute program #2 in ALWAYS mode.
0->7
In the ALWAYS program, it is possible to execute multitask-related instructions such as XRun and
XLoad, and also the Servo instruction.
Description of the operation
Description of the operation

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents