Mitsubishi CR750-Q Series Instruction Manual page 143

Tracking system and vision tracking system using mitsubishi robot
Hide thumbs Also See for CR750-Q Series:
Table of Contents

Advertisement

(4) CM1.Prg
1 '## Ver.A3 ####################################
2 '# Conveyer tracking, sensor monitoring program
3 '# Program type : CM1.prg
4 '# Date of creation/version : 2012.07.31 A3
5 '# COPYRIGHT : MITSUBISHI ELECTRIC CORPORATION.
6 '##############################################
7 '
8 '##### Main processing #####
9 *S00MAIN
10
GoSub *S10DTGET
11 *LOOP
12
GoSub *S20WRITE
13
GoTo *LOOP
14 End
15 '##### Data acquisition processing #####
16 *S10DTGET
17 'Acquire the suction position, amount of encoder movement and encoder number set with program C
18
MWKNO= M_09#
19
M10ED#=M_101#(MWKNO)
20
MENCNO= P_102(MWKNO).X
21
MSNS= P_102(MWKNO).Y
22 'Calculate the workpiece position (X,Y) when the sensor is activated
23
PWPOS=P_100(MWKNO)-P_EncDlt(MENCNO)*M10ED#
24 Return
25 '##### Position data writing processing #####
26 *S20WRITE
27
If M_In(MSNS)=0 Then GoTo *S20WRITE 'Wait for a workpiece to activate the photoelectronic sensor
CR750-Q/CR751-Q series, CRnQ-700 series controller
28
MENC#=M_EncL(MENCNO)
CR750-D/CR751-D series, CRnD-700 series controller
28
MENC#=M_Enc(MENCNO)
29
TrWrt PWPOS,MENC#,MWKNO,1,MENCNO
tracking buffer
30 *L20WAIT
31
If M_In(MSNS)=1 Then GoTo *L20WAIT
32 Return
'Processing for acquiring required data
'Workpiece position writing processing
'Acquire model number
'Amount of encoder movement
'Encoder number
'Sensor number
'Encoder number
'Encoder number
'Write data (workpiece position and encoder value) to the
21 Appendix
(Note)
The command is deferent between iQ
Platform controller (CR750-Q/CR751-Q
series, CRnQ-700 series) and stand alone
type controller (CR750-D/CR751-D series,
CRnD-700 series).
In the CR750-Q/CR751-Q series,
CRnQ-700 series series, it is necessary to
use the latch encoder data (M_ENCL)
after confirmation with an input signal.
Sample Programs 21-133

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents