EasyManua.ls Logo

Mitsubishi Electric CR760-D - Page 348

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...
4-328 Detailed explanation of Robot Status Variable
4MELFA-BASIC V
M_ColSts
[Function]
Return the collision detection status..
1: Detecting an collision
0: No collision has been detected
[Format]
[Terminology]
<Mechanism Number> Specify the mechanism number 1 to 3. The default value is 1.
[Reference Program]
1 Def Act 1,M_ColSts(1)=1 GoTo *HOME,S 'Define the processing to be executed when an collision
is detected using an interrupt.
2 Act 1=1
3 ColChk ON,NOErr 'Enable the collision detection function in the error non-occurrence
mode.
4 Mov P1
5 Mov P2 'If an collision is detected while executing lines 40 through 70, it jumps to
interrupt processing.
6 Mov P3
7 Mov P4
8 Act 1=0
:
:
100 *HOME 'Interrupt processing during collision detection.
101 ColChk Off 'Disable the collision detection function.
102 Servo On 'Turn the servo on.
103 PESC=P_ColDir(1)*(-2) 'Create the amount of movement for escape operation
104 PDst=P_Fbc(1)+PESC 'Create the escape position.
105 Mvs PDst 'Move to the escape position.
106 Error 9100 'Stop operation by generating a user-defined L level error.
[Explanation]
(1) When an collision is detected, it is set to 1. When the servo is turned off and the collision state is can-
celed, it is set to 0.
(2) It is used as an interrupt condition in the Def Act instruction when used in the NOERR mode.
(3) This variable only reads the data.
Example) Def Act 1, M_ColSts [(<Mechanism Number>)]=1 GoTo *LCOL,S

Table of Contents

Related product manuals