Best Practices: Difference between revisions

From Industrial Robotics & Automation - Fanuc Teach Pendant Programming
Content added Content deleted
No edit summary
No edit summary
Line 23: Line 23:


=== Digital Inputs ===
=== Digital Inputs ===


==Files and File Systems==
=== 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)





Revision as of 13:41, 29 April 2019

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

Files and File Systems

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.