Programs: Difference between revisions
Content added Content deleted
(→Inputs) |
No edit summary |
||
Line 5: | Line 5: | ||
== Setup Section == |
|||
The first lines of a program should be your setup instructions. This often means zeroing registers and setting constants to be used later. It's also a good idea to set all your outputs to ideal conditions. We can do this quickly using a single register instruction. |
The first lines of a program should be your setup instructions. This often means zeroing registers and setting constants to be used later. It's also a good idea to set all your outputs to ideal conditions. We can do this quickly using a single register instruction. |
||
Line 14: | Line 14: | ||
<br /> |
<br /> |
||
== Intro Motion == |
|||
It can be useful to include motion instructions that take your robot to a known position, in case of power failure or a prior program leaving off in a weird place. Use a Joint move to ensure you don't enter singularity. |
It can be useful to include motion instructions that take your robot to a known position, in case of power failure or a prior program leaving off in a weird place. Use a Joint move to ensure you don't enter singularity. |
||
Line 21: | Line 21: | ||
<br /> |
<br /> |
||
==Inputs == |
|||
While inputs can be read anywhere in your program, it can be helpful to organize them into a small section that can be run through at points where it really matters. In this example, we have 4 inputs waiting to go ON. These could represent 4 different conveyors coming to the robot. |
While inputs can be read anywhere in your program, it can be helpful to organize them into a small section that can be run through at points where it really matters. In this example, we have 4 inputs waiting to go ON. These could represent 4 different conveyors coming to the robot. |
||
Line 37: | Line 37: | ||
<br /> |
<br /> |
||
== Configuration == |
|||
Depending on program state, input values, counts, times, and other variables - you can set up configuration data to match. This lets you run short, efficient motion instructions with few or no special sections. |
Depending on program state, input values, counts, times, and other variables - you can set up configuration data to match. This lets you run short, efficient motion instructions with few or no special sections. |
||
Line 66: | Line 66: | ||
<br /> |
<br /> |
||
== Motion == |
|||
Your motion lines should be efficient and minimalist. Anything that can be done with a new tool frame, user frame, offset, and registers should be, instead of having lots of similar motion lines. |
Your motion lines should be efficient and minimalist. Anything that can be done with a new tool frame, user frame, offset, and registers should be, instead of having lots of similar motion lines. |
||
'''J P[1] 100% Fine |
'''J P[1] 100% Fine''' |
||
'''L P[2] 222mm/s Fine OFFSET PR[10]''' |
'''L P[2] 222mm/s Fine OFFSET PR[10]''' |
||
Line 78: | Line 78: | ||
'''L P[3] 222mm/s Fine OFFSET PR[10]''' |
'''L P[3] 222mm/s Fine OFFSET PR[10]''' |
||
'''C P[8] |
'''C P[8] OFFSET PR[10]''' |
||
'''... P[6] R[11] 222mm/s Fine OFFSET PR[10]''' |
|||
⚫ | |||
⚫ | |||
The program listed above could have been done much more simply with a group input and a SELECT instruction. It was left as IF statements for simplicity in understanding. |
The program listed above could have been done much more simply with a group input and a SELECT instruction. It was left as IF statements for simplicity in understanding. |