How to run a long script from grasshopper in UR10e

Hi all,

We are trying to run a 3d printing script created with the robots plug-in for grasshopper.
Due to the quality of the print it comes to 40k lines of code, we run to an issue were the robot takes to long to load the script and when it is finally loaded it does not run.

Just additional info, we are trying to avoid using robodk or any other software with additional cost.

Is there a better what to run it?

Thank you for your help

You can not directly uplad the file to the robot at this length.
You need to use sftp upload.

You can do this directly from Grasshopper or by using an ftp program like Filezilla.

To do this in Grasshopper:
Set the ip of the robot upload to sftp://IPADDRESS
Make sure to change the program name on each upload otherwise the new program will not be loaded.

If you upload to Ursim its a bit more complicated because the login data is different. You need to add the correct filepath and login credentials for ursim.

Here is an example grasshopper script:

RobotsFTPupload01.gh.zip (27.3 KB)

See this discussion for more info:

Hello Robin,

thank you so much for sharing your Grasshopper and Remote Controlling Robot Knowledge. We are running into the same problem with our Robot. He doesnt like long code. Even if we send it through sftp using your script. Remote connection said Sending: robot program but the Robot doesn’t start. When i lower target points and the lines of code it works.

What could be the problem? Is it a Network / Communication Problem or does the Robot has some kind of Limitation?

Many Thanks for your help!

How many lines of code are you sending? There may be a limitation somewhere yes.
What Robot and Software version are you using?

With around 2600 it was okey. I had another Code which with worked with around 4k lines aswell. So maybe if the waypoints are too close together it has difficulties? Unfortunately there is no error message or anything at all. Just no popup and nothing happens.

We are using (contrary to what the title of the forum entry suggests. sorry for that) an UR5e from 2018. PolyScope Version 5.12
I tried with Grasshopper and the code attached. I changed the program titeling timestamps to Seconds to test faster.

UR5e_SFTP_HAWK_Hildesheim.zip (44.3 KB)

What do you mean with “nothing happens” ?
I assume the file gets uploaded correctly, and then nothing happens when you press play?
Or does the upload fail as well?
We are uploading and playing up to 40000 targets, so I believe your amount of targets should be far from any internal limit.

I think the upload should work because i only change the amount of waypoints and Connection Log in Grasshopper says “Sending: Robot program”. But the Log on the Teachpendant doesn’t show anything. And there is no popup that shows up. We had the same issue when we wanted to start a long script file within the polyscope program.

Still trying to figure out where exactly the problem is. What do you think?

Many thanks.

Sorry for the redundant questions but I still haven’t understood your situation:

You are using the FTP upload functionality?
The upload works with short programs.
The short programs appear with the correct name at the top and then you can press play?
Or do the programs start playing immediately after you uploaded them from grasshopper (in which case you are not using the FTP uplad method correctly)
FTP upload loads a .urp file onto the robot that appears in the programs folder. There is no message in the log on FTP uploads.
Can you find the program there after uploading even if it doesnt open by itself?

Programs with more than ~2000 lines can only be upladed with the FTP method.
Are you using the latest Robots plugin version ? There were multiple updates with changes to FTP functionality recently.

thank you for the clearification. It is like you said, the programs start immediately after uploading them. And there where no uploaded files in the program folder. I will check on the FTP upload settings. It looks like i thought it does FTP Upload but it was still sending via TCP/IP.


Yes, according to the script you posted you are not using the sftp ip address.
You need to connect the generated robot IP with the remote connection component like this:

Hi Robin, thank you so much for your help. After connecting it, i had this Error Message:

Error: FTP - System.IO.FileNotFoundException: Die Datei oder Assembly "Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51" oder eine Abhängigkeit davon wurde nicht gefunden. Das System kann die angegebene Datei nicht finden.
Dateiname: "Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51"
   bei Robots.Ftp.Upload(Byte[] bytes, String fileName, User user)
   bei Robots.RemoteURFtp.Upload(IProgram program)

Tried to install a NuGet Package manually and run into new problem challenges.
Switching from Rhino 7 to Rhino 8 did the trick! Rhino - Scripting

Now Upload is working properly!

Hi there, I am running into a similar problem, but even after connecting the output to the IP node of the remote connection component the pendant will still not show a pop-up and grasshopper will buffer for a moment. I am already using Rhino8 and i only have about 435 targets that the robot needs to reach. Any idea of what I’m doing wrong?

{0;0}

  1. 10:27:31 - Error: FTP - System.Net.Sockets.SocketException (0x00002AF9): No such host is known.
    at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, Nullable`1 startingTimestamp)
    at System.Net.Dns.GetHostAddresses(String hostNameOrAddress, AddressFamily family)
    at Renci.SshNet.Connection.ConnectorBase.SocketConnect(String host, Int32 port, TimeSpan timeout)
    at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)
  2. 10:27:22 - Error: FTP - System.Net.Sockets.SocketException (0x00002AF9): No such host is known.
    at System.Net.Dns.GetHostEntryOrAddressesCore(String hostName, Boolean justAddresses, AddressFamily addressFamily, Nullable`1 startingTimestamp)
    at System.Net.Dns.GetHostAddresses(String hostNameOrAddress, AddressFamily family)
    at Renci.SshNet.Connection.ConnectorBase.SocketConnect(String host, Int32 port, TimeSpan timeout)
    at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)
  3. 10:18:20 - Error: FTP - Renci.SshNet.Common.SshAuthenticationException: Permission denied (password).
    at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
    at Renci.SshNet.ConnectionInfo.Authenticate(ISession session, IServiceFactory serviceFactory)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)
  4. 10:17:42 - Error: FTP - Renci.SshNet.Common.SshAuthenticationException: Permission denied (password).
    at Renci.SshNet.ClientAuthentication.Authenticate(IConnectionInfoInternal connectionInfo, ISession session)
    at Renci.SshNet.ConnectionInfo.Authenticate(ISession session, IServiceFactory serviceFactory)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)
  5. 10:17:34 - Error: FTP - Renci.SshNet.Common.SshOperationTimeoutException: Connection failed to establish within 5000 milliseconds.
    at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCore(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout, Boolean ownsSocket)
    at Renci.SshNet.Abstractions.SocketAbstraction.Connect(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
    at Renci.SshNet.Connection.ConnectorBase.SocketConnect(String host, Int32 port, TimeSpan timeout)
    at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)
  6. 10:17:29 - Error: FTP - Renci.SshNet.Common.SshOperationTimeoutException: Connection failed to establish within 5000 milliseconds.
    at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCore(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout, Boolean ownsSocket)
    at Renci.SshNet.Abstractions.SocketAbstraction.Connect(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
    at Renci.SshNet.Connection.ConnectorBase.SocketConnect(String host, Int32 port, TimeSpan timeout)
    at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)
  7. 10:17:20 - Error: FTP - Renci.SshNet.Common.SshOperationTimeoutException: Connection failed to establish within 5000 milliseconds.
    at Renci.SshNet.Abstractions.SocketAbstraction.ConnectCore(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout, Boolean ownsSocket)
    at Renci.SshNet.Abstractions.SocketAbstraction.Connect(Socket socket, IPEndPoint remoteEndpoint, TimeSpan connectTimeout)
    at Renci.SshNet.Connection.ConnectorBase.SocketConnect(String host, Int32 port, TimeSpan timeout)
    at Renci.SshNet.Connection.DirectConnector.Connect(IConnectionInfo connectionInfo)
    at Renci.SshNet.Session.Connect()
    at Renci.SshNet.BaseClient.CreateAndConnectSession()
    at Renci.SshNet.BaseClient.Connect()
    at Robots.Ftp.Upload(Byte bytes, String fileName, User user)
    at Robots.RemoteURFtp.UploadFtp(IProgram program)
    at Robots.RemoteURFtp.Upload(IProgram program)

check if you can ping the robot via the ip-address.
you might simply not be connected

it’s responding in my command window

I just realized you are the one I have been watching on youtube haha. I followed the instruction in your “Upload Large Programs” video and it is not sending the program to the teachpendant. If I upload the program directly with low enough layers / targets the robot has no problem running, so I don’t think it is a connection issue.

Hmm, difficult to diagnose remotely.

Check the following basics:

Are you running the newest version of Rhino 8? FTP Upload has issues on Rhino 7.
Are you running the newest version of the Robots plugin?
Is there a blank space or newline in the ip-address panel? Make sure there are no extra characters present.

what robot version are you using? Old Robots (CB2 and early CB3) might not have the same ssh/sftp access.
Is SSH activated on the robot?
If it is activated: is the ssh password method activated as well (not just to key-method)?
You can find these settings under Settings-> Security-> Secure Shell.

Was the robot password changed? it needs to be easybot for the connection to work. There is a “permission denied” error in your log which might be due to a wrong password.

Check these first before doing any other troubleshooting.

i changed the password back to easybot and it fixed it! thanks a ton