CIROS-CP UserManual EN v7.1-221201-1
CIROS-CP UserManual EN v7.1-221201-1
2
Content
3. Introduction to Festo CP-System (→) 4. CP-System Model Libraries (→)
3
Content
5. Virtual Commissioning with MES4 (→) 6. Virtual Commissioning with Soft PLC (→)
4
Content
7. Simulation (→) 8. Python (→)
5
Content
9. OPC UA Interface (→) 11. Robot Programming (1) (→)
6
Content
11. Robot Programming (2) (→) 12. VR (→)
7
Content
13. Advanced (→) 14. Troubleshooting (→)
8
Introduction to CIROS
Overview
CIROS – Computer Integrated RObot Simulation
10
Overview
Studio vs. Education
11
Overview
Language packs & software releases
12
Overview
Hardware requirements
• Either USB port for USB dongle or network access for server-based licensing
• Officially supported operating system: Windows 10
• Hardware requirements
• High-performance CPU, i.e. Intel i5/i7
• At least 8 GB main memory
• At least 4 GB SSD memory
• NVIDIA graphics card with OpenGL 4.5 support and 4 GB dedicated memory
• When using CIROS in combination with other software (e.g., MES4, PLCSIM Advanced) two screens are highly recommended!
• It is also possible to run CIROS and other software (e.g., MES4, PLCSIM Advanced) on different PCs
13
Installation
• Open Start.exe and select CIROS Applications.
14
Installation
• Select either CIROS Studio or CIROS Education to be installed.
15
License
License is managed by CodeMeter.
List of USB dongles currently attached to the system.
2
16
View local licenses in CodeMeter WebAdmin
Option 1 Option 2
17
CodeMeter WebAdmin
Note: All CIROS related licenses should be placed in the same container.
List of licenses
stored on the
attached USB
dongle.
18
Licenses from Server
Allowing CodeMeter WebAdmin to act as a server.
19
Licenses from Server
Connecting to a CodeMeter WebAdmin server. (1)
20
Licenses from Server
Connecting to a CodeMeter WebAdmin server. (2)
3
4
21
Licenses from Server
Connecting to a CodeMeter WebAdmin server. (3)
22
Licenses from Server
Connecting to a CodeMeter WebAdmin server. (4)
Virtual Commissioning
OPC UA
Process Optimisation
Large Classrooms
PLC Programming
Python
Virtual Reality
Robotics
CAD Import
24
Application Scenarios
Process optimisation
• Assume following process: Front cover → Measuring → Back cover → Pressing → Heating → Delivering
• Which of the two configurations below is more efficient?
Heating Pressing Delivering Heating
Delivering Pressing
Front
Back cover cover Back cover
Measuring
Front Measuring
cover
25
Application Scenarios
PLC programming (example with Siemens PLC)
EasyPort
Real PLC
Soft PLC
26
Help Menu
• Detailed help system with a couple of introductory examples, but not focusing on CP Lab / Factory explicitly.
2
27
Keyboard Shortcuts
SHIFT + left mouse button Move user perspective in view mode
CTRL + left/right mouse button Rotate user perspective in view mode
+/- Zoom in / zoom out
V/H Front / rear view
A Top view
R Right view
L Left view
SHIFT + O Full screen
F5 Start / stop simulation
CTRL + F5 Reset simulation
CTRL + E Toggle between view (default cursor) and edit mode (crosshair cursor)
CTRL + . / CTRL + , Rotate selected object by +/-90° in edit mode
CTRL + T Show model explorer
CTRL + F9 Compile robot / PLC programs
CTRL + SHIFT + M Show model libraries
28
Options Setting
• CIROS has two option settings, application options and model options. There are for different configurations
• Application options configure the whole CIROS application, regardless of the models.
• All changes made in model options are only applied to the active model.
29
Application Options
File → Application options
30
Model Options
Settings → Model options
• Collision detection
• Model display settings
• Background
• Floor
• Sensors
• Etc.
• Fault simulation in teacher mode
• Interfaces
• MES4
• Fleet Manager
• Data logging
• Model explorer settings
• Modelling
• Online management for Mitsubishi robots
• ORL
• Overlays
• Model Simulations
• Video recorders
31
Where to look for the options?
• Structure and elements of models
• Modell Explorer: Modelling → Model Explorer or Ctrl+T
• Often used
• Properties of model
• Model options: Settings →Model options or Ctrl+I
• Used fairly
32
Window’s Size
• Windows size for Application Window and Modell Window can be adjusted.
33
Introduction to CIROS Model
CIROS Model
• Preliminary remark: Each CIROS model not only consists of the
modx/ini files but also the folders CF and Textures, storing the
internal PLC programs and textures
• It is highly recommended, to store each CIROS model in a
separate folder!
A CIROS project folder:
• Important: Do not copy the modx/ini files only, but the entire
folder containing the subfolders CF and Textures, too!
35
Collaborative Working
• Several users can work on the same model at the same time.
• When a user changes the model, other users will receive a notification.
• However, simultaneous changes and changes that crossed over time cannot be merged together.
36
Model’s Structure
Elements in a model Model
• Structures of elements Object
• Model / Environment
• Objects: Logical unit Section
• Sections: Static body
• Hulls: Geometries Hull
• Hulls
• Geometric primitives
• Box,sphere, etc.
• Polyhedron
• Vertex, Facet
37
Model’s Structure
• Objects in the structure tree
• Placed on the highest hierarchy in the model or Model
• Placed under an object
Object
• Object’s nomenclature
• Parent object: superordinate object Object
• Child object: child of a parent object
• Usage
• For a clear structure
• Definition of static assembly
38
Elements and Coordinate Systems
• Different coordinate systems, each might has same or different origins
• World : based on world coordinate system
• Object : based on coordinate system of the parent object
• Section : based on coordinate system of the section it belongs to
• Hull : based on coordinate system of the hull
• In model window, origin of three axes of coordinate system are shown in different colours.
Z
39
Create a CIROS Model
• Recommended way of defining a new CIROS Model
1. Choose FILE → New → Model assistant
2. Specify the model’s name and enable Create a subfolder with the same name as the model.
3. Important: Do not select a robot, these ones are not the ones integrated within CP Lab / Factory! Choose Empty model instead!
2 3
40
Window’s Layout
42
View and Edit Mode
View mode Edit mode
• Change user perspective onto scene • Place, move, rotate objects within scene
• Default cursor: • Crosshair cursor:
43
Standard Views
44
Standard Views
Top view
• Important
• Switching to Top View ensures that the z-values remain
constant when moving components within the scenery!
• Snapping into place of modules works well in Top view only!
46
Snapping into Place
• When placing application modules onto conveyor belts, it is not
necessary to adjust them as precisely as possible.
• Just putting the phrases Application, CPLab, Modul, etc. on top
of each other is all one has to do!
• Same holds for mounting deflections, docking kits, and so on.
47
Floor and Background
• Floor can be activated or deactivated.
1. Right click in view window.
2. Check or uncheck Floor.
48
Import Data
• It is possible to import a model from CAD data by selecting File → Import.
• Supported formats are as follow:
• 3ds Max
• AutoCAD DXF
• Autodesk
• Blender
• Collada
• IGES
• PointCloud
• STEP
• STL
• VRML
• Wavefront Object
49
Export Data
• It is possible to export a model or selected objects in the model to CAD or picture.
1. To export a whole model, in Model Explorer, select Objects. To export objects in model, select the objects in Model Explorer.
2. Click File → Export.
51
Simulation Control in Model Window
• Simulation control buttons can be shown in model window.
• This is to allow simulation control in full screen mode or in VR.
52
Introduction to Festo CP-System
Building blocks Module / Ressource
Resource Application
Carrier
Base module
54
Building Blocks
Carrier and product
+ +
Product
Palette (Smartphone)
Carrier
55
Product (Smartphone)
Back cover
Covers are available in
four colours
Inlay (optional)
- PCB
- Fuses
Front cover
- Slot for screen
- An opening for Button
- Able to drill holes for screw thread
56
Terms & Definitions
Parts External production part Carrier
57
Standard Part Numbers
Supported part numbers
25 Pallet • Supported part numbers are parts that can be booked into a
31 Carrier high-bay warehouse at simulation time t=0s.
110 / 109 / 108 / Raw material front cover black / grey / blue / red • All other part numbers – in particular user-defined parts – can
107
be generated and stored into a high-bay warehouse during
111 / 112 / 113 / Back cover black / grey / blue / red
production, but not replicated in a warehouse at simulation
114
startup at t=0s.
210 / 310 / 410 / Front cover black / grey / blue / red
510
x11 / x12 / x13 / Front cover in black / grey / blue / red including
x14 (x = 2, 3, 4, 5) PCB / front fuse / rear fuse / both fuses
1y11 / 1y12 / 1y13 Front and back cover in black / grey / blue / red
/ 1y14 (y = 2, 3, 4, including PCB / front fuse / rear fuse / both fuses
5)
26 / 120 / 130 Unknown workpiece / PCB / fuse
58
Standard Part Numbers
Some examples
Part number 412 Part number 513 Part number 1214 Part number 109
(blue, PCB, front fuse) (red, PCB, rear fuse) (black, both fuses, back cover) (grey, raw material front cover)
59
Groups and Utilities
• Groups define sets of parts somehow belonging to each other.
• Besides the list of parts belonging to a group each group also Almost Final Products
contains a unique ID and a description.
• There is no restriction on the number of different types of parts
a group consists of.
• Parts can be attached to an arbitrary number of groups or not
attached to any group at all.
• Typically, groups are used to define zones and restrictions wrt.
buffer positions of a high-bay warehouse.
• Utilities defines a special subclass or group of parts, containing
all carriers, boxes, and pallets, which are the ones that are
responsible for transport purposes.
60
Carriers
• In CIROS two different kinds of carriers are supported
• CP-F-CARRIER: Carriers without Pallets
• Carriers without Pallets must be used in cases in which a CP Factory high-bay warehouse is part of the CIROS model, since the
workpieces will be stored and released together with pallets in this situation!
• In all other cases Carriers including Pallets should be used
• Rule of thumb according to the number of carriers used within a CIROS model: One carrier per conveyor belt.
61
Resources and Buffers
• Resources are the production facilities (modules) of the CP Lab
/ Factory.
• Each resource is represented by a unique ID.
• Periodically, each resource sends a status update to MES4 and
gets process data back when initiating a corresponding service
call.
• Robotino is a special kind of a mobile resource.
• Some resources contain buffers, like the high-bay warehouse,
the robot assembly station, Robotinos, and the branches.
• Each buffer consists of at least one buffer position to store
parts, one per buffer position.
• MES4 could be configured in such a way that, based on zones
and restrictions, buffer positions are allowed to store specific
types of parts only.
62
CP-System Model Libraries
Open Model Libraries Window
Modelling → Model libraries
64
Model Library Festo CP System
• There are four groups containing CP Lab / Factory modules
Name Description
65
Model Library Festo CP System
CP Application
Module Description
CP-AM-CAM Camera inspection
CP-AM-DRILL Drilling
CP-AM-HEAT Heating tunnel
CP-AM-iDRILL Drilling module with own PLC
CP-AM-iPICK Pick by light with own PLC
CP-AM-LABEL Labelling printer
CP-AM-MAG_BACK Back cover magazine
CP-AM-MAG_FRONT Front cover magazine
CP-AM-MANUAL Manual working place
CP-AM-MEASURE Analog measurement
CP-AM-MPRESS Muscle press
CP-AM-OUT Workpiece output
CP-AM-PRESS Pressing
CP-AM-TURN Workpiece flipping
66
Model Library Festo CP System
CP AR
Module Description
CP-AR-GUI CP-AR QR-Code to the AR server.
67
Model Library Festo CP System
CP Factory
Module Description
New
CP-F-ASRS20-B Automated Storage Retrieval System for boxes
CP-F-ASRS32-P Automated Storage Retrieval System for parts and pallets
CP-F-BRANCH Branch base module
CP-F-BUF-B New Manual working place with automated box transfer
CP-F-BUFROB-B New Part transfer between box and CP-Factory line with robot
CP-F-BUFROBM-B New CNC milling application attached to robot and box transfer
CP-F-BYPASS CP-Factory base module with bypass belt
CP-F-CARRIER 15 carriers for CP-Factory base modules without pallet
CP-F-DEFLECTION180 Passive 180° deflection
CP-F-FEEDROBM CNC milling application attached to robot and CP-F linear
CP-F-LINEAR CP-Factory base module with two parallel conveyor belts
CP-F-RASS Robot assembly station
CP-F-SINK Sink to remove carriers, pallets, workpieces
CP-F-SOURCE Source to generate carriers, pallets, workpieces
68
Model Library Festo CP System
CP Lab
Module Description
CP-L-BRANCH Branch base module
CP-L-CARRIER 15 carriers for CP-Lab base modules with pallet
CP-L-CONVEYOR CP-Lab base module with a conveyor belt
CP-L-DEFLECTION90 Passive 90° deflection
CP-L-iASRS12-W Automated Storage Retrieval System for parts
CP-L-SINK Sink to remove carriers, pallets, workpieces
CP-L-SOURCE Source to generate carriers, pallets, workpieces
69
Model Library Festo CP System
CP Mobile Robots
Module Description
CP-MR-B New
Robotino for boxes
CP-MR-C Robotino for carriers
CP-MR-DOCK Docking kit to be mounted on branches
to enable (un)docking maneuvers by a
Robotino
CP-MR-PARK New
Robotino parking position
70
Model Library Festo CP System
CP-Models
Module Description
CP Lab 404-1 Standard CP Lab system with four stations and configured MES4 v1
1. Front cover magazine
2. Analog measurement
3. iDrill
4. Workpiece Output
CP Lab 406-1 Standard CP Lab system with six stations and configured MES4 v1
1. All modules in CP Lab 404-1
2. Back cover magazine
3. Pressing
CP Lab-408-1 Standard CP Lab system with six stations and configured MES4 v1
1. All modules in CP Lab 406-1
2. Pick by light
3. Labelling
CP Lab 410-1 Standard CP Lab system with six stations and configured MES4 v1
1. All modules in CP Lab 408-1
2. Camera inspection
3. Turning
SAP4School Model for virtual commissioning of SAP4School
71
Configuration in Properties Section CP System
• For almost all components there is a section CP System as being part of the
corresponding Properties menu.
• Represents the options that can be defined at the HMIs of a real CP Lab / Factory
• MES ID
• Traffic jam control
• Energy saving (stopping the belts whenever possible)
• Behavior of branches
• Additionally, one can configure some CIROS internal parameters not available on a
real CP Lab / Factory.
72
Configuration in Properties Section CP System
Define MES ID (1)
• Note, that the default mode of CIROS is not equal to the default
mode of a real CP Lab / Factory!
• If the MES ID of at least one component is greater 0, running
the CIROS simulation without MES4 results in an error
message!
73
Configuration in Properties Section CP System
Define MES ID (2)
• Constraints
• MES IDs must be unique throughout the entire model .
• Each MES ID must be greater 0.
• Definition of IDs within CIROS and MES4 must match each
other.
74
CP-AM-iDRILL
Configure x-axis linear drive
1. Configure axis lower limit, upper limit and maximum velocity. 2. It is possible to see the position of the drill bit in model window.
1. In Model Explorer, select CP-AM-iDRILL → Mechanik. 1. In Properties, select Axes → DH parameters.
2. In Properties, select Axes → Axis parameters. 2. By dragging the scale XAchse at bottom, the drill bit will move accordingly
3. Adjust Lower limit, Upper Limit and Max. velocity.
1.3
1.1
1.2
2.1
2.2
75
CP-AM-iDRILL
Object Mechanik (1)
77
CP-AM-iPICK
Configuration in properties section CP System
Property Description
Working time (s) Working time required by the worker
to finish an operation (valid for
CIROS and CIROS/MES4).
Target number Part number of the part to be
replicated by the worker (valid for
CIROS default mode only).
78
CP-AM-MAG_BACK
Configuration in properties section CP System
Properties Description
Automatic Mode In “Automatic Mode” the magazine
will be filled automatically during
simulation.
Colour Workpiece Defines the color of the back covers
stored in the magazine. By enabling
“Manual Override” the user can
specify the color of each individual
cover to be replicated.
79
CP-AM-MAG_FRONT
Configuration in properties section CP System Default Rotated
orientation orientation
Properties Description
80
CP-AM-MANUAL
Configuration in properties section CP System Default Rotated
orientation orientation
Properties Description
81
CP-AM-MEASURE
Configuration in properties section CP System
Properties Description
82
CP-AM-OUT
Configuration in properties section CP System
Properties Description
83
CP-AM-TURN
Configuration in properties section CP System
Properties Description
84
CP-F-BRANCH / CP-L-BRANCH
Configuration in properties section CP System
Properties Description
85
CP-F-RASS
Configuration in properties section CP System
Properties Description
86
CP-MR-C / CP-MR-B
Configuration in properties section CP System
Properties Description
Note:
• CP-MR-C stands for Cyberphysical-Mobile Robot-Carrier.
• CP-MR-B stands for Cyberphysical-Mobile Robot-Box.
• RFM stands for Robot Fleet Manager.
87
CP-MR-DOCK
Configuration in properties section CP System
Properties Description
88
Sources and Sinks
• Sources and Sinks can be used to dynamically replicate and
remove workpieces during the simulation, either via pushing
the corresponding button or automatically controlled by CIROS.
• There are different versions of sources and sinks, one set to be
applied to CP Lab conveyor belts and one set to be used in
combination with CP Factory components.
• Typically, sources and sinks come into play whenever one
wants to model a single conveyor belt & application module.
89
Sources and Sinks
Remarks
• Depending on the model, sources and sinks may have to be rotated to operate correctly!
Rotated by 180°
Not rotated
90
Sources and Sinks
Configuration in properties section CP System
Properties Description
91
Adding New Libraries to CIROS
1. Open an already existing model or create a new CIROS model like
shown before.
Note: Model libraries window can only be opened when a CIROS model is opened
or created!
2. Open the model libraries window
• MODELING → Model libraries or
• CTRL + SHIFT +M
3. Click on the right mouse button within the tree view part of the model
libraries to open the corresponding context menu
4. Execute Add folder to list…
5. Select the folder in which the model library to be added is stored and
press OK
92
Virtual Commissioning with MES4
Basic knowledge in Festo MES4 and Fleet Manager is required.
Virtual Commissioning with MES4 Tutorial
MES4 v2 and below
94
Virtual Commissioning with MES4 Tutorial
1. Create a new CIROS project.
2 3
95
Virtual Commissioning with MES4 Tutorial
2. Build a CIROS model from model libraries.
96
Virtual Commissioning with MES4 Tutorial
3. Configure MES4.
97
Virtual Commissioning with MES4 Tutorial
4. Configure CIROS model respective to the MES4 configured.
98
Virtual Commissioning with FactoryViews[1]
Import Model from Python Script
• Python script to generate model with configured MES4 resource ID can be generated from Festo Factory View, which is the successor
of Festo MES4 Software.
• The script can be executed in CIROS to configure the CP System setup for virtual commissioning.
• With this option, time to insert the models and to configure the resource IDs is saved.
• However, the carriers are not generated from the code. Thus, they have to be added manually from Festo CP System Model Library.
[1] FactoryViews is the new software bundle for MES and web based services. It contains MES4 v3. 99
Virtual Commissioning with FactoryViews[1]
Guide to import model from python script
Hint:
• In the python script exported from FactoryViews, the modules are snapped in place and MES
ID of the resources are set.
• To reduce graphic power consumption and avoid crash, close all windows and minimize
Model Window before loading the script.
[1] FactoryViews is the new software bundle for MES and web based services. It contains MES4 v3. 100
Virtual Commissioning with Robotino
• Note: MES4 is not communicating with Robotino(s) directly!
MES4 Fleet Manager
• Communication is carried out via the Fleet Manager.
• MES4 is just sending transportation orders like “Go to position
A, grab a workpiece, move to position B, and release the
workpiece over there” to the Fleet Manager
• Fleet Manager itself selects one of the available Robotino(s)
and sends commands like “dock to position A” to the Robotino
to fulfill the MES4 order.
101
Virtual Commissioning with Robotino
Videos tutorial: 21_ConfigureFleetManagerForCiros.avi
Robotino CP-MR-C
102
Virtual Commissioning with Robotino
Fleet Manager v3 and above
103
Virtual Commissioning with Robotino
Simulation with CIROS, MES4 and Fleet Manager
Videos tutorial:
01_StartUpRobotino.mp4
22_SimulationOfRobotino.avi
104
Synchronise CIROS Parts in Storage with MES4 Buffers
• During the initialization phase of a CIROS simulation run,
CIROS will ask for the buffer contents of high-bay warehouses
automatically .
• But, whenever the buffer of a high-bay warehouse has changed
within the MES4 while the CIROS simulation is running, one
must click the MES 4 button in CIROS view window to transmit
these changes to CIROS.
105
Running CIROS and MES4 on Different PCs
CIROS → Settings → Model Options
Address = IP-Address of PC
which MES4 is running.
106
Running CIROS and Fleet Manager on Different PCs
CIROS → Settings → Model Options
Address = IP-Address of PC
which Fleet Manager is running.
107
Terms & Definitions in MES4
Customers, orders, order number & order position
108
Terms & Definitions in MES4
Operations and parameters
• The resources send a status update to MES4 in every second. • Resources or other applications query data from MES4 or write
data to MES4.
Resource Resource
Port Port
2000 2001
110
Terminology in MES4 Messages
Term Meaning
BoxID Box ID
BoxPNo Box part number
BoxPos Position in box
BufNo Buffer number
BufPos Buffer position
ONo Order number
OPos Order position
Op Operation
OpEnd Operation end
OpNo Operation number
111
MES4 Service Requests
• MES4 offers many services that are required for the operation
of a plant.
• None of the plants use all services, but all services are
available at any time and can be called not only by PLCs but
also by other business applications via a TCP/IP connection. In
addition, a skilled operator can implement additional services,
if they can be mapped to an SQL query of theMES4 database.
Request
• Service calls always follow the request response paradigm, i.e.,
a client sends a call and MES4 response back. Client
Response
MES4
• Internal controller of CIROS model is the virtual representation
of PLC. Thus, it communicates the same way as a real PLC.
112
MES4 Service Requests
Message classification Example:
113
MES4 Service Requests
Classes
• Service classes on the right are frequently used. For user MClass Description
defined services, any other classes can be used.
100 Get information from orders and work plans
114
MES4 Service Requests
Message packet overview
Request Response
Header Header
• Defined in HeaderGet.xml • Defined in HeaderSend.xml
115
MES4 Service Requests
Data coding
• MES4 allows two different encoding procedures for service requests and responses.
• The first three or four bytes of each packet are TCP Ident header, which indicates which method the packet uses.
• Binary coding
• Binary coding is primarily used for communication with PLCs on which it is fundamentally easier to handle fixed-address binary data than strings.
• In the binary procedure, a distinction is still made between the Siemens format and the CODESYS format. MES4 also responds to each binary-coded
request in the binary procedure of the same format.
• String coding
• Well suited for implementation in high-level languages or for manual tests. Parameter names and values are transmitted in human-readable form.
• The string procedure also has two forms.
• The complete format can be used for both calls and responses.
• The abbreviated format is only used in MES4 responses if this was requested in the call. was requested.
116
Festo MES4 Interface
• The communication between the MES4 and the CIROS model
requires an object of type MES in the CIROS model.
117
Festo MES4 Interface
• The communication with the MES object inside CIROS is exclusively done via IRL functions. These functions are provided by a
program named MES_commands.irl which is automatically added to a Programs subfolder of your model folder when you add the
MES object. The required functions can be made accessible in your own IRL program by stating FROM MES_commands IMPORT ALL;
• By default, the MES4 interface uses field definitions from the HeaderSend.xml file in the CIROS root directory. If you need own field
definitions, these can be configured in the model options. After configuring field definitions, go to the MES property page of the MES
object and press the Create compatible IO button to create the required object inputs and outputs.
creates the required inputs and outputs based on the configured field definition file
118
Use Case: Update Resource Status with MES Controller
• At the end of this tutorial, user is able to update to MES4 that the resource is in Automatic, MES mode when simulation starts.
119
Use Case: Update Resource Status with MES Controller
ResourceState.irl
PROGRAM ResourceState;
BEGIN
{Initiate MES status}
setStateMESMode(true);
setStateAuto(true);
setStateReset(false);
setStateError(-1);
ENDPROGRAM
120
Use Case: Update Resource Status with MES Controller
Steps in screenshots
3 5 8
1
7 9
4
2
121
Use Case: Update Resource Status with MES Controller
Steps in screenshots
10 11 12
13
122
Message Request from CP System to MES4
• CIROS behaves the same as PLC in terms of MES4
communication. Thus a bit coding is used.
• The messages are written in IRL format and can be found in
Project Management.
1. In toolbar, open Programming \ Project Management.
2. In Project Management window, if not yet exist, add following
project.
• <project folder\CF\CPSystems\CPSystem_Allgemein.prjx>
3. Open Projects \ CPSystem_Allgemein(IRL) \ Files.
123
MES Communication Flow Chart
Example: CP-L-CONVEYOR
124
Message Request from CIROS to Fleet Manager
• Like PLC, CIROS Robotino model is the virtual representation of real Robotino. Thus it communicates with Fleet Manager the same
way as a real Robotino.
• The communication messages are written in IRL format and can be found in CIROS → Programming → Project Management →
Projects →RFM_MR.
127
Scenario Overview
All on single PC Software on different PCs
128
Process Summary
Important:
• CIROS v7.1 is only compatible with Siemens PLCSIM Advanced v3.0 or above!
• CIROS v7.0 or below is only compatible with Siemens PLCSIM Advanced v2.0 or below.
129
Preparing a CIROS Model
130
Preparing a CIROS Model
Your model usually needs three basic elements to serve for virtual
commissioning with PLCSIM Advanced:
131
Exercise
Preparing a CIROS model from scratch
132
Starting a PLCSIM Instance
Feel free to choose any PLCSIM Advanced settings that work for you.
The only setting relevant to CIROS is the instance name. Choose one
you like and remember it. You’ll need it later.
Some recommendations:
• For Online Access, choose PLCSIM unless your simulated PLC
needs to communicate over the network. This mode makes the
connection to TIA Portal effortless
• Leave Time Scaling off. CIROS has its own time scale and will
make sure the PLC keeps track if you speed up the simulation
beyond real-time
• Choose ET 200SP for PLC type as that matches the physical PLC in
most CP hardware systems
133
Creating the Hardware Configuration and IO Tags in TIA Portal
Hardware configuration IO tags
You can configure your PLC in any way you like. You can freely name your inputs and outputs, as long as the
Ideally, it should have at least the number of digital and analog address and the type of an input/output is correct.
I/Os that the physical PLC inside your chosen CP system has. If you like you can skip the inputs and outputs that are not
connected to anything in your CP system.
Refer to the Festo Didactic Infoportal (https://ip.festo-
didactic.com) for an I/O listing of your CP system. Alternatively,
find the relevant information in your manual or circuit diagram.
134
Exercise
Creating the hardware configuration
Detailed instructions how to do the hardware configuration in TIA Portal are beyond the scope of this document. Refer to the
courseware ‘Device configuration’ if you’re having trouble.
For this exercise, we’re configuring the PLC as we would a real CP-L-CONV module with a Siemens IO-Link 1.1 conformant RFID device.
135
Exercise
Creating the hardware configuration
136
Exercise
Setting up the I/O tags
Note:
Depending on the revision of a physical CP-L-CONV, any address listed on the Infoportal in byte 18 might require to be shifted to byte
42. This is only relevant if you plan to download this TIA project to a real CP-L-CONV. In CIROS the absolute I/O addresses don’t matter.
137
Exercise
Setting up the I/O tags
139
Exercise
Downloading project to PLC instance
.1. Compile the project.
2. Download it to your simulated PLC.
If Online Access in PLCSIM Advanced is set to PLCSIM mode, this is
almost fully automatic.
140
Configuring the Interface
The virtual PLC in CIROS has a large number of inputs and outputs, most of which are unused or used for internal processes inside
CIROS. A few virtual I/Os correspond to the I/Os of the PLC inside a real CP system, though. These are named DIN0_x0 to DIN18_x7
and DOUT0_x0 to DOUT18_x7, after the absolute addresses of the real PLC’s I/Os.
141
Configuring the Interface
You can connect each virtual PLC in your CIROS model to exactly one PLCSIM Advanced instance.
You have to configure our CIROS PLC to connect to the right instance and to hook up the virtual CIROS I/Os to the correct TIA I/Os.
142
Exercise
Configuring the interface
143
Exercise
Configuring the interface
144
Exercise
Configuring the interface
1. From the list of I/O tags on the right, drag and drop
each I/O to the matching entry on the left.
Note: Connect CIROS inputs with PLC inputs, and CIROS
outputs with PLC outputs.
2. When done, click “Apply”.
3. Optionally, click “Connect” again to disconnect.
Drag and
drop
Hint: You can select multiple I/Os from the right if they
are in the right order and drag them to the left at once.
146
Exercise
Run the simulation
147
Exercise
Run the simulation
148
More Information
Mapping CIROS I/Os to PLCSIM Advanced instance I/Os
Inputs Inputs
Outputs Outputs
More Information
Mapping CIROS I/Os to real PLC via EasyPort and EzOPC
Software Hardware
150
Common Issues
Can’t download project to PLC instance anymore
Once CIROS has established a link to a PLCSIM instance, that instance is bound to the simulation. Only when the CIROS simulation is
running, will the instance run as well.
Should TIA appear to be stuck when downloading to the instance that is likely because your CIROS simulation is paused. As soon as
you start the simulation, the download will continue.
151
Remote Connection between CIROS and PLCSIM Advanced
If you’re running CIROS and PLCSIM Advanced on different machines, you need a little bit of
extra configuration.
152
Remote Connection between CIROS and PLCSIM Advanced
You also have to let CIROS know, where to find PLCSIM Advanced.
153
Simulation
Simulation Kernel
• Settings → Model options allows for configuring the way in
which the simulation status will be updated during simulation. 2
155
Simulation Kernel
Model computation
Rule of thumb: Do not touch the default value for the simulation
increment!
156
Simulation Kernel
Relationship model time / real time (1)
157
Simulation Kernel
Relationship model time / real time (2)
158
Simulation Kernel
Relationship model time / real time (3)
159
Simulation Kernel
Remarks
• Timestamps in CIROS are based on model time, while in MES4 timestamps are based on real time!
• Example of what could happen if model time differs from real time.
• Assume that a single step of an MES4 workplan takes 10s of real time on a corresponding real application module.
• If CIROS is keeping track with real time (model time = real time), the step will be simulated in 10s of real time, too.
• If CIROS is running faster, this step still requires 10s of model time, but CIROS can simulate that 10s of model time in (to give an
example) 2s of real time. MES4 will record that the operation required only 2s of real time!
• Therefore, if CIROS is simulating faster/slower than real time the process times the MES4 is measuring are no longer reliable!
• Due to the different ways of measuring time, it is not possible to simulate the annual production of a CP Lab / Factory within a few
hours!
160
Reduce Simulation Computing Requirement
Disabling shadow simulation
• Calculating shadows during simulation allows for a more natural appearance of the model but requires a lot of CPU/GPU
performance. Simulation might slow down significantly!
• For less powerful hardware environments disabling shadows improves overall simulation performance.
• Screen Space Ambient Occlusion (SSAO)
• Shadow light sources
161
Reduce Simulation Computing Requirement
Screen Space Ambient Occlusion (SSAO) (1)
• SSAO is a computer graphics technique for efficiently approximating the ambient occlusion effect, caused by ambient lightning, in
real time.
• While the implementation in principle is quite fast, it nevertheless requires substantial computation power.
162
Reduce Simulation Computing Requirement
Screen Space Ambient Occlusion (SSAO) of a model (2)
• Use Model Explorer → Model → Lightning → Ambient light → Properties to disable or enable Screen Space Ambient Occlusion.
163
Reduce Simulation Computing Requirement
Shadow light source 1
• Usually, light source 1 is causing shadows, while light sources 2 to 7 and headlight do not have that option
• If enabled the simulation of that shadow depends on the position of light source 1 and its properties
164
Reduce Simulation Computing Requirement
Shadow light source 1 of a model
• Use Model Explorer → Model → Lightning → Light source 1 → Properties to disable or enable shadow simulation.
165
Reduce Simulation Computing Requirement
SSAO and shadow source of CIROS application.
166
1
167
Visualising Sensor Data
• Depending on the model options, measured range and values
are not visualized by default in view window.
168
Visualising Sensor Data
• In rare cases one must enable the visualization of sensor data
by modifying the properties of each individual sensor.
169
Data Logging
• Data logging in CIROS allows for storing and visualization of values of inputs, outputs, variables, etc. during simulation.
• Example shown here: Visualization of the time needed for performing a status update.
• Configuration of data logging is available at Settings → Model options → Logging.
170
Data Logging
Simulation speed restricted to real time
172
2
Data Logging
Create new profile
• Apart from default data logging profiles, it is possible to log own data to simulate
the model built.
• To log own data, a logging profile containing desired data must be created, it can be
1
created in Settings → Model Options → Logging → Profiles.
• Profile created can then be added to logging window in Settings → Model Options →
Logging, section General. 5
173
Simulation Control in CP System
Industrial Robotic Language (IRL) Python
A project is assigned
to the controller.
Project information.
175
Python
Python in Model Libraries
• Python 3.7 or higher is required for the support of CP Lab / Factory model library.
• Replication of CP Lab / Factory workpieces within CIROS is based on various Python scripts, compared to previous versions this
change within the CIROS kernel simplifies the integration of user defined workpieces.
• If not already installed, CIROS installation wizard will install Python and add it to Windows path during the setup in silence mode.
177
Python in Model Libraries
Adding python to Windows path (1)
• To define Python in System Environment Variable Path in Windows 10: 2. Open Environment Variables.
1. Open System Properties. Advanced → Environment Variables
178
Python in Model Libraries
Adding python to Windows path (2)
3. Edit Variable Path in System Variables. 4. Insert the path to Python and Python Scripts folder here.
System Variables → Path → Edit For example: C:\Program Files \Python 38\ and C:\Program Files \Python
38\Scripts\
179
Python Installed but Not Working
• When different python versions are installed in the same
computer, CIROS always selects the version on top of the
Windows environment path list.
• When the version on top of the list is not supported by CIROS,
there will be an error.
• Typical error message is “cirosPluginPython.dll not loaded”.
180
Python Scripts
• CIROS v7 and above works with Python scripts. The scripts can be called for following purposes
• Creation and modification of model.
• Controller for simulation or components.
• Define user defined commands in context menu.
• Requirements
• Python 3 is installed
• Supported versions are 3.6, 3.7, 3.8 and 3.9
• The used version will be chosen automatically
• First line in python function list states the version used.
Note:
• Python must be defined in windows PATH-variable.
• The script cannot contain endless loop.
181
Python Scripts
Python scripts can be executed by following methods 1
1. Manually
• Application script (Concurrent or blocking)
• With or without simulation 2
• Menu Extras → Python → Execute
3. Python controller
• Controller script (Concurrent) 3
183
Built-In Function List
1. Show the function list by clicking Menu → Extras → Python → Show function list.
2. Copy the function list and paste it in an editor, for example ‘Notepad++’.
184
CP System Construction Helper
• A python library contains of four classes.
Class Explanation
CPFactoryConstructionHelper Constructs a single line of CP-Factory base modules from left to right.
CPLabConstructionHelper Constructs a single island of CP-Lab modules from left to right, base modules and corners must be added in
the correct order, build order is from left to right.
CPSystemConfigurationHelper This can be used to change the configuration of certain modules. Please note that u need to give the correct
object name as it appears in the model, for example CP-L-BRANCH_1 for the second added branch module.
• Note: This library does not come in default with the installation. It might be found in the CIROS project configured by Festo Didactic
in folder python. If it is not found, please contact us to request for it.
185
Use Case: Common TCP/IP Communication
Tutorial: Send robot TCP to a TCP/IP server.
• At the end of this tutorial, user is able to get a robot TCP in joint coordinate and send it to an external TCP/IP server using common
TCP/IP communication protocol with a python script.
• The example will be demonstrated with a CP-F-RASS_Mitsubishi modell.
186
Use Case: Common TCP/IP Communication
1. Insert CP-F-RASS_Mitsubishi model in CIROS.
2. Create a python script named TcpIpClient.py.
3. Program the script as shown in next page.
4. Start a TCP/IP server.
Example: With open source software ‘Hercules’.
5. In CIROS, select Extra \ Python \ Execute.
6. Select the python script.
7. Cartesian coordinate is received in the server.
8. Send a reply to close the connection.
187
Use Case: Common TCP/IP Communication
Python script
188
OPC UA Interface
CIROS as OPC UA Client
1. Change controller object type to OPC UA client. 1.1
1.4
1.3
190
3
4
4. Assign the OPC UA nodes in server to the internal IOs.
5. Select Apply.
5
1
1.1
191
Robot Programming
Mitsubishi
Mitsubishi Industrial Robot
Electric RV-4FL robotic arm
Wrist
J5-axis joint
Type Articulated robot
J4-axis
Number of axes 6 Lower arm
Gripper flange
Ultimate load 4 kg Elbow
J6-axis block
Maximum reach radius 649 mm J3-axis
193
Mitsubishi Industrial Robot
Robot controller CR750-D
194
Mitsubishi Industrial Robot
Teach box R56TB
195
Layout and Windows
Programme window
Model window
196
CP-F-RASS
Robot simulation
• Attention: General knowledge of Mitsubishi robot and robot programming are required to proceed in this chapter. Please be
informed about Mitsubishi robot program structure, programming language, and I/O connections before proceeding.
• The robot programs are written in Melfa Basic V (MBA5) with extension .mb5, which is the programming language of Mitsubishi
robot.
• Positions are stored in the position list with extension .pos.
• There is a robot project in CP-F-RASS model, which have the same programs as in actual robot. However, the I/O channels and tool
changing mechanism are modified to suit the modelling environment.
• In CIROS simulation, a main program RobotSystemDriver.mb5 is used to simulate the slot allocation in actual robot controller.
• Generally, a program name can be any string characters. However, PLC only calls the program by integers. To allow the new program
to be able to function in real robot, the program name should be numbers.
198
CP-F-RASS GRPVACOFF.mb5
GRPVACON.mb5
Switch off vacuum gripper
199
CP-F-RASS
Controllers and I/Os Montage_RV-4FL Index Type SPS_Roboter Index Type Description
I_Stop 100 DI DOUT_100_x0 40 DO Stop robot
program
• Station CP-F-RASS has two controllers,
I_Start 101 DI DOUT_100_x1 41 DO Start a robot
• PLC controller program
IDATA_(0-15) 116 – 16 Bit AOUT_W102 002 AO Program
• Robot controller 131 DI number in
binary
• In CIROS, the station has two controllers as well. DI_PCBPalletNo_(0-7) 172 – 8 Bit AOUT_B109 004 AO Position in
179 DI PCB box
• SPS_Roboter is the virtual representation of PLC controller
HOpen_1 900 DO Open
gripper
• Montage_RV-4FL is the virtual representation of robot
HClose_1 901 DO Close
controller gripper
• The I/Os are linked internally in CIROS model. HOpen_3 904 DO Release
gripper
HClose_3 905 DO Lock gripper
200
CP-F-RASS
Grippers’ tool number
• Each gripper has a tool number. It is important to select the right tool as different TCP is used for different tools.
• Tool 1 : Vacuum gripper.
• Z-offset relative to flange TCP 205 mm.
• C-rotation relative to flange TCP 33.5°.
• Tool 2 : Parallel gripper for front cover.
• Z-offset relative to flange TCP 170 mm.
• C-rotation relative to flange TCP 33.5°.
• Tool 3 : Parallel gripper for fuse.
• Z-offset relative to flange TCP 151.5 mm.
• C-rotation relative to flange TCP 33.5°.
• Tool 4 : No gripper.
• Z-offset relative to flange TCP 0 mm.
• C-rotation relative to flange TCP 0°.
201
CP-F-RASS
List of default positions in CIROS environment for reference
14 15 16
No Definition Position
1 P_AssemblePCB (-140.03,-367.01,109.01,-179.73,0.09,89.95)(7,0)
11 12 13
2 P_PCBPalletOrigin (93.00,276.00,213.00,-180.00,0.00,90.00)(7,0)
3 P_PCBPaletXDir (-140.10,276.00,213.00,-180.00,0.00,90.00)(7,0)
4 P_PCBPaletYDir (93.00,398.00,213.00,-180.00,0.00,90.00)(7,0) 3 5
5 P_PCBPaletXYDir (-140.10,398.00,213.00,-180.00,0.00,90.00)(7,0)
9 10
6 P_CarrierStop1 (402.50,-267.00,171.50,179.73,-0.09,90.05)(7,0) 1 7
8 2 4
7 P_Vision (30.00,-350.00,101.50,180.00,-0.00,90.00)(7,0)
8 P_AssembleWp (-139.00,-362.00,114.00,-180.00,-0.00,90.00)(7,0)
9 P_AssembleFuse1 (-138.97,-401.18,127.13,-180.00,0.00,180.00)(7,0)
10 P_AssembleFuse2 (-138.97,-388.18,127.13,180.00,-0.00,180.00)(7,0)
6
11 P_FuseMagazine1 (-300.65,-430.30,160.30,177.86,-42.56,-177.96)(7,0)
12 P_FuseMagazine2 (-299.24,-360.21,159.46,177.87,-42.57,-177.96)(7,0)
13 P_FuseMagazine3 (-299.44,-290.40,159.99,177.87,-42.57,-177.96)(7,0)
14 P_GrpStorageVac (-395.65,-125.00,484.90,-180.00,-0.00,-0.00)(7,1)
15 P_GrpStorageWp (-395.65,0.00,484.90,-180.00,0.00,0.00)(7,1)
16 P_GrpStorageFuse (-395.65,125.00,484.90,-180.00,-0.00,-0.00)(7,0)
202
Steps to configure CP-F-RASS for simulation
1. Create a new CIROS project. 5. Assign required I/Os to IO monitor.
1. Open an I/O monitor window, it can be any I/O monitor.
2. Insert and snap following from CP System model libraries.
2. Drag the Outputs from Model Explorer to I/O monitor window.
1. CP-F-RASS (Mitsubishi)
3. Required Outputs are in Objects → CP-F-RASS_Mitsubishi → SPS_Roboter
2. CP-F-SOURCE
→ Outputs
3. CP-F-SINK
1. AOUT_W102 (analogue 002) : robot program
3. Optional: Hide safety glass. 2. AOUT_B109 (analogue 004) : position in PCB box
1. In Model Explorer, choose Objects → CP-F-RASS_Mitsubishi → Geometrie → 6. Change source part number to 210.
Geometrie_Umhausung 1. In Model Explorer, select CP-F-SOURCE.
2. In Properties, select Visualization. 2. In Properties → CP System, change Part Number to 210.
3. Click Invisible.
4. Open robot program in project management.
1. In Project Management, right click on Projects and select Open.
2. Select <project folder>\CF\Rob_Montage\RV-4FL\Montage_RV_4FL.prjx. Note: The configured model can be saved as a template which can be
3. In Project Management, select Controllers → Montage_RV_4FL
opened with CIROS Studio and Education in robot programming lessons.
4. Assign project Montage_RV_4FL to the controller.
203
Steps to simulate CP-F-RASS
1. Optional: To reduce computing power, close all windows except model window and I/O monitor, e.g. Model Explorer, Properties,
Project Management, etc.
2. Start simulation.
3. Give a robot program and position in box in I/O monitor and activate override.
1. For example: robot program 1 and box position 3.
• AOUT_W102 = robot program → Value = 1
• AOUT_B109 = position in box → Value = 3
204
Simulate Real Robot Program in CP-F-RASS Model
205
Simulate Real Robot Program in CP-F-RASS Model
Steps to modify robot program (1)
1. Create a new CIROS project. 6. Copy following files from <project folder>\CF\Rob_Montage\RV-4FL to
2. Load and snap following models in place from CP System model the robot program folder.
1. RobotSystemDriver.mb5
libraries.
2. Montage_RV_4FL.prjx
1. CP-F-RASS (Mitsubishi)
3. ENRGSAVEVACU.mb5, if not exist
2. CP-F-SOURCE
4. MonitorHome.mb5, if not exist
3. CP-F-SINK
5. MonitorPalWS.mb5, if not exist
3. Change Part Number of CP-F-SOURCE to 210. 6. PCBTrayCntrl.mb5, if not exist
4. Place all the real robot programs in a single folder and place the folder 7. In CIROS, open Project Manager, open the copied project
in CIROS project folder. Montage_RV_4FL.prjx in robot program folder and assign it to
controller Montage_RV-4FL.
5. In the folder, delete following files.
1. Files with type .bak. 8. In Project Manager, open Projects → Montage_RV_4FL (MBA5) → Files
2. Files with type .prjx. and delete the files which do not exist.
206
Simulate Real Robot Program in CP-F-RASS Model
Steps to modify robot program (2)
9. In CIROS, change the following in all files in the project. 3. Make following changes.
1. Bits and bytes in I/O definitions 1. Add following lines in 999.mb5.
P_tGripperVac=(0,0,205,0,0,33.50)
From To From To From To
P_tGripperWP=(0,0,170,0,0,33.50)
2032 132 2072 172 2148 248 P_tGripperFuse=(0,0,151.5,0,0,33.50)
P_tGripperNone=(0,0,0,0,0,33.50)
2033 133 2144 244 2150 250
2. Comment out or delete all position declarations in UBP.mb5 and add following lines.
2040 140 2147 247 2151 251
Def Pos P_tGripperVac
2064 164 Def Pos P_tGripperWP
Def Pos P_tGripperFuse
2. Tool changing mechanism Def Pos P_tGripperNone
From To 3. Change following positions to reference positions in UBP.pos. The location of tool
magazine in CIROS model is different from actual robot. Thus, the offsets are too large to
M_Tool = m_GripperFuse Tool P_tGripperFuse
be ignored.
M_Tool = m_GripperNone Tool P_tGripperNone P_GrpStorageVac = (-395.65,-125.00,484.90,-180.00,-0.00,-0.00)(7,1)
P_GrpStorageWp = (-395.65,0.00,484.90,-180.00,0.00,0.00)(7,1)
M_Tool = m_GripperVac Tool P_tGripperVac P_GrpStorageFuse = (-395.65,125.00,484.90,-180.00,-0.00,-0.00)(7,0)
M_Tool = m_GripperWP Tool P_tGripperWP 4. Comment out or remove all lines calling camera related subprograms, for example the
line calling GetCamResult in program 1 to 5.mb5.
HOpen 6 HOpen 3
REM CallP "GetCamResult", CamPrgNumber%
HClose 6 HClose 3
10. Save all and compile the project.
207
CP-F-RASS Robot Programming
Robot programming example ‘gripper test’ (1)
• The program is independent of all the other robot programs, but uses positions in UBP.pos.
• It is written in MBA V and does the following.
1. Move robot arm to home position.
2. Move robot to parallel workpiece gripper magazine.
3. Mount the gripper.
4. Remove gripper from magazine.
5. Open gripper.
6. Close gripper.
7. Store gripper back to magazine.
8. Move robot arm back to home position.
208
CP-F-RASS Robot Programming
' TODO add your code here ' Store gripper back to magazine
Robot programming example ‘gripper test’ (2)
MVS P_GrpStorageWP
' Move to home position HOpen 3
1. Create a CIROS project and load CP-F-RASS from CP System model libraries. MOV P_Home
2. Make sure a project is assigned to controller Montage_RV-4FL and UBP.pos is in DLY 1 ' Move back to home position
MVS P_GrpStorageWp, -30
the project.
' Mount parallel workpiece gripper JOVRD 100
3. In Project Management, right click on Projects → <project name> → Files and MOV P_PCBPalletHelp MOV P_PCBPalletHelp
choose new. MOV P_GrpStorageWp, -30 MOV P_Home
JOVRD 50
4. Create a Melfa Basic V program and name it RASS-GripperTest.mb5. MVS P_GrpStorageWp END
5. With the programming window being the active window, select Programming → HClose 3
MVS P_GrpStorageWp + P_ToolX80
Programming assistant.
DLY 1
6. Uncheck Declare inputs and outputs and click OK.
' Open and close gripper
7. In the programming window, add the lines shown in right. HClose 1
8. Save the program. HOpen 1
DLY 1
9. In Project Management, right click on the program and select Set main program. HOpen 1
10. Compile the project. HClose 1
DLY 1
11. Run simulation.
209
Move Robot Manually
• There are several ways to move robot manually in CIROS.
210
Move Robot Manually
3. Move the robot with Teach-In panel.
• Gripper can be controlled in section Gripper output.
211
Mount and Release a Gripper Manually
• In some system, for example, CP-F-RASS, TCP changes relative • Steps to release a gripper manually with example CP-F-RASS
to the gripper. model.
1. Move the robot arm to the desired position.
• Steps to mount a gripper manually with example CP-F-RASS 2. In Teach-In panel → Gripper output, open HClose_3.
model. 3. Start simulation (F5).
4. Stop simulation (F5).
1. Select <Automatic TCP>. 5. The gripper is released.
2. Move the robot arm to the tool position.
3. In Teach-In panel → Gripper output, close HClose_3.
4. Start simulation (F5).
5. Stop simulation (F5).
6. The gripper is mounted.
212
TCP Tracking
• TCP path of robot movement can be monitored.
• Active TCP tracking from View → TCP tracking.
213
View TCP Coordinate
• Joint coordinate and cartesian coordinate of the active TCP can be monitored.
214
Robot Workspace
• The room that TCP can reach.
• Activate at View → Robot workspace.
215
Collision Detection
• Collision detection can be activated.
• In collision detection mode the movements are always
incremental.
• It is useful in testing a new robot program to avoid collision.
216
Collision Detection
Configuration (1)
1. Assign group. Collision is only detected when elements in deferent 4. Assign content to Rest group.
groups cross each other.
1. Select Settings → Collision detection.
217
Collision Detection
Configuration (2)
218
Collision Detection
Activate simulation
219
Only CIROS Studio
Connect to Robot Controller
Communication interface
• Ethernet cable
• TCP/IP protocol
• IP-Address and Port
LAN Port
220
Only CIROS Studio
Check the Ethernet Cable
Please check the ethernet connection between robot controller and the computer.
221
Only CIROS Studio
Connect to Robot Controller
Find the IP-address from R32TB
1. The IP-address can be read from robot teach box (TB). 4. Select 3.PARAM.
222
Only CIROS Studio
Connect to Robot Controller
Find the IP-address from R56TB
1. The IP-address can be read from robot teach box (TB). 3. Click on “Parameter name” to search for parameter “NETIP”.
2. Select “Parameter” from the menu. 4. Key in “NETIP” and click “Enter”.
5. IP Address is shown.
224
Only CIROS Studio
Connect to Robot Controller
Set robot controller to Automatic and switch of teach mode.
225
Only CIROS Studio
Connect to Robot Controller
Insert CP-F-RASS model
226
Only CIROS Studio
Connect to Robot Controller
Configure communication setting
1. In Model Explorer, select “CP-F-RASS_Mitsubishi\Montage_RV-4FL”. 4. Expand Communication in properties window and select TCP/IP.
2. In properties window, select Communication. 5. Enter the IP-address of the robot controller.
3. Select TCP/IP as connection type. 6. Port = 10001
Offline / Local
228
Only CIROS Studio
Connect to Robot Controller
Open RCI-Explorer
229
Only CIROS Studio
Connect to Robot Controller
Build the connection
1. In RCI Explorer, right click on Connection and select Connect. 4. Connection is established.
231
Only CIROS Studio
Online Information from Robot Controller
Robot programs
232
Only CIROS Studio
Online Information from Robot Controller
Robot programs in slots
233
Only CIROS Studio
Online Information from Robot Controller
System variables
234
Only CIROS Studio
Online Information from Robot Controller
Parameters
235
Only CIROS Studio
Read Live Parameter Value
236
Only CIROS Studio
Online Information from Robot Controller
Error list
237
Only CIROS Studio
Online Information from Robot Controller
Refresh window
3. Creating backup…
239
Only CIROS Studio
Robot Controller Backup Folder
• By default, backup is located in <project folder>\Backup.
240
Only CIROS Studio
Load Backup
1. Right click on the robot and select Load backup > All. 2. Select backup folder.
3. Restart the controller after loading complete.
241
Only CIROS Studio
Upload Robot Programs
242
Only CIROS Studio
Upload Robot Programs
1. In RCI Explorer, right click on Programs, select Upload all. 3. Programs which are running in slots cannot be uploaded. Click ok and
continue uploading the missing programs.
243
Only CIROS Studio
Robot Program Folder
• By default, uploaded robot programs are located in <project
folder>\<robot controller name>.
• For example,
• CIROS project : RASS2_717
• Robot name : Montage_RV-4FL
• Uploaded robot programs are located in ..\RASS2_717\Montage_RV-
4FL.
244
Only CIROS Studio
Download Program
245
Only CIROS Studio
Online Teach-In
• Once connected, it is possible to activate online teaching in Teach-In panel.
• Online teaching mode allows
• Simulation of real time robot position in CIROS
• Move the real robot in CIROS
• Track the real robot coordinates in CIROS
246
Only CIROS Studio
Online Teach-In
1. Make sure robot controller is online. 4. At the bottom of Teach-In panel, click on Activate online
2. Open Teach-In panel. teaching.
Shortcut: F8
247
Only CIROS Studio
Online Teach-In
Notice the difference between before and after teach in is activated.
248
Only CIROS Studio
Get Actual Robot Data with Built-In Python Function
1 3
• CIROS can be directly connected to VR glasses like HTC Vive and Oculus Rift.
• Typical procedure
1. Install Steam / SteamVR and create a user account (https://store.steampowered.com/)
2. Start Steam and switch to “offline mode” in case that Steam should be used without internet access
3. Start SteamVR and run room setup
4. Configure the VR mode of CIROS
5. Activate VR mode of CIROS and start the simulation
251
Setting up VR Glasses Configuration of the (virtual) room
Start SteamVR and run Room Setup
Choose “Room-Scale” to be
able to go around in the real
and virtual room
253
Setting up VR Glasses
Start SteamVR and run Room Setup
254
Setting up VR Glasses
Start SteamVR and run Room Setup
255
Setting up VR Glasses
Start SteamVR and run Room Setup
256
Setting up VR Glasses
Start SteamVR and run Room Setup
257
Setting up VR Glasses
Configure VR mode of CIROS
Enable VR glasses
258
Setting up VR Glasses
Configure VR mode of CIROS
259
Setting up VR Glasses
Activate VR mode of CIROS and start the simulation
260
Interact with Model
• To interact with the model, for example, click on the buttons,
start and stop simulation, etc. An interactive element has to be
added.
263
Move I/O Address
Example: Moving digital input S1_A from bit 3 to 11 (2)
265
Multiple View Windows
• CIROS is not restricted to a single view window but offers the possibility to show a couple of view windows concurrently.
• To open a new window, select View → New window.
• Each view might have a different perspective onto the scene.
266
CIROS Starter
Calling CIROS model with URL
Use single instance UseSingleInstance CIROS uses an existing instance to open the new
model. A new instance is only started if no
instance of CIROS is running yet.
URL format:
“StartCIROS: <path to model>?Parameter1&Parameter2”
Example:
"StartCIROS:Example Models\Small Demos for Learning\Robot Assembly with UR5\Robot Assembly with UR5.modx?ActivateFullScreen&UseSingleInstance"
267
Model Analysis
Extras → Model analysis → Whole model
268
CIROS Part Number for CP System
“PartNrReplikator.py” replicates the part in simulation. “PartNrTranslation.py” translates MES4 part number to CIROS part number.
269
Create Own Part
Task: Add a MPS Part from CP-L-SOURCE
• There are some parts supported from CP-System model libraries. It is possible to create own part to work in CP environment in
CIROS.
• User can import the CAD drawing of their parts and test it in virtual environment before implementing it on the real system.
• Steps to create own part will be explained with an example of adding a Festo MPS red housing with RFID and black MPS cap to a
CP-L-CONVEYOR via a CP-L-SOURCE.
270
Create Own Part
MPS part numbers according to FactoryViews[1]
3002 Black MPS housing with 3080 Cap with integrated micro-
RFID controller
[1] FactoryViews is the new software bundle for MES and web based services. It contains MES4 v3. 271
Create Own Part
Steps to create an own part (1)
272
Create Own Part
Prepare CAD drawing of the parts in supported format.
273
Create Own Part
Define MES4 / FactoryViews part numbers.
274
Create Own Part
CIROS part number as defined in “PartNrTranslation.py”
276
Create Own Part
Optimize geometry
277
Create Own Part
Objects’ properties defined in example.
Part name Meta object Object type Gripper points Grip points
MPS_Housing_rt [1] Housing WS GripPistonRed HousingRed
GripCapRed
MPS_Housing_sw [2] Housing WS GripPistonBlack HousingBlack
GripCapBlack
MPS_Housing_gr [3] Housing WS GripPistonSilver HousingSilver
GripCapSilver
MPS_Piston Pistons WS PPiston
MPS_Cap Caps WS CapStackBlackCap
279
Create Own Part
Configure object’s properties in CIROS (2)
280
Create Own Part
Define coordinates of gripper points and grip points.
281
Create Own Part
Move configured object to Templates.
• Objects can be moved between ‘Objects’ and ‘Templates’ in Model Explorer by drag and drop.
282
Create Own Part
“PartNrTranslation.py” description
• “PartNrTranslation.py” translate MES4 part number to CIROS • List “CirosPN_by_PNsw” translates MES part number to CIROS
part number. part number. Only part number of black part is needed here.
• 2D array “PN_by_color” sorts the part by colour.
284
Create Own Part
“PartNrReplikator.py” description
• “PartNrReplikator.py” takes the translated CIROS part number • “bauteil_ID” contains detailed information of each CIROS ID.
and replicates the part in the model from templates.
• The script also configures gripper points and grip points.
285
Create Own Part
Add new parts to “<project>\CF\py\PartNrReplikator.py”
286
Create Own Part
Modify template “Palette”
1. Move “Palette” from “Templates” to “Objects”. 3. In Properties window, change the value of “Grip only objects in direct
meta object” to “Frontschalen,Ruechschalen,Housing” and click Apply.
Note: The value can be typed directly in the field below.
287
Create Own Model Library
• There are model libraries with a huge variety of models by default. However, these models are encrypted and not editable.
• It is possible to create own libraries, either from scratch or from modified standard model libraries. These libraries created can be
edited from time to time and can also be used as a building block to build own models, just like the standard model libraries.
• In coming tutorials, steps to create own model libraries from modified standard model libraries containing a modified CP-L-
CONVEYOR, CP-L-SOURCE and CP-L-SINK which supports MPS workpiece will be shown. Steps to create MPS workpiece in CP
environment is shown in previous chapter.
• Important! If the library is made from modified standard library, avoid mixing new model library with standard library for an error
free simulation.
288
Create Own Model Library
Elements of a model library
• CF.7z
• Textures.7z
• Model
• Model.modx
• Model.png
• Model.ini
• Model.html
• InitModBib.modx
• InitModBib.ini
• InitModBib.fin
289
Create Own Model Library
Steps to create own model library
290
Create Own Model Library
Create CP.7z and Textures.7z
1. In a chosen window’s path, create an empty folder. This will be the new model library folder.
2. In CIROS Studio, create a CIROS model in the folder created above. Name it InitModBib.modx.
3. Add any model from Festo CP System model library.
4. Delete all Materials in Model Explorer.
5. In <project folder>\CF, replace any modified python or irl scripts.
6. Compress following folders with 7-Zip:
1. <project folder>\CF
2. <project folder>\Textures
291
Create Own Model Library
Create InitModBib (*.modx, *.ini and *.fin)
292
Steps to Create own Virtual Machine Communicating with MES4
• At the end of this tutorial, a resource consists of a belt with
application module traffic light is created (see picture on the
right) and is able to work together with a CP-L-CONVEYOR.
293
Steps to Create own Virtual Machine Communicating with MES4
Steps to create base module.
1. Insert CP-L-CONVEYOR from Festo CP System model library. 5. Delete following components in ConveyorBelt.
• LedBackwards
2. Insert ModLibs\Conveyors\ConveyorBelt. • LedForwards
• LedStopped
• ProfilesTopX
• All inputs
• All outputs
3. Delete all Extended properties in Properties\Extended. 6. Go to Properties\General, select object type as Inactive object.
7. Go to Modelling\Geometry optimization.
8. Select Merge hulls with matching material or area color to optimize
ConveyorBelt.
7. Change the size of ConveyorBelt in Properties\Dimension. 10. Copy CP-L-CONVEYOR\SPS_A and paste it under object ConveyorBelt.
• X = 700 mm The object is renamed to SPS_A_1.
• Y = 120 mm
• Z = 974.50 mm 11. Change position of SPS_A_1 in world coordinate.
• X = 350 mm
• Y = 54.55 mm
• Z = 975 mm
12. Copy CP-L-CONVEYOR\Conn1 and Conn2 and paste them under
ConveyorBelt.
295
Steps to Create own Virtual Machine Communicating with MES4
Steps to create base module.
296
Steps to Create own Virtual Machine Communicating with MES4
Steps to create base module.
15. Go to SPS_A_1\Inputs, connect DIN1_x5 to 1. 19. Right click on Projects\CPSystem_Allgemein(IRL) and compile the
project. Make sure that all projects are compiled successfully.
20. Drag and snap ConveyorBelt to CP-L-CONVEYOR.
21. Base module is created.
297
Steps to Create own Virtual Machine Communicating with MES4
Steps to create application module.
1. In model libraries, insert LEDs and switches\Signal lights. 3. Move origin of SignalLights to middle bottom of the object.
Hint: With help of 3D marker.
2. Select SignalLights, in Properties\General, change object type to Work 4. Change z-coordinate of SignalLights in world coordinate to 975 mm.
station. 5. Add analog output and name it CIROS_App_ID.
298
Steps to Create own Virtual Machine Communicating with MES4
Steps to create application module.
6. Select SignalLights, add following extended property. 9. Move AppConn pose to front middle of object’s bottom plane.
Key Value
OF OUT_CIROS_App_ID := 24
299
Steps to Create own Virtual Machine Communicating with MES4
Steps to create application module.
300
Steps to Create own Virtual Machine Communicating with MES4
Steps to program virtual machine in IRL
301
Steps to Create own Virtual Machine Communicating with MES4
Steps to program virtual machine in IRL WAIT 1.0 SEC;
YellowOn := false;
GreenOn := true;
2. Add function “appSignalLights()” to Applikationen.irl. else
FUNCTION appSignalLights( IN ARRAY [1..7] OF REAL: Parameter ) : int; redMES := Parameter[1];
VAR yellowMES := Parameter[2];
INPUT BOOL : RedIsOn AT 0; greenMES := Parameter[3];
INPUT BOOL : YellowIsOn AT 1; IF redMES = 1 THEN
INPUT BOOL : GreenIsOn AT 2; RedOn := true;
OUTPUT BOOL : RedOn AT -1; ENDIF;
OUTPUT BOOL : YellowOn AT 0; IF yellowMES = 1 THEN
OUTPUT BOOL : GreenOn AT 1; YellowOn := true;
REAL : redMES; ENDIF;
REAL : yellowMES; IF greenMES = 1 THEN
REAL : greenMES; GreenOn := true;
BEGIN ENDIF;
RedOn := false; endif;
YellowOn := false;
GreenOn := false; WAIT 1.0 SEC;
if( MyResourceId = 0 ) then RedOn := false;
{Standardmode} YellowOn := false;
RedOn := true; GreenOn := false;
WAIT 1.0 SEC;
RedOn := false; return (0);
YellowOn := true; ENDFCT;
302
Steps to Create own Virtual Machine Communicating with MES4
Steps to program virtual machine in IRL
303
Troubleshoot in External Document
CIROS-CP_Troubleshoot_EN_v7.1_xxxxxx.pdf