I recently began learning how to use the UR5 robot, and I started with the learning modules on the website. They were very good, but now I am looking for more material to continue learning. Ideally, I would like some sample code that I can download and run so that I can see how it works and use that knowledge for future projects. Code that uses more advanced commands like switches, variables, script, etc. Would anyone be able to provide me with anything like that/know where I can find it?
You may consider signing up for a Basic/Advanced Core Training if you’re with a company. If you’re just an individual, or a student, UR’s website has some various examples of things: Articles | Support site | Universal Robots
Otherwise, you can learn a lot just by poking around on the pendant and trying things out. For example, the Assignment command is used to create a variable. Try making one, and then using an If statement to check it’s value and turn on an output accordingly.
Finally, the script manual can also be found on the website: https://s3-eu-west-1.amazonaws.com/ur-support-site/163530/scriptmanual_5.12.pdf
If you do not have a physical robot, you can try things out on the free simulator.