![Mitsubishi Electric CR750 Series Instruction Manual Download Page 411](http://html.mh-extra.com/html/mitsubishi-electric/cr750-series/cr750-series_instruction-manual_238840411.webp)
Detailed explanation of Robot Status Variable
4-391
P_Gps1 to P_Gps8
[Function]
This command returns XYZ coordinate data for the current position data when the condition defined in the
Def Gps command is met, using the get-position-quick function (GPS function). (Up to 400 position data can
be saved.)
The current position data of the robot at the time when the condition defined in the Def Gps command is met
can be checked. (The number of times when the condition defined in the Def Gps command is met can be
checked in the M_Gps.)
[Format]
[Terminology]
<Position Variable>
Specifies the position variable to assign.
The position data corresponding to a position number set in <Numeric value> is
returned to <Position variable>. The initial value is "P_Zero" (all elements are zero).
The value is cleared to zero when the GpsChk On command is executed, and the
current position data at the time when the defined condition is met is stored after
the GpsChk Off command is executed.
<Numeric value>
Set a position number obtained using the GPS function. (1 to 400)
The first time when the condition defined in the Def Gps command is met is numbered
1, and the following times are numbered 2, 3, .... in turn. (To obtain the position
data of the first time, set "1".)
1 will be set when omitted.
[Reference Program]
1 Def Gps1,852,On,1
‘ The position data of the mechanism No. 1 is recorded for the monitor-
ing No. 1 when the signal No. 852 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.
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. 852 is turned on.
8 Hlt
‘ Halt program
[Explanation]
(1) The current position data of the robot is stored in this status variable when the condition defined in the
Def Gps command is met. When "1" is set in <Monitoring No.> in the Def Gps command and the condi-
tion is met three times, these position data of the robot is stored in the "P_Gps1(1), P_Gps1(2), and
P_Gps1(3)". The stored position data of the first time is shown as "P_Gps1(1)".
(2) Up to 400 position data (P_GpsX(1) to P_GpsX(400)) can be saved. When the number of stored position
data reaches 400, further position data cannot be stored.
(3) The position data corresponding to a numerical value set in array elements is returned.
(4) The value is cleared to zero when the GpsChk On command is executed.
(5) The number of times can be confirmed after the GpsChk Off command is executed.
(6) This variable only reads the data.
(7) The number of times is cleared to zero when the controller is turned on. (This command is not covered
by the continue function.)
[Related instructions]
,
,
Example) <Position Variable>=P_Gps1[(<Numeric value>)]