Sending and running a script through tcp/ip connection

Hi guys,

I am looking into generating a .script file containing some urscript on a computer and having an e-series cobot run this. I know it is possible to send individual commands to the primary, secondary and real-time sockets, but I can’t find any documentation on sending a complete script.
If this is not possible out of the box, I was considering running a deamon that accepts some urscript, saves this data as a .script file and then find some way to run this. That brings me to my second question, is it possible to start a script file from a tcp/ip connection? Would the only way to run this file be to open a “Script” urcap, load the script in there, and then run the program, or is there a way to run a script without this step?

Thanks in advance,

Jona

You can make an .urp file that calls a .script file. You can upload/overwrite the .script file via the sFTP, and the send command to the robot o run it via dashboard at 29999. ( You can send the .urp file via sFTP too)

Entirely possible to send a whole script to the robot client interfaces for execution. You just need to wrap the whole thing in a function definition, the controller will wait until it receives the “end” of that function then executes.

How are you trying to do it? Is it not working?

Ah, that makes sense. I have not had the oppertunity to test anything yet because I’m working from home a lot, so I am currently researching some possible methods to test when I have access to a cobot again.

Thank you for your suggestion!

You’re welcome. All of the client interfaces are running in URSIM so you can also test this without access to a real robot.

1 Like

One thing to know is indentation is important on this. The body of the script has to be indented two spaces from the definition line and the end line. I believe you can then have additional indentation as needed but it’s not required.

1 Like