EasyManua.ls Logo

Mitsubishi Electric CR760-D - Page 224

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-204 Detailed explanation of command words
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]
[Terminology]
<Monitoring No.> The target monitoring number. Set it with a constant number from 1 to 8.
<Input No.> Set the target input signal number for the monitoring.
Servo digital input: 850 to 852
SKIP input: 801 to 803
<Condition> 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.
<Mechanism No.> Set the target mechanism number for the position data acquisition. (If the argument
is omitted, 1 is set as the default value.)
[Reference Program]
1 Def Gps 1,851,On,1 ‘ The position data of the mechanism No. 1 is recorded for the monitoring No. 1
when the signal No. 851 is turned on.
2 GpsChk On,1 ‘ Monitoring a condition for the monitoring No. 1 is started.
3 Mvs P1 ‘ Moves to P1
4 GpsChk Off,1 ‘ Monitoring a condition for the monitoring No. 1 is stopped (the position data
obtained is stored).
5 M1 = M_Gps(1) ‘ The number of the position data recorded in the P_Gps1 is stored.
6 If M1 = 0 Then Error 9000 ‘ The error 9000 is generated if no position data is recorded.
7 Mvs P_Gps1(1) ‘ The robot moves its arm to the position at the first time when the signal No.
851 is turned on.
8 Hlt ‘ Halt program
[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.
Def[]Gps[] <Monitoring No.>, <Input No.>, <Condition>, [<Mechanism No.>]
Set value Conditions
On On the rising edge of target input signal
Off On the falling edge of target input signal

Table of Contents

Related product manuals