Python programs can be directly executed on the robot using the same Python code used to simulate the robot (as shown in the Python Simulation section). Online programming allows running a generic program on a specific robot controller using Robot Drivers:
1.Right click a Python program
2.Select Run on robot
The program will run on the robot as it the Python program is executed.
Important: A connection between the PC and the robot is required by using Robot Drivers (right click a robot, then, select Connect to robot…). More information in the Robot Drivers section.
Note: The Run on robot option will automatically set the RunMode of the RDK/Robolink connection to RUNMODE_RUN_ROBOT. In other words, it is possible to run the robot movement commands outside the RoboDK’s GUI. For example:
RDK = Robolink()
RDK.setRunMode(RUNMODE_RUN_ROBOT)
Tip: The macro SampleOnlineProgramming.py from the C:/RoboDK/Library/Macros/ folder provides a full example to test it with the same hexagonal path used in the Python simulation section.
Note: More information about using robot drivers through the API in the Robot Drivers section.