active robot training manual
TRANSCRIPT
-
7/28/2019 Active Robot Training Manual
1/114
1
AAAppppppllliiicccaaatttiiiooonnn DDDeeevvveeelllooopppmmmeeennnttt
Training
-
7/28/2019 Active Robot Training Manual
2/114
2
Revision History
Number Details Date
001 Release 11-00
-
7/28/2019 Active Robot Training Manual
3/114
3
Table of Contents
TASK: #1 UNDERSTANDING ROBOT SYSTEM COMPONENTS 7
LESSON 1.1 Hardware Components 7Concept of a Robot System 7Identifying the Different CRS Arms 8
The C500C Controller 9Optional Components 10
LESSON 1.2 Software Components 12What is ActiveRobot 12Demonstration: A Simple ActiveRobot Application 13
The ActiveRobot Setup Utility 14ActiveRobot Terminal 15
The ActiveRobot Explorer 16Software Products that Support ActiveX Controls 17
TASK: #2 USING THE ROBOT SAFELY 18
LESSON 2.1 Operating the Emergency Stop 18
Safety Features of the CRS Robot System 18What is an Emergency Stop? 18Locating Emergency Stop Buttons 19How the E-Stop Works 19
LESSON 2.2 Preventing Operator Injury 21Purpose of the Live-man Switch 21Exercise: Enabling the Live-man Switch 22Understanding Point of Control 23Proper Training 24Performing a Risk Analysis 24
TASK: #3 MOVING THE ROBOT 25
LESSON 3.1 Using the Teach Pendant 25Activating the Teach Pendant 25Moving in Different Coordinate Systems 27
LESSON 3.2 Using the Application Shell 34Starting the Application Shell 34Moving the Robot from Ash 35Exiting the Application Shell 36
TASK: #4 UNDERSTANDING LOCATIONS 37
LESSON 4.1 Understanding ActiveRobot Locations 37Homing the robot 37Understanding ActiveRobot Locations 37
How to Create Location Variables in the V3 File 40
LESSON 4.2 Measuring the tool offset 41How the Tool Transform affects locations 41
The Default Tool Centre Point 42How to create a tool transform 43
-
7/28/2019 Active Robot Training Manual
4/114
4
TASK: #5 TEACHING LOCATIONS 45
LESSON 5.1 Using the Teach Pendant 45Teaching World Locations through the Teach Pendant 45Teaching Motor Locations through the Teach Pendant 46
LESSON 5.2 Using Ash 47Teaching World Locations from Ash 47Teaching Motor Locations from Ash 48
Location Arrays 49
LESSON 5.3 Understanding Motion Types 51Joint Interpolated Motion 51Moving the Robot in Ash Error! Bookmark not defined.Straight Line Motion 53Blended Motion 54Moving the Robot in a Straight Line 55
TASK: #6 UNDERSTANDING ACTIVE ROBOT 56
LESSON 6.1 Understanding The CRSRobot Object 56What is the CRSRobot Object? 56When to use an instance of the CRSRobot. 56
What Happens When A Robot Command Is Issued? 57How To Poll The Status Of The Robot Periodically 58Considerations To Be Aware Of While Polling. 58
LESSON 6.2 Understanding The CRSV3File Object 59What is the CRSV3File Object? 59Opening the CRSV3File 59Using the Contents of the V3 File 60Closing the CRSV3File 60
LESSON 6.3 Understanding The CRSLocation Object 61What is the CRSLocation Object 61How to Use a CRSLocation 61Understanding Abort Methods 62
LESSON 6.4 Robot and Location Object Properties 63Aspects of the Robot Configuration 63Details To Be Aware Of When Changing The Configuration 64How to Find List of ActiveRobot Methods and Properties 64
TASK: #7 PROGRAMMING 65
LESSON 7.1 Preparing the Working Directory 65Creating a Directory in Explorer 65
Transferring the V3 File from the Controller to the Host computer 66Understanding the Active Directory 66
LESSON 7.2 Starting Visual Basic 67Opening a Visual Basic Standard Project 67Referencing the Active Robot Library 67Saving the Application 68
LESSON 7.3 Building a Form 69Adding Controls to the Form 69Setting the Properties of the Form and Controls 70
LESSON 7.4 Writing Code 72Declaring Variables 72Setting up Form_Load Event 74
-
7/28/2019 Active Robot Training Manual
5/114
5
Writing the Main Robot Application 75Adding Timed Polling of Robot Status 78Deselecting Controls during Robot Operations 79Aborting Robot Motion 80Shutdown of the Controller 81
TASK: #8 DEBUGGING CODE 82
LESSON 8.1 Understanding Error Codes 82Common Causes of Errors 82Identifying the Error Codes and What they Mean 83
LESSON 8.2 Setting up Error Handling 85Trapping Errors in Visual Basic 85Impact of the Errors 87Recovering from Errors 88
LESSON 8.3 Handling Point of Control Issues 92Subsequent Runs 92GPIO Can Cause Point of Control Problems Too 93
TASK: #9 OPTIMIZING SYSTEM 94
LESSON 9.1 Improving Robot Speed 94Move Size VS. Speed 94When to use Blended Motion and When not to 95Adjusting Locations to Improve Cycle Time 95
LESSON9.2 Optimizing Code 96Optimizing the use of BlendedMotion 96
TASK: #10 UNDERSTANDING APPLICATION DEVELOPMENT 97
LESSON 10.1 Analyzing the Application 97Defining the Process to be Automated 97Sub-Systems 98Interfacing Requirements 98
End of Arm Tooling 99Performance Levels 99Flow of Material 100
LESSON 10.2 Designing the Application 101Defining the cycle 101Potential Pitfalls 102Sensors 103Identifying key arm locations 103Specifying Interfacing Requirements 103
Timing Dependencies 103Required Operator Inputs 104Identifying the key software modules. 104
LESSON 10.3 Developing the Application 105Creating a flow-chart 105
Teaching key locations 108Teaching other locations 108Writing the modules 108
LESSON 10.4 Testing and Optimizing the Application 109Testing 109Optimizing 109
-
7/28/2019 Active Robot Training Manual
6/114
6
LESSON 10.5 Deploying the Application 110Determine Necessary Components 110Documentation 110
Training 111
APPENDIX A 112
The CRS Risk Analysis Guidelines 112
APPENDIX B 113
Robot Related Safety Standards 113
APPENDIX C 114
Purchasing Standards 114
-
7/28/2019 Active Robot Training Manual
7/114
7
Task: #1 Understanding Robot System Components
LESSON 1.1 Hardware Components
Objective:
To recognize the hardware components of the robot system and understand theirfunction as part of the system.
Content:
Concept of a Robot System
Identifying the Different CRS Arms
The C500C Controller
Optional Components: The Teach Pendant and GPIO Block
Concept of a Robot System
Each of the components of the robot system are dependent on the other componentsin the system. For example, a robot alone on a table is of no use without the
controller to tell it what to do. The controller cant tell it what to do unless there is acomputer hooked up to the controller running a program or communicating through
the terminal window. Each component is as important as the next.
computer system
teach pendant
controller
robot arm
Figure 1 Robot system compon ents
-
7/28/2019 Active Robot Training Manual
8/114
8
Identifying the Different CRS Arms
There are three different types of CRS robot arms:
The A255 arm carries a 1 kg payload and has five axes of motion. It uses
incremental encoders and must be homed after each powerup. Homingcan be done manually (using the calibration markers on each joint) or can
be automated (with a homing bracket).
The A465 arm carries a 2 kg payload and has six axes of motion. It alsouses incremental encoders and must be homed after each power-up.
Homing is automated by using proximity sensors in each joint to establishthe arms position.
The F3 carries a 3 kg payload and has six axes of motion. It uses absoluteencoders that retain their position automatically via battery backed-upmemory. The F3 does not need to be homed.
A255 A465 F3
waist (joint 1) waist (joint 1) waist (joint 1)
shoulder (joint 2) shoulder (joint 2) shoulder (joint 2)
elbow (joint 3) elbow (joint 3) elbow (joint 3)
--- wrist yaw (joint 4) wrist yaw (joint 4)
wrist pitch (joint 4) wrist pitch (joint 5) wrist pitch (joint 5)
tool roll (joint 5) tool roll (joint 6) tool roll (joint 6)
Figure 2 CRS Robot Models
Robot axes
Each axis passes through the joint and is the center of rotation of that joint. There areas many axes as joints.
If your system includes a track, the track is an additional axis.
Other CRS robot system designations
T265 is the designation for an A255 system with support for a CRS track
T475 is the designation for an A465 system with support for a CRS track
F3t is the designation for an F3 system with support for a CRS track
-
7/28/2019 Active Robot Training Manual
9/114
9
The C500C Controller
The C500C controller is essentially the brains behind the robot. It contains the robot
memory and moves the robot arm by providing the necessary control signals.
EXPANSION
AMPLIFIER
expansionamplifier*
Figure 3 The contro ller (shown here for an A255 or A465)
-
7/28/2019 Active Robot Training Manual
10/114
10
Optional Components
The Teach Pendant
The teach pendant is hand held robot control terminal with a keypad, LCD display,
E-Stop button, and cable. The teach pendant is used to move the robot arm, teach
locations, and edit variables.
Figure 4 The teach pendant
Because of the E-Stop on the teach pendant, you must insert a teach pendant dummy plug into theteach pendant port whenever the pendant is disconnected from the controller.
The GPIO Block
The CRS robot system allows you to connect external inputs and outputs to help youcontrol the robot work cell. For instance, you may want to hook up a proximitysensor to indicate a part is present, or have a beacon light to indicate the state of
the system.
Example:
On some CRS lab systems, a green beacon means that the system issuspended and it is safe to approach, a yellow beacon means that the robot is
in motion and it is unsafe to approach, and a red beacon indicates that an
error has occurred (for example, a misplaced container) and an operatorneeds to intervene.
The beacon lamps are connected through the GPIO port and controlled via aprogram on the controller.
To make it easier to connect devices to the 16 digital inputs and 16 digital outputs,you can purchase a GPIO terminal block as an option for your robot system.
The GPIO block kit includes a ribbon cable with a 50 pin connector. The connector
attaches to the GPIO port on the back panel of the controller.
-
7/28/2019 Active Robot Training Manual
11/114
11
Adding inputs and outputs can help with the timing of the entire work-cell. Youmay not want the robot system to start if the door is open. In this case, you may put
a check for a door latch sensor before any robot motion can take place. You may alsowant to use an output to start different devices in the work-cell when the robot is
ready for them. For example, you may want to restart a conveyor once the robot has
removed the part so the next one can move into place. You may also want toindicate the robot motion by flashing an orange light when the robot is in motion,
and turn a green light on when it is safe to enter the work-cell.
insert
ribbon cable
here
clipclip
insert
DIN rail
here
screw
terminals
Figure 5 The GPI O block
Pinout schematics for the GPIO port and wiring instructions are in your robot system user guide.
-
7/28/2019 Active Robot Training Manual
12/114
12
Task: #1 Understanding Robot System Components
LESSON 1.2 Software Components
Objective:
To recognize the software components of the robot system and understand theirfunction.
Content:
What is ActiveRobot
Demonstration: A Simple ActiveRobot Application
The ActiveRobot Setup Utility
ActiveRobot Terminal
The ActiveRobot Explorer
Software Products that Support ActiveX Controls
What is ActiveRobot
ActiveRobot is an ActiveX component that enables Microsoft Windows applications tofully access and control up to 8 CRS Robotics robot systems from one host computer.
A robot system consists of an articulated CRS arm, a C500C controller, and up to two additionalaxes, one of which could be a track
ActiveRobot includes two versions of the help file (PDF, and HTML formats), several
examples in Visual basic and Visual C++, release notes, and the following utilities:
ActiveRobot Terminal
ActiveRobot Configuration
ActiveRobot Explorer
When you set up ActiveRobot on your development, or host, computer, the
installation program adds the following shared Windows dynamic link libraries (DLL):
ActiveRobot.dll, which provides an interface to the features of the robotsystem. This dynamically linked library (DLL) contains all the robot- and
controller-specific methods and properties required to create anActiveRobot application
HCLInterface.dll, which ActiveRobot.dll uses to get reliablecommunication with the controller. This DLL controls how commands for
the robot system are sent to the controller .
-
7/28/2019 Active Robot Training Manual
13/114
13
Demonstration: A Simple ActiveRobot Application
-
7/28/2019 Active Robot Training Manual
14/114
14
The ActiveRobot Setup Utility
The ActiveRobot Setup Utility lets you configure and test communications between
the robot system(s) and the host computer.
To open the ActiveRobot Setup Utility, select ActiveRobot Configuration from theWindows Start Menu or the CRS ActiveRobot directory. The ActiveRobot Setup Utility
opens to the General tab:
Figure 6 The ActiveRobot Setup Utility
The General tab displays the current version of the ActiveRobot .dll and
the number of robots you have configured.
The Configure tab lets you create and edit a communications
configuration for each robot system attached to the host computer.
The Test tab lets you test communications between the host computerand the configured robot system.
The Utility tab lets you perform several useful robot motion operationsfrom the host computer, including homing the arm, setting joint speeds,
and moving individual axes.
The Controller tab lets you synchronize the real-time clocks on the robotsystem and the host computer, and can also be used to shut down the
controller.
-
7/28/2019 Active Robot Training Manual
15/114
15
ActiveRobot Terminal
ActiveRobot Terminal provides a simple command-line terminal interface to the
controller. Through ActiveRobot Terminal, you can access the controllers operating
system and command the robot from the host PC without having to create anapplication.
ActiveRobot Terminal provides a command-line interface only. It is not a programming editor or amacro generator. Commands are sent directly to the robot system and are not available for replaylater.
To use ActiveRobot Terminal, select ActiveRobot Terminal from the Windows Start
Menu or the CRS ActiveRobot directory.
When it starts, ActiveRobot Terminal first determines what robot systems areavailable for communication and then attempts to establish a connection with the
default system. If it succeeds, it opens a terminal window.
The ActiveRobot Terminal window maintains a 200-line scroll buffer that enables you to view theoutput of recent controller commands. You can copy text from this buffer, but you cannot paste textinto it.
F igure 7 The Act iveRobot Terminal Window
-
7/28/2019 Active Robot Training Manual
16/114
16
The ActiveRobot Explorer
ActiveRobot Explorer provides a Windows Explorer-like interface to the controller's
file system. You can navigate, view directories, view file attributes, and create, copy,
and delete files and directories just as you would using Windows.
Once deleted, a file is gone
Unlike Windows, ActiveRobot Explorer does not have a Recycle Bin.
To use ActiveRobot Explorer, select ActiveRobot Explorer in the Windows Start Menu
or in the CRS ActiveRobot directory.
When it starts, ActiveRobot Explorer determines which robot systems are availablefor communication and then attempts to establish a connection with the defaultsystem. If it succeeds, it opens a tree-view window into the controller's root
directory:
F igure 8 The ActiveRobot Explo rer Window
You can use drag-and-drop to copy files from the controller to the host computer,and vice-versa.
Holding the left mouse button down, drag the selected files to thedestination directory in ActiveRobot Explorer.
You can copy files from the host computer's desktop simply by dragging them to the destinationdirectory in ActiveRobot Explorer; you don't have to open Windows Explorer in this case.
-
7/28/2019 Active Robot Training Manual
17/114
17
Software Products that Support ActiveX Controls
ActiveRobot can be used with any product that supports ActiveX. Some software
products that support ActiveX controls include:
Microsoft Visual Basic
Microsoft Visual C++
ActiveX-compatible applications such as Microsoft Access 97/2000
National Instruments LabVIEW.
Steeple chase
In this course, you will learn how to develop applications using Visual Basic.
-
7/28/2019 Active Robot Training Manual
18/114
18
Task: #2 Using the Robot Safely
LESSON 2.1 Operating the Emergency Stop
Objective: To locate and use each of the emergency stops in the system
Content:
Safety Features of the CRS Robot System
What is an Emergency Stop?
Locating Emergency Stop Buttons
How the E-Stop Works
Safety Features of the CRS Robot System
CRS robot systems include several built-in layers of safety features. Some of thesefeatures are hardware related; some are built into the software. Many of the features
are redundant.
For example, when you turn the main power on by toggling the ON/OFF switch, armpower does not come on automatically, nor can it be turned on through software.This reduces the risk of being unprepared for robot motion. It is also a good idea to
build in your own safety features while designing your system. (e.g. putting a startbutton outside the robot work-cell, or adding a light curtain.)
For a detailed list of the safety features of your robot, refer to your Robot SystemUser Guide.
What is an Emergency Stop?
An emergency stop is a device used to cut power to a moving device to prevent
operator injury or a potential collision. When triggered, the emergency stop for your
robot system breaks the electrical circuit, thereby cutting power to the robot arm. Ifyou have multiple devices in your workcell, it is a good idea to integrate all
emergency stop devices together so that a single button halts the entire system.
For a more detailed discussion of how to connect devices to the Emergency Stopcircuit in the controller, refer to your Robot System User Guide.
-
7/28/2019 Active Robot Training Manual
19/114
19
Locating Emergency Stop Buttons
All CRS robot systems have an emergency stop located on the front of the controller.Most customers usually order a Teach Pendant as well, which also comes equipped
with an emergency stop.
Figure 9 The Co ntroller E- Stop
How the E-Stop Works
Several things happen when you strike an emergency stop button:
1. The E-Stop button latches. (This means you are required to twist the button
to release the E-stop state)
2. Arm power is terminated. This happens because the e-stop button is hard
wired as part of the arm power circuit.
3. A signal is sent to the controller. This causes the robot to back drive themotors in the event the arm power is not terminated immediately (This is just
a second level safety feature to guarantee the arm stops. It should never geta chance to do this)
4. The motion command will fail, causing you to exit your program unless youvebuilt in sufficient error handling.
5. Due to the lack of arm power, joint 1 (waist) will limp allowing you to movethe robot away from the impending collision.
You cannot turn on arm power while any of the E-stop buttons are triggered.
-
7/28/2019 Active Robot Training Manual
20/114
20
Recovering from an E-Stop (Outside an application)
This procedure describes in very basic terms how to recover mechanically from an emergency stop.If you are running even a moderately complex application, you will need to perform additional stepsbefore you can resume processing.
Recovering from an E-Stop within an application will be discussed in a later section.
To recover from an E-Stop, perform the following steps:
1 If necessary, move the arm away from the impending collision.
2 Release the triggered E-stop button by twisting it until it pops out of thelatched position.
3 Make sure that it is safe to engage arm power. Remove any obstacles fromthe workcell.
4 Press the Arm Power button to re-apply arm power.
5 If you cannot apply arm power, check the circuit breakers or fuses to makesure you havent tripped a breaker.
If you have an F3 arm, you may occasionally encounter an error condition following an E-Stop. Toclear this error, enter the ash command clrerror. If the error persists, shutdown and reboot the
controller.
-
7/28/2019 Active Robot Training Manual
21/114
21
Task: #2 Using the Robot Safely
LESSON 2.2 Preventing Operator Injury
Objective: To operate the robot safely and prevent injuries from occurring
Content:
Purpose of the Live-man Switch
Exercise: Enabling the Live-man Switch
Understanding Point of Control
Proper Training
Performing a Risk Analysis
Purpose of the Live-man Switch
When you are trying to teach locations for a system, it is necessary to get into the
robot workcell and up close to the robot in order to teach accurate locations. This
could become very dangerous if we didnt include certain safety features.
The live-man switch is just one of these safety features.
The robot can only be moved from the Teach Pendant when the live-man switch is in
the middle (enabled) position.
If the live-man switch is fully released, the system assumes that the robothas knocked the Teach Pendant from your hand. At this point, if you try tomove the robot, the arm power will cut out.
If the live-man switch is fully depressed, the system assumes you havebeen pinched in a corner by the robot or you have been electrocuted.Again, if this is the status of the live-man switch, and you try to move the
robot, the arm power will cut out.
These may seem a little severe for the relatively small size of CRS robots, but wemust follow the same safety requirements as companies that make much heavier
industrial robots.
-
7/28/2019 Active Robot Training Manual
22/114
22
Exercise: Enabling the Live-man Switch
live-man switch
enabled
position
disabledposition
disabledposition
Figure 10 The L ive-man Sw itch
Only a small amount of pressure is required to go past the second click. Be gentle!
Exercise:
1 Hold the teach pendant to your ear.
2 Slowly depress the live-man switch.3 Listen for the first click. This is the enabled position.
4 Slowly depress the live-man switch further.
5 Listen for the second click.
6 If you did not hear both clicks, repeat the exercise.
We will be using the teach pendant to manipulate the robot in Task: #3 Movingthe Robot. At that point you will be able to try moving the robot with the live-manswitch enabled.
-
7/28/2019 Active Robot Training Manual
23/114
23
Understanding Point of Control
Managed point of control is another safety feature of the robot system. By managingpoint of control, the robot system ensures that only one process can control the
robot at a time. If we take this a step further, it also ensures that only one person
can be moving the robot at any point in time.
If you try to type robot commands from a terminal while an operator is moving the
robot from the teach pendant, the robot system will prevent you from controlling the
arm until point of control is passed back from the teach pendant.
Point of control forces each process to explicitly pass control over to the next
awaiting process that needs to move the robot.
Example:
If someone is commanding the robot from the ActiveRobot Terminal, theywould need to type in pendant to pass control to the Teach Pendant.
Example:
If the controller has been running an application, and point of control was notreleased from the program, the controller would require the operator to press
the Pause/Continue button on the front of the controller. Since the controller
is normally stored in close vicinity to the robot, this forces the operator tolook in the workcell to ensure that no one is in danger from the robot.
The Three Points of Control
Three entities can have or request point of control:
The teach pendant
A process, such as ash (through ActiveRobot Terminal or other terminalconnected to the controller)
A running application
If you are using ActiveRobot Terminal, you will likely be using ash to move the robot and teachlocations. Ash is a process, which requires point of control. If you do not exit from ash before tryingto run your application, your program will not run and you will receive an error stating the resourceis busy. If you get this error, simply go into ActiveRobot Terminal and ensure that ash is no longerrunning.
-
7/28/2019 Active Robot Training Manual
24/114
24
Proper Training
It is important to remember that all robots are potentially dangerous objects. Onlyindividuals who are familiar with operating robots should be allowed in the robot
workcell while the robot is powered.
In many cases people think it is safe to approach the robot because it is not moving,but this is not always the case. The robot could be idle and waiting for an input.
When it receives the input it will start its routine and anyone standing in the way will
be in danger. This is why its important for any personnel working in the vicinity ofthe robot to be properly trained in robot safety.
Any person responsible for programming or moving the robot must be fully trained inthe operation of the robot system and robot safety issues.
Performing a Risk Analysis
As an integrator or robotics programmer, you must consider several safety
requirements when designing and building your system. To help you perform yourown risk analysis, Appendix A lists the steps that we follow at CRS when performinga risk analysis. Appendix B and Appendix C provide a list of robotics standards and
organizations which sell copies of these standards.
-
7/28/2019 Active Robot Training Manual
25/114
25
Task: #3 Moving the Robot
LESSON 3.1 Using the Teach Pendant
Objective: To activate the teach pendant and move the robot using different coordinate
systems.
Content:
Activating the Teach Pendant
Choosing an Application
Moving in Different Coordinate Systems:
The Joint Coordinate System
The World Coordinate System
The Tool Coordinate System
The Cylindrical Coordinate System
Activating the Teach Pendant
If the teach pendant is connected when you turn the controller on, the teach pendant
will automatically be active on boot-up. If the pendant is not active, you can start it
up from the ActiveRobot Terminal.
Exercise:
For the purposes of this lesson, were assuming that the teach pendant is not active, the controller isturned on, and the robot is homed.
1 Open the ActiveRobot Terminal
2 Press the Enter key on the keyboard to establish a prompt
3 At the prompt, type pendant to activate the pendant. Once the pendant isactive, you will no longer be able to type in the terminal window.
Main Menu
app motn
Choosing an Application
In order to teach locations and move the robot you need to select (or create) anapplication. This application corresponds to a directory on the controller where yourprograms and variables will be stored.
-
7/28/2019 Active Robot Training Manual
26/114
26
For this exercise, we want to create a new application.
Exercise:
1 On the teach pendant keypad, select F1 [app]
2 Use the keypad on the teach pendant to type in FIRST. This will be the namefor our application.
3 Select F1 [sel] to select first.
4 Confirm the new app by selecting F2 [yes]
5 Select F1 [edit] to enter the application
6 Select F3 [motn] to access the motion menu. The teach pendant screenshould now look like this:
Manual Menu ON
1% VEL JOINT
motn mode
Manual Menu ON
1% VEL JOINT
Now were ready to move the robot and teach locations through the teach pendant.
-
7/28/2019 Active Robot Training Manual
27/114
27
Moving in Different Coordinate Systems
A coordinate system is a way to describe the space around the arm. CRS robots canuse any of the following coordinate systems:
Joint
Cylindrical
World
Tool
Although a location can be defined using any of these coordinate systems, some aremore appropriate than others.
The coordinate system you use should depend on the task you are trying toaccomplish.
The Joint Coordinate System
The joint coordinate system is a rotational coordinate system. It is based on rotation
around each joint axis. The joints are numbered from the bottom of the robot, up.
When you are moving in the joint coordinate system, you can only move one joint ata time. Joint moves are incremental and not absolute.
That means that you can use joint commands without having to home the arm.
For A255 and A465 arms, you must home the robot system after each power up in order toestablish the arms orientation within its workspace. Without this orientation, the cylindrical, world,and tool modes are meaningless and cannot be used. F3 arms automatically retain their orientationin battery backed-up memory and do not have to be homed.
joint 1
joint 2
joint 3
joint 4
joint 5
joint 6
Figure 11 The jo int coordinate system
-
7/28/2019 Active Robot Training Manual
28/114
28
Moving the Arm in Joint Mode
The Axis keys on the teach pendant keypad are numbered, corresponding to the
joints on the arm. The + and - side of each axis key allows you to choose thepositive or negative direction for motion. When you press an axis key, the armmoves along that axis in the specified direction.
F igure 12 The Ax is and Funct ion keys
Axes 7 and 8 (or 6, 7, and 8 for an A255) correspond to additional axes like tracks or carousels thatcan be connected to the controller.
Additional axes are available as optional components for some systems.
Two motion types are available:
Velocity motion moves the arm at a constant speed for as long as you
hold down the axis key.
Jog motion moves only a few degrees each time the axis key is pressed. If
you release the axis key before the jog is complete, the robot stopswithout completing the move.
By default, the teach pendant uses velocity motion.
Exercise:
For the purposes of this lesson, were assuming that the teach pendant is in velocity joint mode. Thisis the default setting when you first enter the Motion menu.
1 Using the SPEED UP and SPEED DOWN keys on the teach pendant keypad, set thespeed to 10 or 20%
2 While holding the live-man switch in the middle (enabled) position, press anaxis + or - key. The selected joint should move.
3 Try moving each of the joints in turn.
As long as you hold the axis k ey down and k eep the Live-Man sw itch in its enabledposition, the arm will continue to move in the selected direction - unless you have reached asoftware limit or collided with something. Its best to avoid both these situations!
-
7/28/2019 Active Robot Training Manual
29/114
29
Changing motion types
In the previous example, we used the default motion type (velocity) and mode
(joint). Now lets try changing the motion type to jog.
Exercise:
1 On the teach pendant keypad, select F3 [motn]
2 Use the SPEED UP or SPEED DOWN keys to adjust the jog size. Notice that the jogsize is in degrees now.
3 While holding the live-man switch in the middle (enabled) position, press anaxis + or - key. The selected joint should move.
4 Try moving each of the joints in turn.
Youll notice that even while holding down the axis key, the robot will not move
further than the jog size. Pressing and holding the button again will move the robot
the jog size again.
The World Coordinate System
The world coordinate system is a cartesian coordinate system based on three axes
(X, Y, Z) at right angles to each other which intersect at the origin. By default, the
origin is the center of the robot mounting flange.
The origin of the world coordinate system doesnt have to be at the center of the mounting flange.For example, if the arm was mounted on a pedestal you could set the origin for the world coordinatesystem to be at the base of the pedestal. We wont discuss this in detail here, but for moreinformation, see the command BaseOffset in the ActiveRobot Online Help.
+Y
-Y
+Z
+X
-X
-Z
Figure 13 The wor ld coordinate system
In the world coordinate system, the Z axis is vertical with positive Z pointing up. TheX and Y axes are horizontal, with positive X forward away from the front of the armand positive Y to the side as shown. The relationship of X, Y, and Z follows the right-
hand rule of thumb.
-
7/28/2019 Active Robot Training Manual
30/114
30
Of course, if your arm is mounted inverted, the axes in the world coordinate system will be invertedtoo. The world coordinate system axis directions are always defined relative to the base of the arm.
Rotation Around the World Axes
Although three axes and an origin provide enough information to locate a point inspace, they dont tell us anything about the orientation of the arm at that point. Inorder to completely describe the orientation of the arm, each axis in the world
coordinate system also has a rotational component.
The actual motions are called xrot, yrot, and zrot. However, to avoid cluttering upthe teach pendant too badly, they refer to these motions as yaw, pitch and roll.
You can rotate the tool centre point around each of the world axes. The diagramsbelow demonstrate the robot moving from a location and adding rotation around
each of the world axes.
Figure 14 Rotations about the world coordinate axes
No matter what coordinate system you use for positioning the arm and teaching
locations, those locations are always stored on the controller in the world coordinate
system. However, for teaching locations, moving in world mode can be awkward.
If you are using an A255 robot, you will notice that it cannot do zrot and it also has trouble withsideways moves (i.e. Y moves when its facing forward, X moves when its turned 90 from ready).This is because the A255 only has 5 degrees of freedom.
Demonstration: Movement in World Mode
Origin with 30o zrot with 40o yrot with 20o xrot
-
7/28/2019 Active Robot Training Manual
31/114
31
Moving the Arm in World Mode
The axis keys on the teach pendant keypad are also marked X, Y, Z, YAW, PITCH, ROLL.
These are used for motions in World mode. In order to save space on the keypad,yaw, pitch and roll are used to represent xrot, yrot and zrot. As in joint mode, eachkey has a + and side to specify the direction of motion.
Unlike joint mode, when you press a key corresponding to a world axis (or itsrotational component), the arm moves all the joints necessary to move the toolflange in the selected direction.
Exercise:
5 Press F4 [mode] until the pendant screen displays VEL WORLD. You are now invelocity world mode.
6 Using the SPEED UP and SPEED DOWN keys on the teach pendant keypad, set thespeed to 10 or 20%.
7 While holding the live-man switch in the middle (enabled) position, press anaxis + or - key. The arm should move.
8 Experiment with the other motion keys as well.
The Tool Coordinate System
The tool coordinate system is also a cartesian coordinate system based on threestraight axes (X, Y, and Z) that are at right angles to each other, are related
according to the right-hand rule, and intersect at an origin. In the tool coordinate
system, the origin is defined as the center of the tool flange by default.
A255, A465F3
Figure 15 The too l coordinate system
The tool coordinate system for the F3 is defined differently from the tool coordinate system for theA255 and the A465.
Because tool mode motions are executed at the end of the arm, tool mode is
especially useful when teaching locations.
You can alter the tool center point (TCP), and the orientation of the tool axes relative to the toolflange by defining a tool transform. This will be discussed in a later lesson.
Rotation Around the Tool Axes
Each axis in the tool coordinate system also has a rotational component, shown inFigure 15. The actual motions are called yaw, pitch, and roll. As you can see yaw and
roll for the A255 and A465 are not defined the same way as yaw and roll for the F3.
-
7/28/2019 Active Robot Training Manual
32/114
32
Exercise:
1 Press F4 [mode] until the pendant screen displays JOG TOOL. You are now injog tool mode.
2 Try moving the arm in tool mode.
There is one other coordinate system that can be quite helpful when using the teachpendant; that mode is cylindrical mode.
The Cylindrical Coordinate System
Cylindrical mode allows you to rotate joint 1, change the radius of the tool withcomparison to the base, and change the height of the tool without changing thetools orientation. It saves you having to scroll between the joint and tool modes.
The cylindrical coordinate system is based on one vertical axis, Z. Locations incyclindrical mode are defined by:
A rotation component around the Z axis {Theta} A radial distance away from the Z axis {R}
A vertical distance (or height) along the Z axis. {Z}
Figure 16 The cylindrical coordinate system
Moving the Arm in Cylindrical Mode
The same keys that contain the axis numbers also contain the symbols for cylindrical
mode.
Exercise:
1 Press F3 [motn] until the motion type on the pendant screen is set to VEL.
2 Press F4 [mode] until the pendant screen displays VEL CYL. You are now invelocity cylindrical mode.
-
7/28/2019 Active Robot Training Manual
33/114
33
3 Using the SPEED UP and SPEED DOWN keys on the teach pendant keypad, set thespeed to 10 or 20%.
4 While holding the live-man switch in the middle (enabled) position, press anaxis + or - key. The arm should move.
Ill assume that you now remember about setting the speed and enabling the live-man
switch. From now on, you still have to do these steps but Ill leave them out of theexplanation.
5 Experiment with the other motion keys as well.
You can also jog the robot in cylindrical mode by pressing F3 [motn].
-
7/28/2019 Active Robot Training Manual
34/114
34
Task: #3 Moving the Robot
LESSON 3.2 Using the Application Shell
Objective: To start the application shell and command the robot using the different
coordinate systems.
Content:
Starting the Application Shell
Moving the Robot from Ash
Exiting the Application Shell
Starting the Application Shell
The application shell (ash) is accessed from the ActiveRobot Terminal. The
application shell provides a command-line interface, interpreting input from the
keyboard and output to the terminal screen. It is the command-line equivalent to theteach pendant. It allows you to move the robot, teach locations, and monitor arm
status.
When you first start the ActiveRobot Terminal, you will see a blank white screen. In
order to get a system prompt ($), press Enter on your keyboard.
If the teach pendant is active, you will not receive a prompt until you terminate control from thependant.
Exit out of the teach pendant by hitting ESC until you get to the terminate pendant controlscreen. Select F1 [yes] to transfer control back over to the terminal. Once youve exited the teachpendant, you should be able get the $ prompt up.
To start the application shell, you simply type ash followed by the name of your
application at the $ prompt. The application shell starts and opens the v3 file of the
same name as the application. The v3 file is simply the file in which your locationsare stored. The v3 file will also store variables of other data types, but is mostcommonly used for locations.
Example:
For example, to create (or load) an application called first, at the system
prompt you would enter:
$ ash first
Your prompt also changes to an application shell prompt that looks like this:
first>
From this point on, the application shell will simply be referred to as ash.
-
7/28/2019 Active Robot Training Manual
35/114
35
Moving the Robot from Ash
Since weve already discussed the different coordinate systems, this section willsimply discuss the commands used to move the arm using ash.
Joint Mode
To move in joint mode, enter:
first> joint ,
Example:
To rotate joint 1 by -45o from its current location, enter:
first> joint 1,-45
In ash, commands are case sensitive and are expected to be lower case.
World Mode
To move in world mode, you need to know what units your system uses. To find outwhat units are in use, you can use the units command. This indicates whether you
are in English/Imperial units, meaning inches, or Metric units, meaning millimeters.
Once you are aware of the units you are operating in, the robot will become so muchsafer!
Some basic world mode commands:
wx ;; moves the robot along the world X axis
wy ;; moves the robot along the world Y axiswz ;; moves the robot along the world Z axis
xrot ;; moves the robot around the world X axis
yrot ;; moves the robot around the world Y axis
zrot ;; moves the robot around the world Z axis
Example:
Assuming metric units, to move the robot 100 mm along the world Y axis, youwould enter:
first> wy 100
Tool Mode
Remember that as you move the tool, your tool coordinate system moves with it.This is important because if you were to move joint 5 by 90 o, your positive tool X
axis, for A series robots, would be pointing down towards the table. Now a positive
tool X move will bring you closer to the table, whereas in the world coordinates its anegative Z command that brings you closer to the mounting surface.
-
7/28/2019 Active Robot Training Manual
36/114
36
Moving the robot in tool mode also requires that you know what units your system uses.
Some basic world mode commands:
tx ;; moves the robot along the tool X axis
ty ;; moves the robot along the tool Y axistz ;; moves the robot along the tool Z axis
yaw ;; moves an A255/A465 around the tool Z
;; moves an F3 around the tool X axis
pitch ;; moves the robot around the tool Y axis
roll ;; moves an A255/A465 around the tool X
;; moves an F3 around the tool Y axis
The tool axis (X-axis for A255/A465, Z-axis for F3) is also known as the approach/depart axis
Cylindrical Mode
You cannot move the robot in cylindrical mode from within ash. You can only movethe robot in cylindrical mode from the teach pendant.
Exiting the Application Shell
The application shell is a process, which requires point of control of the robot system.
You will be unable to start one of your ActiveRobot applications while ash is running.Be sure to exit out of ash before going over to your application.
To exit ash, type: exit and answer yto confirm.
-
7/28/2019 Active Robot Training Manual
37/114
37
Task: #4 Understanding Locations
LESSON 4.1 Understanding ActiveRobot Locations
Objective: To understand and identify different types of locations.
Content:
Homing the robot
Understanding ActiveRobot Locations:
World Locations
Motor Locations
Robot Stance
Motor Locations
The Ready Position
How to Create Location Variables in the V3 File
Homing the robot
As mention earlier, the A255 and the A465 robots must be homed before you canmove the robot in world, tool or cylindrical modes. Homing the robot orients the arm
so it knows where it is in space. To home the robots, you type home in the
ARterminal window at the $ prompt or in ash. The A255 needs to be in the readyposition before you home the robot.
For more information on homing your particular model of arm, please refer to your
User Guide, which was delivered on the CD-ROM with your robot system.
Understanding ActiveRobot Locations
Locations are variables that contain the values of either a point in space or theorientation/positioning of the robot arm. These variables are stored in the v3 file and
remain in memory so they can be used and reused within your application. We teach
(record) locations using ash or the teach pendant.
World Locations
In Task: #3 Moving the Robot:Moving in Different Coordinate Systems, we
discussed the world coordinate system. In ActiveRobot, we use the term worldlocation to describe a location which is based on the world coordinate system.
In the case of ActiveRobot, once weve created the locations on the controller, we
copy the file containing those locations to the host computer. Each location contains
-
7/28/2019 Active Robot Training Manual
38/114
38
both the position of the tool center point (TCP) and the orientation of the arm at that
point in the workspace. These are stored as a distance (positive or negative) alongthe X, Y, and Z axes, and the orientation of the tool flange, as defined by the
rotational components xrot, yrot, and zrot.
When working with ash or the teach pendant, world locations are referred to as cloc.
This stands for cartesian location which was a term dating back to, and still used in,
RAPL-3. You will need to know this when creating locations on the controller.ActiveRobot ; however, uses the term World Location.
The data is also independent of robot stance. The location might be accessible with
the arm in different stances. In other words, a world location variable does notdefine unique robot axis positions.
Robot Stance
You may have been wondering what the purpose of two different location types is.
Well, when you use world locations, the controller only stores the end point of therobot arm (tool centre points will be discussed in Lesson 5). This means that therobot could get to the same location with several different arm orientations.
The default stance for the robot has the waist facing forward, the elbow is up and thewrist is in the noflip position. There are; however, other stances that the robot cantake. The waist could be facing backwards, the elbow could be down and the wrist
could be in the flip position.
Motor Locations
In ActiveRobot, we use the term motor location to describe a type of location,which records the encoder pulses on each motor in the arm.
Each joint contains an encoder that generates pulses as it rotates (about 200 pulses
for each degree of rotation for most non-wrist joints). Any position of the arm can be
defined by the number of precision pulses away from zero, for each joint.Zero is set at the factory with each joint at a certain position. For example, for joint
1, zero is set with the arm facing forward. Pulse counts for joint 1 can range from
+48611 to 48611 (all robots).
When working with motor locations on the teach pendant or in ash, they will be
referred to as plocs. Once again this stems from the RAPL-3 language and isnecessary to know in order to record motor locations.
-
7/28/2019 Active Robot Training Manual
39/114
-
7/28/2019 Active Robot Training Manual
40/114
40
How to Create Location Variables in the V3 File
Creating locations in ash
In order to start storing our locations, we need to create the variable names the
locations will be stored in. To do this we need to define the type of location as well asthe name.
To create a world location, enter:
new _ (note that there is a space after new)
The _ (underscore character) defines the location as a cloc in the v3 file.
There is no value associated with the location variable yet, weve only created thevariable name and defined its data type.
To create a motor location, enter:
new #
The # symbol identifies it as a ploc in the v3 file.
Creating locations with the teach pendant
1 Start the teach pendant by typing pendant in the AR Terminal window
2 Select an application.
If you were in ash when you typed pendant, you will already be in the application otherwise, youcan use F3 and F4 to scroll through the applications, or type on the keypad to create a new one.
3 Select F1 [edit]
4 Select F1 [var] to create and edit variables
5 Use the pendant keypad to type in a name for the location
6 Select F2 [type] to scroll through the data types.
7 Choose cloc to create a world location or ploc to create a motor location
8 Select F1 [make]
-
7/28/2019 Active Robot Training Manual
41/114
41
Task: #4 Understanding Locations
LESSON 4.2 Measuring the tool offset
Objective: To accurately measure the tool transform and understand the purpose for using
one.
Content:
How the Tool Transform affects locations
The Default Tool Centre Point
How to create a tool transform
How the Tool Transform affects locations
By adding a tool transform to your application, you alter the point that gets recorded
in a world location. A tool transform has no effect on motor locations. When you
apply a tool transform before teaching your locations, you shift the TCP from thecentre of the tool flange to the actual tool centre.
When discussing world locations, it was stated that world locations store the positionof the TCP in the workspace and is identified by distances (positive or negative)
along the X, Y, and Z axes from the origin. The orientation of the tool flange is
recorded as well, as xrot, yrot, and zrot. If we were to remove the transform and tryto move to the taught location again, you would see a shift in the location by the
amount of the tool transform.While locations can be taught without a tool transform, it is recommended that youuse a tool transform, as it allows you to make modification to the tool and not haveto re-teach the entire system.
Example:
If you were to break your end effector and try to replace it, the supplier may
have changed the design. If you didnt use a tool transform, you will have tore-teach every location in your workcell for the new tool. This is very time
consuming and costly. However, if you did use a tool transform, you wouldonly need to change the value of the tool transform and you would be up and
running again.
Demonstration: Using a tool transform when teaching a location
-
7/28/2019 Active Robot Training Manual
42/114
42
The Default Tool Centre Point
A tool transform informs the controller of the position of the tool center point -TCP.Without a tool transform, the controller moves the arm as if the TCP is the center
point of the tool flange surface. A tool transform is the measurements in the tool
coordinate system of the mounted tools TCP. The tool transform also includes theyaw, pitch, and roll coordinates, which define the tools orientation.
A255, A465F3
Figure 18 The too l coordinate system
By adding a tool transform, any rotation which takes place in the tool coordinatesystem, will now rotate around the TCP
When measuring the tool offset, you should record the offsets in the order tool X,tool Y, tool Z, yaw, pitch, roll. Be sure to note that the F3 tool coordinate system
is different from the A Series robots.
-
7/28/2019 Active Robot Training Manual
43/114
43
How to create a tool transform
When measuring the tool offset, be sure the units match the system units, otherwiseyour locations will not be accurate values. If the system is configured as metric, be
sure to make your measurements in millimeters. If the system is configured to
English/imperial you need to measure the offset in inches.
F igure 19 Measur ing a tool of fset
The above diagram is an example of a tool mounted on the F3 robot.
Exercise
To set the tool transform for the dispensing tool shown above, you would do the
following in ash:
1 Make sure you are in ash for your current application.
2 Create a new variable called DispenseOffset by entering:first> new _DispenseOffset
The first underscore designates it as a cloc
3 Set the values of the new variables by entering:
first> set DispenseOffset = {114, 0, 16, 0,90,0}
4 Make this the active tool offset by typing:
first> tool DispenseOffset
By doing these steps, you will be setting the tool transform in ash and creating a
variable in the v3 file. When you teach your locations, the offset will be added to thevalue of your world locations. In this particular example, you will also note that the
tool transform has a pitch of 900 which means your tool coordinate system has now
changed the tool Z axis to up and down (positive being down towards the table).
This tool offset will only remain active while the controller is powered. Once the
controller has been turned off, you need to reset the transform by repeating steps 1
and 4.
-
7/28/2019 Active Robot Training Manual
44/114
44
You will need to use the variable from the v3 file in your ActiveRobot program. This will requiredeclaring the variable and using the ToolTransform property. This is discussed in a later lesson.
You can also set the tool transform through hard code in your Visual Basic
application. In this case you would use the components of the location object to setthe transform. This would typically be part of the form_load event handler.
-
7/28/2019 Active Robot Training Manual
45/114
45
Task: #5 Teaching Locations
LESSON 5.1 Using the Teach Pendant
Objective: To record world and motor locations from the teach pendant.
Content:
Teaching World Locations through the Teach Pendant
Teaching Motor Locations through the Teach Pendant
Teaching World Locations through the Teach Pendant
Using the teach pendant, you teach locations by moving the robot to each specific
location, and entering the tch command.
1 In the application window of the pendant, press F1 [var] to enter theVariable Find screen.
2 Using the alphanumeric data keys on the pendant, enter a name for yourvariable.
3 The Var Create screen displays the variable name you entered. Press the F1[make] pendant key to create a new world location variable.
4 Press the F1 [sel] key to select the new variable.
5 Move the robot to the location you wish to teach.6 Press F1 [tch] to record this position in the variable table.
Repeat the same steps for a second location by pressing the ESC key until you return
to the Variable Find screen.
When you teach a location, the controller records the value associated with the robotarms location in space, or the position, in encoder pulses, of each axis, at the time
you select tch.
-
7/28/2019 Active Robot Training Manual
46/114
46
Teaching Motor Locations through the Teach Pendant
Teaching motor locations is done almost the same way as world locations. There isone extra step to teaching motor locations.
Exercise
1 Scroll to the Variable Find window
2 Type the name of your motor location
3 Press F2 [type] until you see ploc above the variable name.
4 Press F1 [make] to create the variable
5 Press F1 [sel] to select the variable
6 Move the robot to the desired location
7 Press F1 [tch] to store the location
-
7/28/2019 Active Robot Training Manual
47/114
47
Task: #5 Teaching Locations
LESSON 5.2 Using Ash
Objective: To be able to record world and motor locations from ash.
Content:
world locations
motor locations
Teaching World Locations from Ash
1 Make sure you are in the application shell for your application.
2 Using the motion commands in ash, move the robot to the new location.
3 To teach the location, enter:
first> here
4 Confirm the creation of your location
The here command takes the world values of the current position of the robot and
stores them in the location variable.
-
7/28/2019 Active Robot Training Manual
48/114
-
7/28/2019 Active Robot Training Manual
49/114
49
Location Arrays
An array is a collection of data objects where all are the same data type and all usethe same identifier, but each has a unique subscript. For the purposes of this class,
we will focus on location arrays; however, you can use arrays for any data type.
We discussed creation of location variables and how to teach them, it is alsoimportant to realize you can create an array of locations. Arrays not only help save
memory space, it also can significantly reduce the amount of code necessary for your
program, particularly if you are following a path or palletizing.
To create an array, you can either use the teach pendant or ash.
By creating an array, I am referring to adding the array name and size to the v3 file, not how toteach the locations. Teaching locations will be covered in Task 5.
Creating an array with the teach pendant:
1 Start the teach pendant by typing pendant in the AR Terminal window.
2 Select the application
If you were in ash when you typed pendant, you will already be in the application otherwise, youcan use F3 and F4 to scroll through the applications, or type on the keypad to create a new one.
3 Select F1 [edit]
4 Select F1 [var] to create and edit variables
5 Use the pendant keypad to type the name of the array
6 Select F2 [type] to scroll through the data types.
7 Choose either cloc (World location) or ploc (Motor location)
8 Select F3 [dim]
9 Enter the size of the array
It is possible to have two-dimensional arrays. If you only want a one-dimensional array, be sure toselect 0 as the second dimension.
10Select F1 [make]
11Select F1 [make]
12To teach a location you can use the Up Index or Down Index buttons toselect the index of the array
13Press F1 [tch] to teach that index of the array.
You should now be in the manual window. The variable name will appear at the
bottom left hand side of the screen.
-
7/28/2019 Active Robot Training Manual
50/114
-
7/28/2019 Active Robot Training Manual
51/114
51
Task: #5 Teaching Locations
LESSON 5.3 Understanding Motion Types
Objective: To differentiate between the different motion types and the reasons for using
them.
Content:
Joint Interpolated Motion
Straight Line Motion
Blended Motion
Performing Straight Line Moves
Joint Interpolated Motion
When the robot is moving in joint interpolated motion, all joints involved start and
stop at the same time. The speed of the joint that has to move the farthest is
governed by the speed setting, and other joints rotate slower according to jointinterpolation. The resulting TCP path is not straight, typically an arc. Unless youstipulate otherwise, this is the type of motion your robot will make. The following
diagram is an example of a joint interpolated motion.
F igure 20 J o int in terpo lated motion
loc
loc
-
7/28/2019 Active Robot Training Manual
52/114
-
7/28/2019 Active Robot Training Manual
53/114
53
Straight Line Motion
When moving in straight-line motion, both arm motion position and orientation arelinearly interpolated. This makes it possible to keep the payload in its current
orientation during the entire move: for example, it enables you to prevent a
container from spilling its contents during the move.
The location can be only be a world location not a motor location.
The diagram below is an example of a straight-line move between two locations.
F igure 21 Straight- line mot ion
locA
locB
-
7/28/2019 Active Robot Training Manual
54/114
54
Blended Motion
In BlendMotion mode (known as online mode in RAPL-3), the motion engineenqueues as many as eight motions. Blended motion uses a different algorithm to
calculate the path of the robot. Rather than going through, and pausing at, each
location, it calculates the line segments and blends them together. To ensure therobot actually makes it to the taught location (i.e. where you are actually picking upa part) you would require a finish method. The finish method empties the motion
queue.
You must have the BlendedMotion property enabled to move the robot in a straight line. Ifblended motion is not enabled, the straight line movement will seem a bit radical.
Definitions:
Motion Engine -
Motion queue holds up to 8 locations or output commands in a queue in order tocalculate a path based on line segments rather than points. If an
output is part of the queue, it will be turned on as the robot passesthrough the location.
Robot Server -
-
7/28/2019 Active Robot Training Manual
55/114
-
7/28/2019 Active Robot Training Manual
56/114
56
Task: #6 Understanding Active Robot
LESSON 6.1 Understanding The CRSRobot Object
Objective: To understand the CRSRobot object and how it works.
Content:
What is the CRSRobot Object?
When to use an instance of the CRSRobot.
What Happens When A Robot Command Is Issued?
Monitoring Inputs or Robot
Considerations To Be Aware Of While Polling.
What is the CRSRobot Object?
CRSRobot is an object class. ActiveRobot provides interfaces to the object class. An
instance of the CRSRobot object sends commands to, and reflects the current state
and configuration of, a single robot system by using the properties and methodsassociated with the CRSRobot object. Your application can contain multiple instancesof CRSRobot, but only one can command a robot system at a time.
The CRSRobot object has:
1 Motion commands
2 Configuration commands
3 Status commands
4 Input and output commands
For a full listing of all the commands available for the CRSRobot object, you can use
the object browser available in Visual Basic.
When to use an instance of the CRSRobot.
In your application, you cannot move the robot without having an instance of the
CRSRobot. The CRSRobot object is used to control GPIO and monitor arm status.
In the event that you want to be able to abort robot motion, or to handle inputs andoutputs which are not dependent on the motion queue, you will need to have a
second instance of the CRSRobot. You will also need a another robot object to
periodically pole the status of the robot arm if necessary.
-
7/28/2019 Active Robot Training Manual
57/114
57
What Happens When A Robot Command Is Issued?
When you create your application, you create instances of ActiveRobot componentsand you use their methods and properties to send commands to the C500C
controller. You also use instances of these components to obtain information from
the controller. When a method is invoked, the component sends binary packet that isinterpreted by the controller.
-
7/28/2019 Active Robot Training Manual
58/114
-
7/28/2019 Active Robot Training Manual
59/114
59
Task: #6 Understanding Active Robot
LESSON 6.2 Understanding The CRSV3File Object
Objective: To understand the CRSV3File object and how it works.
Content:
What is the CRSV3File Object?
Opening the CRSV3File
Using the Contents of the V3 File
Closing the CRSV3File
What is the CRSV3File Object?
The CRSV3File object class provides access to v3 files.
V3 files are used to store robot locations on the controller. In order to use the
CRSV3File object, you typically create the v3 file down on the controller using the
application shell, then you upload the file to the computer. Once the file exists on thePC, you can delete the file from the controller. The ActiveRobot Explorer makes filetransfers easy. (See section on Active Robot Explorer Task: #1
Understanding Robot System Components:ActiveRobot Terminalfor anexplanation)
Opening the CRSV3File
In order to use any of the data (e.g. locations) from the v3 file, you need to first
open the v3 file from the directory where you stored it. Lets say you stored it on theC drive on your computer under the directory, Test. Lets also assume the name of
the v3 file is test.v3. Its a good idea to give the absolute path to your v3 file just incase its not in the active directory.
-
7/28/2019 Active Robot Training Manual
60/114
60
Using the Contents of the V3 File
Once the v3 file is open, you need to set your Visual Basic variables equal to those inthe v3 file.
This is all I will say for now because this will be discussed further when we talk about
the CRSLocation object.
Closing the CRSV3File
Once youve set the variables of your Visual Basic program equal to those in the
test.v3 file, you can close the CRSV3File object. This is done very simply.
-
7/28/2019 Active Robot Training Manual
61/114
61
Task: #6 Understanding Active Robot
LESSON 6.3 Understanding The CRSLocation Object
Objective: To understand the CRSLocation object and how to use it.
Content:
What is the CRSLocation Object
How to Use a CRSLocation
Understanding Abort Methods
What is the CRSLocation ObjectThe properties of the CRSLocation object define world and motor locations in therobot workspace. Using the properties described in the ActiveRobot help file , you
can access the individual elements of the location, find out what type it is, and
modify it.
How to Use a CRSLocation
In the majority of situations, you will be using locations you taught in the v3 file
which was uploaded from the controller. In order to do this, you need to set theVisual Basic variables equal to the values of the locations in the v3 file.
It is important to realize that there are several components to a CRSLocation object.
Each location object contains 8 elements. In the case of a World location, theycontain the elements X, Y, Z, Zrot, Yrot, Xrot, E1, E2. In the case of a Motor location,they contain the elements Axis1, Axis2, Axis3, Axis4, Axis5, Axis6, Axis7, Axis8.
Each one of these axes refers to the number of motor pulses recorded for that
location. It is these elements that allow us to edit locations from within our program.
Definitions:
E1 Extra axis 1 (typically a track)
E2 Extra axis 2 (8th axis is typically used if you have the robot on a gantry)
-
7/28/2019 Active Robot Training Manual
62/114
62
Understanding Abort Methods
While the robot is moving you may need to halt the robot motion without cutting armpower. You may also want to be able to restart the program.
In ActiveRobot, due to the issues with point of control, you cannot process abort
commands simply by invoking your primary CRSRobot object's Abort method while itis processing another method. Instead, you must invoke the Abort method from
another CRSRobot object. The Abort method will stop robot motion immediately
without turning arm power off.
If you need to stop the arm immediately due to risk of injury, you should always use the emergencystop button to cut arm power and halt the robot. By using the emergency stop, you will also limp
joint 1, which allows you to move the robot away from the point of collision.
The error handling is done using On Error Goto in Visual Basic and the abort state is
cleared using the ClearAbort method.
-
7/28/2019 Active Robot Training Manual
63/114
63
Task: #6 Understanding Active Robot
LESSON 6.4 Robot and Location Object Properties
Objective: To understand the properties for the CRSRobot and the CRSLocation objects.
Content:
Aspects of the Robot Configuration
Details To Be Aware Of When Changing The Configuration
How to Find List of ActiveRobot Methods and Properties
Aspects of the Robot ConfigurationThere are several items involved with configuring your system. They are as follows:
What units do you want your system to operate in? (Metric or Imperial)
Does your system need to run a CRS track?
Are you going to be running a servo gripper or an air gripper?
Will you be using a force sensor?
Are you running extra axes from the controller?
When you first receive your robot system, it comes configured with default values.
The default settings for the A255/A465: Units are in imperial
Gripper is configured for air
The default settings for the F3:
Units are metric
Gripper is configured for air
If you have ordered a track or a force sensor, your system will already be configured
to support these items.
You will need to reconfigure your system if you have a servo gripper, or if you would
like to work in the opposite units. You may also need to reconfigure the system ifyou are adding extra axes to the robot. In this case, you would need to order the
option for an extra axis.
-
7/28/2019 Active Robot Training Manual
64/114
64
Details To Be Aware Of When Changing The Configuration
Configuring your system can be done through thesystem shell (CROS) orby using Active Robot methods and properties from within a program.
When you teach world locations, they are recorded in the units you have
configured your system to. If you change the configuration of the robotafter teaching the locations, the locations will no longer be valid.
If you are running a non-CRS track you need to make sure you dont tell
the system you have a track. In this case you would simply tell thesystem you have an extra axis.
If you are configuring your system to operate with a servo gripper, youneed to make sure you calibrate the gripper to the units you will be using.
How to Find List of ActiveRobot Methods and Properties
The nice thing about using ActiveRobot with a programming language such as Visual
basic, is the ability to see all the methods and properties for a particular object.Visual Basic contains a feature called object browser.
To open the object browser you can do one of two things:
1 Press F1
2 Under the project drop down menu, select object browser.
Once in the object browser, you can click on the object class and a list of all the
methods and properties will be displayed. By clicking on the method or property, the
object browser will display the arguments necessary, and the function of the
command, in the bottom of the screen.
-
7/28/2019 Active Robot Training Manual
65/114
-
7/28/2019 Active Robot Training Manual
66/114
-
7/28/2019 Active Robot Training Manual
67/114
-
7/28/2019 Active Robot Training Manual
68/114
68
Saving the Project
To save the Visual Basic project, use the File drop down menu and select Save
Project As. The first thing it will ask you to do is name the form. The standard
naming convention for forms is to use the prefix frm then the form name. For the
purposes of training, well call it frmFirst. As you can see, it opens up the activedirectory. To save it to the First App directory, you will need to browse the c: drive.Once youve opened the correct directory, click the save button. The next thing it will
ask you to do is name the project. The standard naming of projects, involves theprefix vbp. Well call the project vbpFirst for now. Click save once youve filled inthe project name.
Now that weve saved our application, with the reference to the ActiveRobot library,
we should close down Visual Basic. The reason for doing this, is to change the activedirectory to the First App directory. Now, using windows explorer, find the first app
directory, and open your project from there. This will start up Visual Basic, but you
will now have the First App directory active. You must do this so your project knowswhere to look for certain files, especially the V3 file.
Now we can start building the form.
-
7/28/2019 Active Robot Training Manual
69/114
69
Task: #7 Programming
LESSON 7.3 Building a Form
Objective: To identify and use the standard Visual Basic controls and edit the properties to
make the form look the way we would like.
Content:
Adding Controls to the Form
Setting the Properties of the Form and Controls
Adding Controls to the Form
Were going to keep our form pretty simple for now.
Example:
Add three command buttons to your form.
1 Click the CommandButton control on the toolbox
2 Place your cursor on the form
3 Holding the left mouse button down, drag until the button is the size youwant
4 Repeat for other two buttons
5 Add two labels to the form following the same steps as above but with thelabel controls
6 Position the labels side by side
7 Add a timer to the form as well
The timer will not appear on the form at run time but it will allow us to do timedevents.
-
7/28/2019 Active Robot Training Manual
70/114
70
Setting the Properties of the Form and Controls
To change the properties of the form and controls, we are going to be using theproperties window. This is usually located on the right hand side of the screen under
the project explorer.
F igure 22 Sett ing proper ties
Properties can also be set or changed in your program code at run time.
Firstly, lets change the name and caption of each of the controls so they are moredescriptive.
We want one of the buttons to be a START button, one to be a ABORT button andone to be a READY button. We also want the labels to monitor the status of arm
power.
Properties window
Project Explorer
-
7/28/2019 Active Robot Training Manual
71/114
-
7/28/2019 Active Robot Training Manual
72/114
72
Task: #7 Programming
LESSON 7.4 Writing Code
Objective: To write code specific for a robot application.
Content:
Declaring Variables
Setting up Form_Load Event
Opening the V3 file
Writing the Main Robot Application
Step 3 Add Inputs and Outputs
Adding Timed Polling of Robot Status
Deselecting Controls during Robot Operations
Aborting Robot Motion
Shutdown of the Controller
Declaring Variables and Objects
It is a good idea to declare all your location, robot, and v3File objects in the option
explicit portion of your code.
In Task: #6 Understanding Active Robot, we looked at the different objectsassociated with Active Robot. What were going to do now is create a whole
application piece by piece starting with the declarations.
For our application, we are going to have six locations, four World Locations and twoMotor Locations. We are also going to have two robot objects, one for motion, and
one for monitoring status. Thirdly, we will need a CRSV3File object.
To view the code window of your form, press F7 or press the view code window iconon the project explorer window. Double clicking the form will work too.
-
7/28/2019 Active Robot Training Manual
73/114
73
Under (General) (Declarations) add the following lines:
Option Explicit
Dim Motion_Robot As New CRSRobot
Dim Status_Robot As New CRSRobot
Dim FirstV3 As CRSV3File
Dim locA1 As CRSLocation
Dim locA2 As CRSLocation
Dim locB1 As CRSLocation
Dim locB2 As CRSLocation
Dim locSafeA As CRSLocation
Dim locSafeB As CRSLocation
If you are working with modules and subroutines, it is a good idea to declare the
robot objects in the module and declare them as public so the entire project hasaccess to them.
-
7/28/2019 Active Robot Training Manual
74/114
74
Setting up Form_Load Event Handler
The Form_Load event is very handy for setting the value for variables that will beused for the duration of the application. For example, setting the location variables
equal to those in the V3 file.
The first step is to open the V3 file in order to access the contents.
Private Sub Form_Load()
FirstV3.Open ("test.v3"), v3fOpen
set locA1 = FirstV3.Location (a1)
set locA2 = FirstV3.Location (a2)
set locB1 = FirstV3.Location (b1)
set locB2 = FirstV3.Location (b2)
set locSa feA = FirstV3.Location (safe_a)
set locSafeB = FirstV3.Location (safe_b)
FirstV3.CloseEnd Sub
The locations from the v3 file must be taught and copied to the host PC before the program can berun. See Task: #5 Teaching Locations andTask: #7 Programming:Transferring the V3 File fromthe Controller to the Host computer
-
7/28/2019 Active Robot Training Manual
75/114
75
Writing the Main Robot Application
Were going to start off with a very basic pick and place application. When the
START button is pressed, the pick and place application will execute.
Step 1 Add Tool Transform
The first part of a well-written application is to add the tool transform to your code.(You must have used a tool transform when teaching locations or this will affect yourprogram in a negative way)
It makes sense to add the tool transform to the form load event as well as setting
the location variables unless you are changing the tool periodically in your programand thereby changing the tool transforms.
There are two ways to set the tool transform. One way is to create a variable in the
v3 file and reference it in you Visual Basic program. The other way is to create a newlocation object, define it as a world location and declare each element of the
transform in your code and then set the tool transform equal to the location object.
Set Tool = Motion_Robot.WorldLocation Makes the location aworld location
Tool.x = 160 Sets the value of the x element of the toollocation
Tool.y = 0
Tool.z = -30
Tool.zrot = 0 same as yaw in tool coordinates
Tool.yrot = 0 same as pitch
Tool.xrot = 0 same as roll
Set Motion_Robot.ToolTransform = Tool activates the tool
transformBe forewarned, if the robot is not homed, this code with cause your program to fail. It may be betterto set the tool transform in the other subroutines.
Step 2 Move the Robot
The next step is to add the code to move the robot. To do this you can select
cmdStart from the left list box, in the code window, and click from the right list
box.
Now, what we want to do is move to the locSafeA followed by moving to locA1,
approaching locA2 and finally moving to locA2. Once at location locA2, we want topick up the object. Then we want to rise up by 20 mm and go back through the
points.
-
7/28/2019 Active Robot Training Manual
76/114
76
Private Sub cmdStart_Click()
Motion_Robot.Move locSafeA
Motion_Robot.MoveStraight locA1
Motion_Robot.ApproachStraight locA2, 50
Motion_Robot.MoveStraight locA2
Motion_Robot.Finish ftTight
Finish the move before the GripperClose starts
Motion_Robot.GripperClose 70
Motion_Robot.GripperFinish
Motion_Robot.JogToolStraight taZ, 75 rise up in tool Z (Aseries robots)
Motion_Robot.MoveStraight locA1
Motion_Robot.Move locSafeA
Motion_Robot.Finish
Motion_Robot.ControlRelease
End Sub
Exercise:
1 Create the place portion of the program using the b related locations (i.e.locSafeB, locB1, locB2).
2 Add the code for the Ready button.
Step 3 Add Inputs and Outputs
Under Option Explicit, in a new module, add the following line to access the function
sleep from a system dll. We will need this to wait for the input before starting.
Public Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds AsLong)
Private sub cmdStart_click ( )
While Motion_Robot.Input(1) = False
program would sit here until door closes
Sleep (100)
Wend
To turn an output on as you pass through a location, you would use the
motion_robot object and add the output command to the motion queue. As long asyou are only using one process to operate the robot and turn the output commands
on, you can use the primary motion_robot. If there is any chance of two calls goingto the robot server at the same time, i.e. using a timer, you must use a second robot
object. In the event this could happen and you are already using a timer to monitoran input you will have to add a third CRSRobot object to handle the outputs.
To turn an output on as part of the motion queue, the command would look as
follows:
motion_robot.Output (6) = True
-
7/28/2019 Active Robot Training Manual
77/114
-
7/28/2019 Active Robot Training Manual
78/114
-
7/28/2019 Active Robot Training Manual
79/114
79
Deselecting Controls during Robot Operations
As I mentioned in the previous section, you want to avoid nesting calls. In order toprevent nested calls, we need to disable the buttons as soon as we press a command
button. To do this, use the CommandButton.enabled property at the beginning of the
subroutines.
Example:
cmdStart.Enabled = False
cmdReady.Enabled = False
Once a subroutine is completed, you will need to re-enable the buttons so you can
continue to use the program. This requires setting the enabled property to true.
cmdStart.Enabled = True
cmdReady.Enabled = True
The only button you want to leave active while the robot is moving, is the abort
button, which will be discussed next.
Exercise:
Disable all the buttons, except the ABORT button, at the beginning of each of thesubroutines that involve robot motion.
Re-enable the buttons at the end of these subroutines.
This should affect the cmdStart_click and the cmdReady_click subroutines.
-
7/28/2019 Active Robot Training Manual
80/114
80
Aborting Robot Motion
Obviously, we want some way to stop robot motion while the program is runningwithout having to use an e-stop. Because the robot server will be busy executing a
robot move, you need to create an additional robot object to perform the Abort
method.
Exercise:
1 Add a third robot object, Abort_Robot, to the general declarations define aspublic
2 Edit the cmdAbort_click subroutine to include the Abort method
-
7/28/2019 Active Robot Training Manual
81/114
-
7/28/2019 Active Robot Training Manual
82/114
82
Task: #8 Debugging Code
LESSON 8.1 Understanding Error Codes
Objective: To understand when errors are likely to occur and what the errors mean.
Content:
Causes of errors
Identifying the error codes
Understanding what they mean
Common Causes of ErrorsWhen working with ActiveRobot, you have added concerns when it comes to errors.Not only do you have possible errors from your computer but you also now have the
added errors from the robot and controller. These errors are usually caused by
programming oversights.
One of the most common errors that occur is due to tool transforms. In many casespeople will forget to teach their location with a tool transform, but still add it to theirapplication. Sometimes the reverse happens and the user has a transform on when
they teach the locations, but forget to add it to their application. In both these
instances, you will likely get an error message saying the location is out of reach, orjoint limit exceeded. If neither of these error messages appears but the location is
out by about the size of the end effector, this could still be your problemThe other errors that are common are illegal straight line moves. This happens whenyou try to move to a motor location in a straight line. The motion engine does notallow this. You can only move to a motor location in joint interpolated motion.
-
7/28/2019 Active Robot Training Manual
83/114
-
7/28/2019 Active Robot Training Manual
84/114
84
AsynchError
Error Code
Error Description
Error Number
Most Common Causes
ecInvalidArgument "invalid argument"
-1610612714
Command could be looking for adifferent data type then theinformation given.
Syntax of command could be wrong
ecJointLimitExceeded "Joint %d limit exceeded"
-1610350591
Tool transform may not be setaccurately
Locations taught while ro