Baixe o app para aproveitar ainda mais
Prévia do material em texto
R J 3 P R O G R A M M I N G M A N U A L Designed to accompany RJ3 training courses at FANUC Robotics (UK) Ltd. 3 . I N T R O D U C T I O N Fanuc Robotics’ RJ3 Training Course This manual is intended to accompany the RJ3 training course held within FANUC Robotics UK Ltd. It is not intended as a comprehensive manual of all that a robot can do. Please pay particular attention to the safety advice contained within this document. For further reference please consult the comprehensive FANUC Reference Manual. Using This Manual Each section is individual labelled to enable you to quickly access the information you require in addition to the table of contents on page 5. 4 5 C O N T E N T S Safety .................................................................................................................................7 The Basics........................................................................................................................17 Jogging the Robot & Coordinate Systems........................................................................... 17 Creating a Program ............................................................................................................. 25 Testing a Robot Program..................................................................................................... 29 Touchup............................................................................................................................... 33 Motion Default...................................................................................................................... 35 Giving 2 Positions the Same Identity .................................................................................. 37 Program Elements............................................................................................................39 EDCMD Menu ..................................................................................................................47 INST Menu .......................................................................................................................57 Registers.............................................................................................................................. 57 Argument Registers ..................................................................................................................63 Position Registers.....................................................................................................................65 LPOS/JPOS..............................................................................................................................69 C O N T E N T S 6 C O N T E N T S Inputs and Outputs ...............................................................................................................73 IF/Select Statement.............................................................................................................79 IF Statement ............................................................................................................................. 79 Select Statement ...................................................................................................................... 83 Wait Instruction.....................................................................................................................87 Labels and Jump Labels ......................................................................................................91 Call Instruction......................................................................................................................95 Miscellaneous Menu.............................................................................................................99 RSR Instruction ........................................................................................................................ 99 User Alarms............................................................................................................................ 101 Timers..................................................................................................................................... 105 Override Instructions .............................................................................................................. 107 Remark ................................................................................................................................... 109 Message Instruction ............................................................................................................... 111 Parameter Instruction ............................................................................................................. 113 Maximum Speed Instruction ................................................................................................... 117 Multiple Control Menu ........................................................................................................119 Run Command ....................................................................................................................... 119 Semaphore Instruction ........................................................................................................... 121 Program Control Instruction ...............................................................................................123 Halt Instruction........................................................................................................................ 123 Abort Instruction ..................................................................................................................... 125 Offsets Menu......................................................................................................................127 Offsets .................................................................................................................................... 127 Frames Instruction.................................................................................................................. 131 Skip Condition ....................................................................................................................135 Frames Overview........................................................................................................... 137 Overview ............................................................................................................................137 Tool Frames ......................................................................................................................139 User Frames.......................................................................................................................149 Jog Frames ........................................................................................................................157 Utilities ........................................................................................................................... 157 Reference Position .............................................................................................................157 Soft Float ............................................................................................................................161 Macros ...............................................................................................................................167 Shift Functions....................................................................................................................173 Overview................................................................................................................................. 173 Program Shift..........................................................................................................................175 Mirror Shift .............................................................................................................................. 179 User Frame Program Shift .................................................................................................185 Continuous Turn.................................................................................................................189 PR Look Ahead Function ...................................................................................................195 File Management ........................................................................................................... 199 Program Header Information..............................................................................................199 Deleting a Program ...........................................................................................................203 Copying a Program ...........................................................................................................205 Backing Up ........................................................................................................................207 4 7 S A F E T Y Essential safety measures required whilst using robots Ensure you read and understand the FANUC Robotics SAFETY HANDBOOK. Teaching and manual operation Don't operate the teach pendant and operator's panel with the gloves on your hand. Use a low override speed to increase your control over the robot when jogging it. Visualize the movement the robot will make before you press the jog keys on the teach pendant. Know the path that can be used to escape from a moving robot; make sure the escape path is never blocked. The area near the robot must be clean and free of oil, water, or debris. S A F E T Y 8 Production operation Understand the complete task the robot is programmed to perform before initiating production operation. Know the location and status of all switches, sensors, and control signals that could cause the robot to move. Know where the EMERGENCY STOP buttons are located on both the robot control and external control devices. Be prepared to press these buttons in an emergency. Never assume that a program is complete if the robot is not moving. The robot could be waiting for an input signal that will permit it to continue activity. FANUC Robotics (UK) Ltd. is not and does not represent itself as an expert in safety systems, safety equipment, or the specific safety aspects of your company and/or its work force. It is the responsibility of the owner, employer, or user to take all necessary steps to guarantee the safety of all personnel in the workplace. The appropriate level of safety for your application and installation can best be determined by safety system professionals. FANUC Robotics (UK) Ltd. therefore, recommends that each customer consult with such professionals in order to provide a workplace that allows for the safe application, use, and operation of FANUC Robotic systems. Additionally, as the owner, employer, or user of a robotic system, it is your responsibility to arrange for the training of the operator of a robot system to recognize and respond to known hazards associated with your robotic system and to be aware of the recommended operating procedures for your particular application and robot installation. FANUC Robotics (UK) Ltd. therefore, requires that all personnel who intend to operate, program, repair, or otherwise use the robotics system be trained in an approved FANUC Robotics (UK) Ltd. training course and become familiar with the proper operation of the system. Persons responsible for programming the system - including the design, implementation, and debugging of application programs - must be familiar with the recommended programming procedures for your application and robot installation. The following guidelines are provided to emphasize the importance of safety in the workplace. Safety is essential whenever robots are used. Safety Considerations Keep in mind the following factors with regard to safety: The safety of people and equipment 9 Use of safety enhancing devices Techniques for safe teaching and manual operation of the robot(s) Techniques for safe automatic operation of the robot(s) Regular scheduled inspection of the robot and workcell Proper maintenance of the robot The safety of people is always of primary importance in any situation. However, equipment must be kept safe, too. When prioritizing how to apply safety to your robotic system, consider the following: People External devices Robot(s) Tooling Workpiece Always give appropriate attention to the work area that surrounds the robot. The safety of the work area can be enhanced by the installation of some or all of the following devices: Safety fences, barriers, or chains Light curtains Interlocks Pressure mats Floor markings Warning lights Mechanical stops DEADMAN switches EMERGENCY STOP buttons A Safe Workcell A safe workcell is essential to protect people and equipment. Observe the following guidelines to ensure that the workcell is set up safely. Sponsor your personnel for training in approved FANUC Robotics training course(s). Never permit untrained personnel to operate the robots. Install a lockout device that uses an access code to prevent unauthorized persons from operating the robot. Use anti-tie-down logic to prevent the operator from bypassing safety measures. Install safety fences to protect against unauthorized entry by personnel into the work envelope. 10 Arrange the workcell so the operator faces the workcell and can see what is going on inside the cell. Clearly identify the work envelope of each robot in the system with floor markings, signs, and special barriers. The work envelope is the area defined by the maximum motion range of the robot, including any tooling attached to the wrist flange that extends this range. Position all controllers outside the safety fence. Never rely on software as the primary safety element. Mount an adequate number of EMERGENCY STOP buttons or switches within easy reach of the operator and at critical points inside and around the outside of the workcell. If necessary, install flashing lights and/or audible warning devices that activate whenever the robot is operating, that is, whenever power is applied to the servo drive system. Install special guarding that prevents the operator from reaching into restricted areas of the work envelope. Use interlocks. Use presence or proximity sensing devices such as light curtains, mats, and capacitance and vision systems to enhance safety. Periodically check the safety joints or safety clutches that can be optionally installed between the robot wrist flange and tooling. If the tooling strikes an object, these devices dislodge, remove power from the system, and help to minimize damage to the tooling and robot. Make sure all external devices are properly filtered, grounded, shielded, and suppressed to prevent hazardous motion due to the effects of electro- magnetic interference (EMI), radio frequency interference (RFI), and electro- static discharge (ESD). Eliminate pinch points. Pinch points are areas where personnel could get trapped between a moving robot and other equipment. Provide enough room inside the workcell to permit personnel to teach the robot and perform maintenance safely. Program the robot to load and unload material safely. If high voltage electrostatics are present, be sure to provide appropriate interlocks, warning, and beacons. If materials are being appliedat dangerously high pressure, provide electrical interlocks for lockout of material flow and pressure. 11 Observe the following rules Advise all personnel who must teach the robot or otherwise manually operate the robot to observe the following rules: Know whether or not you are using an intrinsically safe teach pendant if you are working in a hazardous environment. Before teaching, visually inspect the robot and work envelope to make sure that no potentially hazardous conditions exist. The work envelope is the area defined by the maximum motion range of the robot. These include tooling attached to the wrist flange that extends this range. The area near the robot must be clean and free of oil, water, or debris. Immediately report unsafe working conditions to the supervisor or safety department. FANUC Robotics (UK) Ltd. recommends that no one enter the work envelope of a robot that is on. However, if you must enter the work envelope, be sure all safeguards are in place, and check the teach pendant DEADMAN switch for proper operation. Take the teach pendant with you, turn it on, and be prepared to release the DEADMAN switch. Only the person with the teach pendant should be in the work envelope. Know the path that can be used to escape from a moving robot; make sure the escape path is never blocked. Isolate the robot from all remote control signals that can cause motion while data is being taught. Testing a Program Test any program being run for the first time in the following manner: Using a low motion speed, single step the program for at least one full cycle. Using a low motion speed, test run the program continuously for at least one full cycle. As speed is increased, the path may vary slightly. Run through the program at 5-10% intervals up to 100%. Using the programmed speed, test run the program continuously for at least one full cycle. Running Production Make sure all personnel are outside the safety fence before running production. Advise all personnel who operate the robot during production to observe the following rules: 12 Know the entire workcell area. The workcell includes the robot and its work envelope, plus the area occupied by all external devices and other equipment with which the robot interacts. Understand the complete task the robot is programmed to perform before initiating production operation. Make sure all personnel are outside the safety fence before operating the robot. Never enter or allow others to enter the work envelope during production operation of the robot. Know the location and status of all switches, sensors, and control signals that could cause the robot to move. Know where the EMERGENCY STOP buttons are located on both the robot control and external control devices. Be prepared to press these buttons in an emergency. Never assume that a program is complete if the robot is not moving. The robot could be waiting for an input signal that will permit it to continue activity. If the robot is running in a pattern, do not assume it will continue to run in the same pattern. Never try to stop the robot, or break its motion, with your body. The only way to stop robot motion immediately is to press an EMERGENCY STOP button located on the controller panel, teach pendant, or emergency stop stations around the workcell. Inspecting the Robot When inspecting the robot, be sure to Turn off power at the controller. Lock out and tag out the power source at the controller according to the policies of your plant. Turn off the compressed air source and relieve the air pressure. If robot motion is not needed for inspecting the electrical circuits, press the EMERGENCY STOP button on the operator panel. If power is needed to check the robot motion or electrical circuits, be prepared to press the EMERGENCY STOP button, in an emergency. 13 Maintenance When performing maintenance on your robot system, observe the following rules: Never enter the work envelope while the robot or a program is in operation. Before entering the work envelope, visually inspect the workcell to make sure no potentially hazardous conditions exist. Consider all or any overlapping work envelopes of adjoining robots when standing in a work envelope. Test the teach pendant for proper operation before entering the work envelope. If it is necessary for you to enter the robot work envelope while power is turned on, you must be sure that you are in control of the robot. Be sure to take the teach pendant with you, press the DEADMAN switch, and turn the teach pendant on. Be prepared to release the DEADMAN switch to turn off servo power to the robot immediately. Whenever possible, perform maintenance with the power turned off. Before you open the controller front panel or enter the work envelope, turn off and lock out the 3-phase power source at the controller. Release or block all stored energy. Before working on the pneumatic system, shut off the system air supply and purge the air lines. Isolate the robot from all remote control signals. If maintenance must be done when the power is on, make sure the person inside the work envelope has sole control of the robot. The teach pendant must be held by this person. Make sure personnel cannot get trapped between the moving robot and other equipment. Know the path that can be used to escape from a moving robot. Make sure the escape route is never blocked. Use blocks, mechanical stops, and pins to prevent hazardous movement by the robot. Make sure that such devices do not create pinch points that could trap personnel. Be aware that when you remove a servomotor or brake, the associated axis will fall if it is not supported or resting on a hard stop. When replacing or installing components, make sure dirt and debris do not enter the system. Use only specified parts for replacement. To avoid fires and damage to parts in the controller, never use non-specified fuses. Before restarting a robot, make sure no one is inside the safety fence; be sure that the robot and all external devices are operating normally. 14 Keeping Machine Tool & Other Devices Safe Certain programming and mechanical measures are useful in keeping the machine tools and other external devices safe. These measures are outlined below. Implement the following programming safety measures to prevent damage to machine tools and other external devices. Back-check limit switches in the workcell to make sure they do not fail. Implement ``failure routines" in programs that will provide appropriate robot actions if an external device or another robot in the workcell fails. Use handshaking protocol to synchronize robot and external device operations. Program the robot to check the condition of all external devices during an operating cycle. Implement the following mechanical safety measures to prevent damage to machine tools and other external devices. Make sure the workcell is clean and free of oil, water, and debris. Use software limits, limit switches, and mechanical hardstops to prevent undesired movement of the robot into the work area of machine tools and external devices. Preventing Damage During Operation Observe the following operating and programming guidelines to prevent damage to the robot. The following measures are designed to prevent damage to the robot during operation. Use a low override speed to increase your control over the robot when jogging the robot. Visualize the movement the robot will make before you press the jog keys on the teach pendant. Make sure the work envelope is clean and free of oil, water, or debris. Use circuit breakers to guard against electricaloverload. Preventing Damage During Programming The following safety measures are designed to prevent damage to the robot during programming: 15 Establish interference zones to prevent collisions when two or more robots share a work area. Make sure that the program ends with the robot near or at the home position. The robot must be at HOME to start a cycle, therefore the robot must return HOME at the end of the program. Be aware of signals or other operations that could trigger operation of tooling resulting in personal injury or equipment damage. NOTE Any deviation from the methods and safety practices described in this manual must conform to the approved standards of your company. If you have questions, see your supervisor. 16 17 J O G G I N G T H E R O B O T The process of moving the robot using jog keys on the teach pendant Remember! Only the person with the teach pendant should be in the working envelope of the robot. Jogging the robot is the process of moving it around. It is ESSENTIAL that all safety advice is understood and followed during jogging of the robot. Always begin jogging the robot at a LOW speed. Become familiar with the different ways the robot moves depending on the different coordinate system chosen. Coordinate Systems The robot may be jogged in one of four different coordinate systems. Each system moves the robot in a different way. B A S I C S 18 World Frame The default system of the robot for XYZ moves is the WORLD frame. WORLD is a cartesian (XYZ) frame. That is, it moves the robot in a frame where the X, Y and Z directions are at right angles to each other. In WORLD, multiple axes at a time move to keep the robot Tool Centre Point in an XYZ plane. World Frame +Z -Z +X +Y -X -Y 19 Joint Coordinate System Joint Coordinate system allows you to move only one axis at a time. That is, one joint at a time unless multiple jog keys are pressed. The zero point of this system is on each individual axis. JOINT is the default system of the robot and cannot be changed. Joint Coordinate System 20 Tool Frame Moves multiple axes at a time relative to the robot faceplate. The robot will move relative to the tool tip if a tool centre point has been set up. The zero point of the robot is on the faceplate but this can be moved to the tip of the tool which is known as the Tool Centre Point (TCP) Tool Coordinate System +Z -Z +X +Y -X -Y +Y +Z +X -X -Y +Z 21 User Coordinate System User is a cartesian system, or XYZ. Moves multiple axes at a time to ensure that the tool centre point or robot faceplate moves in the selected XYZ plane. The zero point of the robot can be placed anywhere by setting up a user frame. If a user frame has not been set up, the robot will move in the WORLD framE when user coordinate system is selected. Take care…when a user frame is set up it can affect how your programs work. CONSULT THE SECTION ON USER FRAMES. Jog Frame (JGFRM) Coordinate System Jgfrm is a cartesian system, or XYZ. Moves multiple axes at a time to ensure that the tool centre point or robot faceplate moves in the selected XYZ plane. A jog frame can be set up by the user to allow for easier jogging in an XYZ plane other than the default. The robot zero point of a jog frame always remains in the WORLD frame. If a JOG frame has not been set up, the robot will move in the WORLD frame when JGFRM coordinate system is selected. A jog frame has no effect on a program Consult the Section on Jog Frames. 22 Activating Coordinate Systems Use the COORD Key to change between Coordinate systems. Jogging the Robot The following steps cause the robot to move, take care. 1. To jog the robot, press and hold the deadman handle on the rear of the teach pendant. 2. Turn the teach pendant ON/OFF switch to ON, and if necessary press the RESET key to reset any faults. Two keys are needed to jog (move) the robot. One of the two SHIFT keys and one of the 12 jog keys which are on the right hand side of the teach pendant. 23 3. Press and hold any one of the SHIFT keys 4. Press one of the twelve jog keys to the right of the teach pendant. 5. The robot will now move in whichever coordinate system is active. 24 25 C R E A T I N G A P R O G R A M Runs step by step through the procedure for creating a new program Before you can begin to teach the robot the path to take around an object, you must first create a program. You must give it a unique program name to identify it, and this selection illustrates how this is achieved. Creating a Program 1. Pick up the teach pendant 2. Press the SELECT Key 3. The SELECT screen will be displayed F1 F2 F3 F4 F5 CREATE [ATTR][TYPE] MONITORDELETE Program1 Select No. 1 2 3 4 5 Program name MAIN SUB TEST MAIN2 PAUSED Joint 10% 1/5 Line 7 537467 bytes free Comment [ Main Program ] [ ] [ ] [ ] [ ] B A S I C S 26 4. If CREATE is not above F2, press NEXT key 5. Press F2, CREATE 6. The following screen should be displayed 7. Press the key to Uppercase and all the letters of the alphabet should be above the function keys, like so: 8. To select a letter, press the corresponding function key until the required letter appears in the program name box. Note If 2 consecutive letters in the program name appear above the same function key, press the right cursor key 9. Continue to press the function keys corresponding to the required letters until the program name is complete. 10. If you make a mistake, use the BACKSPACE key. 11. Once the program name is complete, press ENTER. 12. The cursor will jump to – END --, shown here F1 F2 F3 F4 F5 Program name: [ ] PRG SUB Prog 1. Words 2. Upper case 3. Lower case 4. Options Select PAUSED Joint 10% Line 2 --- Create Teach Pendant Program --- --- END --- MAIN TEST Enter program name F1 F2 F3 F4 F5 Program name: [ ] ABCDEF MNOPQR Prog 1. Words 2. Upper case 3. Lower case 4. Options Select PAUSED Joint 10% Line 2 --- Create Teach Pendant Program --- --- END --- GHIJKL STUVWX Enter program name YZ_@*. F1 F2 F3 F4 F5 Program name: [ BOX ] EDIT Prog 1. Words 2. Upper case 3. Lower case 4. Options Select PAUSED Joint 10% Line 2 --- Create Teach Pendant Program --- --- END --- DETAIL Enter program name 27 13. Press ENTER again to lead to the program screen. Recording a Position The teach pendant is now ready for the first program point to be recorded. 14. To do this, jog the robot to the first position and press SHIFT + F1, (POINT). 15. The robot has now been taught that position and a line identifying it will appear looking something like this: J P[1] 100% FINE 16. Continue jogging the robot to new positions and recording them by using SHIFT +F1, POINT. Every time SHIFT +F1, POINT are pressed, new program lines will be displayed representing the robot positions in space. 17. The new program will look similar to this: J P[1] 100% FINE J P[2] 100% FINE J P[3] 100% FINE J P[4] 100% FINE J P[5] 100% FINE J P[6]100% FINE 18. Each new recorded position is given the next available position number, P[ ]. F1 F2 F3 F4 F5 POINT Prog [END] PAUSED Joint 10% Line 2 TOUCHUP + 28 29 T E S T I N G A R O B O T P R O G R A M Running through a robot program for the first time. Ensure all safety advice has been read and understood. the following steps cause the robot to move, take care. 1. To test a program for the first time, cursor to the top of the program and press STEP until the STEP LED lights up to the left of the teach pendant screen. B A S I C S 30 2. Ensure a SLOW speed is selected using the SPEED Keys. Ensure it is safe for the robot to move from where it is currently sitting to the position in the program the cursor is at. If it is not safe, first jog the robot to a safe position. 3. Press and hold the SHIFT key 4. Press the FWD key 5. So long as the STEP LED is on, the robot will move to the first position and stop. 6. Keep hold of the SHIFT key and press the FWD key repeatedly until the program finishes execution. To stop the robot at any time, realease the SHIFT key, let go of the Deadmans or hit any emergency stop. Running Through the Program Continuously When you are happy that the program is running as it should, press STEP again. The STEP LED will turn off and the robot is in continuous mode. 1. Ensure a SLOW speed is selected 2. Press and hold the SHIFT key 3. Press the FWD key + 31 The robot will run the program through completely Continue to run the program, increasing the percentage speed slowly, bearing in mind that the path of the robot may change the faster you go. To re-check a program point, press SHIFT & BWD to move back one step at a time. 32 33 T O U C H U P Altering a program position The TOUCHUP command may be needed to modify the position of existing points. It is located above F5. Using TOUCHUP To use Touchup, you must press SHIFT + TOUCHUP whilst in the program screen. This is similar to recording a point using SHIFT + POINT. The difference between the two methods of recording positions is: SHIFT + POINT Records a new position with the default set of program elements. SHIFT + TOUCHUP Changes the positional information only of the position the cursor is currently on. B A S I C S 34 Set New I.D If two points in a program have the same identity, for example if there are two P[3] ‘s, the teach pendant will ask if you want to set a new i.d when you try to touchup one of them. Set New I.D. YES NO F4 F5 If YES is selected, the position is touched up and given the next available position number. The second position in the program will not be touched up and the two no longer have the same identity. If NO is selected, the position is touched up and the second position is touched up also, keeping the two positions identical. 35 M O T I O N D E F A U L T Changing the way a position is recorded as default The usual program line that appears when SHIFT + POINT is pressed looks similar to: J P[1] 100% FINE It is possible to change what kind of program line appears when SHIFT + POINT is pressed. That is, to change the default. There are 4 possible motion defaults. Changing the Default Motion a. To select from the default menu press F1 POINT without the SHIFT key. b. A screen similar to that below will appear: B A S I C S 36 c. Press F1, ED_DEF, and these motion defaults can be changed to that required by the user. d. Just cursor in, press CHOICE (above F4) and edit these defaults. When completed press DONE (F5). F1 F2 F3 F4 F5 ED_DEF Prog Default Motion 1 J P[ ] 100% FINE 2 J P[ ] 100% CNT100 3 L P[ ] 1000mm/sec FINE 4 L P[ ] 200mm/sec CNT50 PROG 7: J P[5] 100% FINE 8: J P[6] 100% FINE [End] PAUSED Joint 10% Line 2 DONE 37 G I V I N G 2 P O S I T I O N S T H E S A M E I D Recording identical positions This procedure allows you to give a position the same identity as a previously recorded one. 1. The program line will look like so: J P[5] 100% FINE 2. To give P[5] the same identity as P[2] for example, cursor onto the 5 like so: J P[5] 100% FINE 3. Enter a 2 with the numeric keypad, and press ENTER. 4. The program line will now look like so: B A S I C S 38 J P[2] 100% FINE 5. This point has now taken the same identity as a previously recorded position number [2]. If there is no position number [2] in the program, the position number you have changed will be uninitialized. Ensure you enter a number that exists in the program. This procedure can be carried out to give any position the same identity as a previously recorded one. 39 P R O G R A M E L E M E N T S Altering the way the robot moves to positions A program line is made up of various elements that control how the robot moves between two positions. Each element can be changed to enable the robot to move the required path in the desired way. A typical program line will look like so: J P[ 1 ] 100% FINE Motion Position Speed Termination E L E M E N T S 40 Each item in the program line is a program element. Every element can be changed and each are described in this section. To change any element cursor onto it and CHOICE appears above F4. Pressing CHOICE will bring up various menus depending on which element the cursor is placed. There are further advanced options available by cursoring to the very end of the line, past FINE and pressing F4 CHOICE. Motion The motion type defines the way in which the robot moves between two points. To change it, place the cursor on the first element, and select CHOICE (above F4). J P[1] 100% FINE The following options are available: 1. Joint 2. Linear 3. Circular Joint The robot makes its own way between two points and calculates the fastest way to get there. Joint motion is particularly useful for points in space when it doesn’t matter which path the robot takes. Joint motion is programmed at the destination position. It causes the robot to move all the required axes to the destination position simultaneously. Units of Joint motion can be a percentage of the total default speed, or seconds. The actual speed of a Joint move is dependant on the speed of the slowest axis. Destination Position J P[2] 100% FINE Start Position 41 Linear The robot will move the tool centre point between two positions in a straight line. Linear motion is programmed at the destination position. Units of linear motion can be millimetres per second, inches per minute, centimetres per minute, degrees per second and seconds. The orientation of the tool centre point changes gradually as the robot moves from the start position to the destination position. J P[1] 100% FINE Start Position Destination Position L P[2] 2000mm/sec100% FINE 42 CIRCULAR With circular motion selected, the robot will move the tool centre point in an arc from the start position through an intermediate position to the end position. Circular motion is programmed at the intermediate position. Units of circular motion are millimetres per second, inches per minute, centimetres per minute, degreesper second and seconds. DO NOT SELECT CIRCULAR MOTION UNLESS YOU UNDERSTAND IT PROPERLY Start Position P[1] Start Position P[2] Intermediate Position P[3] 100mm/sec FINE Destination Position P[4] Intermediate Position 43 Position J P[1] 100% FINE Place the cursor on any position number to examine the positional coordinates of that position. PRESS F5 POSITION: The screen displayed informs you where in space this position was recorded. You can edit all the values by cursoring onto them and using the numeric keypad to enter new values. X,Y,Z,W,P and R are the cartesian coordinates of the selected position. To display the JOINT coordinates (each axis in degrees), press F5 [REPRE] and select Joint. When coordinates are displayed in JOINT, all tool and user frame information is ignored. F1 F2 F3 F4 F5 DONECONFIG [REPRE] Prog Position Detail P[1] UF:0 UT:1 X 901.860 mm Y -260.835 mm Z -173.005 mm PROG 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] Enter value PAUSED Joint 10% Line 2 CONFIG: N 000 W 13.482 deg P 12.777 deg R 14.652 deg 44 Speed J P[1] 100% FINE The speed value can be changed by cursoring onto it and entering a new value via the numeric keypad. The speed units can be changed by cursoring onto them and pressing F4 CHOICE. The choice available depends on the motion type selected, Joint, Linear or Circular. If the motion is JOINT the following units are available for selection: 1. % 2. secs If the motion is LINEAR or CIRCULAR the following units are available for selection: 1. mm/sec 5. sec 2. cm/min 6. 3. inch/min 7. 4. deg/sec 8. The robot knows how fast it can go and will not let you enter too fast a speed. 45 Termination J P[1] 100% FINE There are two types of motion termination, FINE and CNT (continuous). To change between the two types, cursor to either of them and press F4 CHOICE. FINE termination With FINE termination selected, the robot visits each point exactly and momentarily stops at each position before moving to the next position. Destination Position L P[2] 100mm/sec FINE P[1] Start Position P[3] Next Position 46 CNT Termination With CNT termination selected, the robot curves each point, does not stop (at high values of CNT) and may not visit the points exactly. The continuous value can be between 0 and 100. This determines how close the robot will come to the destination position. At CNT100, the robot moves furthest from the destination position, with minimum deceleration. Destination Position L P[2] 100mm/sec FINE P[1] Start Position P[3] Next Position J P[2] 100% CNT0 CNT50 CNT70 CNT100 47 E D C M D M E N U Editing your programs, adding and deleting lines etc. The EDCMD menu is located above F5 and to view it you must be in a program. If EDCMD is not above F5, press the NEXT key. The menu consists of: 1. Insert 2. Delete 3. Copy (and Paste) 4. Find 5. Replace 6. Renumber 7. Comment 8. Undo This section will go through each item on the list and describe them in turn. E D C M D M e n u 48 Insert If a further command or point needs to be added to an existing program, a blank line needs to be inserted first, otherwise existing data will be lost. Using the Insert Function 1. You are in the program screen 2. Place the cursor at the start of the program line below where you require the inserted line to be. Lines will always be inserted above the cursor. 3. If EDCMD is not above F5, press the NEXT key. 4. Press F5. 5. Select INSERT 6. Once Insert is selected a question will be asked: How many lines to insert? : 7. Enter the number of lines you wish to insert, press ENTER and the blank lines will appear. F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO 49 Delete Deleting program lines. Using the Delete Function 1. You are in the program screen 2. To delete a line or range of lines, place the cursor at the start of the program line at the top or bottom of the range. 3. If EDCMD is not above F5, press the NEXT key. 4. Press F5. 5. Select DELETE 6. The teach pendant will ask: Delete line(s) ? YES NO F4 F5 7. Before selecting yes, highlight as many lines as you require to be deleted using the cursor keys. ⇓ ⇑ F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO 50 Copy Copying program lines. Using the Copy Function 1. To copy, place the cursor at the start of the program line at the top or bottom of the range of lines to be copied. 2. If EDCMD is not above F5, press the NEXT key. 3. Press F5. 4. Select COPY 5. COPY is above F2, and PASTE above F5. 6. Press F2 COPY Multiple lines can now be highlighted using the cursor keys. ⇓⇑ 7. When all the required lines are selected, press F2 COPY again. The copy has now been performed. F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO 51 Paste Once program lines have been copied, they can be pasted as many times as required and in as many different programs as required. You do not need to insert blank lines before using the paste command. 1. Cursor to the start of the program line in the program where you wish to paste the copied lines. It will paste ABOVE the cursor. 2. If PASTE is not above F5, press the NEXT key until EDCMD appears above F5. Press F5, EDCMD and select copy. 3. Press F5 PASTE. 4. Once PASTE is selected, the following options will appear above the functions keys. Paste before this line: LOGIC POS-ID POSITION CANCEL F2 F3 F4 F5 If copying from one program to another, you must select F4 POSITION to paste. F3 POS-ID should only be used if you are pasting in the same program as you copied from. Reverse Order Pasting To paste in reverse order press the NEXT key, after selecting the PASTE command. The options above appear but this time with an R in front representing reverse. Note Copy and Paste will remain above the function keys until the prev key is pressed. Adds the lines exactly as they were and retains the current position numbers. Each pasted position will have the same identity as the original numbers. Leaves the position numbers blank. Does not record any positional information. Adds the lines exactly as they were and renumbers the copied positions with the next available position numbers. 52 Find In large programs the FIND command can be used to search the program for instructions such as Registers, I/O and Labels among others. The FIND command is located on the EDCMD menu. Using the Find Command 1. You are in the program screen at the start of a program line 2. If EDCMD is not above F5, press the NEXT key. 3. Press F5. 4. Select 4. FIND and follow the instructions on screen. F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO53 Replace The REPLACE command is used to replace instructions or motion commands in a program. It can be used to replace: • FINE to CNT and vice versa • Speed Values • Speed Units • Registers • Jump Labels • and others… The REPLACE command is located on the EDCMD menu. Using the Replace Command 1. You are in the program screen at the start of a program line 2. If EDCMD is not above F5, press the NEXT key. 3. Press F5. 4. Select 5. REPLACE and follow the instructions on screen. F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO 54 Renumber The RENUMBER command is used to renumber positions sequentially. The positional data will remain the same, only the position numbers will change. Suppose you have a program containing 3 positions, like so: J P[1] 100% FINE J P[2] 100% FINE J P[3] 100% FINE You may wish to add a position between positions 1 and 2, (after inserting a blank line first). When you do so, the new position will be given the next available position number, like so: J P[1] 100% FINE J P[4] 100% FINE J P[2] 100% FINE J P[3] 100% FINE The RENUMBER command allows you to renumber the positions sequentially like so: J P[1] 100% FINE J P[2] 100% FINE J P[3] 100% FINE J P[4] 100% FINE The RENUMBER command is located on the EDCMD menu. 1. You are in the program screen at the start of any program line 2. If EDCMD is not above F5, press the NEXT key. 3. Press F5. 4. Select 6. RENUMBER The RENUMBER command changes the position number ONLY. 55 Comment The COMMENT command enables or disables the appearance of comments on the program screen. For example, if a Register has a comment to describe it (SECTION 5), the comment will appear in the program like so, if this command is enabled. R[1: Counter] = R[1: Counter] +1 Using the Comment Function 1. You are in the program screen at the start of any program line 2. If EDCMD is not above F5, press the NEXT key. 3. Press F5. 4. Select 7. COMMENT 5. This will enable or disable the appearance of comments on the program screen. F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO 56 UNDO The UNDO functions allows you to correct a mistake by undoing the last action. CAUTION An UNDO operation automatically rewrites the program, so that the results may not be those expected by the operator. Before executing a program after an undo operation, carefully check the program. Notes This function can undo the following operations - Instruction modifications - Line insertion - Line deletion - Copying of program statements - Program instruction replacement - Reassignment of position numbers The UNDO function is disabled when any of the following operations are performed: - Power Off - Selection of another program Using the UNDO Function 1. You are in the program screen 2. If EDCMD is not above F5, press the NEXT key. 3. Press F5. 4. Select 8. UNDO F1 F2 F3 F4 F5 [INST] Prog 1. J P[1] 100% FINE 2. L P[2] 100mm/sec FINE [END] PAUSED Joint 10% Line 2 EDCMD 1. INSERT 2. DELETE 3. COPY 4. FIND 5. REPLACE 6. RENUMBER 7. COMMENT 8. UNDO 57 I N S T > R E G I S T E R S > R E G I S T E R S Counting or storing a numerical value Registers may be thought of as containers. They will store numbers given to them, via a program or manually, until told to store something else. There are 32 registers as the default number on a RJ3 robot, but this may be increased to 256 as desired. In a program they look like so: R [1] = 54 This statement means store a value of 54 in Register 1 Using a Register as a Counter Registers can be used as counters to count production, or parts produced. To use a register as a counter the following statement is required. I N S T M e n u 58 R [1] = R[1] + 1 Determines how many parts per cycle are being counted. In this example 1 will be added into Register [1] every time the robot reads this statement in a program. Registers are found on the [INST] menu. Resetting a Register Registers store the last value given to them until told otherwise. Therefore, it may be necessary to reset a register before using it. This will ensure that it begins its count at 0. To reset any register, the program line should look like that below: R [9] = 0 This means set the value of register 9 to zero. EXAMPLE INPUT As an example, suppose we want to enter… R[2] = R[2] + 1 …in to a program to set register 2 up as a counter. Procedure You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. 2. Press F1 INST 3. Select item Registers F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6. CALL 7. Miscellaneous 8. --- next page --- 59 4. From the next screen select item 2 … = …+… 5. The cursor will now jump to the first position in the line and give a list of choices like that shown 6. Select item 1. R [ ] 7. The cursor will jump between the two square brackets like so: R [ ] = …+… 8. Enter the value of the register you wish to use. 9. The cursor will now jump to the other side of the = sign and give these choices. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. … = ... 2. … = … + ... 3. … = … - … 4. … = … * ... 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. … = … / ... 6. … = … DIV ... 7. … = … MOD ... 8. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. R[ ] 2. PR[ ] 3. PR[i, j] 4. 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. 60 10. Select item 1. R [ ] 11. The cursor will jump between the two square brackets. Enter the required register number. R [2] = R[…] +…. 12. Enter the same value of register as that before the = sign. 13. The program line should now look like so, with the cursor to the right of the + sign: R[2] = R[2]+ … 14. The screen below will appear giving these choices: 15. Now we need to choose 2. Constant, to enter a constant value of 1. 16. Enter 1 via the numeric keypad and the program line will now look like so: R[2]=R[2]+1 F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. R[ ] 2. Constant 3. DO[ ] 4. DI[ ] 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. RO[ ] 6. RI[ ] 7. GO[ ] 8. --- next page --- F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. R[ ] 2. Constant 3. DO[ ] 4. DI[ ] 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. RO[ ] 6. RI[ ] 7. GO[ ] 8. --- next page --- 61 Viewing Registers Press the DATA key to view registers and position registers NOTE To return to the program screen from the data screen (or any other) press the EDIT key. 1. Press the DATA key 2. If registers are not displayed, press F1, TYPE and select Registers. 3. To change the value a register is storing, cursor to it, use the numeric keypad to insert a new number, and pressENTER. Adding a Comment to a Register To add a comment to describe a register, cursor to the register and press ENTER. All the letters of the alphabet should appear above the function keys. Type in the required comment and press ENTER. F1 F2 F3 F4 F5 Prog DATA Registers R[1: ] = 0 R[2: ] = 0 R[3: ] = 3 R[4: ] = 102 R[5: ] = 10 R[6: ] = 0 R[7: ] = 0 R[8: ] = 0 R[9: ] = 33 Press ENTER PAUSED Joint 10% Line 2 [TYPE] To change between Registers and Position Registers, press F1 TYPE. 62 63 I N S T > R E G I S T E R S > A R G U M E N T R E G I S T E R S Transferring data between programs Using ‘arguments’ and ‘argument registers’, it is possible to transfer data between programs. Data can be transferred between 2 programs only. Notation The notation used for argument registers is AR[ ]. Argument registers are added to the CALL command when a program is called, like so: CALL SUB_1(2, R[3]) AR[1] = 2 AR[2] = R[3] I N S T M e n u 64 To illustrate the principle of argument registers, lets look at 2 programs as an example. The first program is called MAIN and the second SUB_1. MAIN will pass 2 arguments to SUB_1. EXAMPLE MAIN SUB_1 J P[1] 100% FINE IF R[7] > AR[2] JMPLBL[5] R[3] = 0 R[8] = AR[1] LBL[1] L P[1] 2000mm/sec FINE L P[2] 2000mm/sec FINE L P[2] 2000mm/sec FINE L P[3] 2000mm/sec FINE L P[3] 2000mm/sec FINE L P[4] 2000mm/sec FINE L P[4] 2000mm/sec FINE L P[4] 2000mm/sec FINE L P[5] 2000mm/sec FINE R[3] = R[3] + 1 LBL[5] IF R[3] < 5 JMPLBL[1] [End] CALL SUB_1(2, R[3]) [End] AR[1] = 2 AR[2] = R[3] R[3] at this point is equal to 5 due to the counter above. AR[2] = R[3] R[3] at this point is equal to 5 due to the counter above. AR[1] = 2 65 I N S T > R E G I S T E R S > P O S I T I O N R E G I S T E R S P O S I T I O N R E G I S T E R S Storing positional data away from a program DO NOT ATTEMPT TO USE POSTION REGISTERS UNTIL YOU HAVE READ ALL THE AVAILABLE INFORMATION AND UNDERSTOOD ALL THE GIVEN INSTRUCTION. A Position Register stores positional information, in the form of X, Y, Z, W, P and R. Position Registers are a powerful programming tool because they can alter the way a program runs. It is ESSENTIAL to understand Position Registers implicitly before you begin programming with them using Offsets. Position Registers are extremely versatile and have multiple uses. Warning Position Registers are affected by User Frames and Tool Frames. I N S T M e n u 66 Using Position Registers as Program Positions Position Registers are stored away from a program and as such can be used by multiple programs. An efficient programming technique is to store frequently used positions (such as the Home position) in a Position Register. This can then be called up from as many different programs as require it. Advantages You may at a later date wish to alter your Home Position. If it is stored in a Position Register you need only alter the relevant position register and all programs using it will adjust accordingly. However, if you have not stored your Home Position in a Position Register you will need to go into every program using the Home Position and alter them individually. Recording Position Registers 1. Press the DATA key 2. If Position Registers are not displayed, press F1, [TYPE] 3. Select Position Reg 4. This screen be displayed 5. Cursor to the Position Register you wish to record into. 6. Jog the Robot to the required position and press SHIFT + F3, RECORD. Use SHIFT + F2, MOVE_TO to move to the position of the current Position Register. Use F5, CLEAR to clear the current Position Register. Adding to a Program To use the newly recorded position register in a program, record a position in space in the usual way (SHIFT + F1, POINT) regardless of where the robot is. 1. Cursor onto the position number of the recorded position like so: F1 F2 F3 F4 F5 Prog DATA Position Reg PR[ 1: ] = * PR[ 2: ] = R PR[ 3: ] = * PR[ 4: ] = * PR[ 5: ] = * PR[ 6: ] = R PR[ 7: ] = R PR[ 8: ] = * PR[ 9: ] = * Press ENTER PAUSED Joint 10% Line 2 [TYPE] MOVE_TO RECORD POSITION CLEAR 67 J P[ 1 ] 100% FINE 2. Press F4 CHOICE 3. From the options available in the menu that appears, select PR[ ] 4. Enter the Position Register number you record the position in. Adding a Comment to a Position Register You may wish to add a comment to a Position Register to describe it. 1. In the DATA screen, cursor to the Position Register you wish to add a comment to and press ENTER. 2. All the letters of the alphabet will appear above the function keys. Type in the required comment and press ENTER. 3. If you make a mistake, use the BACKSPACE key. 68 69 I N S T > R E G I S T E R S > P O S I T I O N R E G I S T E R S L P O S / J P O S Recording the robots current position. The LPOS and JPOS commands allow you to store the current position of the robot into a position register. Program Examples PR[5] = LPOS LPOS stores the LINEAR (XYZWPR) coordinates of the robot PR[6] = JPOS JPOS stores the JOINT (J1…J6) coordinates of the robot I N S T M e n u 70 EXAMPLE INPUT You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. 2. Press F1 INST 3. Select item Registers 4. From the next screen select item 1 … = … 5. The cursor will now jump to the first position in the line and give a list of choices like that shown F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6. CALL 7. Miscellaneous 8. --- next page --- F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. … = ... 2. … = … + ... 3. … = … - … 4. … = … * ... 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. … = … / ... 6. … = … DIV ... 7. … = … MOD ... 8. 71 6. Select item 2. PR [ ] 7. The cursor will jump between the two square brackets like so: PR [ ] = … 8. Enter the value of the position register you wish to use. 9. The cursor will now jump to the other side of the = sign and give these choices. 10. Select the choice you require. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. R[ ] 2. PR[ ] 3. PR[i, j] 4. 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. PR[ ] 2. JPOS 3. LPOS 4. 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. 72 73 I N S T > I / O > I N P U T S A N D O U T P U T S Controlling and Monitoring Inputs and Outputs Output - Will turn something on or off. (e.g. a gripper) Input - Monitors signals. (e.g. a sensor) There are various types of Inputs and Outputs (I/O), 4 are: Digital • Digital I/O (DO/DI) signals provide access to data on a single input or output signal line. • Signals can be ON or OFF. Robot • Robot digital input and output signals (RO/RI) are used to communicate between thecontroller and the robot. • Signal are ON or OFF. I N S T M e n u 74 Analogue • Analogue inputs and outputs (AI/AO) are continuous input and output signals and indicate values such as temperature and voltage. Group • Group inputs and outputs (GI/GO) are several digital input or output signals that have been assigned to a group. • They are read as binary numbers. Group Input Example Suppose we have a number of digital inputs that we need to check and then have the robot act accordingly. For example, we have 4 conveyor belts, each with a digital input to check if a box is waiting to be picked up by the robot. Combine the 4 digital inputs into group input [1], GI[1]. DI[1] has group input value of 2 DI[2] has group input value of 4 DI[3] has group input value of 8 DI[4] has group input value of 16 Therefore: DI[1] = ON …………………………….. GI[1]=2 DI[3] = ON …………………………….. GI[1]=8 DI[1] = ON & DI[3] = ON ……………….. GI[1] =10 DI[2] = ON & DI[3] = ON & DI[4]……….. GI[1] =28 This feature allows for efficient programming and easy manipulation of digital inputs and outputs in a program. Group inputs and outputs can also be assigned to registers. DI[1] DI[2] DI[3] DI[4] 75 EXAMPLE INPUT OF IO As an example, suppose we wanted to enter RO[3] = ON into our program to turn robot output number 3 on. Procedure You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. 2. Press INST (F1), and the Instruction Menu will be displayed like so: 3. Select item 2. I/O, and this screen will be displayed 4. Select item 3. RO [ ] = …. 5. The cursor will jump between the two square brackets like so: RO [ ] = …… 6. Enter the value of I/O you wish to use, press ENTER and the cursor will jump across to the right of the = sign and the following choices will be displayed F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6. CALL 7. Miscellaneous 8. --- next page --- F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. DO[ ] = ... 2. R[ ] = DI[ ] 3. RO[ ] = ... 4. R[ ] = RI[ ] 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. GO[ ] = ... 6. R[ ] = GO[ ] 7. 8. 76 7. Select item 1. ON 8. The program line will now look like so: RO [3] = ON 9. This procedure may also be followed to turn off an output. PULSE PULSE means the output will turn on for a specified time only. For example, if the program line said: RO[3] = PULSE 2 secs Robot output number 3 would turn on for 2 seconds only. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1 ON 2. OFF 3. PULSE 4. R[ ] 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. 77 Viewing I/O’s 4. Press MENUS 5. Select I/O 6. A screen similar to this should be displayed. Adding Comments to I/O For Robot I/O go to “Adding Comments to Robot IO” below 1. Press the MENUS key 2. Select I/O 3. If the I/O type you wish to add a comment to is not displayed, press F1, [TYPE] and select the required type of I/O 4. Press F2 CONFIG 5. Press F4 DETAIL 6. Cursor to the output you wish to add a comment to. 7. Press ENTER. Letters of the alphabet will appear above the function keys. F1 F2 F3 F4 F5 OFF[TYPE] Program1 I/O DIGITAL OUT DO[1] U ON [ ] DO[2] U ON [ ] DO[3] U ON [ ] DO[4] U ON [ ] DO[5] U ON [ ] DO[6] U ON [ ] DO[7] U ON [ ] DO[8] U ON [ ] DO[9] U ON [ ] DO[10] U ON [ ] ABORTED Joint 10% Line 1 ONIN/OUTCONFIG To switch between the different types of output press f1 [type], cursor to the correct output and press enter. Outputs can be forced On and OFF by pressing F4 and F5. 78 8. Using the function keys, enter a comment and then press ENTER. If you make a mistake, use the backspace key To return to the program screen, press the EDIT key. Each time the input or output is called within a program, the comment should appear in the program screen. If it does not you need to enable comments, See the EDCMD Menu. Adding Comments to ROBOT I/O 9. Press the MENUS key 10. Select I/O 11. If Robot I/O are not displayed, press F1, [TYPE] and select Robot I/O 12. Press F2 DETAIL 13. Cursor to the output you wish to add a comment to 14. Press ENTER 15. Using the alphabet above the function keys, enter a comment and then press ENTER If you make a mistake, use the backspace key To return to the program screen, press the EDIT key. Each time the input or output is called within a program, the comment should appear in the program screen. If it does not you need to enable comments, See the EDCMD Menu. 79 I N S T > I F / S E L E C T > I F S T A T E M E N T Setting up conditional statements The If Statement allows you to carry out a program command, only when certain conditions are met. When the set conditions are met, the robot can call another program to run or jump to a label. EXAMPLE INPUT As an example, we will set up an If statement to call another program when 3 cycles have been executed. Remember, a Register counter statement would be needed to count the number of cycles. Procedure You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. I N S T M e n u 80 2. Press F1 INST 3. Select item IF/SELECT 4. Select item 3.IF/SELECT and this screen will be displayed 5. Select item 1. IF … = … 6. The cursor will now jump to the first position in the line and give a list of choices… F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6. CALL 7. Miscellaneous 8. --- next page --- F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. IF … = ... 2. IF … <> ... 3. IF … < ... 4. IF … <= ... 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. IF … > ... 6. IF … >= ... 7. 8. --- next page --- F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. R[ ] 2. DO[ ] 3. DI[ ] 4. RO[ ] 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. RI[ ] 6. GO[ ] 7. GI[ ] 8. --- next page --- 81 7. Select item 1. R [ ] 8. The cursor will jump between the two square brackets like so: IF R [ ] = … … 9. Enter the value of the register you wish to use and press ENTER. 10. The cursor will now jump to the other side of the = sign and give the following choices. 11. Select item 2. Constant 12. Enter the value of the constant you require and press ENTER. this will determine the number of cycles the robot makes. 13. The cursor will jump to the next space and give you another menu to choose from. 14. Select item 2. CALL and a list of all the teach pendant programs will appear in alphabetical order. 15. If the program you wish to call is not listed, press 8. -- next page --, to flip the pages of programs. 16. The program line will now look like so: F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. R[ ] 2. Constant 3. 4. 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. JMPLBL 2. CALL 3. 4.1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. 82 IF R [1] = 3 CALL (name of program) Although this example calls a program depending on the IF statement, a JMPLBL could also be used with the IF statement to jump to another part of the same program. REMEMBER! You must have the same register as that in the IF statement set up as a counter above the IF statement. 83 I N S T > I F / S E L E C T > S E L E C T Adding conditions into a program The SELECT statement is located on the INST menu and works in a similar but slightly different way to the IF statement. How SELECT works: Imagine a program that needs to check a register value and then depending on the value jump to different lines in the program. Suppose we use Group Input 1, GI[1]. Using Group Input 1, GI[1], many IF statements would be necessary like so: 1. IF GI[1] = 2 CALL PROGRAM1 2. IF GI[1] = 4 CALL PROGRAM1 3. IF GI[1] = 8 CALL PROGRAM1 4. IF GI[1] = 16 JMP CALL PROGRAM1 I N S T M e n u 84 4 different IF statements are necessary and the robot would read them all until it found one that was true. Instead, with the Select statement the program would work like so: 1. SELECT GI[1] = 2 CALL PROGRAM1 = 4 CALL PROGRAM1 = 8 CALL PROGRAM1 = 16 CALL PROGRAM1 EXAMPLE INPUT Entering a SELECT statement. Procedure 1. You are in the program screen and have inserted a blank line or the cursor is on [End]. 2. If INST is not above F1, press the NEXT key 3. Press F1 INST 4. Select IF/SELECT 5. Select 8. next page 6. The SELECT statement is available on this menu. 7. Choose item 1 when you are setting up a new SELECT statement. 8. Choose item 2 or 3 when you wish to add new branches to an existing SELECT statement. The robot will branch to whichever statement is true. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. SELECT R[ ] 2. select <> 3. ELSE R[ ] 4. 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. 6. 7. 8. 85 To add a branch to an existing SELECT statement, the cursor must be placed on the line below the existing SELECT statement or below the last branch added to the SELECT statement. 86 87 I N S T > W A I T > W A I T I N S T R U C T I O N Pausing the program or waiting for a condition to become true The WAIT Instruction tells the robot to wait for something to happen. The robot can wait for : • A given time in seconds • An input or output • A register to be equal to a certain value. • A semaphore Wait is located on the INST menu. I N S T M e n u 88 EXAMPLE INPUT As an example we will enter a statement to make the robot wait for 2 seconds before carrying on to the next program line. Procedure You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. 2. Select item 4. WAIT, and this screen will be displayed 3. Select item 1. WAIT … (sec) 4. The program line will look like this: WAIT … (secs) 5. Enter the number of seconds you wish to wait, and press ENTER. 6. The program line should look like this: F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6. CALL 7. Miscellaneous 8. --- next page --- F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. WAIT … (secs) 2. WAIT … = ... 3. WAIT … <> ... 4. WAIT … < ... 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. WAIT … <= ... 6. WAIT … > ... 7. WAIT … >= ... 8. WAIT SEMAPHORE 89 WAIT 2 (secs) The WAIT Instruction can also be used to wait for inputs to turn on, or to wait for a register to reach a certain value. 90 91 I N S T > J m p / L b l > L A B E L S & J U M P L A B E L S Using labels and jump labels to create cycles Labels (LBL) are similar to markers in that they mark a point in a program for the robot to jump to when the jump to label (JMPLBL) command is used. They are therefore used for cycling purposes. For example: 1. LBL [1] 2. J P[1] 100% FINE 3. J P[2] 100% FINE 4. J P[3] 100% FINE 5. J P[4] 100% FINE 6. J P[5] 100% FINE 7. J P[6] 100% FINE 8. J P[7] 100% FINE 9. J P[8] 100% FINE 10.JMPLBL [1] This label defines the line for the robot to jump to when it reads a JMPLBL[1] command. Every time the robot reads this line, it will jump to label [1], and hence run the entire program again and again. I N S T M e n u 92 The above is an example of an unconditional loop. It will continue to cycle no matter what. To set up a conditional loop, an IF statement is required in combination with a Register counter. The order of the LBL and JMPLBL commands in a program does not matter. You can place a JMPLBL command anywhere in a program to jump to any other label, even if the label appears after the JMPLBL. EXAMPLE INPUT Entering a LBL command. Procedure You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. 2. Press F1 INST 3. Select item JMP/LBL 4. Select 5.JMP/LBL and there will be two choices, shown below: 1. JMPLBL 2. LBL 5. To enter a LBL, select 2.LBL and the value of the label may be entered via the numeric keypad. There are 10,000 labels that can be used, but the same one cannot be used in the same program. You can jump to the label as many times as required, but there must be only one label with the same number in any one program. For example, only one LBL[99] or LBL[2], etc. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6. CALL 7. Miscellaneous 8. --- next page --- 93 JMPLBL To enter a JMPLBL. Press F1, INST again, and select 5. JMP/LBL. Select 1. JMPLBL and enter the value via the numeric keypad. The above example sets up an unconditional cycle. i.e. it will cycle forever. To set up a conditional cycle, you need to use the IF statement together with registers, labels and jump labels. 94 95 I N S T > C A L L > C A L L I N S T R U C T I O N Calling programs from within programs In addition to using the CALL Statement in conjunction with the IF Statement, it can also be used alone. It is located on the INST menu and in a program looks like so: CALL (name of program) EXAMPLE INPUT Entering a CALL command. Procedure You are in the program screen and have inserted a blank line or the cursor is on on [End]. 1. If INST is not above F1, press the NEXT key. I N S T M e n u 96 2. Press F1 INST 3. Select item CALL 4. Select item CALL and this screen will be displayed 5. Select item 1. CALL program 6. There will then be a list of teach pendant programs displayed, select the program you wish to call. Remember The robot always takes the shortest route from where it is to where it is going. Make sure the path between programs is a safe one to take. F1 F2 F3 F4 F5 EDCMDINST Program1 INST 1. Registers 2. I/O 3. IF/SELECT 4. WAIT 1. J P[1] 100% FINE 2. J P[2] 100% FINE [End] PAUSED Joint 10% Line 7 5. Jmp/Lbl 6.
Compartilhar