Procedures To Multitask Execution; Mov P1 - Mitsubishi MELFA CR1D Instruction Manual

Table of Contents

Advertisement

4MELFA-BASIC IV

(2) Procedures to multitask execution

*Procedure 1: Program creation
<1> Movement program (Program name: 1)
1 Cnt 1
2 Mov P2,10

3 Mov P1,10

4 Mov P1
5 M_Out(10)=0
6 Dly 0.05
7 Mov P1,10
8 Mov P3
9 Spd 500
10 Mvs P4
11 M_02#=0
18 M_01#=1
19 Mvs P2,10
20 *L
21 If M_02#=0 Then GoTo *L
22 P20=P2*P_01
23 Mov P20,10
24 Mov P20
24 M_Out(10)=1
25 Dly 0.05
26 Mov P20,10
27 Cnt 0
28 End
<2> Position data lead-in program (Program name: 2)
1 *R
2 If M_01#=0 Then GoTo *R
3 Open "COM1:" AS #1
4 Dly M_03#
5 Print #1,"SENS"
6 Input #1,M1,M2,M3
7 P_01.X=M1
8 P_01.Y=M2
9 P_01.Z=0.0
10 P_01.A=0.0
11 P_01.B=0.0
12 P_01.C=Rad(M3)
13 Close
14 M_01#=0
15 M_02#=1
16 End
*Procedure 2: Setting the slot parameters
Set the slot parameters as shown below.
Parameters
SLT1
SLT2
*Procedure 3: Reflecting the slot parameters
Turn the power OFF and ON to validate the slot parameters.
4-123 Multitask function
'Validate path connected movement
'Move to +10mm above P2
'Move to +10mm above P1
'Move to P1 workpiece pickup position
'Pickup workpiece
'Timer 0.05 second
'Move to +10mm above P1
'Move to vision pre-position P3
'Set linear speed to 500mm/sec.
'Start vision lead-in with P4 passage
'Start data lead-in with background process at interlock variable
(M_01=1/M_02=0)
'Start data load-in with background process
'Move to +10mm above P2
'Wait for interlock variable M_02 to reach 1
'Add vision compensation P_01 to P20, and move to +10mm above
'Move to +10mm above P20
'Go to P20 workpiece placing position
'Place workpiece
'Timer 0.05 second
'Move to +10mm above P20
'Invalidate path connected movement
'End one cycle
'Wait for interlock variable M_01 to reach 1
'Open RS-232-C line
'Hypothetical process timer (0.05 second)
'Transmit character string "SENS" to RS-232-C (vision side)
'Wait to lead-in vision compensation value (relative data)
'Substitute delta X coordinate
'Substitute delta Y coordinate
'
'
'
'Substitute delta C coordinate
'Close RS-232-C line
'Interlock variable M_01 = 0
'Interlock variable M_02 = 0
'End process
Program name
Operation mode
1
REP
2
REP
Operation format
Number of executed lines
START
1
START
1

Advertisement

Table of Contents
loading

This manual is also suitable for:

Melfa cr2dMelfa cr3d

Table of Contents