DoF - a Robotiq Community
Warning sign
The Dof Community was shut down in June 2023. This is a read-only archive.
If you have questions about Robotiq products please reach our support team.
matthewd92

@Tayo you won't find much on the internet about it outside of the script manual which can be found here (choose your software version).  I agree that there is so much hidden functionality within the UR once you can write script commands.  The way that I learned it was to write simple programs on the simulator and then look at the script file that is generated.  When you save or play a program on the simulator or robot there are actually 3 files created, the .urp, .txt and a .script.  The .urp is the binary of the actual Polyscope program, the .txt is a text representation of what you see on the robot screen and the .script is the actual file that is being executed on the robot when you are playing the program.  You can use that to really understand how things work at a lower level. It was and remains a very beneficial tool that I use.

The next step is just to start playing with the scripts in the manual and understand what they do and how they work.  Before long you will find yourself sprinkling them throughout the program.  For instance, we use a lot on pneumatics in our cells.  Anytime you set a cylinder on or a gripper for instance you need to give it some time to work before you execute the next line of code.  Often times with grippers we don't deploy stroke sensors as they are a point of failure that we have seen over and over.  Instead we will just use a gripperWaitTime variable and define a time in seconds that we want to wait anytime the gripper is open and closed.  We then use the sleep() script command with that variable to allow us to have the same wait time throughout the program but be able to dial it in by changing one variable value at the top of the program.

Below is some psuedo-code of how we would use the script

var gripperWaitTime = 0.5 #seconds
set DO0=True
sleep(gripperWaitTime)
do something else
The other great resource is DoF, feel free to search above for other posts that may answer the question or post new questions up, we may not know the answer right away but someone will go out and research/figure it out usually.  As your level of knowledge grows, remember to give back by helping others and answering questions when you can.

Good luck!

CTLatte

Thanks! @matthewd92