Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
apiur.exe crash prevents connection to robot when launched with Python SDK
#1
I am trying to use the Python API to open a RoboDK station and then connect to a real UR10 robot, but the connection always fails. The only way I am able to successfully connect to the robot is if I open the station by clicking the .rdk file in file explorer. When I attempt to connect using either Connect() or ConnectSafe(), the 'Connection to UR10' menu in RoboDK gives me the following log:

Quote:DISCONNECT
Driver apiur not running
Disconnected
Stopped
Starting robot driver: C:/RoboDK/api/robot/apiur.exe
Starting...
CONNECT 169.254.213.80 2000 6
Driver apiur not running
Disconnected
Error: Process crashed (id 1)
Stopped
DISCONNECT

From this, it seems that the problem is coming from apiur.exe crashing. Below is the Python script that I am running to open RoboDK and connect to the robot:
Quote: RDK = robolink.Robolink()
station_file =r'Documents\forumSample'
current_station = RDK.AddFile(station_file)
robot = RDK.Item(“UR10”)
robot.setConnectionParams('169.254.213.80',2000,'/','','')
robot.Connect('169.254.213.80')
time . sleep (3)
状态,味精= robot.ConnectedState()
print(state)
print(msg)
#2
I'm unable to reproduce this issue.
What version of RoboDK are you using?
Can you try with the latest version?

It looks like the driver process can't start for some reason.
#3
I am using RoboDK version 3.8.3 and had Windows Firewall completely disabled.

After some additional testing, I think I have found the source of the issue. I have been using Pycharm to write Python scripts with the RoboDK API, and I was never able to connect to the robot when running the programs directly from Pycharm, however I was consistently able to connect to it when running those same programs through a command prompt. Thus, the error must have to do with the way the programs are being launched rather than the content of the programs themselves. After this realization, I tried running the programs in a different IDE (this time I used Wing) and the problem was solved; I can now successfully connect to the robot using the same Python programs that were giving me errors and crashing the UR driver earlier.
#4
This issue is strange... Can you provide steps to reproduce it?
The latest version of RoboDK for Windows uses Python 3.7, before it used to be Python 3.4. This may have caused issues with Pycharm.

I also recommend you to try Visual Studio Code. You can also embed the Window in RoboDK:
//www.sinclairbody.com/doc/en/PythonAPI/intr...to-install

This setup will soon be integrated with our default installer.
#5
Also a related issue here. the error apiur.exe gives when pressing connect: The procedure entry point ..(some string of characters).. could not be located in the dynamic link library C:\RoboDK\API\robot\apiur.exe

Firewall disabled, tried a reinstall of python and robodk (newest version). Could not find a solution so hope someone might be able to help here. Any ideas?

*side note: the signing up form for this form is a bit hard with the verification code that show ambiguous characters that could be a 0 or O or o etc.. + verficaition code not send to my gmail (also not in spam), but did work with my university work account.




Users browsing this thread:
1 Guest(s)