Overview: Position Data and Pose Type in Yaskawa Motoman Controllers
Yaskawa Motoman robots (DX200, YRC1000, YRC1000micro, FS100, and newer generations) store taught or calculated position data inside P-variables. Each P-variable is a structured record containing six Cartesian components (X, Y, Z, Rx, Ry, Rz), a pose configuration code, a tool number, and a user-coordinate-frame number. Engineers driving the robot from a PLC that sends dynamic X/Y/Z/Rx/Ry/Rz values via discrete I/O or Ethernet explicit messaging must also pass the matching pose configuration. Without it, the controller cannot resolve a unique inverse-kinematics solution and the motion planner will reject the move or snap to the closest valid configuration.
The pose configuration encodes which of the eight mathematically valid solutions the robot should target (right/left arm, elbow above/below, wrist flip/no-flip, turn number). This article documents the procedures for reading the current pose type from system variables and writing pose type into a P-variable from inside an INFORM JOB, the limitations of the CNVRT instruction, and the methods for exchanging pose data over PLC networks.
P-Variable Structure and Element Index Layout
A Motoman P-variable is an array of real numbers indexed by an integer element number. The element layout is identical across the DX200, YRC1000, and FS100 controllers, although additional user-frame and tool-frame fields may appear on newer firmware:
| Element Index | Field | Data Type | Description |
|---|---|---|---|
| 1 | X | REAL (mm) | Cartesian X coordinate in the active user frame |
| 2 | Y | REAL (mm) | Cartesian Y coordinate in the active user frame |
| 3 | Z | REAL (mm) | Cartesian Z coordinate in the active user frame |
| 4 | Rx | REAL (deg) | Rotation about X axis |
| 5 | Ry | REAL (deg) | Rotation about Y axis |
| 6 | Rz | REAL (deg) | Rotation about Z axis |
| 7 | Configuration (Pose Type) | INTEGER | Encoded arm/elbow/wrist/turn configuration |
| 8 | Tool Number | INTEGER | Active tool frame index |
| 9 | User Frame | INTEGER | Active user frame index |
The configuration element (index 7) is the only integer field in the P-variable structure. All other position components are floating-point REAL values expressed in millimetres and degrees. When reading or writing individual components with the SETE instruction, the element number corresponds exactly to this table.
Configuration Register Encoding Format
The pose configuration is stored as a single integer that encodes five distinct sub-fields. The encoding is documented in the INFORM III manual and applies to all current controller generations:
| Sub-Field | Bit Range | Multiplier | Valid Values | Meaning |
|---|---|---|---|---|
| TURN | Bits 16-19 | ×100000 | 0-7 | Axis 4 turn number (0=0°, 1=+90°, 2=+180°, ...) |
| FLIP (B) | Bit 12 | ×10000 | 0 / 1 | 0 = No Flip (NF), 1 = Flip (F) about wrist |
| ARM | Bit 8 | ×1000 | 0 / 1 | 0 = Left arm (L), 1 = Right arm (R) |
| ELBOW | Bit 4 | ×100 | 0 / 1 | 0 = Below (B), 1 = Above (A) |
| WRIST | Bit 0 | ×1 | 0 / 1 | 0 = Top (T), 1 = Bottom (B) |
To construct a configuration value, sum the multipliers for the desired sub-field values. For example, a Right-arm, Above-elbow, Top-wrist, 0-turn configuration (R.A.T.0) encodes as:
Config = (TURN × 100000) + (B × 10000) + (ARM × 1000) + (ELBOW × 100) + (WRIST × 1)
Config = (0 × 100000) + (0 × 10000) + (1 × 1000) + (1 × 100) + (0 × 1)
Config = 1100
A Left-arm, Below-elbow, Bottom-wrist, 1-turn configuration (L.B.B.1) encodes as:
Config = (1 × 100000) + (1 × 10000) + (0 × 1000) + (0 × 100) + (1 × 1)
Config = 110001
Reading Current Position with the GETS Instruction
The GETS instruction copies the value of a system variable (any variable beginning with $) into a user variable. To read the current pose type directly into a P-variable, GETS pulls the system pulse position $PX000 into the user P-variable P000:
GETS PX000 $PX000
The $PX000 system variable contains the live position of the robot in pulse coordinates, including all eight pose fields. After execution, every element of P000 (X, Y, Z, Rx, Ry, Rz, configuration, tool, user frame) reflects the current state of the manipulator.
The general GETS syntax documented in the INFORM III manual is:
GETS [target_variable] [source_variable]
Common system position variables available to GETS:
| System Variable | Content |
|---|---|
| $PX000 | Current pulse-based position (X, Y, Z, Rx, Ry, Rz, config, tool, user) |
| $PX001 | Position of user coordinate system 1 in pulse coordinates |
| $PXPULSE | Last executed position in pulse form (some firmware versions) |
| $RCNFG | Current robot configuration flag register (read as B[ ] / I[ ] bit field) |
Because GETS reads pulse coordinates, the X/Y/Z values will be in pulse counts (encoder counts) rather than millimetres. This is acceptable for matching configurations but not for delivering Cartesian coordinates from a PLC. For Cartesian readback, use $PX000 only when the active user frame matches the tool-frame calibration.
Writing Pose Type to a P-Variable with SETE
The SETE instruction writes a single element of a structured variable from a numeric source. It is the canonical way to inject a configuration value into a P-variable without re-teaching the position. The general syntax is:
SETE [variable] (element_index) [source_value]
To set the configuration element (index 7) of P000 from a B-register or integer D-register, use:
SETE P000 (7) D[0]
This stores the value held in data register D[0] into element 7 of P000, overwriting any previously assigned configuration. Typical engineering workflow:
- PLC writes the desired configuration integer (e.g., 1100 for R.A.T.0) into a B-register or D-register over the fieldbus.
- JOB executes
SETE P000 (7) B[100]to inject the configuration. - JOB executes
SETE P000 (1) B[101],SETE P000 (2) B[102], ...SETE P000 (6) B[106]to inject X, Y, Z, Rx, Ry, Rz. - JOB executes
MOVJ P000 VJ=50.00(or MOVL P000 VL=200.00) to perform the move with the dynamic pose.
SETE accepts numeric literals, B-register references (B[0]–B[1023]), D-register references (D[0]–D[1023]), and integer variables. Float values written to the configuration element are truncated to integer.
CNVRT Instruction and Its Conversion Limits
The CNVRT instruction converts a P-variable between supported pose representations. The valid target formats are documented as fixed keyword arguments:
| Keyword | Conversion |
|---|---|
| BF | Convert pose representation to/from base-frame format |
| RF | Convert pose to/from robot-frame (world) format |
| TF | Convert pose to/from tool-frame format |
| UF | Convert pose to/from user-frame format |
| MTF | Convert pose to multi-turn flag format |
CNVRT does not support conversion from Cartesian (XYZ + Euler angles) to pulse coordinates. The closest available primitive is to read the live pulse position with GETS, which requires the robot to physically arrive at the Cartesian pose first. There is no off-line direct CNVRT path for an arbitrary Cartesian command arriving from a PLC.
Reading the Current Pose Type to a B/D Register
To read the live configuration into a register that the PLC can consume, combine GETS with SETE or use the dedicated system configuration registers. Two equivalent paths exist:
Path A — via GETS into a scratch P-variable, then SETE:
GETS PX000 $PX000 ' Read current position into P000
SETE B[200] P000 (7) ' Extract element 7 (configuration) into B[200]
Path B — using the $RCNFG system byte register (DX200/YRC1000):
GETS B[201] $RCNFG ' Some firmware exposes config as bit field
Path A is portable across firmware versions and is the recommended approach for production code. Path B is controller-dependent and should be verified against the firmware-specific INFORM manual. The Yaskawa Motoman INFORM III manual (document 181276-1CD) lists all $-prefixed system variables readable by GETS.
Writing the Pose Type When Using a Single P-Variable
Many production cells use a single P-variable as a "scratch" register that the PLC overwrites cyclically. In that case, every cycle must rewrite all nine elements of the P-variable, including element 7. A robust template JOB looks like:
' Wait for PLC handshake
WAIT B[10] = 1
' Read Cartesian pose from PLC registers
SETE P000 (1) B[100] ' X
SETE P000 (2) B[101] ' Y
SETE P000 (3) B[102] ' Z
SETE P000 (4) B[103] ' Rx
SETE P000 (5) B[104] ' Ry
SETE P000 (6) B[105] ' Rz
SETE P000 (7) B[106] ' Configuration (pose type)
SETE P000 (8) B[107] ' Tool number
SETE P000 (9) B[108] ' User frame number
' Execute motion
MOVJ P000 VJ=50.00
' Acknowledge completion
SET B[11] 1
WAIT B[10] = 0
SET B[11] 0
This pattern guarantees that the configuration is never stale. If the PLC fails to update B[106] in a given cycle, the previous cycle's configuration persists, which usually causes an alarm only if the Cartesian pose is incompatible. Always validate B[106] at the PLC side against the table of valid configurations for the current robot geometry.
PLC Communication: I/O Registers vs. Explicit Messaging
Two mechanisms exist for exchanging pose data between a PLC and the Motoman controller:
| Mechanism | Bandwidth | Data Granularity | Typical Use |
|---|---|---|---|
| Discrete I/O (B/D/I/Q registers) | Every scan (~10-20 ms typical JOB cycle) | 16-bit or 32-bit registers mapped to fieldbus words | High-speed pick-and-place, conveyor tracking |
| Ethernet Explicit Messaging (MotoCom32 / Ethernet Server) | On-demand request/response (~50-200 ms typical) | Full P-variable read/write, job start, status | Slow supervisory coordination, recipe download |
| EtherNet/IP or PROFINET implicit I/O | RPI 5-50 ms typical | Same as discrete I/O but on industrial Ethernet | Modern PLC integration (ControlLogix, S7-1500) |
For pose-type exchange, the discrete I/O path (EtherNet/IP implicit, PROFINET, or CC-Link) is preferred because the configuration must arrive in lockstep with the Cartesian components at every motion request. Explicit messaging on Ethernet is documented in the controller-specific Ethernet Server manual and can read/write full P-variable blocks, but its request/response latency introduces motion jitter if used for closed-loop motion control.
Workarounds for Dynamic Pose Updates
When the PLC cannot reliably compute a valid configuration for a target Cartesian pose (for example, when crossing a singularity), three field-proven workarounds exist:
-
Multiple P-variables with explicit branches: Pre-teach P001, P002, P003 with valid configurations for distinct regions of the workspace. The PLC selects the correct P-variable via a selector register, and the JOB executes
MOVJ P00xbased on that selector. This avoids the need to transmit the configuration at all. - PLC-side kinematic solver: Compute the configuration on the PLC using a copy of the robot's DH parameters. This requires the PLC to know the robot model (e.g., GP180-120, MH50) and tool-frame calibration.
- Two-step move: Move to a nearby "configuration reference" position whose configuration is known, then offset with a relative MOVL. The PLC commands only the offset; the configuration is implicit in the reference position.
Workaround #1 is the most common in production cells because it eliminates configuration management entirely from the PLC code.
Verification Procedure
After implementing dynamic pose updates, perform the following verification before resuming production:
-
Read-back check: Add a temporary JOB step that executes
GETS B[250] PX000(configuration of last commanded position) and verify that B[250] matches the configuration the PLC wrote. Cross-check on the teach pendant under Variable → P-variable → P000 → Element 7. - Workspace boundary test: Command the robot to extreme corners of the workspace and verify that the encoded configuration matches the displayed configuration on the teach pendant.
- Singularity sweep: Sweep a linear path through the wrist-flip singularity (extended-arm configuration) and confirm that the controller does not raise alarm 4150. If it does, the PLC must be programmed to switch configuration mid-path.
- Register-monitoring session: Use the teach pendant's I/O monitor to observe B[100]-B[108] at each PLC scan and confirm handshake integrity.
- Alarm log review: Inspect the alarm history for codes 4107, 4150, 4210 (position data error) and 4640 (tool/user frame error). Any of these during commissioning indicate configuration-frame mismatches.
Troubleshooting Matrix
| Symptom | Alarm Code | Root Cause | Corrective Action |
|---|---|---|---|
| MOVJ/MOVL aborts immediately | 4107 | Configuration element invalid for target XYZ pose | Recompute configuration at PLC using DH model or switch P-variable |
| Robot moves to wrong Cartesian position | None (silent) | Configuration 0 forces default; controller picks nearest valid pose | Always write element 7 explicitly; verify B[106] in monitor |
| JOB hangs at GETS step | None | Source system variable undefined in firmware | Verify $PX000 exists in your controller generation |
| SETE writes wrong element | None (silent) | Element index off-by-one (some legacy manuals use 0-indexed) | Confirm 1-based indexing on your controller |
| Configuration reverts to default between cycles | None | PLC is not updating B[106]; scan order incorrect | Verify PLC handshake timing; add WAIT after each SETE batch |
| Alarm on first move only | 4150 | Stale configuration from previous JOB execution | Issue SETE for all elements every cycle, do not skip element 7 |
Field Notes and Best Practices
- Treat element 7 of every dynamically written P-variable as mandatory. Even an empty or zero configuration is "valid" to the controller but usually produces a default flip/elbow that does not match your intent.
- When reading configuration back via GETS, use a scratch P-variable (e.g., P999) so that the live teach-pendant P000 is not disturbed.
- On the YRC1000, the configuration register is also accessible through the high-speed I/O area (HSI) if the controller is equipped with the optional HSI expansion. This avoids B-register contention with the standard general-purpose area.
- Document the configuration encoding table in your PLC project comments. Future maintenance engineers will not intuit the 1100 vs. 110001 distinction from ladder logic alone.
- When upgrading controller firmware, re-test all dynamic-position paths. New firmware revisions occasionally change the layout of system variables or the size of the configuration element.
FAQ
What is the configuration element index in a Yaskawa Motoman P-variable?
Element 7. The first six elements hold X, Y, Z, Rx, Ry, Rz. Element 8 is the tool number, and element 9 is the user-coordinate-frame number. The configuration is the only integer field.
How do I read the current robot pose type inside an INFORM JOB?
Use GETS PX000 $PX000 to read the current position into P000, then SETE B[200] P000 (7) to extract the configuration integer into B-register 200. The same pattern works on DX200, YRC1000, and FS100 controllers.
Can CNVRT convert Cartesian XYZ to pulse coordinates?
No. CNVRT supports only BF, RF, TF, UF, and MTF conversions. To obtain pulse coordinates from a Cartesian command, you must either move the robot to that Cartesian pose and read $PX000 with GETS, or compute the inverse kinematics off-line.
How do I write a pose type into a P-variable from a PLC?
The PLC writes the encoded configuration integer (for example, 1100 for R.A.T.0) into a B-register. The JOB executes SETE P000 (7) B[100], followed by SETE for X/Y/Z/Rx/Ry/Rz, then MOVJ P000 VJ=50.00. Repeat the SETE for element 7 every cycle when reusing one P-variable.
Which alarm indicates a configuration mismatch at motion time?
Alarm 4150 ("Configuration error") or 4107 ("Position not reachable"). Both indicate that the encoded configuration is not geometrically consistent with the commanded X/Y/Z/Rx/Ry/Rz. Verify the TURN, ARM, ELBOW, and WRIST sub-fields against the current robot pose.
Can PLC explicit messaging read or write the configuration element?
Yes. Ethernet explicit messaging (MotoCom32 or the Yaskawa Ethernet Server option) reads and writes the entire P-variable block, including element 7. Explicit messaging is best suited for non-time-critical exchanges; for real-time motion control, use fieldbus implicit I/O with B-register mapping.