RoboDK is a simulator focused on industrial robot applications. This means that robot programs can be created, simulated and generated offline for a specific robot arm and robot controller. In other words, RoboDK is software for Offline Programming.
To create robot programs, it is required to select a robot, load the robot tools and use one or more CAD to path features to create programs by adding targets or using specific tools (such as converting CNC programs to robot programs).
An extensive library of industrial robots is available. Industrial robots are modelled in RoboDK the same way they behave using vendor-specific controllers, including axis limits, sense of motion and axis linking.
This section shows how robot programs can be created, simulated and generated for a specific robot controller using the RoboDK Graphical User Interface (GUI).
Note: This section describes how to create robot programs using the Graphical User Interface (GUI) only. The RoboDK API can be used to complement these programs or to completely create a robot program. Visit the RoboDK API section for more information.
Offline Programming (or Off-Line Programming) means programming robots outside the production environment. Offline Programming eliminates production downtime caused by shop floor programming (programming using the teach pendant). 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.
A simulation can be accomplished by adding a sequence of instructions in a program. Each instruction represents specific code for a specific controller, however, RoboDK offers a Graphical User Interface (GUI) to easily build robot programs, in a generic way, without the need to write code. The code specific to a robot controller will be generated automatically when the program is generated.
To create a new empty program using the RoboDK Graphical User Interface:
Select Program➔ Add Program
Alternatively, select the corresponding button in the toolbar.
2. Select Tools➔Rename item… (F2) to rename the program
Note: Programs are automatically created if an instruction is added but there is no program available in the station.
This action will create an empty program and will allow adding new instructions by right clicking the program or selecting an instruction from the Program menu. The next section Program Instructions provides more information about adding instructions.
Note: Simulations and programs can also be fully created using the RoboDK API and a specific programming language, such as Python, C# or Matlab. The RoboDK API section provides more information.
It is possible to add new instructions by right clicking a program or from the Program menu, as shown in the previous section.
Tip: Select a specific instruction to add a new instruction after the selected instruction.
Tip: It is possible to drag and drop instructions inside a program or between different programs to reorder them.
This section describes the instructions supported by the RoboDK graphical user interface for robot offline programming.
Select Program➔ Move Joint Instruction to add a new joint movement instruction. Alternatively, select the corresponding button in the toolbar.
Unless a target is selected before adding the instruction, the movement instruction will create a new target and they will be linked. If the target is moved the movement is also modified.
If this is the first instruction that is added to the program, two more instructions will be added before the movement instruction: a Reference Frame selection and a Tool Frame selection. This will make sure that when the program reaches the movement instruction the robot is using the same reference and tool frames used to create this new target.
Note: Right click the Movement instruction and select Target options… (F3) to open the target options menu. The target can be modified from this window or directly from the 3D view.
Select Program➔ Move Linear Instruction to add a new linear movement instruction. Alternatively, select the corresponding button in the toolbar.
Unless a target is selected before adding the instruction, the movement instruction will create a new target and they will be linked. If the target is moved the movement is also modified.
Joint Moves and Linear Moves behave the same way and can be easily switched from one type to the other.
Same as with the Joint Move Instruction, if this is the first instruction that is added to a program, two more instructions will be added before the movement instruction: a Reference Frame selection and a Tool Frame selection.
Important: It is recommended to keep the first movement of each program as a Joint Move using a Joint target. This will properly set up the desired configuration from the first movement and make sure that the real robot is moving the same way it was simulated.
Contrary to Joint Movements, Linear Movements are sensible to robot singularities and axis limits. For example, 6-axis robots can’t cross a singularity following a linear move. The following image shows an example saying Joint 5 is too close to a singularity (0 degrees). […] Consider a Joint move instead. As shown in the following image.
If a linear move is not strictly necessary, right click the movement instruction and change it to a Joint Instruction.
Alternatively, the target, the TCP or the position of the reference frame must be modified to avoid the singularity.
Select Program➔ Set Reference Frame Instruction to use a specific reference frame. This will update the given reference frame on the controller for the following movement instructions and will change the Active reference frame of the robot in RoboDK for simulation purposes. That means that movement instructions to specific targets (Cartesian targets) will be made with respect to the last reference frame set.
The reference frame is a variable also known as Work Object (ABB robots), UFRAME (Fanuc robots), FRAME (for Motoman robots) or $BASE (for KUKA robots).
Note: Specific controllers support setting reference frames using a numbered reference frame (such as Fanuc and Motoman controllers). In that case, the name of the reference frame can end with a number (such as Frame 4 to set the frame index 4).
Select Program➔ Set Tool Frame Instruction to use a specific tool frame (TCP). This will update the given tool frame on the program for the following movement instructions and will change the Active tool frame of the robot in RoboDK for simulation purposes. That means that movement instructions to specific target (Cartesian targets) will be made with respect to the last tool frame set.
The reference frame is a variable also known as ToolData (ABB robots), UTOOL (Fanuc robots), TOOL (for Motoman robots) or $TOOL (for KUKA robots).
Note: Specific controllers support setting tool frames using a numbered tool (such as Fanuc and Motoman controllers). In that case, the name of the tool frame can end with a number (such as Tool 4 to set the tool index 4).
Select Program➔ Move Circular Instruction to add a new circular movement instruction. Alternatively, select the corresponding button in the toolbar.
Unless two targets are selected before adding the instruction, the movement instruction will create no new targets. It is required to add two more targets separately and link them from the circular move instruction, as shown in the next image.
The circular path is an arc created from the point where the robot is located, passing through the first circular point (Target Linked 1) and ending at the end point (Target Linked 2).
Important: It is not possible to accomplish a full circle with only one circular instruction. A full circle must be split into two separate circular moves.
Select Program➔ Set Speed Instruction to add a new instruction that changes the speed and/or the acceleration. It is possible to specify speed and accelerations in the joint space and in the cartesian space.
Activate the corresponding cases to impose a specific speed and/or acceleration in the program. The robot speed is applied from the moment this instruction is executed.
The robot speed can also be changed in the robot parameters menu: Double click the robot, then, select parameters.
Note: Not all robot controllers support setting accelerations accurately.
Important: Setting the right speed is important to accurately calculate the program time (cycle time). More information available in the cycle time section.
Select Program➔ Show Message Instruction to add a new instruction that will display a message on the teach pendant.
Note: Not all robot controllers support displaying messages on the teach pendant from a program. In that case, this instruction will have no effect.
Select Program➔ Pause Instruction to add a new instruction that will pause the program execution for some time or stop the program until the operator desires to resume the program.
Note: Set the pause delay value to -1 to pause the program until the operator desires to resume the program. In that case, the instruction will be automatically named Stop.
Important: In the simulation, a 5 second pause will take 1 second to simulate for the default simulation ratio of 5. More information is available in the Simulation section.
Select Program➔ Program Call Instruction to add a call to a sub program from the current program.
By default, this is a blocking call to a specific program. However, it is possible to switch to Insert Code to enter code specific at the location of this instruction. This might be useful for a specific application and a specific controller.
Tip: Select Select program to automatically fill the text field. Otherwise, a text match should also work. If there is a name match with the sub program used in the instruction, this subprogram will be simulated in RoboDK.
Tip: Enter multiple lines to automatically set up multiple program call instructions in a row.
Switch from Program Call to Start Thread to provoke a non-blocking call to a sub program. In this case, the controller will start a new thread. This option is only available for certain controllers and only works for specific operations.
Tip: A main program used for simulation purposes only may use the Start Thread option to start the simulation of multiple programs at the same time (for example when two or more robots are simulated).
Select Program➔ Set or Wait I/O Instruction to change the state of Digital Outputs (DO). By default, this instruction is set to Set Digital Output. This instruction also allows waiting for a specific Digital Input (DI) to switch to a specific state.
The IO Name can be a number or a text value if it is a named variable. The IO Value can be a number (0 for False and 1 for True) or a text value if it is a named state.
Note: This instruction also supports setting Analog Outputs (AO) or waiting for Analog Inputs (AI) on some robot controllers. In that case, it is possible to provide decimal numbers or specific text instead of numbers.
Set to Wait for Digital Input to stop the program execution until a specific input changes to a specific value. Furthermore, most robot controllers support a timeout delay to raise an error if the waiting time exceeds a specific value. Check the Timeout (ms) option to activate this feature.
Tip: It is a good practice, for example, if the robot has a specific hardware on the cell (such as a gripper or a milling spindle), to activate this specific hardware using a Digital Output (DO), then waiting for a specific Digital Input (DI) to switch to a specific state.
Altering simulated Digital Inputs and Digital Outputs will create new station variables. To check the state of these variables you can right click the station and select Station Parameters. It is also possible to read or modify these variables through the API.
Select Program➔ Set Rounding Instruction to alter the rounding accuracy. The rounding accuracy used to smooth the edges between consecutive movements. This change takes effect from the moment it is executed inside a program (same as with all the other instructions), so it is typical to set this value at the beginning of a program.
Without a rounding instruction, the robot will reach the speed of 0 at the end of each movement (unless the next movement is tangent with the previous movement). This will provoke high accelerations and quick speed changes to ensure the best accuracy for each movement.
This value is also known as Blending radius (Universal Robots), ZoneData (ABB robots), CNT/FINE (Fanuc robots), Cornering (Mecademic robots) or $APO.CDIS/$APO.CPTP/Advance (KUKA robots).
Note: Set the Rounding value to -1 to provoke fine movements. This means that the robot will not round the path edges.
Tip: A high rounding value will ensure a constant speed through the robot path in exchange of losing accuracy on the path edges. Depending on each application, it is common to find a good compromise between accuracy and a smooth speed.
RoboDK path accuracy tests allow to have a better understanding of the effect of different rounding values with a measurement system.
Select Program➔ Simulation Event Instruction to provoke a specific simulation event. Simulation events have no impact on generated code and are used only to provoke a specific event for simulation purposes. Simulation events using the graphical user interface allow:
● attaching or detaching objects to robot tools
● showing or hiding objects or tools
● changing the position of objects and reference frames
For example, if the robot moves to a specific location to grab an object we can set up an Attach object event to move that object together with the robot. Then, after the robot has moved and it is ready to leave the objects we can set up a Detach object event to leave any objects the tool has grabbed.
Note: Specific events can also be simulated using macros (programing experience is required). For example, using the API it is possible to make objects appear randomly at specific locations for a pick and place simulation.
Note: When attaching object to the tool, the closest object is attached if it is not farther from a given distance. This distance is 200 mm by default and can be changed in: Tools➔Options➔Maximum distance to attach an object to a robot tool. Also, by default, the distance is checked from the TCP location to the object reference. Alternatively, it is possible to use the distance between the TCP and the object geometry by selecting Check shortest distance between TCP and the object shape.
Double click the program to start the simulation. Alternatively:
1. Right click the program
2. Select Run
A simulation bar will appear at the bottom if the program is double clicked. It is possible to slide the simulation to move the simulation forward or backwards using the simulation bar.
Tip: Select Program➔ Fast simulation to speed up the simulation (or hold the space bar). This option is also available in the toolbar.
RoboDK simulates 5 times faster than real time by default. That means that if a program takes 30 seconds to execute it will be simulated in 30/5=6 seconds. Speeding up the simulation increases this ratio to 100. Normal and fast simulation speeds can be changed in the Tools➔Options➔Motion menu.
Tip: Select Program➔ Pause to pause the simulation (or the Backspace key).
Tip: Select Esc key to stop the simulation or double click the program again.
Tip: Double click each instruction individually to execute them one by one.
Tip: Right click a movement instruction and select Start from here to resume the program execution from that instruction, as shown in the next image.
Follow these steps to generate the robot program required by the robot controller (vendor-specific robot controller):
1. Select the Program
2. Select Program➔Generate Program(s) (F6)
Alternatively, right click a program and select Generate robot program (F6) to generate the program.
Multiple programs can be selected to generate more than one program at a time. Hold the Ctrl key to select more than one program. Selecting the Generate Program(s)… (Shift+F6) option will open a window asking the user to provide a location to save the program.
It is possible to transfer a program from the computer directly to the robot. This option usually sends the program to the robot through FTP protocol or other specific protocols, such as using socket messaging or serial connection. First, it is required to enter the robot IP and FTP settings in the robot connection menu:
1. Right click a robot
2. Select Connect to robot… A window will appear on the left.
3. Enter the robot IP
4. Select More options to enter the FTP settings and FTP credentials (if required)
Tip: Select Ping to see if the robot can be found in the network.
Once the network settings have been provided and the robot is properly connected, follow these steps to transfer the program to the robot directly from RoboDK:
1. Right click a program
2. Select Send program to robot (Ctrl+F6)
A popup window will display the success or failed status.
Note: Programs can also be transferred through a USB disk or other media. The Robot Tips section (brand-specific section) provides more information for some of the supported robot brands.
Note: Start on robot only works on specific robot controllers and allows to start the program.
Important: The Connect button is only useful when using the robot driver. It is possible to achieve a program transfer without connecting the robot driver. The robot driver allows moving the robot point by point from RoboDK and debug programs in an easy manner (Run on Robot option). The robot driver also allows moving the robot directly through the API.
The conversion from the RoboDK simulation to a specific robot program is done by a Post Processor. The Post Processor defines how robot programs should be generated for a specific robot. Each robot has a specific/default post processor by default in RoboDK.
To select a specific post processor for a robot:
1. Right click a robot or a program
2. Select Select Post Processor
3. Choose a post processor from the list
4. Select OK
The change is now applied and the program can be generated again to see the result.
Note: A Post Processor is linked to a specific robot. Changing the post processor of a program will update the post processor for all programs linked to the same robot.
Post Processors in RoboDK provide complete flexibility to generate the robot programs for specific requirements. RoboDK provides Post Processors for most robot brands. Post processors can be easily created or modified. More information about post processors in a dedicated section for post processors.
Long programs can exceed the controller limitations. The controller limitations can be the file size or the number of lines per program. For example, a robot program made for 3D printing or robot machining can exceed one million lines of code. In that case it is better to split such a long program in smaller sub programs, including one main program that runs the subprograms in order.
To automatically split a long program:
1. Select Tools➔Options➔Program
2. Check Limit the maximum number of lines per program and provide the desired maximum of lines per program to generate per file.
Tip: Certain post processors have a built-in limit of maximum number of lines per program that can be changed or overridden by the provided steps (a variable named as MAX_LINES_X_PROG).