EasyManua.ls Logo

Mitsubishi Electric CR760-D - Page 564

Mitsubishi Electric CR760-D
730 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
6-544 Interference avoidance function
5Functions set with parameters
(4) Executing avoidance operation after detecting interference (interrupt process)
<Program example> Note) The step numbers are omitted.
Def Act 1,M_CavSts<>0 GoTo *Home,S ' Define a process to be executed as an interrupt when
interference is detected
Act 1=1
CavChk On,0,NOErr ' Enable the interference avoidance function in error disabled mode
Mov P1 ' Movement when the interference avoidance function is enabled
Mov P2 ' Movement when the interference avoidance function is enabled
Mov P3 ' Movement when the interference avoidance function is enabled
:
:
*Home ' Step to interrupt when interference is detected
CavChk Off
M_CavSts=0 ' Clear the interference state
MDist=Sqr(P_CavDir.X*P_CavDir.X+P_CavDir.Y*P_CavDir.Y+P_CavDir.Z*P_CavDir.Z)
' Find the movement rate ratio
PESC=P_CavDir(1)*(-50)*(1/MDist)
' Create movement amount for avoidance operation (move back 50mm
from the interference position)
PDST=P_Fbc(1)+PESC ' Create an avoidance destination
Mvs PDST ' Avoidance movement
Mvs PHome ' Move to the avoidance destination
:

Table of Contents

Related product manuals