Running kuka|PRC XML on KUKA iiwa via Sunrise Workbench

Jason IP3 min read
Other ManufacturerRoboticsTutorial / How-to
Licensed PE Working through this on a live machine? A Maine-licensed engineer can take it from here — included with IMD hardware, by the hour for everything else. Book an engineer

Why the kuka|PRC XML Cannot Be Started Directly

An *.xml file exported from kuka|PRC (or any external path-planning tool) is data, not an executable robot application. On an iiwa running Sunrise OS (tested here on 1.11), only Java classes compiled inside a Sunrise Workbench project appear on the smartHMI as selectable applications after project synchronization. An XML file synced to the controller will never show up under the play button, and KRL-style command data cannot be interpreted natively by Sunrise — the iiwa does not execute KRL program files.

Supported Workflow: Wrap the XML in a Java Application

The correct path is to parse the XML inside a Java robot application. The kuka|PRC output is structurally close to Sunrise's own RoboticsAPIData format, which stores named frames with their transformations and redundancy data, for example:

<RoboticsAPIData>
  <version>3</version>
  <world>
    <frame name="PTP ">
      <transformation x="501.597" y="-134.696" z="160"
                      a="0" b="1.5707963" c="0" /\>
      <redundancyData> ... </redundancyData>
    </frame>
    <frame name="LIN "> ... </frame>
  </world>
</RoboticsAPIData>

Implement the workflow in this order:

  1. Create a new robot application class in the Sunrise Workbench project (it must sit in the package tree of the project so it is registered as an application).
  2. Add the kuka|PRC XML file to the project resources so it is transferred during synchronization.
  3. In the application, read the XML and extract each frame's transformation (X/Y/Z/A/B/C) plus the command type (AXIS/PTP/LIN), velocity, and approximation/interpolation attributes from the PRC_CommandData block.
  4. Build the corresponding motion sequence in Java: joint targets from AXIS commands, Cartesian PTP and LIN moves from frame data, applying the base and tool frames from the PRC_Settings block.
  5. Synchronize the project to the controller over the configured network connection (X66 in this setup) and start the application from the smartHMI.

Mapping kuka|PRC Command Data to Sunrise Motions

The PRC_CommandData block carries three command types that map onto Sunrise motion calls. AXIS commands contain per-joint targets A01–A07 (radians on the iiwa, e.g. A04 = -1.5707963 for -90 deg) and become joint PTP motions. PTP and LIN commands carry a Cartesian frame and become Cartesian point-to-point or linear moves. Velocity fields appear in both relative form (VEL 0.15 on AXIS/PTP) and absolute form (VEL 250 on LIN, i.e. mm/s), so scale each command according to its type. The PRC_Settings block supplies the BASE frame and the INITTOOL frame (in this export Z = 132.99, B = -1.5707963), which must be attached to the robot before replaying the path or all positions shift.

Verification and Common Pitfall

After synchronization, confirm the application appears in the application list on the smartHMI — if it does not, the class is missing from the project package tree or required classes failed to compile. The reported failure in this case was exactly that: missing classes prevented the code from running until the project was corrected. First execution should be in T1 at reduced override, confirming the base/tool frames produce the expected start pose before running the full LIN segments.

FAQ

Can an XML file from kuka|PRC run directly on a KUKA iiwa with Sunrise OS?

No. Sunrise OS only executes Java robot applications that are compiled in a Sunrise Workbench project and synchronized to the controller; XML files are data and never appear as startable applications on the smartHMI.

How do I convert kuka|PRC XML into a Sunrise robot application?

Write a Java application that parses the XML, converts each PTP/LIN/AXIS command into the matching Sunrise motion using the frame and velocity data, apply the BASE and INITTOOL frames from PRC_Settings, then synchronize the project to the controller.

Why does my synced Sunrise application not show up on the smartHMI?

Only compiled Java classes inside the Sunrise Workbench project's package tree register as applications after synchronization. Check for missing classes or compile errors in the project — this was the root cause of the failure reported here.

Back to blog