Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

API worked on dev PC but not deployed PC

#1
My C# app had no problems talking to RoboDK using the API on the computer which the code was developed on, but now I'm trying to deploy it on another PC that runs the robot and it will no longer talk to RoboDK.  It has been so long since I set this up that I can't remember if there was a separate installer for the API or not.  I just copied the RoboDklApi.dll file along with the C# .exe on the target PC but that was it.  I'm guessing there is an RPC server that runs in the background that handles the communications between RoboDK and the external app using the API, but don't know if this is installed as part of the RoboDK installation or if it is a separate  thing that is part of an API installer.
#2
What issues do you see?

Did you install RoboDK using the default installer? Did you install it in the default location?

Does your application work if you start RoboDK manually?

Is your API instance running on a sperate PC?
You can enable external communciations here: Tools-Options-Other and check the option to allow external API.

Also, make sure the API port is set to the default value of 20500 in that same menu.
#3
The "allow external API" option was turned off, everything is working now. Thanks!

It would have taken me a long time to find that on my own. I think it is so great that the CEO of RoboDK spends so much time answering customer questions on this forum, and so quickly!

Actually I accidentally tested on the computer that was already working. Oddly enough, the working computer had the API option turned off and it was still working anyway.

The deployment computer is still not working even after turning the API feature on and making sure the correct port is being used.  The working computer has version 5.5.4 installed, whereas the non-working computer has version 5.6.5.  The symptom of the problem is that any command sent to RoboDK has no effect.  It seems like the commands are just not getting there.  Even if I manually start RoboDK it still does not process any commands sent by the app. Could this be a firewall issue?

It started working after a reboot, so I'm guessing it was granting access to RoboDK through the firewall followed by a reboot that fixed it.
#4
Thank you for your feedback!

You can also enable the external API using the command AllowExternalAPI. This is an example to enable it through the command line as you start RoboDK:
C:/RoboDK/bin/RoboDK.exe -AllowExternalAPI=1

However, this requires allowing the proper firewall rules. This requires user intervention (with administrator privileges). Usually you see a Windows popup automatically and you simply need to confirm you want to allow it.

I understand you were able to make it work after rebooting RoboDK. If not, is is possible for you to test commands locally? Or you can also run a quick test by disabling the firewall to see if it is due to the firewall.
  




Users browsing this thread:
1 Guest(s)