Industrial Robots are difficult to control, they are made for specially trained personal and hardly accessible to anybody else.
For our semester project at the HfG Schwäbisch Gmünd we used a Fanuc 200ic/5h. This tutorial will show teach you the basics of the TeachPendant – a remote control by Fanuc to program their robots.
Originally we planned to control the robot externally via tools such as Processing or Arduino. We were however not able to do that. If you have a solution to externally control the robot, feel free to fork this repo and add it to it.
Your help would be hugely appreciated.
In order to control the robot you have to diactivate his safety mechanism – the dead man's switch:
- Press and hold SHIFT
- Press (half-way through) and hold one vertical yellow button on the rear of the TeachPendant
- Keep holding these buttons (otherwise robot will go back into a locked mode)
After power up, the robot's speed will be slow by default. Current speed is shown as percentage with a green background in the top right corner. You can control the maximum speed on the TeachPendant:
- +% Raises speed
- -% Lowers speed
Note: The robot's speed in manual mode is only a fraction of what it will in automatic mode. Be careful!
There are multiple ways to control the robot. However, we only used the movement types "JOINT" and "WORLD". They can be cycled through by pressing COORD on the TeachPendant. The current mode will be shown in the top right with a black background. These settings affect the functions of the blue buttons (on the right of the TeachPendant) which control the robots movement:
The movement type "JOINT" controls every joint individually.
J1 = base joint:
- +X(J1) Rotate anti-clockwise
- -X(J1) Rotate clockwise
J2 = lower arm joint:
- +Y(J2) Rotates upwards
- -Y(J2) Rotates downwards
J3 = upper arm joint:
- +Z(J3) Rotates upwards
- -Z(J3) Rotates downwards
J4 = "hand" joint:
- +X(J4) Rotates upwards
- -X(J4) Rotates downwards
J5 = tool mount joint:
- +Y(J5) Rotates clockwise
- -Y(J5) Rotates anit-clockwise
J6 is not assigned in our robot (because it is only euqipped with five axis). Normally it would control the arm's rotation itself.
The movement type "WORLD" defines one point, where the robot points to. This point is the tip of the tool mount. This means, that you just set where the tool mount's tip should be located and the robot will move all necessary joints to reach that position.
J1 = x-axis:
- +X(J1) Move forward
- -X(J1) Move backward
J2 = y-axis:
- +Y(J2) Move left
- -Y(J2) Move right
J3 = z-axis:
- +Z(J3) Move up
- -Z(J3) Move down
J4 = "hand" joint:
- +X(J4) Rotates "hand" upwards
- -X(J4) Rotates "hand" downwards
J5 = tool mount joint:
- +Y(J5) Rotates clockwise
- -Y(J5) Rotates anit-clockwise
J6 is not assigned in our robot (because it is only euqipped with five axis). Normally it would control the arm's rotation itself.
- Press select to open the menu
- Press F2 ("CREATE") to create a new program
- Using the arrow keys you can either choose presets ("Words") or type your own name ("Upper Case" and "Lower Case"). "Options" also reveals more advanced functions.
- Press ENTER on the TeachPendant to close naming menu
- Press ENTER again to confirm name
- Press F1 ("POINT")
- Select the kind of motion and speed you want from the dropdown.
- "J" stands for joint movement
- "L" stands for linear movement
- "FINE" stands for a precise movement
- "CNT100" stands for an approximate movement
- Press enter to select
- The current postion of the robot has now been saved to that point and just appeared as a new line in your code
Note: "CNT100" is normally used as an intermediate point. It is faster than "FINE", because will approach that coordinate just roughly.
Example: If you want to move from Point A to B via Point C (e.g. to avoid collision with something), Point C should be set to "CNT100".
Hold dead man switch, the press the FWD (forwards) button to run the program. Pressing BWD (backwards) will do the opposite.
Pressing the STEP button on the TeachPendant will cycle between two differend modes. It is shown in the top left corner labeled "step".
- Green background indicates that the robot will cycle through all steps (once)
- Logo with two arrows and red bars indicates that the robot will move only step at a time (after each completion you have to hit FWD again)
Using the arrow keys you navigate from top to bottom and also from left to right
Set new coordinate for point: Select the line number of the point you want to change. Pressing F5 ("TOUCHUP") will overwrite the previous coordinates with the current one
Change movement type: Select the letter after the line number (C, J or L) and press F4 ("CHOICE") to switch to a different motion type.
Change movement precision: Select "CNT100"/"FINE" press F4 ("CHOICE") to select a different precision.
Set speed to point: Select the type of speed (either %, sec or msec) and press F4 ("CHOICE") to change it. You can also change the value by typing numbers on the TeachPendant (confirm by pressing ENTER).
- Press F5 for "|EDCMD|" (You may have to press NEXT in the menu bar to navigate there)
- Select action you want from the dropdown menu
- Press ENTER
- Confirm action
As you might have noticed, the robot will only run the program once. You have to loop a program for that reason. This happens by creating a "label" and using a command to jump to that label.
- In the programm editing mode, press NEXT on the TeachPendant to reveal the menu points "[INST]" and "[EDCMD]"
- Press F1 ("[INST]")
- Select "5 JMP/LBL" and press ENTER
- Select "2 LBL[ ]" and press ENTER
- Enter a number on the TeachPendant and press ENTER
- The line you have create will say something like "1: LBL[12]" and means that there is the label with the index 12 where you can "jump" to, but more on that soon
- Now enter the "[INST]" menu again, but this time select "2 JMP LBL[ ]" and press ENTER
- Give it the same number as the label before.
- You should have something like:
1: LBL[12]
2:J @P[1] 100% FINE
3:J P[2] 100% FINE
4: JMP LBL[12]
This means that the robot will read line 1 (won't do anything though), move to the coordinates specified in line 2, afterwards move to the coordinates from line 3 then he reads in line 4 that he has to continue from the label with the number 12 (which is in line 1), so he will jump back to line 1 and therefore do the same procedure again.
You can now loop this action in the automatic mode.
Switch into automatic mode by:
- Rotate the key on the base station to "AUTO"
- Turn the TeachPendant off (Switch in top left corner)
Switch it on Press "CYCLE START"-button (Green button next to the emergency stop on the base station)
If it doesn't start:
- Clear Errors by pressing Reset on the TeachPendant and start the cycle again
- The TeachPendant might inform you, that the robot is at a different position, select "Yes" if this happens (the robot will move to position 1 of your script and then start)
- Table of contents was created using DocToc