OFFSETS: Difference between revisions

No edit summary
 
(2 intermediate revisions by the same user not shown)
Line 1:
Offsets are a bridge between the [[Registers|math]] within teach pendant programs and the [[Motion Instructions|motion instructions]] themselves. With offsets, you can control the destination of a motion instruction depending on sensors, counters, math equations, user inputs, or virtually any variable available on your robot.
==Offset PR[] Syntax==
{| class="wikitable"
Line 41:
<u>Results:</u>
 
* The robot will move in a linear fashion at 100mm/s to reach the coordinates 100, 121, 0, 0, 0, 94
* The contents of P[1] are unchanged.
 
<small>* The contents of PPR[15] are unchanged.</small>
<small>* The speed variable is unchanged.</small>
 
<small>* The contentsmotion and oftermination PR[5]types are unchanged.</small>
 
<small>The speed variable is unchanged.</small>
 
<small>The motion and termination types are unchanged.</small>
 
<u>Reasoning:</u>
 
The motion option "Offset PR[5]" told the controller's processor the robot should go to the [http://mathandmultimedia.com/2011/06/29/addition-of-coordinates/ SUM] of the coordinates in P[1] and PR[5].
 
<br />
<u>Use:</u><br />To figure out the actual position the robot will reach, add the contents of the position listed in the instruction with the position register listed after the OFFSET motion modifier. In the above example, P[1]'s X element is 77 and PR[5]'s X element is 23. Add them together and the actual X coordinate it will reach will be 100. For the Y element, you would add 121 and 0 which equals 121. You would continue for all six elements to determine the full actual coordinates the instruction will take the robot to.
 
== When to Use Offset PR[] ==
The [[Motion Instructions#Motion Modification|motion option]] is useful when working on a program requiring repetitive, predictable, or non-arbitrary motion instructions.
 
<br />
Line 223 ⟶ 220:
''PR[1,1] = 0''
 
''IF PR[1,2] < =2.54 JMP LBL[1:Inner_Loop]''
 
''JMP LBL[2:Begin]''