user manual statemachine add-in 1 · robotstudio simulation to use the virtual controller system...

14
2018-10-31 1/14 ROBOTWARE ADD-IN User Manual StateMachine Add-In 1.0 Contents Requirements ...................................................................................................................................................... 2 Overview .............................................................................................................................................................. 2 RAPID Modules and Configurations ......................................................................................................................... 3 State Machine Illustration ......................................................................................................................................... 6 Example 1: ............................................................................................................................................................... 6 Example 2: ............................................................................................................................................................... 6 System Installation ............................................................................................................................................. 7 Step 1: Controllers ........................................................................................................................................................ 7 Step 2: Products .......................................................................................................................................................... 8 Step 3: Licenses ........................................................................................................................................................... 9 Step 4: Options ...........................................................................................................................................................10 Step 5: Confirmation ................................................................................................................................................. 11 RobotStudio Simulation ................................................................................................................................... 12 Step 1: Add System .................................................................................................................................................... 12 Step 2: Configuration (Optional) ............................................................................................................................ 12 Step 3: Simulation ...................................................................................................................................................... 12 External Resources ........................................................................................................................................... 13 Documentation ........................................................................................................................................................... 13 Open Source Resources ............................................................................................................................................ 13 Acknowledgements .......................................................................................................................................... 14

Upload: others

Post on 21-Apr-2020

13 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

2018-10-31 1/14

— ROBOT WARE ADD -IN

User Manual

StateMachine Add-In 1.0

Contents

Requirements ...................................................................................................................................................... 2

Overview .............................................................................................................................................................. 2 RAPID Modules and Configurations ......................................................................................................................... 3 State Machine Illustration ......................................................................................................................................... 6

Example 1: ............................................................................................................................................................... 6 Example 2: ............................................................................................................................................................... 6

System Installation ............................................................................................................................................. 7 Step 1: Controllers ........................................................................................................................................................ 7 Step 2: Products .......................................................................................................................................................... 8 Step 3: Licenses ........................................................................................................................................................... 9 Step 4: Options ........................................................................................................................................................... 10 Step 5: Confirmation ................................................................................................................................................. 11

RobotStudio Simulation ................................................................................................................................... 12 Step 1: Add System .................................................................................................................................................... 12 Step 2: Configuration (Optional) ............................................................................................................................ 12 Step 3: Simulation ...................................................................................................................................................... 12

External Resources ........................................................................................................................................... 13 Documentation ........................................................................................................................................................... 13 Open Source Resources ............................................................................................................................................ 13

Acknowledgements .......................................................................................................................................... 14

Page 2: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 2/14

Requirements • RobotWare 6.06 or higher.

Overview This RobotWare Add-In provides a state machine implementation, which listens for changes in certain

IO-signals. Most of the IO-signals are coupled with requesting transition into different states. State

transitions are only made if allowed, and this depends on the currently active state.

If the Add-In has been selected during system installation, then several RAPID modules and

configurations will be loaded into the system. Each motion task in the system receives its own instances

of each module that is loaded.

Several base modules and configurations are always loaded. Additional modules and configurations

might also be loaded depending on specifications of the system. I.e.:

Robot(s):

• Single robot.

• Multiple robots.

• Dual armed robot.

RobotWare Options:

• Externally Guided Motion (689-1).

RobotWare Add-Ins:

• SmartGripper (only versions 3.52, 3.53 and 3.54 are currently supported).

The combination of the RAPID modules and configurations compose several services, which provides

ease-of-use of some robot controller functionality.

The state machine implementation is intended to be used in combination with external component(s),

which are using Robot Web Services (RWS) and (optionally) Externally Guided Motion (EGM) for

communication with the robot controller. An external component can for example be a C++ program

executing on a user’s own computer.

In short: RWS is an interface for more general communication (e.g. reading/writing IO-signals and

RAPID program data, starting/stopping the RAPID program, reading robot controller status etc.). On the

other hand, EGM is an interface used for more specialized communication (i.e. streaming motion

references for direct motion control).

There are several other options for communication between external components and ABB robot

controllers, but as mentioned earlier this Add-In is intended be used with RWS and (optionally) EGM.

See the External Resources section for some useful information concerning usage of EGM and RWS.

Page 3: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 3/14

RAPID Modules and Configurations

The following tables specify the RAPID modules and the configurations loaded by the Add-In. The tables

also indicate the dependencies for each item. Noteworthy information is highlighted in red.

Table 1: RAPID modules.

Dependency Module Comment

Base TRobMain.mod Contains the state machine loop.

Base TRobUtility.mod Provides utility functionality.

Base TRobRAPID.mod Facilitates the execution of RAPID routines.

Base TRobWatchdog.mod Watchdog for checking the status of external

components (deactivated by default).

Base TRobSystem.sys Provides functionality for system specific RAPID routines.

Base TRobSystemExample.sys Examples of system specific RAPID routines and data.

EGM TRobEGM.mod Setup and activation of EGM motions.

SmartGripper TRobSG.mod Interaction with a SmartGripper.

Table 2: Configurations (communication domain).

Dependency Type Instance (first attribute) Comment

EGM Transmission

Protocol

ROB_X Settings for the robot controller’s

internal EGM clients. X depends

on the number of robots in the

system. Important for a user to

update, with correct remote IP-

address (to an external EGM

server).

Table 3: Configurations (controller domain).

Dependency Type Instance (first attribute) Comment

Base Event Routine Quick Stop When a quick stop event occurs,

then a routine will be executed to

reset the watchdog’s internal

signals.

Base

EGM

SmartGripper

Automatic

Loading of

Modules

TRobX.mod Indicates which RAPID module are

loaded into the system. X

depends on the installed system.

Table 4: Configurations (motion domain).

Dependency Type Instance (first attribute) Comment

EGM External Motion

Interface Data

ROB_X For applying filter to EGM motion

references. X depends on the

number of robots in the system.

EGM External Motion

Interface Data

ROB_X_RAW For using raw (no filter) EGM

motion references. X depends on

the number of robots in the

system.

Page 4: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 4/14

Table 5: Configurations (I/O system domain).

Dependency Type Instance (first attribute) Comment

Base Signal RUN_RAPID_ROUTINE Used by an external component

to request the execution of a

RAPID routine.

Base Signal OUTPUT_STATIONARY_ROB_X Indicates if a mechanical unit is

moving or not. X depends on the

number of robots in the system.

Base Signal WD_EXTERNAL_STATUS Used by an external component

to update its status. Checked by

the watchdog periodically.

Base Signal WD_STOP_REQUEST Used by an external component

to request a stop of the system.

The stop is handled by the

watchdog.

Base Signal WD_STOP_TRIGGER Used by the watchdog to signal

a stop of the system.

Base Signal WD_STOP Internal signal (used to stop the

system).

Base Signal Input WD_STOP Internal signal input (used to

stop the system).

Base Cross

Connection

WD_STOP_CC Internal cross-connection (used

to stop the system).

Base Signal Output OUTPUT_STATIONARY_ROB_X Internal signal output (indicates

if a mechanical unit is moving or

not). X depends on the number

of robots in the system.

EGM Signal EGM_START_JOINT Used by an external component

to request the start of EGM joint

motions.

EGM Signal EGM_START_POSE Used by an external component

to request the start of EGM pose

motions.

EGM Signal EGM_STOP Used by an external component

to request the stop of an active

EGM motion.

SmartGripper Signal RUN_SG_ROUTINE Used by an external component

to request execution of a

SmartGripper routine.

Page 5: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 5/14

Table 6: Configurations (man-machine communication domain).

Dependency Type Instance (first attribute) Comment

Base Most Common

I/O Signal

RUN_RAPID_ROUTINE For ease-of-access (primarily

during testing).

Base Most Common

I/O Signal

OUTPUT_STATIONARY_ROB_X For ease-of-access (primarily

during testing).

Base Most Common

I/O Signal

WD_EXTERNAL_STATUS For ease-of-access (primarily

during testing).

Base Most Common

I/O Signal

WD_STOP_REQUEST For ease-of-access (primarily

during testing).

EGM Most Common

I/O Signal

EGM_START_JOINT For ease-of-access (primarily

during testing).

EGM Most Common

I/O Signal

EGM_START_POSE For ease-of-access (primarily

during testing).

EGM Most Common

I/O Signal

EGM_STOP For ease-of-access (primarily

during testing).

SmartGripper Most Common

I/O Signal

RUN_SG_ROUTINE For ease-of-access (primarily

during testing).

Page 6: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 6/14

State Machine Illustration

The following is an illustration of the different states, and how the state transitions are made.

Figure 1: Sketch of the state machine and state transitions. The EGM section is only included if the EGM

option exists in the system.

Example 1: When the IO-signal RUN_RAPID_ROUTINE goes from 0 to 1, and the state machine is in the idle state,

then the program will attempt to execute the desired RAPID routine (specified by setting RAPID

variable(s) beforehand). If the RAPID routine has been added to list of known routines, then the state

machine enters the corresponding state and executes the routine. If the routine is non-blocking, then

the state machine doesn’t change state.

Note: There are some predefined RAPID routines in the TRobRAPID.mod module, and additional routines

can be added by the user in the TRobSystem.sys module.

Example 2: If using EGM, then when either of the IO-signals EGM_START_JOINT, and EGM_START_POSE goes from 0

to 1, and the state machine is in the idle state, then the program will start the desired EGM motion

session. The robot controller starts by sending out a feedback message to the external EGM server.

If no reply is sent by the EGM server, then a timeout occurs, and the robot controller ends the EGM

motion session, and the state machine goes back to the idle state.

If the EGM server replies with motion references, then the robot moves according to the references. The

EGM motion session continues until either the predefined EGM conditions are met, a timeout occurs or

the IO-signal EGM_STOP goes from 0 to 1. When the EGM motion session ends, then the state machine

goes back the to idle state.

Note: The TRobEGM.mod module contains several parameters that should be updated to meet the

needs of the user.

Page 7: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 7/14

System Installation Installation of a virtual controller (used for simulations) will be used as an example. The installation

process for a real robot controller is practically identical, with a few differences that will be highlighted

in red.

The StateMachine Add-In is assumed to have been added to RobotStudio, so that it is available during

system installation. This can be verified by: RobotStudio Add-Ins tab Check if “StateMachine

<version>” is included in the Installed Packages list.

The Installation Manager will be used to install the system: RobotStudio Controller tab Installation

Manager.

Step 1: Controllers

Under the Virtual tab, add a new virtual controller system, name the system and press Next.

For a real robot controller, use the Network tab and find your controller. If it doesn’t show up, make

sure that there is a network connection to the physical controller. Add a new system (remove an old

system if required to free up memory), name the system, and press Next.

Figure 2: Create a new system.

Page 8: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 8/14

Step 2: Products

Add the RobotWare product and the StateMachine Add-In, as well as any additional products. Do this by

pressing Add… and find the desired products. If the StateMachine Add-In doesn’t show up, abort the

installation and add it to RobotStudio’s installed packages.

Figure 3: Add products.

Figure 4: Find the product in the list.

Page 9: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 9/14

Figure 5: After all desired products has been added, press Next.

Step 3: Licenses

For a virtual system, then a preadded virtual license is used. Press Next to continue.

For a real robot controller, the license list will be empty. Press Add… to add the license(s) for your

physical robot controller. Press Next to continue.

Figure 6: Add licenses.

Page 10: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 10/14

Step 4: Options

Add the desired system options (e.g. 689-1 Externally Guided Motion (EGM)), and the desired robot

type(s), and any application desired options.

For a real robot controller, the options included in the license(s) should have automatically been

selected. Add any additional desired open options.

Figure 7: Select system options.

Figure 8: Select robot type(s).

Page 11: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 11/14

Step 5: Confirmation

Verify that all the desired settings have been made, then press Apply. Wait until the system installation

has been finished. Finally, close the Installation Manager.

For a real robot controller, verify that all the desired settings have been made, then press Apply.

Follow the instructions and wait until the system installation has been finished (can take a while).

Finally, close the Installation Manager.

Figure 9: Confirm the settings.

Page 12: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 12/14

RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a

RobotStudio station.

Step 1: Add System

Follow these steps to add the virtual controller system to a RobotStudio station.

1. RobotStudio File tab New Create a Solution with an Empty Station or an Empty Station.

2. RobotStudio Home tab Robot System Exisiting System...

a. Find the system Press Ok.

b. Wait until the system has been added to the station.

Step 2: Configuration (Optional)

If using EGM, then it is important to update the UDP communication configuration(s).

• RobotStudio Controller tab Configuration Communication Transmission Protocol

Update all the ROB_X instances (X depends on the number of robots in the system).

o The type must be UDPUC.

o The Remote Address (to the external EGM server) is important to set correctly.

o The Remote Port (to the external EGM server) is important to set correctly.

After the configuration(s) has been updated, and the controller has been restarted, then the controller’s

EGM client(s) should be able to communicate with the external EGM server(s).

Step 3: Simulation

Start a simulation by etiher:

• RobotStudio Simulation tab Press Play.

• RobotStudio RAPID tab Program Pointer Set Program Pointer to Main in all tasks, and

then press Start.

When the simulation has started, then the state machine will begin with initialization, and then enter an

idle state. Trigger a state request by setting any of the following IO-signals from 0 to 1:

• RUN_RAPID_ROUTINE.

• Only avialable if using EGM:

o EGM_START_JOINT.

o EGM_START_POSE.

o EGM_STOP.

• Only avialable if using SmartGripper:

o RUN_SG_ROUTINE.

Tips:

• Trigger IO-signals manaully with the I/O Simulator.

o RobotStudio Simulation tab I/O Simulator.

o It is useful to create a User List (Filter User List Edit Lists... Add desired IO-

signals).

• Activate the Operator Window (to see printouts from the state machine RAPID program).

o RobotStudio Controller tab Operator Window.

Page 13: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 13/14

External Resources

Documentation

See the online documentation (http://developercenter.robotstudio.com/webservice/api_reference) for

a detailed description of Robot Web Services (RWS).

See the Application manual - Controller software IRC5 for a detailed description of Externally Guided

Motion (EGM).

Open Source Resources

Two open source C++ communication libraries can be used together with systems based on the

StateMachine Add-In. And they are called abb_librws and abb_libegm, for RWS and EGM communication

respectively. The abb_librws library provides a user-friendly interface, which has been designed

especially for the Add-In.

The libraries are available on GitHub:

• https://github.com/ros-industrial/abb_libegm

• https://github.com/ros-industrial/abb_librws

Figure 10: Overview sketch of robot controller, and the RWS and EGM C++ libraries. The StateMachine

Add-In sets up the robot controller with RAPID modules and necessary system configurations.

Page 14: User Manual StateMachine Add-In 1 · RobotStudio Simulation To use the virtual controller system installed in the previous section it needs to be added to a RobotStudio station. Step

USER MANUAL

2018-10-31 14/14

Acknowledgements The core development has been supported by the European Union's Horizon 2020 project SYMBIO-TIC

(http://www.symbio-tic.eu).

The SYMBIO-TIC project has received funding from the European Union's Horizon 2020 research and

innovation programme under grant agreement no. 637107.

Figure 11: Logo of SYMBIO-TIC.

The distribution process has been supported by the European Union's Horizon 2020 project ROSIN

(http://rosin-project.eu).

The ROSIN project has received funding from the European Union's Horizon 2020 research and

innovation programme under grant agreement no. 732287.

Figure 12: Logo of ROSIN.

The opinions expressed in this document reflects only the author's view and reflects in no way the

European Commission's opinions.

The European Commission is not responsible for any use that may be made of the contained

information.