Mitsubishi Electric CR750-Q Instruction Manual page 218

Cr750/cr751/cr760 series
Hide thumbs Also See for CR750-Q:
Table of Contents

Advertisement

4MELFA-BASIC V
Def Act (Define act)
[Function]
This instruction defines the interrupt conditions for monitoring signals concurrently and performing interrupt
processing during program execution, as well as the processing that will take place when an interrupt
occurs.
[Format]
Def[]Act[]<Priority No.>, <Expression>[]<Process> [, <Type>]
[Terminology]
<Priority No.>
<Expression>
<Process>
<Type>
[Reference Program]
1 Def Act 1,M_In(17)=1 GoSub *SUB1
2 Def Act 2,MFG1 AND MFG2 GoTo *L200
3 Def Act 3,M_Timer(1)>10.5 GoSub *LBL
:
9 *SUB1
10 M_Timer(1)=0
11 Act 3=1
12 Return 0
:
19 *L200
20 Mov P_Safe
21 End
:
30 *LBL
31 M_Timer(1)=0.0
32 Act 3=0
33 Return 0
4-198 Detailed explanation of command words
This is the priority No. of the interrupt. It can be set with constant Nos. 1 to 8.
For the interrupt status, use the formats described below: (Refer to the syntax diagram)
<Numeric type data> <Comparison operator> <Numeric type data> or
<Numeric type data> <Logical operator> <Numeric type data>
<Numeric type data> refers to the following:
<Numeric type constant>| <Numeric variable>|<Numeric array variable>|
<Component data>
Refers to a GoTo statement or a GoSub statement used to process an interrupt when it
occurs.
When omitted: Stop type 1
The robot stops at the stop position, assuming 100% execution of the external override.
If the external override is small, the time required for the robot to stop becomes longer, but
it will always stop at the same position.
S : Stop type 2
The robot decelerates and stops in the shortest time and distance possible,
independently of the external override.
L : Execution complete stop
The interrupt processing is performed after the robot has moved to the target position
(the step being executed is completed).
' Defines the subroutine at label *SUB1 to be the one to
be called up when the status for the general purpose
input signal No. 17 is ON.
' Defines the label *L200 as the one to jump to when the
logic operation of AND applied to MFG1 or MFG2
results in "true."
' When 10.5 seconds pass, the program calls the label
*LBL subroutine.
' Sets the timer to zero.
' Enables Act 3.
' Resets the timer to zero.
' Disables Act 3.

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents