This page details data structure and types used in the FANUC TP programs. For the use of data for directing program flow, see Registers.
In all programming languages, information must be stored somewhere to be used in the future. FANUC's software handles data in variables known as "Registers". This is where numbers are stored to be used by programs to change how programs flow or operate, as well as to help in communications with the user or other devices.
There are many types of registers available in FANUC software, but the two types you will need to know for MH-142 are data "Registers" and "Position Registers"
From the teach pendant, the DATA screen can be accessed with the DATA button. It can also be accessed via MENU, selecting the Data option.
The DATA screen lets you view and modify contents and metadata for registers.
The options available under [TYPE] are as follows:
- Position Reg
- MOVE_TO - Pressing this while shifted will move the robot to the coordinates stored in the selected position register.
- RECORD - Set the position registers values to the current position of the robot. Must have SHIFT pressed beforehand.
- POSITION - Open up the position register's contents to view and edit individual elements.
- CLEAR - De-initialize the register. This clears all contents, loading them with NULL values. This is different from values of zero, as the NULL contents won't allow the position register to be used in a program.
- String Reg
- Vision Reg
- Pallet register
- KAREL Vars
- KAREL Posns
|Register Type||Label||Range||# Of Elements||Type of Data Allowed|
|Position Register||PR||6||Position Values - Cartesian or Joint|
|Pallet Register||PL||3||Position Values - Cartesian|
A register is listed as R[#] and contains a number. This is good for math equations, counters, single dimension data handling, and temporary storage of values to be used or communicated at a future time.
A position register is listed as PR[#] and contains positional data in six separate elements.
In Cartesian mode, the 6 elements represent 3 dimensional measurements and 3 angular measurements. A position register functions much the same as positions in a program, except they are "global" which means they are the same in every program they exist. This differs from the simple positions (P) seen in programs, as position 1 in one program has nothing to do with position 1 in another.
They can also contain Joint configurations, with each element representing the angular position of each robot joint.
When opening the DETAIL page for a specific position register, you can switch between Joint and Cartesian representation by hitting the softkey [REPRE].
P[n] = (x,y,z,w,p,r,configuration) – configuration describes axis condition at destination. Wrist could be N (not-flipped) or F (flipped), elbow could be U (up) or D (down), robot could be T (Front) or B (back)
P[n] = (J1, J2, J3, J4, J5, J6)
A common useful process is using the DATA page to quickly take the robot to the predetermined HOME location. On the Position Registers page, select PR[1: HOME], clear all alarms, hold SHIFT and press the softkey MOVE_TO. Continue holding SHIFT until the robot moves to its HOME position.
Initialization of Position Registers
Position registers must be initilized before they can be used in running programs. To initialize a position register, open the DATA screen, change [TYPE] to Position Reg, and select your desired position register by cursoring to it. Hit the softkey POSITION to open up that position register, and enter values. All six elements must contain values for the position register to be valid, even if those elements aren't used or contain zeroes.
A position register is listed as PL[#] and contains positional data in three separate elements.