Skip to content

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 WinOLP, 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 200 robots from 15 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 2,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.

23 Comments

  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. isma isma

    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!

    • 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. Anto Anto

    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. Senthil Kumar Senthil Kumar

    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”

  6. kalki kalki

    I don’t know why every time I loaded the src file the RoboDK crashed.

    • 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.

  7. Martin Häuer Martin Häuer

    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!

    • Thanks for your comments. We replied to your request on the forum about appropriate instructions to install RoboDK for Ubuntu. I recommend you to download the latest Ubuntu version (currently RoboDK v2.6.7) and follow the instructions in the install-instructions.txt file.

      More information here:
      https://www.robodk.com/forum/showthread.php?tid=223

  8. Uditha Uditha

    How can I insert a written LS format file to RoboDK? To Funuc Robot.

  9. Uditha Uditha

    Sorry ,Fanuc robot. Not funuc.

    • 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:
      http://www.robodk.com/help#PostProcessor

  10. Nickolas Davies Nickolas Davies

    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?

  11. 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.

    • 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 info@robodk.com if you need technical assistance.

  12. 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?
    Thanks
    mecch

  13. Barrett Barrett

    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!

    • 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:
      https://www.robodk.com/offline-programming
      If you have any questions we will be happy to help.

  14. kuliah kuliah

    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.

    • 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().

Leave a Reply

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