Hello, I am trying to convert a Python script to the robot prog for the Mitsubishi robot. When I select the "generate robot program" the whole RoboDK software collapses and shuts down. Kindly clarify what could be the problem. I am using roboDk v 5.5.2. And here is my code.
Also, kindly take note that the Python script can simulate the motion properly. I am also attaching the project file herewith for your reference.
Code:
# More information about the RoboDK API here:
# https://robodk.com/doc/en/RoboDK-API.html
from robolink import * # API to communicate with RoboDK
from robodk import * # robodk robotics toolbox
# Connect to the RoboDK API
RDK = Robolink()
list_items = RDK.ItemList()
for item in list_items:
print(item.Name())
robot=RDK.Item('Mitsubishi RV-7FR')
# robot.Connect("192.168.0.25") # connect to the robot. Use double inverted comma for ip address
# Retrieve all items and print their names
home_position = RDK.Item('Home')
Target_position_2 = RDK.Item('Target')
Target_position_1 = RDK.Item('Target 3')
speed_lin = mbox('Set Your Linear Speed', entry=" ")
speed_ang = mbox('Set Your Angular Speed', entry=" ")
loop = mbox('Set Your Loop Count', entry=" ")
robot.setSpeed(int(speed_lin), int(speed_ang))
for i in range(int(loop)):
robot.MoveJ(home_position)
robot.MoveJ(Target_position_1)
robot.MoveL(Target_position_2)
robot.MoveL(Target_position_1)
robot.MoveJ(Target_position_2)
robot.MoveJ(Target_position_1)
robot.MoveJ(home_position)
Also, kindly take note that the Python script can simulate the motion properly. I am also attaching the project file herewith for your reference.