Mitsubishi Electric CR750-Q Instruction Manual page 224

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

Advertisement

4MELFA-BASIC V
Def Gps (Define get position)
[Function]
This command defines the monitored condition for the position data acquisition using the fast-response
position data import function (GPS function) for the monitoring.
[Format]
Def[]Gps[] <Monitoring No.>, <Input No.>, <Condition>, [<Mechanism No.>]
[Terminology]
<Monitoring No.>
<Input No.>
<Condition>
<Mechanism No.>
[Reference Program]
1 Def Gps 1,851,On,1
2 GpsChk On,1
3 Mvs P1
4 GpsChk Off,1
5 M1 = M_Gps(1)
6 If M1 = 0 Then Error 9000 ' The error 9000 is generated if no position data is recorded.
7 Mvs P_Gps1(1)
8 Hlt
[Explanation]
(1) The current position data of the robot set in <Mechanism No.> is imported when the signal set in <Input
No.> satisfies the condition specified in <Condition>. However, the monitoring of the condition defined
in this command is not started until the GpsChk On command is executed.
(2) The imported position data of the robot is stored in the P_GpsX() ("X" indicates the same number as the
target monitoring number from 1 to 8) when the GpsChk Off command is executed.
(3) The position data stored in the P_GpsX() is cleared to zero when the GpsChk On command for the tar-
get monitoring number is executed.
(4) During multitask operation, the monitored condition is independently defined for each task slot. Each
defined condition is valid for the target slot only. Up to 8 conditions including the one defined in the Def
Map command can be defined for all slots.
(5) This command is not available for the programs in which the starting condition is set to ALWAYS or
ERROR.
(6) This command is not covered by the continue function.
(7) If several conditions are set for one monitoring number, the previously-executed condition is overwritten
by the condition to be executed subsequently.
(8) The condition setting defined in this command is cleared to zero when the program is reset, the End
command is executed, or the controller is turned on next time.
4-204 Detailed explanation of command words
The target monitoring number. Set it with a constant number from 1 to 8.
Set the target input signal number for the monitoring.
Servo digital input: 850 to 852
SKIP input: 801 to 803
Specify the signal-on/off status as a trigger.
The robot position data is stored when the signal set in <Input No.> is turned on/off.
Set value
On
On the rising edge of target input signal
Off
On the falling edge of target input signal
Set the target mechanism number for the position data acquisition. (If the argument
is omitted, 1 is set as the default value.)
' The position data of the mechanism No. 1 is recorded for the monitoring No. 1
when the signal No. 851 is turned on.
' Monitoring a condition for the monitoring No. 1 is started.
' Moves to P1
' Monitoring a condition for the monitoring No. 1 is stopped (the position data
obtained is stored).
' The number of the position data recorded in the P_Gps1 is stored.
' The robot moves its arm to the position at the first time when the signal No.
851 is turned on.
' Halt program
Conditions

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Cr750Cr751-qCr751-dCr760-dCr760-qCr750-d

Table of Contents