This page is dedicated to listing some good practices to do or helpful things to set up for programming.

Position Registers

Home

 
This is the robot in our "Home" position

The most common universal position stored in position registers is the "Home" position. For our robots, we set the joint positions to zeros except for joint 5, which faces down. This means the tool can be moved in world frame XYZ after taking it to home, with no angles or error in Z motion.

Zeroing

Position registers are often zeroed in the beginning of programs to initialize them as a predictable value. If a program uses values from a position register that isn't within the acceptable range to start, unintended events could occur.

In our robot lab, we like to initialize PR[2] as containing 0,0,0,0,0,0. This allows us to set any position register we want as "zero" with a single instruction.

We also commented PR[2] as "Zero" so it shows up as PR[2:Zero] which helps in remembering what lines do in larger programs.

Example:

PR[6:HeightOffset] = PR[2:Zero]


Digital Inputs

Program Names

Many programs will use similar names, especially since we do multiple labs to reinforce the material and run multiple class sessions concurrently. Good practice is to use a syntax for your specific section.

Example:

If you are the N51 section in spring 2019, you can use SP19N51Name as a template to name your programs.

This keeps all your programs right next to eachother and you won't confuse them with other existing programs on the teach pendant.