Offline Programming

Offline Programming (or Off-Line Programming) means programming robots outside the production environment. Offline Programming eliminates production downtime caused by shopfloor programming. Simulation and Offline Programming allows studying multiple scenarios of a work cell before setting up the production work cell. Mistakes commonly made in designing a work cell can be predicted in time.

Offline Programming is the best way to maximize return on investment for robot systems and it requires appropriate simulation tools. The time for the adoption of new programs can be cut from weeks to a single day, enabling the robotization of short-run production.

Offline Programming with RoboDK

Offline Programming has no limits with RoboDK. RoboDK provides a user friendly Graphical User Interface to simulate and program industrial robots. RoboDK will help you avoid singularities and axis limits. Programming experience is not required. More information available in the Offline Programming section of the documentation.

With the RoboDK's API you can also program and simulate robots using Python. Python is a programming language that lets you work faster and integrate your systems more effectively. Python allows expressing concepts in fewer lines of code compared to other languages, making it friendly and easy to learn.

More information available in the RoboDK API section of the documentation. The RoboDK API is also available for C# and Matlab.

Offline Programming example:

from robolink import *    # RoboDK's API
from robodk import *      # Math toolbox for robots

# Start the RoboDK API:
RDK = Robolink()

# Get the robot (first robot found):
robot = RDK.Item('', ITEM_TYPE_ROBOT)

# Get the reference target by name:
target = RDK.Item('Target 1')
target_pose = target.Pose()
xyz_ref = target_pose.Pos()

# Move the robot to the reference point:
robot.MoveJ(target)

# Draw a hexagon around the reference target:
for i in range(7):
    ang = i*2*pi/6 #ang = 0, 60, 120, ..., 360
    
    # Calculate the new position around the reference:
    x = xyz_ref[0] + R*cos(ang) # new X coordinate
    y = xyz_ref[1] + R*sin(ang) # new Y coordinate
    z = xyz_ref[2]              # new Z coordinate    
    target_pos.setPos([x,y,z])
    
    # Move to the new target:
    robot.MoveL(target_pos)

# Trigger a program call at the end of the movement
robot.RunCode('Program_Done')

# Move back to the reference target:
robot.MoveL(target)

Once the simulation produces the desired effect it is very easy to generate the robot program offline (Offline Programming). As an example, the following program will be generated for an ABB robot.

Robot Offline Programming result:

MODULE MOD_HexagonPath

PROC HexagonPath()
	!Program generated by RoboDK for ABB IRB 1600ID-4/1.5 on 29/11/2014 17:42:31
	ConfJ \On;
	ConfL \On;
	rdkTool.tframe:=[-4,0,371.3],[0.92387953,0,0.38268343,0];
	MoveJ [[1010.634,-114.491,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[810.634,-114.491,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[910.634,58.715,662.29],[0,0,1,0],[0,-1,0,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[1110.634,58.715,662.29],[0,0,1,0],[0,-1,0,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[1210.634,-114.491,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[1110.634,-287.696,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[910.634,-287.696,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	MoveL [[810.634,-114.491,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	Program_Done;
	MoveL [[1010.634,-114.491,662.29],[0,0,1,0],[-1,0,-1,0],rdkExtax], rdkSpeed, rdkZone, rdkTool, \WObj:=rdkWObj;
	ConfJ \On;
	ConfL \On;
ENDPROC
ENDMODULE

Robot Post Processor

Post Processors define how robot programs should be generated for a specific robot controller. The conversion from a simulated application to a specific robot controller is done by a Post Processor. RoboDK Post Processors provide complete flexibility to generate the robot programs for specific requirements.

RoboDK provides post processors for most robot controllers. Post processors can be easily created or modified. More information available in the Post Processor section of the documentation.