Best Practices

From Industrial Robotics & Automation - Fanuc Teach Pendant Programming

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

Adhering to good practices will make programming the robots quicker, diagnostics easier, and allow others to understand your programs better.

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 on a XY plane work area (the bed)

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.

This can be done with a single register instruction, as follows:

PR[5]=PR[5]-PR[5]

Digital Inputs

  • It is best to cluster your individual digital inputs and outputs on one side of whatever range you are using. This makes it easy to set up a group input without having to change any existing inputs.
  • Any group of inputs can become an analog input, given an ADC.

Files and File Systems

This section briefly details files. For more information, see File Manipulation.

Backups

In the beginning of the course, you made a backup image of the robot in a known working state. Since multiple groups of students use the robots in sequence, many things can be changed, deleted, or otherwise render your programs non-functioning. You are fully responsible for making sure everything is as it should be before you start your programming labs.

If you wish to ensure the robot is as it should be, you should restore from backup at the start of each class, then create a new backup whenever something is changed you wish to save (programs, tool frames, etc)


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.