Get-position-quick function
Appendix-707
<Sample program>
1 Def Map 3,851,On,1,PC1,PC2,20,10
‘ The position data of the mechanism No. 1 is recorded for the monitoring No. 3 when the signal
No. 851 is turned on, and the mapping is executed according to the defined condition.
PC1: Lowest point (first segment) in a cassette, PC2: Highest point (last segment) in a cassette,
20: the number of segments in a cassette (20 segments), 10: a sensitive area of a sensor (10
mm)
2 Mov PM1
‘ The robot moves its arm to the mapping start position.
3 GpsChk On,3
‘ Monitoring a condition for the monitoring No. 3 is started.
The position data of the mechanism No. 1 is recorded when the signal No. 851 is turned on.
4 Mvs PM2
‘ The robot moves its arm to the mapping stop position.
5 GpsChk Off,3
‘ Monitoring a condition for the monitoring No. 3 is stopped.
‘ Using the recorded position data, the segment number in which the workpiece is present is
stored in the M_Map3().
6 M1=M_Gps(3)
‘ The number of the position data recorded in the P_Gps3 is stored.
7 If M1=0 Then Error 9000
‘ The error 9000 is generated if no position data is recorded.
8 For M2=1 To 20
‘
9 M_Out(6100+M2)=M_Map3(M2) ‘ The results of the mapping are output with a signal (the signal number "6101" is assigned for the
first result).
10 Next M2
‘ The process performed for the first segment is repeated for the remaining segments.