4MELFA-BASIC IV
Detailed explanation of Robot Status Variable
4-304
P_Curr
[Function]
Returns the current position (X, Y, Z, A, B, C,L1,L2) (FL1, FL2).
[Format]
[Terminology]
<Position Variables>
Specifies the position variable to assign.
<Mechanism Number>
Enter the mechanism number. 1 to 3, If the argument is omitted, 1 is set as the
default value.
[Reference Program]
1 Def Act 1,M_In(10)=1 GoTo 1000
' Defines interrupt.
2 Act 1=1
' Enables interrupt.
3 Mov P1
4 Mov P2
5 Act 1=0
' Disables interrupt.
:
100 P100=P_Curr
' Loads the current position when an interrupt signal is
received.
101 Mov P100,-100
' Moves 100 mm above P100 (i.e, -100 mm in the Z direc-
tion of the tool).
102 End
' Ends the program.
[Explanation]
(1) This can be used to identify the current position.
(2) This variable only reads the data.
[Reference]
Example)<Position Variables>=P_Curr [(<Mechanism Number>)]