@prototwin/abb-rapid-exporter

1.0.0•Public•Published 35 minutes ago

A tool for exporting robot programs to an ABB RAPID module.

Latest Version: 1.0.0

Size: 25 KB

Publisher: ProtoTwin (contact@prototwin.com)

README.md

ABB RAPID Exporter

This package contains a tool that exports the programs of a robot controller as an ABB RAPID module, which can be loaded into RobotStudio or onto an ABB robot controller. Moves, speeds, tools, work objects, external axes and I/O signals are exported, and joint moves are timed to match the joint speeds in ProtoTwin.

Usage

  1. Select the entity with the robot controller and run Export ABB RAPID from the robot controller component's tools.
  2. The tool saves <Module Name>.mod. When the programs use signals and Export Signals is enabled, it saves <Module Name>.zip instead, containing the module and an EIO.cfg file that defines the signals.
  3. In RobotStudio, load EIO.cfg first (Controller > Configuration > Load Parameters) and restart the controller. Then load the module, set the program pointer to main, and run it.

Any warnings are listed at the top of the module and in the console. Problems that would make the program behave differently from ProtoTwin stop the export with an error that names the program and instruction.

Properties

  • Module Name: The name of the RAPID module and the exported file.
  • Cycle: Repeats the Main program indefinitely. When disabled, it runs once.
  • Export Signals: Exports an EIO.cfg file with the signals used by the programs.

Requirements

  • The robot model follows ABB conventions: the robot entity is the ABB base frame, the joint values of the robot controller are the ABB axis values, and the link holding the TCP is tool0. Robots exported from RobotStudio follow these conventions.
  • The robot controller has a TCP and a program named Main, which is called from the RAPID main routine. Every other program is exported as a routine that Main can call.

Instructions

ProtoTwin RAPID
Linear Move MoveL
Joint Move with a selected solution MoveAbsJ to the joint values of the solution
Joint Move without a solution MoveJ to the target, keeping the current robot configuration
Servo Move MoveAbsJ from the current joint values, where joints that are not specified keep their positions
Arc Move MoveC
Path Move A sequence of MoveL instructions through the points of the path
Pause WaitTime \InPos
Await Signal WaitDI, WaitDO, WaitGI, WaitGO or WaitUntil, with \MaxTime when a timeout is set
Set Signal SetDO, SetGO or SetAO
Call A call to the routine of the program
Conditional Call An IF statement that calls the routine of the program
Set Speed Updates the speeds and accelerations used by later moves
Set TCP Switches the active tool
Call Script Not supported. The export fails, because scripts cannot be converted to RAPID.

Speeds and Timing

  • Linear, arc and path moves use the linear and angular speed of the robot controller, and its linear acceleration as the TCP acceleration limit.
  • Joint and servo moves are timed from the speed and acceleration of each joint's motor, multiplied by the joint speed and joint acceleration of the robot controller. The time is calculated when the move runs, so it is correct however the program reaches it. The robot controller adds its own short ramps, so joint moves typically take 1 to 3% longer than in ProtoTwin.
  • Every move ends at a stop point (fine). The points along a path are blended with the largest standard zone that keeps each corner within the discretization tolerance of the path, so curved paths run at full speed.

Tools

Each TCP is exported as a tooldata named after its entity, such as tGripper. Its load (mass, centre of mass and inertia) is calculated from the physics bodies of the tool. When the tool has no physics bodies, a placeholder load is exported with a warning. Measure the load with the LoadIdentify service routine, or enter it from the tool's datasheet, before running on a real robot.

Work Objects

Targets are exported relative to their parent entity, which becomes a work object named after it, such as wFixture. This lets the program be adjusted on the real cell by touching up a work object, instead of every target.

  • When the parent entity is itself inside another entity, the parent is treated as a part on a fixture. The part's work object has the fixture as its user frame and its position on the fixture as its object frame, and the fixture gets a work object of its own. At startup, the program copies each fixture's frame into the parts on it, so touching up the fixture moves every part on it. Touch up the fixture's work object, or a part's object frame, but not a part's user frame, which is overwritten at startup.
  • Targets in the scene, under the robot, or under an entity that contains the robot are relative to the robot base (wobj0).
  • A path move with a reference frame uses the work object of its reference frame.

External Axes

Controlled joints under the robot controller entity are the robot axes. Any other controlled joints are external axes, exported as eax_a to eax_f in the order of the controlled joints. They must be configured as mechanical units on the robot controller.

  • Every move to a target must constrain every external axis. Along a path, the external axes move from their positions at the start to the constrained positions at the end.
  • Tracks: For a robot mounted on a track, targets are relative to the robot base with the track at zero.
  • Positioners: Targets on a positioner use coordinated work objects, so they move with it. The positioner needs a mechanical unit named after its top-level entity, whose user frame matches the last link of the positioner, and targets must be attached to that link.

Signals

Each signal used by the programs becomes an ABB signal named after it, with a prefix for its type:

Signal type Output Input
Bit do di
Float or double ao ai
Other types go gi

The EIO.cfg file defines them without an I/O device. Group and analog signals must be mapped to an I/O device on the robot controller.

Names

RAPID names are created from the names of entities, programs and signals. Characters that RAPID does not allow are replaced with underscores, names are limited to 32 characters, and duplicates are numbered, such as pTarget_2. Routines start with r, robtargets with p, jointtargets with j, tools with t, and work objects with w.

Limitations

  • Robot configuration data is not exported, so configuration checking is turned off (ConfJ \\Off and ConfL \\Off) when the program starts from main. Moving the program pointer directly to a routine turns configuration checking back on, which can stop the program, so always start from main.
  • Moves are not blended, except along paths.
  • External axes are not solved from joint weights, so they must be constrained on every move to a target.
  • Only a single robot is supported, without MultiMove.

Changelog

1.0.0

Initial release.