Expose the FANUC robot’s current Cartesian position to an external HMI by copying the position into numeric registers that the PLC or HMI can read. The available implementation supports two acquisition paths: capture LPOS in a TP program, or enable $SCR_GRP.$M_POS_ENB and run a logic-only position-reading program as background logic.
Position Data Path
Both methods finish with the same data path: capture the current Cartesian position, move its six components into numeric registers, and transfer those registers through the configured robot-to-PLC or robot-to-HMI communication link.
| Numeric register | Cartesian component |
|---|---|
R[1] |
X |
R[2] |
Y |
R[3] |
Z |
R[4] |
W |
R[5] |
P |
R[6] |
R |
A two-dimensional position-register reference selects one component. For example, PR[1,2] addresses the Y component of PR[1].
Method 1: Capture the Position with LPOS
- Create a TP program.
- Use
LPOSto store the robot’s current Cartesian position inPR[1]. - Copy the six components of
PR[1]intoR[1]throughR[6]using the mapping above. - Expose the numeric registers through the communication path used by the external PLC or HMI.
The evidence also identifies JPOS as an available position instruction, but the documented external-display procedure specifically uses LPOS and Cartesian components.
Method 2: Run Position Acquisition as Background Logic
- Open the robot variable table and enable
$SCR_GRP.$M_POS_ENB. - Create the TP program that reads the current position and transfers its components to numeric registers.
- Open the program detail screen and change every group-mask entry to
*. This masks motion instructions for all robot motion axes while retaining logic execution. - Configure the TP program for background execution.
- Open background-logic setup with
MENU>Setup>Background Logic, select the position-reading program, and change its status to running.
After acquisition, process and transmit the register values in the same way as Method 1.
Handle Sign, Precision, and Verification
If the PLC interface requires sign information separately, assign a digital output as a sign indicator: turn it on when the associated register is greater than zero and off when it is less than zero. The PLC can interpret those states as positive and negative. The evidence does not define handling for a value equal to zero, so define and test that state explicitly in the interface specification.
Position values contain three decimal places. When the communication path uses scaled integers, multiply by 10 through 1000 according to the required display resolution, then apply the matching inverse scale in the PLC or HMI. Verify all six displayed components against the robot position display, including positive and negative values, and confirm that background acquisition continues while the position changes.
FAQ
How do I read a FANUC robot Cartesian position into registers?
Use LPOS to capture the current Cartesian position in PR[1], then copy X, Y, Z, W, P, and R into R[1] through R[6].
What does PR[1,2] mean on a FANUC robot?
PR[1,2] selects the Y component of position register PR[1].
How do I run FANUC position reading as background logic?
Enable $SCR_GRP.$M_POS_ENB, set every program group-mask entry to *, select the program under MENU > Setup > Background Logic, and change its status to running.