Registers: Difference between revisions

From Industrial Robotics & Automation - Fanuc Teach Pendant Programming
Content added Content deleted
m (Mike138 moved page Register Instructions to Registers: Name Changed to match TP)
No edit summary
Line 72: Line 72:


* When this instruction is reached
===When this instruction is reached ===


Line 80: Line 80:


* When to add this instruction
===When to add this instruction ===


Line 92: Line 92:


* What else is needed to use this instruction
===What else is needed to use this instruction ===


Line 100: Line 100:


* Valid Variables
===Valid Variables ===


Line 128: Line 128:


* Special Notes
===Special Notes ===


Line 226: Line 226:


* When this instruction is reached
===When this instruction is reached ===


Line 234: Line 234:


* When to add this instruction
===When to add this instruction ===


Line 242: Line 242:


* What else is needed to use this instruction
===What else is needed to use this instruction ===


Line 250: Line 250:


* Valid Variables
===Valid Variables ===


Line 278: Line 278:


* Special Notes
===Special Notes ===


Line 374: Line 374:


* When this instruction is reached
===When this instruction is reached ===


Line 382: Line 382:


* When to add this instruction
===When to add this instruction ===


Line 390: Line 390:


* What else is needed to use this instruction
===What else is needed to use this instruction ===


Line 398: Line 398:


* Valid Variables
===Valid Variables ===


Line 426: Line 426:


* Special Notes
===Special Notes ===


Line 524: Line 524:


* When this instruction is reached
===When this instruction is reached ===


Line 532: Line 532:


* When to add this instruction
===When to add this instruction ===


Line 540: Line 540:


* What else is needed to use this instruction
===What else is needed to use this instruction ===


Line 548: Line 548:


* Valid Variables
===Valid Variables ===


Line 576: Line 576:


* Special Notes
===Special Notes ===



Revision as of 14:38, 7 April 2019

This page details the Register Instructions available on the Fanuc Teach Pendant Programmers.


Register instructions do not involve motion. They are simply math operations with one or more inputs and an output.

When the program reaches a register instruction, it completes the math operation, overwrites the destination variable, and moves forward.

Equals Instruction

R [1] = R [2] Equals Instruction
PR [1] = PR [2]
PR [i,j] = 1
R [1] = PR [i,j]



When this instruction is reached

The contents of the left variable are set to the right variable.


When to add this instruction

Use this instruction whenever you need to set a variable’s contents to the contents of another.


In the Non-Motion Instructions menu, select the “Registers” Category. In the “Registers” menu, select “... = ...”. Once inserted, select your left variable. Type the numbers for the variable, then hit enter. Select the right variable. Type the numbers for the variable, then hit enter.


What else is needed to use this instruction

None.


Valid Variables

R [1] - Data Registers


PR [1] - Position Registers (Must set all 6 elements at once)


PR [i,j] - Position Register Element (Sets element j in position register i)


SR [1]


PL [1]


Constant


Special Notes

You cannot perform operations between entire position registers and other variables, as position registers contain 6 separate elements. You can only work with one element at a time, using PR[i,j].


Addition Instruction

R [1] = R [1] + 28 Add Instruction
PR [1] = PR [1] + PR [7]
PR [i,j] = R [3] + 100
R [1] = PR [i,j] + PR [i,j]




When this instruction is reached

The contents of the left variable are set to the middle variable plus the right variable.


When to add this instruction

Use this instruction whenever you need to set a variable’s contents to the contents of multiple variables added together.


What else is needed to use this instruction

None.


Valid Variables

R [1] - Data Registers


PR [1] - Position Registers (Must set all 6 elements at once)


PR [i,j] - Position Register Element (Sets element j in position register i)


SR [1]


PL [1]


Constant


Special Notes

You cannot perform operations between entire position registers and other variables, as position registers contain 6 separate elements. You can only work with one element at a time, using PR[i,j].


Subtraction Instruction

R [1] = R [1] - 28 Subtract Instruction
PR [1] = PR [1] - PR [7]
PR [i,j] = R [3] - 100
R [1] = PR [i,j] - PR [i,j]



When this instruction is reached

The contents of the left variable are set to the middle variable minus the right variable.


When to add this instruction

Use this instruction whenever you need to subtract one variable from another.


What else is needed to use this instruction

None.


Valid Variables

R [1] - Data Registers


PR [1] - Position Registers (Must set all 6 elements at once)


PR [i,j] - Position Register Element (Sets element j in position register i)


SR [1]


PL [1]


Constant


Special Notes

You cannot perform operations between entire position registers and other variables, as position registers contain 6 separate elements. You can only work with one element at a time, using PR[i,j].


Division Instruction

R [1] = R [1] / 28 Division Instruction
PR [1] = PR [1] / PR [7]
PR [i,j] = R [3] / 100
R [1] = PR [i,j] / PR [i,j]



When this instruction is reached

The contents of the left variable are set to the middle variable divided by the right variable.


When to add this instruction

Use this instruction whenever you need to divide two variables.


What else is needed to use this instruction

None.


Valid Variables

R [1] - Data Registers


PR [1] - Position Registers (Must set all 6 elements at once)


PR [i,j] - Position Register Element (Sets element j in position register i)


SR [1]


PL [1]


Constant


Special Notes

You cannot perform operations between entire position registers and other variables, as position registers contain 6 separate elements. You can only work with one element at a time, using PR[i,j].