Custom gripper functions on UR robots #309
-
Hello @visose I'm trying to send programs to a UR robot over TCP/IP with the Remote connection component. All is working except when the program contains custom commands for an OnRobot gripper. In that case, the code gets sent but the robot does nothing and nothing is written in the log. Yet, if I take the same code and put it in a USB stick, it runs on the robot without any issue. After some digging it seams that gripper specific functions in UR robots are loaded on the fly and must be defined before def program(). I have isolated the specific boilerplate code that must be sent with the program, but I don't know exactly how to achieve this with robots plugin as it is. One of my ideas was to modify your Remote Connection component to add a new input for tool specific code, but I wasn't able to find the Remote connection component C# code in the source of your repository. The other was to use the Custom Program component and add the boilerplate code there. But that didn't work... |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
With a bit more time I was able to come up with something...
}` but still having issues: 1. Parameter "program" type conversion failed from GH_Program to IProgram |
Beta Was this translation helpful? Give feedback.
-
Hi @filipejsbrandao, the Custom Program component should have worked for this. You can use standard grasshopper components for modifying text and lists to prepend the required lines of code into the program. Can you give more details on why it didn't work for you? |
Beta Was this translation helpful? Give feedback.
The code input expects the full code. If you connect the code output of the Create Program component to this without any changes, it will behave as nothing changed. You can use components in-between to prepend the additional code.
The Program input is to include other data like the RobotSystem you are using. This is need to create an
IProgram
that you can pass to other components like the Save component or the Remote component (in your case) that have a Program parameter input.