Off-line Programming

If you drive a car, it makes little difference what brand it is: all cars are driven the same way. The same applies to computers. If you have a Windows PC, the user interface won’t be affected by your computer hardware. This is definitely not the case for industrial robots.

The way you program an industrial robot strongly depends on the robot brand. You might think that a robot program looks like C++ or Visual Basic. The truth is that some robots are still programmed in assembler-like languages.

RoboDK simulationBecause of the complexity of using an industrial robot, robot integrators and most manufacturers try to limit themselves to a single robot brand. Unfortunately, industrial robot manufacturers don’t offer completely equivalent product ranges, and their offers evolve constantly. Stäubli, for example, is one of the few manufacturers that offer robots suitable for humid environments, while FANUC is the only one to offer a medium-payload collaborative robot. Furthermore, a number of businesses work with calls for tenders. As a result, sometimes manufacturers end up with robots of different brands.

The reason why robot-programming languages evolve slowly is probably due to the fact that industrial robots are extremely reliable and durable. Thus, robot manufacturers have to offer backward compatibility. Selling spare parts and additional options is probably as lucrative as selling new robots. For this reason, robot manufacturers probably won’t change the fundamentals of their programming languages. For example, ABB is stuck with using quaternions on the user level to represent orientation, even though a quaternion is as intuitive as using binary code instead of ASCII. Rather than changing quaternions to Euler angles, like every other robot manufacturer, ABB simply added functions that convert from one orientation representation to the other. Most robot programming languages probably looked great a decade or two ago, but nowadays, engineers are used to modern programming languages like Java, C#, and Python.

FANUC, one of the leading four robot manufacturers, provides not one but two different programming languages: Teach Pendant (or TP) and KAREL. TP programs are binary files that can be edited through the robot’s teach pendant buttons (or touch screen for newer robots). TP files can also be compiled/decompiled from an LS file (human-readable ASCII file). TP programs offer a limited assembler-like functionality. Alternatively, with FANUC, you can program your own algorithms using a PC and KAREL (programming language based on Pascal), but KAREL does not allow you to do robot movements nor edit the program from the controller’s teach pendant.

You can purchase ROBOGUIDE off-line programming and simulation software to off-line program FANUC robots. However, if you don’t have ROBOGUIDE’s WinOLPC, you won’t be able to use LS programs unless you also have the option “ASCII Upload” in your FANUC robot controller, a paid software upgrade required for each robot. You also need ROBOGUIDE to edit and create KAREL programs.

Motoman robots are programmed using the INFORM programming language (JBI files). INFORM looks similar to FANUC’s TP. The program variables are registers shared among all programs. However, Motoman also offers MotoCom for all their robots: a well-documented library that allows you to program the robot using C++, C# or Visual Basic (on Windows).

Programming of ABB robots is simpler, and based on the RAPID programming language, which is somewhat similar to Visual Basic. Furthermore, ABB provides RobotStudio, offering on-line programming and an excellent RAPID program editor for free, as well as an easy file transfer through a network connection between a PC and the robot. Optionally, you can purchase the 3D simulator and off-line programming tools.

KUKA robots require SRC programs written in the KRL programming language, usually edited using the free OrangeEdit editor unless you have the KUKA simulator Sim Pro. It is interesting to note that Kuka’s KRC4 controller is a Windows based computer and the teach pendant is a remote desktop of that computer. It is unpractical to modify programs from the teach pendant as the touch screen feels slow. One notable exception, however, is KUKA’s collaborative robot, LBR iiwa, which uses KUKA’s Sunrise controller and is programmed in Java.

We’ll stop here, because there are dozens of other robot manufacturers from all over the world. Some brands do not have offline programming software, such as Universal Robots: the user must program UR robots through the robot’s touch pendant interface (which is highly intuitive, but also very limited) or using an ASCII editor and their UR Script language (based on Python). Other robot manufacturers focus their efforts on having plugins for CAD software, like Mitsubishi who offers MelfaWorks for SolidWorks.

The fact that nobody has taken a step towards unifying the way robots are programmed is very disappointing. G-code was introduced in the 50s, shortly after Numerical Control, and most CNC controllers currently use it. No such common programming language exists for industrial robots.

Several companies offer powerful robot off-line programming (OLP) tools that support multiple robot brands, and each software tool has its advantages and disadvantages. However, most of these tools are also relatively expensive. There are also free tools like Gazebo (generally used with ROS), but they require expert programming skills and are targeted to robotics in general, making them less practical for simulation and off-line programming of industrial robots.

This is why we created RoboDK: an affordable simulator for industrial robots that provides an intuitive way to program industrial robots. The simulator supports a wide variety of applications, such as pick and place, painting or robot milling. Optimization tools are provided to automatically convert CAM programs to robot programs. RoboDK is a spin-off from the CoRo laboratory, one of the largest robotics labs in Canada, where it was tested on all major industrial robot brands.

RoboDK’s library has more than 300 robots from 30 different robot manufacturers and we look forward to continue adding support for new robot brands. Any robot manufacturer is welcome to include their robots in RoboDK’s library, providing an open interface to be able to do off-line programming and online programming as well. Off-line programming is achieved by defining the robot’s brand post processor. The online programming is achieved by developing a robot driver that works as a bridge between the simulator and the robot. Then, it is possible to easily run robot programs step by step, retrieve the robot position or move to a specific position with a robot. This video shows an example of online programming with an UR10:

What makes RoboDK unique is that you can program any robot using Python and the RoboDK API. Python offers an immense library of tools for programming (for example, to convert SVG images to XY coordinates that can be followed by robots). You can then use object oriented programming with Python and RoboDK’s API and have code snippets like this one:

# robot is an object
# target is a pose (4x4 matrix), defining position and orientation of the TCP
robot.MoveJ(target*transl(0,0,-100))    # Move (joint) to the approach position
robot.MoveL(target)                     # Move (linear) to the target
CloseGripper()                          # Custom-defined action, such as grabbing a part
robot.MoveL(target*transl(0,0,-100))    # Move back to the approach position

The above script will move the robot to a specific target through an approach position. Many other examples are available in our library (with and without Python).

There is no doubt that one day, a robot programmer will have the choice to program any robot brand using a universal programming language such as Python. Robot programmers as well as companies prefer this option as they do not depend on brand-specific tools. Kudos to Mecademic, another spin-off of CoRo, who offers the first industrial robot arm that can be controlled with any modern programming language, but this robot too requires the use of a few proprietary commands.

Robot Workspace

RoboDK has been downloaded more than 30,000 times since we launched it in January 2015. RoboDK has also attracted universities as a tool for learning industrial robotics (you can display DH frames, for example) as well as new robot manufacturers all over the world. We also welcome integrators to develop their technology using RoboDK’s API. The advantage is that they can develop their technology with one robot brand and deploy it with any other robot brand.

RoboDK can be tried for free and will remain free for educational purposes. We also believe that RoboDK is the most affordable off-line robot programming solution currently available.

31 Comments on “Off-line Programming”

  1. Thank you for the over view. I am planning to control a Fanuc robot over socket from Python environment.

  2. Awesome!!! I`m a professor in the field of industrial robots and planning to use RoboDK in class. Many thanks for you all! 😀

  3. hello,

    thanks for the overview.
    I’m new to robot programming, do you know from where I can get free software for kuka robots.

    Thank you!

    1. Hello Isma,
      What are you planning to do with your Kuka robot? The free version of RoboDK might be enough for you to simulate and program Kuka robots.
      There is a free program editor for Kuka robots: OrangeEdit.

  4. One of the excellent package that I came across during my Thesis and supported me a lot, especially when students are not on a position to afford sky high priced soft wares. Good choice for kinematic manipulations

  5. It seems to be very interesting. I need manual for using Robo DK… Can anyone share the manual file/link to download the “How To Use Robo DK”

    1. The problem is fixed with the new version. Let us know if you still have issues. You can import a KUKA SRC programs simulate it, modify it and generate the SRC robot program again.

  6. I feel really amazed about this development and I decided to use RoboDK for the KUKA robot, I am working with, in my company. I tried to install it on Ubuntu 16.04 (64bit), but I am struggling with an error message all day now (cannot find the Qt platform plugin “xcb” ). The latest python is installed and – as far as I know – all the Qt platform plugins required as well. I was unable to find any solution on the web or in the RoboDK-Forum – surely it’s a quite simple solution, but without help I will be unable to implement RoboDK for the upcoming tasks.

    thanks a lot!

    1. You can select the Fanuc post processor to generate LS code offline. If you have the ASCII upload option you can transfer the LS program directly to the controller. Alternatively, you can compile the LS file to a TP file with the appropriate post processor.
      More information about post post processors here:

  7. Hi grate software, have been playing with the trial with aims of testing with are Nachi sf166, considering a licence for ether RoboDK or SpruitCAM do you have planed feature’s list somewhere outlining what upgrades to expect in the future?
    5 axis tool path’s without 3rd party software possibly?
    probe point cloud?

  8. Hi ,sir,

    I use RoboDK create a KUKA *.src file , while when I send the file to KUKA Controller by FTP, it displays in *.txt file. Now I can’t run the program in KUKA Robot.

    1. You should rename the file to SRC file and make sure that the content was properly transferred.
      What controller do you have?
      How did you set up your FTP connection?
      What location in the controller do you send it to?
      Do not hesitate to contact us at if you need technical assistance.

  9. Hi! RoboDK
    I have read the paper about how to connect Kuka robots with RoboDK. That article mentioned a MainCom.src file to run on the KRC controller in order to connect the PC running RoboDK. Could you send me this file?

  10. This is very interesting to read!

    I’ve been programming ABB robots for about 10 years now and it is by far the easiest language I have had to deal with. Fanuc is so clunky to work with, and you can’t edit it offline without a special program. Rapid feels very similar to Python. If memory serves I think Fortran was very similar.

    Quaternions were ABB’s solution for a more compact method of solid body transformations as opposed to the more computationally intense homogeneous transform matrices. Maybe it’s because I’ve been using it so long, but I find it very easy to work with. 1,0,0,0 is when two coordinate systems are aligned in the XYZ axes. very compact and efficient. The ABB is a programmer’s and mathematicians robot as far as I can tell.

    I stumbled upon your site because I am trying to find if anyone has figured out a way to run other manufacturers robots on different operating systems. I would love to see Rapid as the standard language.

    I’m going to enjoy trying out your SDK!

    1. We are glad to hear you liked our posts. By using our Python SDK you can simulate and program any industrial robot arm from any robot manufacturer, including ABB, KUKA, Fanuc, Yaskawa Motoman, Universal Robots and more! A brief example is provided on our website:
      If you have any questions we will be happy to help.

  11. Let me know the RoboDK python API (if exist) to move particular joint of a robot around its axis at amount of degree. As far as I know there is an instruction MoveJ that receive target (4×4 matrix) as parameter not degree. I am lecturer. Thanks so much.

    1. Hi Kuliah, You can also provide a joint matrix (6×1) and it will use the provided data as joint angles. You can also retrieve the current robot joint position using robot.Joints().

  12. Hi RoboDK.

    Good day. This a good explanation by you as i understand few of your technical words. Thanks for that

    Let me introduce myself. I am a robot teach pendent programmer fanuc abb etc. Also robot simulator and olp programmer of process simulate robcad roboguide etc. Well i dont know much about python c++ etc.

    Recently i came across a requirement of my customer where they need to program kuka robot for thermal spray coatings of turbine blades. If you look at the turbine blades its having a very complex geometry and tricky to generate offline program, as you know process simulate or robcad is difficult for complex geometry for olp.

    My requirement is i need to generate kuka olp where as that software should be good enough to support complex geometries. Well i mean to say it should be very easy to generate robot paths using 3D cad native files. Hovc thermal spray is used in coatings for longetivity of materials.

    I can suggest your software to the customer but at the end its all depends on customer and the software easiness.

    Thanks for your explanation.

    1. Hi Andrew,

      Thanks for the details of your project! We hope RoboDK fits the needs of your customer. For any specific questions please feel free to reach out to us at

      Best regards,

  13. In RoboDK, there is the option to use linear constraints on a joint move. (meaning that max velocity and acceleration of the TCP are constrained). Does it make any sense? Is this option applicable in a real situation and why?

    Thank you in advance.

      1. I am working on a Human-robot collaborative environment. As I see in ISO 15066, the constraint for max velocity of the TCP, is enough in order to ensure safety, at least for free transient contacts (figure A.4). In ROBODK, there is the option to set linear constraints for a joint motion.

        Traditionally, a joint move is constrained by setting angular velocity and acceleration. In this way, it is most likely for the joint move to be faster than the linear one, and as I see, this is one of the reasons for someone to prefer joint to linear.

        So, is it ok to program a joint move with linear constraints (and not the angular constraints)?

        Thank you for your help!

        1. You can actually choose your preferred setting here:
          Tools-Options-Motion-Move time calculation
          You can set it to “Strictest constrain” and all the speed constrains will be taken into account for each movement.

  14. Muito legal estudante de Eng Industrial e sistema eléctrico , Técnico de Montagem de robos Industrial

  15. Really Awesome Thing, ROBODK Is An Excellent Thing ToUse. I Am Polytechnic Lecturer, I Just Prefer This To Explain Industrial Robots Working.

Leave a Reply

Your email address will not be published. Required fields are marked *