User Manual StateMachine Add-In 1 · USER MANUAL 2019-12-04 2/14 Requirements • RobotWare 6.09 or...
Transcript of User Manual StateMachine Add-In 1 · USER MANUAL 2019-12-04 2/14 Requirements • RobotWare 6.09 or...
2019-12-04 1/14
— ROBOT WARE ADD -IN
User Manual
StateMachine Add-In 1.1
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
USER MANUAL
2019-12-04 2/14
Requirements • RobotWare 6.09 or higher (less than RobotWare 7.0).
• One or more ABB robots.
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 transitions 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 the modules that are loaded for such tasks. An optional watchdog implementation can be selected
during system installation. The watchdog is loaded into a separate task for multitask systems, and into
the main task for non-multitask systems.
Several core modules and configurations are always loaded. Additional modules and configurations
might also be loaded depending on specifications of the system. For example:
Robot(s):
• Single robot.
• Multiple robots.
• Dual armed robot (IRB14000).
RobotWare Options:
• Multitasking (623-1).
• Externally Guided Motion (689-1).
• Leadthrough.
RobotWare Add-Ins:
• StateMachine option: Watchdog.
• SmartGripper (only versions 3.52, 3.53, 3.54, 3.55 and 3.56 are currently supported).
The combination of the RAPID modules and configurations compose several services, which are
intended to provide ease-of-use of a subset of the robot controller’s functionalities.
The state machine implementation is intended to be used in combination with external component(s),
which are using Robot Web Services 1.0 (RWS1) 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: RWS1 is an interface for 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 specialized communication (e.g. 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 to be used with RWS1 and (optionally) EGM.
See the External Resources section for some useful information concerning usage of RWS1 and EGM.
USER MANUAL
2019-12-04 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. The “_X”
suffix depends on either the number of robots in the system, or the selected options.
Table 1: RAPID modules.
Dependency Module Comment
Core TRobMain.mod The StateMachine’s main loop.
Core TRobUtility.mod Provides utility features.
Core TRobRAPID.mod Facilitates execution of RAPID routines.
Core TRobSystem.sys Facilitates execution of system specific RAPID routines.
Core TRobSystemExample.sys Examples of system specific RAPID routines and data.
Watchdog TRobWatchdog.mod Watchdog, for watching external status signals (used in
non-multitask systems).
Watchdog TWatchdogMain.mod The watchdog’s main loop, for watching external status
signals (used in multitask systems).
EGM TRobEGM.mod Facilitates execution of EGM RAPID routines.
SmartGripper TRobSG.mod Facilitates execution of SmartGripper RAPID routines.
Table 2: Configurations (communication domain).
Dependency Type Instance (first attribute) Comment
EGM Transmission
Protocol
ROB_X The robot controller’s EGM
settings. Important for a user to
update with the correct remote
IP-addresses after installation.
Table 3: Configurations (controller domain).
Dependency Type Instance (first attribute) Comment
Core
EGM
SmartGripper
Automatic
Loading of
Modules
TRobX.mod/TRobX.sys Indicates which RAPID module are
loaded into motion task(s).
Watchdog Event Routine Quick Stop When a quick stop event occurs,
then a routine is executed to
reset the watchdog’s status.
Watchdog Task T_WATCHDOG Specifies a watchdog task (used
in multitask systems).
Watchdog Automatic
Loading of
Modules
TWatchdogMain.mod Loads the watchdog task’s main
RAPID module (used in multitask
systems).
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.
EGM External Motion
Interface Data
ROB_X_RAW For using raw (non-filtered) EGM
motion references.
USER MANUAL
2019-12-04 4/14
Table 5: Configurations (I/O system domain).
Dependency Type Instance (first attribute) Comment
Core Signal RUN_RAPID_ROUTINE Used by an external component
to request the execution of a
RAPID routine.
Core Signal OUTPUT_STATIONARY_ROB_X Indicates if a mechanical unit is
moving or not.
Core Signal Output OUTPUT_STATIONARY_ROB_X Internal signal output (indicates
if a mechanical unit is moving or
not).
Watchdog Signal WD_EXTERNAL_STATUS Used by an external component
to set its status. Periodically
checked by the watchdog (if
activated and set to do so).
Watchdog Signal WD_STOP_REQUEST Used by an external component
to request a stop of the system.
The stop is handled by the
watchdog (if activated).
Watchdog Signal WD_STOP_TRIGGER Used by the watchdog to signal
a stop of the system.
Watchdog Signal WD_STOP Internal signal (used to stop the
system).
Watchdog Signal Input WD_STOP Internal signal input (used to
stop the system).
Watchdog Cross
Connection
WD_STOP_CC Internal cross-connection (used
to stop the system).
EGM Signal EGM_START_JOINT Used by an external component
to request start of EGM joint
motions.
EGM Signal EGM_START_POSE Used by an external component
to request start of EGM pose
motions.
EGM Signal EGM_START_STREAM Used by an external component
to request start of EGM position
streaming (i.e. no motions).
EGM Signal EGM_STOP Used by an external component
to request stop of EGM motions.
EGM Signal EGM_STOP_STREAM Used by an external component
to request stop of EGM position
streaming.
SmartGripper Signal RUN_SG_ROUTINE Used by an external component
to request execution of a
SmartGripper routine.
USER MANUAL
2019-12-04 5/14
Table 6: Configurations (man-machine communication domain).
Dependency Type Instance (first attribute) Comment
Core Most Common
I/O Signal
RUN_RAPID_ROUTINE For ease-of-access.
Core Most Common
I/O Signal
OUTPUT_STATIONARY_ROB_X For ease-of-access.
Watchdog Most Common
I/O Signal
WD_EXTERNAL_STATUS For ease-of-access.
Watchdog Most Common
I/O Signal
WD_STOP_REQUEST For ease-of-access.
EGM Most Common
I/O Signal
EGM_START_JOINT For ease-of-access.
EGM Most Common
I/O Signal
EGM_START_POSE For ease-of-access.
EGM Most Common
I/O Signal
EGM_START_STREAM For ease-of-access.
EGM Most Common
I/O Signal
EGM_STOP For ease-of-access.
EGM Most Common
I/O Signal
EGM_STOP_STREAM For ease-of-access.
SmartGripper Most Common
I/O Signal
RUN_SG_ROUTINE For ease-of-access.
USER MANUAL
2019-12-04 6/14
State Machine Illustration
The following is an illustration of some different states, and how the state transitions are made.
Figure 1: Sketch of the state machine and some 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 the 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 a few predefined RAPID routines in the TRobRAPID.mod module, and additional user
routines are recommended to be added 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.
USER MANUAL
2019-12-04 7/14
System Installation Installation of a virtual controller is used as an example. The installation process for a real robot
controller is practically identical, with a few differences that are 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 looking at: RobotStudio → Add-Ins tab → Check if
“StateMachine <version>” is included in the Installed Packages list.
Installation Manager 6 is used to install the system: RobotStudio → Controller tab → Installation
Manager → Installation Manager 6.
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.
USER MANUAL
2019-12-04 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 in the list,
abort the installation and add it to RobotStudio’s installed packages.
Figure 3: Add products.
Figure 4: Find the product in the list.
USER MANUAL
2019-12-04 9/14
Figure 5: Press Next after all desired products has been added.
Step 3: Licenses
For a virtual controller, then a preadded virtual license is used by default. 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.
USER MANUAL
2019-12-04 10/14
Step 4: Options
Add the desired system options (e.g. 689-1 Externally Guided Motion (EGM)), and robot type(s), and
application options (e.g. the StateMachine Watchdog).
For a real robot controller, the options included in the license(s) should have automatically been
selected. Add any additional desired (open) application options.
Figure 7: Select system options.
Figure 8: Select robot type(s).
USER MANUAL
2019-12-04 11/14
Figure 9: Select application options.
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 10: Confirm and apply the settings.
USER MANUAL
2019-12-04 12/14
RobotStudio Simulation To simulate the virtual controller, installed in the previous section, it needs to be added to a RobotStudio
station.
Step 1: Add Virtual Controller
Follow these steps to add the virtual controller to a RobotStudio station.
1. RobotStudio → File tab → New → Create an Empty Station, or a Solution with an Empty Station.
2. RobotStudio → Home tab → Virtual Controller → Exisiting Controller...
a. Find the virtual controller → Press Ok.
b. Wait until the virtual controller 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 Number (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 → 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, for example, setting any of the following IO-signals from 0 to 1:
• RUN_RAPID_ROUTINE.
• Only available if using EGM:
o EGM_START_JOINT.
o EGM_START_POSE.
o EGM_STOP.
• Only available 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.
USER MANUAL
2019-12-04 13/14
External Resources
Documentation
See the online documentation (http://developercenter.robotstudio.com/webservice/api_reference) for
a detailed description of Robot Web Services 1.0 (RWS1).
See the Application manual - Externally Guided Motion 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 abb_librws and abb_libegm, for RWS1 and EGM communication
respectively. The abb_librws library provides a user-friendly interface, which has been designed
especially for this Add-In.
The libraries are available on GitHub:
• https://github.com/ros-industrial/abb_libegm.
• https://github.com/ros-industrial/abb_librws.
Figure 11: Overview sketch of robot controller, and the RWS1 and EGM C++ libraries. The StateMachine
Add-In sets up the robot controller with RAPID modules and necessary system configurations.
USER MANUAL
2019-12-04 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 12: 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 13: 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.