Download as pdf or txt
Download as pdf or txt
You are on page 1of 255

BASIC PLANT SIMULATION

Student Guide

Engineering Solution
Hitachi Sunway Information Systems (Thailand) Ltd.
Contents
Simulation Concepts ............................................................................................................................... 8
Definition of Simulation ....................................................................................................................... 9
Discrete-Event Simulation ................................................................................................................... 9
Avoid These Common Errors in Simulation ........................................................................................ 9
Benefit of Simulation ........................................................................................................................... 9
Simulation Uses ................................................................................................................................ 10
Phases of a Simulation Study ........................................................................................................... 11
Proceeding Through a Simulation Project ........................................................................................ 11
Planning of Experiments ................................................................................................................... 13
Basic Simulation Workflow ................................................................................................................ 13
Getting Started ...................................................................................................................................... 14
Plant Simulation: Discrete-Event Simulation..................................................................................... 15
Starting Plant Simulation ................................................................................................................... 15
Ways to Open a Plant Simulation Model File.................................................................................... 16
Ways to Close a Plant Simulation Model File ................................................................................... 16
Exiting Plant Simulation .................................................................................................................... 16
Plant Simulation Licensing ................................................................................................................ 17
Plant Simulation Graphical User Interface ............................................................................................ 19
Introduction to the Graphical User Interface ..................................................................................... 20
Window Types ................................................................................................................................... 20
Plant Simulation Viewers .................................................................................................................. 20
Plant Simulation Object Windows ..................................................................................................... 21
Docked and Floating Viewers and Toolbars ..................................................................................... 21
On Demand Window Viewing ........................................................................................................... 22
Arranging Windows ........................................................................................................................... 22
Toolbox Viewer ................................................................................................................................. 23
Adding to the Class Library and Toolbox .......................................................................................... 23
Customizing Menu and Tool Bars ......................................................................................................... 25
Toolbars ............................................................................................................................................ 26
Customizing the Toolbar ................................................................................................................... 26
Introduction to Modeling ........................................................................................................................ 27
Introduction to Modeling .................................................................................................................... 28
Modeling Strategies .......................................................................................................................... 28
Organizing the Class Library ............................................................................................................. 28
Moving a Folder ................................................................................................................................ 28
The Default Class Library of a Model File ......................................................................................... 29
Renaming a Folder ............................................................................................................................ 29
User-defined Names ......................................................................................................................... 30
Saving a Model File ........................................................................................................................... 30
Opening a Backup File ...................................................................................................................... 30
Working with Objects ............................................................................................................................ 31
Frames .............................................................................................................................................. 32
Units Setup ........................................................................................................................................ 32
Inserting Objects ............................................................................................................................... 32
Connecting Objects ........................................................................................................................... 33
Other Selected Topics ....................................................................................................................... 33
Simulating a Facility .......................................................................................................................... 34
States of Material Flow Objects ........................................................................................................ 34
Help Access .......................................................................................................................................... 35
Introduction to Help ........................................................................................................................... 36
Basic Objects ........................................................................................................................................ 37
Material Flow and MUs ..................................................................................................................... 38
Resource Objects .............................................................................................................................. 38
Information Flow Objects .................................................................................................................. 38

Hitachi Sunway Information Systems (Thailand) Ltd.


-1-
User Interface Objects ...................................................................................................................... 38
Tools .................................................................................................................................................. 39
Introduction to Material Flow Objects .................................................................................................... 40
The Source ........................................................................................................................................ 41
The Station ........................................................................................................................................ 42
The Drain........................................................................................................................................... 42
The Part............................................................................................................................................. 42
The Event Controller ......................................................................................................................... 43
Material Flow Object States .............................................................................................................. 44
Frame Window Toolbar ..................................................................................................................... 44
Common Material Flow Object Properties ............................................................................................ 45
Resources ......................................................................................................................................... 46
Times Tab ......................................................................................................................................... 46
Set Up Tab ........................................................................................................................................ 46
Failures Tab ...................................................................................................................................... 46
Controls ............................................................................................................................................. 47
Exit Strategy ...................................................................................................................................... 47
Statistics ............................................................................................................................................ 47
Stationary Importer and Failure Importer Tab ................................................................................... 47
User-Attributes Tab ........................................................................................................................... 47
The Icons Menu ................................................................................................................................ 47
Using Object Labels .......................................................................................................................... 48
How to Continue with the Activities ................................................................................................... 48
Copying the Contents of a Frame ..................................................................................................... 48
Global Options and Preferences Windows ....................................................................................... 49
Default strategy for moving a MU from station to station ...................................................................... 51
Introduction to the Default strategy for Moving a MU ....................................................................... 52
The Standard Converging Behavior .................................................................................................. 52
Setting Up Exit Strategies ................................................................................................................. 52
Modifying Exit Strategy Behavior ...................................................................................................... 53
The FlowControl ................................................................................................................................ 53
Introduction to Bottleneck Analyzer and Sankey Objects ..................................................................... 54
BottleNeck Analyzer .......................................................................................................................... 55
Sankey Diagram ................................................................................................................................ 55
Statistics and Charts ............................................................................................................................. 57
Introduction to Statistics and Charts ................................................................................................. 58
Collecting Statistics ........................................................................................................................... 58
Resource Statistics ........................................................................................................................... 58
Product Statistics .............................................................................................................................. 59
Driving Statistics ................................................................................................................................ 59
Type Statistics ................................................................................................................................... 59
Statistics Report ................................................................................................................................ 59
Statistics Tables ................................................................................................................................ 59
Statistics Values ................................................................................................................................ 59
The Chart Object ............................................................................................................................... 60
Display Panel .................................................................................................................................... 60
More Chart Techniques (Optional Lesson) ........................................................................................... 61
Introduction to Chart Techniques ...................................................................................................... 62
Histogram .......................................................................................................................................... 63
Plotter ................................................................................................................................................ 64
Display............................................................................................................................................... 64
Gantt Wizard ..................................................................................................................................... 65
Hierarchy and Interfaces ....................................................................................................................... 66
Introduction to Hierarchy and Interfaces ........................................................................................... 67
Building a Component ....................................................................................................................... 67
Interfaces........................................................................................................................................... 68
The Hierarchical Structure of the Model ........................................................................................... 68

Hitachi Sunway Information Systems (Thailand) Ltd.


-2-
Selecting and Copying Objects ......................................................................................................... 69
Test Models ........................................................................................................................................... 70
Introduction to Test models ............................................................................................................... 71
Testing a Module of the Simulation Model ........................................................................................ 71
Re-using User-defined Objects ......................................................................................................... 72
Icon Editor and Component Representation ......................................................................................... 73
Icons .................................................................................................................................................. 74
Icon Editor ......................................................................................................................................... 74
The Icon Editor’s Main Window ........................................................................................................ 75
About Icons ....................................................................................................................................... 75
The Icon Toolbar, Draw Mode .......................................................................................................... 75
Creating a New Icon .......................................................................................................................... 76
Using the Clipart Library .................................................................................................................... 76
Importing Images and Drawings ....................................................................................................... 77
Transparent Icons ............................................................................................................................. 77
Animating Icons ..................................................................................................................................... 78
The Icon Toolbar, Animation Mode ....................................................................................................... 79
Symbolic and Logical Levels ............................................................................................................. 79
Animating a Picture Using Animation Points ..................................................................................... 80
Connecting the Animation Points ...................................................................................................... 80
Other Icon Editor Topics ....................................................................................................................... 81
Automatic Icon Control (State Icons) ................................................................................................ 82
Frame Background Image ................................................................................................................. 82
Moving an Icon Reference Point ....................................................................................................... 82
Moving an Icon Animation Point ....................................................................................................... 83
Icons in the Toolbox .......................................................................................................................... 83
MU Graphics tab ............................................................................................................................... 83
Vector Graphics and Comments ........................................................................................................... 85
Using Vector Graphics in the Background of a Frame ..................................................................... 86
Adding Comments to a Frame .......................................................................................................... 86
Modifying the Frame Display............................................................................................................. 86
Classes, Instances, and Inheritance Introduction ................................................................................. 87
Inheritance Basics ............................................................................................................................. 88
Classes and Instances ...................................................................................................................... 88
Inheritance......................................................................................................................................... 89
More on Classes, Instances and Inheritance ........................................................................................ 91
Showing Inheritance Structures ........................................................................................................ 92
Paths and Name Space .................................................................................................................... 93
The Relative Path .............................................................................................................................. 93
The Absolute Path ............................................................................................................................. 93
Machine Failures ................................................................................................................................... 94
Introduction to Machine Failures ....................................................................................................... 95
Defining Failures ............................................................................................................................... 95
Random Number Introduction ........................................................................................................... 96
Random Number Streams-Seed Values ........................................................................................... 96
How are Random Number Streams Accessed ................................................................................. 97
Buffers and Other Material Flow Objects with a Capacity > 1 .............................................................. 98
The Buffer.......................................................................................................................................... 99
The PlaceBuffer ................................................................................................................................ 99
The Sorter ......................................................................................................................................... 99
The Parallel Station ......................................................................................................................... 100
The Pick and Place Robot............................................................................................................... 100
Others Covered in MT46300 ........................................................................................................... 100
Others Covered in this Course ........................................................................................................ 100
Introduction to Length-Oriented Objects ............................................................................................. 101

Hitachi Sunway Information Systems (Thailand) Ltd.


-3-
Introduction to Length-Oriented Objects ......................................................................................... 102
The Conveyor .................................................................................................................................. 103
Tracks, Transporters, and Transfer Station Objects ........................................................................... 104
Track Object .................................................................................................................................... 105
Loading and Unloading ................................................................................................................... 105
Transfer Station: Loading ................................................................................................................ 106
Transfer Station: Unloading ............................................................................................................ 107
Setup Time, Assembly, and Dismantle Objects .................................................................................. 108
MUs with a Capacity ....................................................................................................................... 109
The Assembly Station ..................................................................................................................... 109
The Dismantle Station ..................................................................................................................... 110
Attributes ............................................................................................................................................. 111
Introduction to Attributes ................................................................................................................. 112
Show Attributes and Methods Window ........................................................................................... 112
Data Types and User-defined Attributes ............................................................................................. 113
Data Types ...................................................................................................................................... 114
User Defined Attributes ................................................................................................................... 114
Working with TableFiles ...................................................................................................................... 115
Introduction to TableFiles ................................................................................................................ 116
Exporting and Importing Data ......................................................................................................... 117
Tables Defining How the Source Creates Parts ............................................................................. 118
The TableFile Sequence of the Source .......................................................................................... 118
Using Attributes of MUs as an Exit Strategy ................................................................................... 118
Introduction to the Paint Object ....................................................................................................... 118
Production Schedules ......................................................................................................................... 120
Introduction to Production Schedules ............................................................................................. 121
Cyclical Source Sequence .............................................................................................................. 121
Event Debugger .................................................................................................................................. 122
Event Debugger .................................................................................................................................. 123
Finding Objects and Text ................................................................................................................ 123
Examples of Event Debugger Usage .............................................................................................. 123
Shift Calendar ..................................................................................................................................... 126
Introduction to Shift Calendar.......................................................................................................... 127
Shift Calendar Object ...................................................................................................................... 127
The ShiftCalendar - Reduced Times ............................................................................................... 128
Resource Exporters and Importers ..................................................................................................... 129
The Concept .................................................................................................................................... 130
Types of Importers .......................................................................................................................... 130
Importer Settings ............................................................................................................................. 131
Exporter Settings ............................................................................................................................. 131
Worker Basics ..................................................................................................................................... 132
The Concept .................................................................................................................................... 133
WorkerPool...................................................................................................................................... 133
Workplace ....................................................................................................................................... 134
Assigning a Workplace to a Station ................................................................................................ 135
Defining Services of a Station ......................................................................................................... 135
Defining the Worker from the Workerpool ....................................................................................... 135
Footpaths and Shift Calendars for Resources .................................................................................... 136
Using Footpaths .............................................................................................................................. 137
Workers and Shifts .......................................................................................................................... 137
Workers Carrying Parts ....................................................................................................................... 138
Introduction to Workers Carrying Parts ........................................................................................... 139
Introduction to Worker Charts ......................................................................................................... 139
Setting up the Worker Chart............................................................................................................ 140

Hitachi Sunway Information Systems (Thailand) Ltd.


-4-
Introduction to Failure Importers ..................................................................................................... 140
Introduction to Adding Workers to our Plant ................................................................................... 140
Time Sequence ................................................................................................................................... 141
Layout.............................................................................................................................................. 142
The TimeSequence ......................................................................................................................... 142
Performing a Power Consumption Analysis........................................................................................ 144
Simulating the Power Consumption in Your Facility ....................................................................... 145
Energy Statistics of the material flow object(s) ............................................................................... 146
Loading a CAD Model as a Background ............................................................................................. 147
Introduction to Background Icons ................................................................................................... 148
How to Bring in an AutoCAD Drawing and Scale it Correctly ......................................................... 149
Preview of Experiment Manager ......................................................................................................... 150
Experiment Manager ....................................................................................................................... 151
Presentation of Results in Custom Reports ........................................................................................ 152
The HTML Wizard Object ................................................................................................................ 153
The Report Object ........................................................................................................................... 153
Introduction to the Method Object ....................................................................................................... 155
Introduction to Our Task .................................................................................................................. 156
Object-Oriented Programming ........................................................................................................ 158
What is a Method? .......................................................................................................................... 158
What Can a Method Do?................................................................................................................. 158
The Method Object .......................................................................................................................... 158
Toolbar of the Method ..................................................................................................................... 159
Editor Preferences .......................................................................................................................... 159
Simulation Preferences ................................................................................................................... 160
The Syntax for Writing a Method ........................................................................................................ 161
Syntax of a Method ......................................................................................................................... 162
SimTalk Operators .......................................................................................................................... 162
Document Conventions ................................................................................................................... 162
Method Templates .......................................................................................................................... 163
Comments ....................................................................................................................................... 163
Sample Statements ......................................................................................................................... 164
The Method Debugger ........................................................................................................................ 165
The Method Debugger .................................................................................................................... 166
Breakpoints: Executing a Method Step-by-Step ............................................................................. 166
The Debugger Toolbar .................................................................................................................... 167
Viewing a Method in the Debugger Window ................................................................................... 167
Names, Identifiers, Paths, and Anonymous Identifiers ....................................................................... 168
Paths ............................................................................................................................................... 169
Name Space ................................................................................................................................... 169
Absolute Path .................................................................................................................................. 169
The Relative Path ............................................................................................................................ 170
Anonymous Identifiers ..................................................................................................................... 170
Calling the MU Triggering the Method -- @ .................................................................................... 170
Calling the Active Method - Self ...................................................................................................... 171
Calling the Object Calling the Method -- ? ...................................................................................... 171
Calling the Active Frame - Current .................................................................................................. 171
Calling the Location of the Active Frame - Location ....................................................................... 172
Calling the Topmost Level of the Hierarchy - root .......................................................................... 172
Scheduling Method Calls .................................................................................................................... 173
Variables ......................................................................................................................................... 174
Events in the Model - Calling Methods ........................................................................................... 174
The Reset Method ........................................................................................................................... 174
The Init Method ............................................................................................................................... 174
Entrance and Exit Controls ................................................................................................................. 175

Hitachi Sunway Information Systems (Thailand) Ltd.


-5-
Introduction to Entrance and Exit Controls ..................................................................................... 176
Point-Oriented Objects .................................................................................................................... 176
Length-Oriented Objects ................................................................................................................. 178
Moving an MU to the Next Object ................................................................................................... 180
Predecessors and Successors ....................................................................................................... 180
Other Notes ..................................................................................................................................... 180
Statements .......................................................................................................................................... 181
Introduction to Statements and Assigning a Value ......................................................................... 182
Conditional Statements ................................................................................................................... 183
Branching using "If Then" ................................................................................................................ 184
Branching using If Elseif .................................................................................................................. 184
The Inspect Statement .................................................................................................................... 184
Tables and Global Variables ............................................................................................................... 185
Using Tables and Global Variables in the Paint Shop .................................................................... 186
TableFile Inheritance ....................................................................................................................... 186
Formatting the TableFile ................................................................................................................. 186
Accessing the TableFile with a Method .......................................................................................... 187
Accessing a TableFile Using a Custom Index ................................................................................ 187
Methods for Lists and Tables .......................................................................................................... 187
Searching a TableFile ..................................................................................................................... 188
The Variable .................................................................................................................................... 188
The StackFile, QueueFile and CardFile .......................................................................................... 189
Method for Writing into StackFiles, QueueFiles and CardFiles ...................................................... 189
Introduction to Distribution Functions .............................................................................................. 190
Operations Converting Data Types ..................................................................................................... 191
Logical Operators ............................................................................................................................ 192
Integer Operators ............................................................................................................................ 192
Real Operators ................................................................................................................................ 192
String Operators .............................................................................................................................. 193
Bit Operators ................................................................................................................................... 193
Operator Precedence ...................................................................................................................... 193
Converting Data Types ....................................................................................................................... 194
Automatic Data Conversion ............................................................................................................ 195
Manually Converting Data Types .................................................................................................... 195
Loops ................................................................................................................................................... 196
The For Loop ................................................................................................................................... 197
The Repeat-Until Loop .................................................................................................................... 198
The While Loop ............................................................................................................................... 198
Conditional Suspensions - waituntil and stopuntil ............................................................................... 199
Introduction to Conditional Suspensions ......................................................................................... 200
Other Related .................................................................................................................................. 200
Methods using Attributes of Assembly Objects................................................................................... 201
Introduction to Methods using Attributes of Assembly Objects....................................................... 202
Accessing the Contents of an Object with a Method .......................................................................... 203
The Container ................................................................................................................................. 204
Accessing the Contents of an Object .............................................................................................. 204
The Contents of a Material Flow Object .......................................................................................... 205
Creating the Assembly Cycle .............................................................................................................. 206
Introduction to the Assembly Cycle ................................................................................................. 207
Calling Methods and Frame Controls ................................................................................................. 208
Calling Methods .............................................................................................................................. 209
Method Called by a Frame Control ................................................................................................. 209
(Resources) Broker Controlled Animation .......................................................................................... 210
A Method as a Custom Attribute ..................................................................................................... 211
Brokers and Importer Logic ............................................................................................................. 212

Hitachi Sunway Information Systems (Thailand) Ltd.


-6-
Modeling Transport Systems .............................................................................................................. 213
Introduction to Transport Systems .................................................................................................. 214
Modeling a Transport System with Active Elements ....................................................................... 215
Modeling a Transport System with Passive Elements .................................................................... 216
Trigger and Line Logic .................................................................................................................... 219
Introduction to Triggers ................................................................................................................... 220
The Trigger ...................................................................................................................................... 220
How the Trigger Works ................................................................................................................... 222
High Speed Line Logic .................................................................................................................... 222
MU Dimensioning ............................................................................................................................ 223
Preparations and Maintenance ........................................................................................................... 224
Set up a Production Resource ........................................................................................................ 225
Setting a Station Up ........................................................................................................................ 225
Other Selected Topics ......................................................................................................................... 226
Built-in Method Icons ....................................................................................................................... 227
Methods for Collecting Statistical Values ............................................................................................ 228
How Does This Relate to Our Plant? .............................................................................................. 229
Saving a Plant Simulation Table as a File ...................................................................................... 229
More Methods for Lists and Tables ................................................................................................. 230
Review: Complete Statistics Table ................................................................................................. 230
The Statistics Method-Accessing the Complete Statistics Table .................................................... 231
Querying Statistical Values/Attributes ............................................................................................. 231
An Alternate Way to Write the RecordTPT Method ........................................................................ 232
Acquiring Data Depending on an Attribute ...................................................................................... 232
The Event Controller ........................................................................................................................... 233
Selected Methods and Attributes of the EventController ................................................................ 234
Controlling the EventController with Methods ................................................................................. 234
Saving a Plant Simulation Table as a Text File .................................................................................. 235
Why Save a Table as a Text File .................................................................................................... 236
Collecting Values and Writing them to a Table ............................................................................... 236
Settings for Text Files Settings for Text Files ................................................................................. 236
The Generator Object ..................................................................................................................... 237
Loading a Text File into a Plant Simulation Table .............................................................................. 238
Loading a Text File .......................................................................................................................... 239
Importing a Production Table .......................................................................................................... 239
Interfaces to Other Applications Overview .......................................................................................... 241
Standard Interfaces in Plant Simulation .......................................................................................... 242
File Interfaces to Other Applications ................................................................................................... 243
DDE-Interface ................................................................................................................................. 244
The File Interface Object ................................................................................................................. 244
XML Interface .................................................................................................................................. 244
Communication Interfaces to Other Applications ................................................................................ 245
Teamcenter Interface ...................................................................................................................... 246
ODBC Interface ............................................................................................................................... 247
SQL Lite Interface ........................................................................................................................... 248
Oracle Interface ............................................................................................................................... 249
OPC Interface ................................................................................................................................. 250
SIMIT Interface ................................................................................................................................ 251
Socket Interface .............................................................................................................................. 252
ActiveX and Plant Simulation Example (Optional Lesson) ............................................................. 253
Putting It All Together ...................................................................................................................... 254

Hitachi Sunway Information Systems (Thailand) Ltd.


-7-
Simulation Concepts

Purpose
In this lesson, you learn the basics of discrete-event simulation.

Caution:
This lesson can be skipped by classes containing students that are already familiar with discrete-
event simulation.

Objectives
After you complete this lesson, you should be able to:
Know the type of simulations performed in Plant Simulation.
Understand why someone would perform a simulation.
See the flow of the basic use case.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Getting to Know Tecnomatix Plant Simulation > Simulation and Modeling
Concepts

Hitachi Sunway Information Systems (Thailand) Ltd.


-8-
Definition of Simulation
Simulation is the imitation of a dynamic process within a model to arrive at results that may be
transferred to real systems.
Or
"Simulation is the emulation of a system including its dynamic processes in a model you can
experiment with. It aims at achieving results that can be transferred to reality." (VDI 3633, Blatt 1,
1993).

Discrete-Event Simulation
Discrete-event simulation tracks the state changes in the model components at the time the changes
occur. Unlike continual simulation where the clock runs in a continuous manner, the clock in discrete-
event simulation jumps from one event to the next scheduled event. Events can schedule other
events such as a part entering a machine, which schedules an event for the same part to leave the
machine.

Note:
Discrete-event simulation only shows the state changes of the model components at certain points in
time, not continually over time. When certain events take place, certain model components change
their state and thus control the simulation. Plant Simulation considers these events in a discrete way,
step-by-step. The main advantage of this approach is, that Plant Simulation skips the time between
the events
In addition, Plant Simulation is an object-oriented application, that allows child objects to inherit
properties from a parent object.

Avoid These Common Errors in Simulation


Inaccurate specifications and parameters in your simulation model that lead to false results.
An inaccurate goal or none at all.
A missing or inaccurate definition of how to measure the results of the model. The measures
should be able to determine how well the experiment met the stated goal.
A model that is too detailed and too extensive that takes too long to build and is hard to
understand.
A model that is too abstract, which leads to unusable results.
An insufficiently validated model.
Incorrect assumptions.

Benefit of Simulation
The benefit of simulation as estimated by the VDI-directive 3633:
20% of all investment costs can be influenced by simulation.
A 2%--4% reduction in investment costs can be achieved.
0.5%--1% of the investment costs are the costs of the simulation.

Hitachi Sunway Information Systems (Thailand) Ltd.


-9-
Simulation Uses
To plan a new facility:
Determine and optimize the times and the throughput.
Determine the dimensioning.
Determine the limits of performance.
Investigate the influence of failures.
Determine manpower requirements.
Gain knowledge about the behavior of the facility.
Determine suitable control strategies
Evaluate different alternatives.

To optimize an existing facility:


Optimize control strategies.
Optimize the sequence of orders.
Test the daily proceedings.

To execute a plan:
Provide a template for creating the control strategies.
Test different scenarios during the warm-up phase of the facility.
Train the operators of the machines in the different states of the facility.

Simulation can:
Increase the profitability of the facility:
Increase
o Throughput
o Resource utilization
o Utilization of the facility
Determine
o Optimal buffer sizes
o Number of transporters and AGVs
o Number of the workpiece carriers
o Production schedules and sequences
Decrease
o Throughput times
o Required resources
o Storage requirements
Other
o Validate the process design in the planning process.
o Identify bottlenecks.
o Reduce WIP (work-in-progress).
o Evaluate the effects of capital investments or changes in processes.
o Optimize control strategies.
o Avoid planning errors.
o Protect investments.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 10 -
Phases of a Simulation Study
The three phases (according to VDI directive 3633 and ASIM guidelines for users of simulation in
production and logistic, 1997):

Note:
The VDI (German abbreviation for the Association of German Engineers) recommendation 3633 (VDI
Richtlinie 3633) defines accordingly: "simulation is a procedure for the reproduction of a system with
its dynamic processes in an experimentable model, in order to arrive at realizations, which are
transferable to the reality. In the broader sense by simulation preparing, accomplishing and evaluating
purposeful experiments with a simulation model are understood. With the help of the simulation the
temporal expiration operational sequence of complex systems can be examined."
ASIM is a simulation conference held every year in Germany for approximately the last 20 years.
According to their website: "The goal of the Symposium on Simulation Techniques is the exchange of
information and experience between experts from industry, science, and education."

1. Preparation
o Make a deicsion on whether it is worth it to simulate?
o Define the challenges and targets.
o Estimate the effort.
o Acquire, prepare, and synchronize the data.
o Make an analytical rough estimation.
o Create and validate the simulation model.
2. Execution
o Plan the simulation experiments.
o Execute the simulation experiments.
o Validate the simulation experiments.
3. Evaluation
o Format the results.
o Interpret the results.
o Document the results.

Proceeding Through a Simulation Project


Preparation
1. Define the problem and target.
o Breakdown of the problem.
o Is the problem worth a simulation?
o Define targets of the simulation study.
o Examples:
▪ Estimated throughput of the plant.
▪ Dimensions of the buffers.
▪ Reasonable control strategies.
▪ Optimal number of used staff members.
2. Analyze the system.
o Description of the system to be simulated.
o Define structure of the system.
o Define the scope of the simulation (border to the environment).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 11 -
3. Acquire the data.
o Breakdown of the separate system elements.
o Acquire system elements and define attributes.

4. Create the model.


o Translation of the real system to a model to run experiments.

5. Validate the model.


o Examination if the model and the reality correspond sufficiently.

Execution
6. Experiment and analyze the model.

Evaluation
7. Evaluate the results.
8. Give recommendations.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 12 -
Distribution of Efforts

Planning of Experiments
Do not make generalizations based on the results.
Plan your experiments exactly.
Validate your model.
Document input data and interfaces fully.
Create your model as detailed as needed, as abstract as possible.
Simulate with real data.

Basic Simulation Workflow

This diagram shows a recommended workflow for executing a simulation study. It is imperative that
the simulation expert set goals and effective ways to measure the results of the model against those
goals. Once the measures have been determined, it is easier to build an accurate model. While
modeling, the simulation expert must determine which factors affect the results of the model and
model those, while filtering out factors that can be assumed or ignored. Once the model is built, it
should be validated. Behavior that is known in the real world should be compared to the behavior in
the model. If the model meets the criteria then experiments can be made. Changes to the model
should be done one at a time, with experiments done each time. Otherwise, it may not be known
which change caused the effects in the experiment. Experiments can show other possibilities, and a
myriad of experiments may be executed before any changes are recommended for the real system.
To execute a concise and accurate simulation study several important issues need to be identified:
• What is the goal for the system being studied?
• What parameters define the success of fulfilling that goal?
• How are these parameters measured?

Hitachi Sunway Information Systems (Thailand) Ltd.


- 13 -
Getting Started

Purpose
In this lesson, you learn to start and exit Plant Simulation.

Note:
For previous Plant Simulation users: Plant Simulation is no longer developed on the TUNE
infrastructure to allow for increased tool flexibility.

Objectives
After you complete this lesson, you should be able to:
Start Plant Simulation.
Exit from Plant Simulation.

Help topics
Additional information for this lesson can be found in:
Setting-Up and Starting > Starting Tecnomatix Plant Simulation
Setting-Up and Starting > Exiting Tecnomatix Plant Simulation

Hitachi Sunway Information Systems (Thailand) Ltd.


- 14 -
Plant Simulation: Discrete-Event Simulation
Why Use Plant Simulation?
Discrete-event simulation only shows the state changes of the model components at certain points in
time, not continually over time. When certain events take place, certain model components change
their state and thus control the simulation. Plant Simulation considers these events in a discrete way,
step-by-step. The main advantage of this approach is that Plant Simulation skips the time between
the events.

Note:
Plant Simulation is a Discrete Event simulation tool. In other words, a dynamic simulation of
manufacturing processes over time. It allows you to perform stochastic (partially unpredictable)
experiments of your manufacturing facility; for statistical modeling of facilities where throughput,
machine capacity constraints, queuing constraints, are important.
In addition, Plant Simulation is an object-oriented application that allows child objects to inherit
properties from a parent object.

Note:
The object-oriented structure of Plant Simulation allows greater flexibility and maintainability of
complex, changing models. The model is made up of a collection of units (objects) that act on each
other. Each object can receive, process, and send data. Each object can be viewed as an
independent little machine or actor with a distinct role or responsibility.
Simple objects (parent objects) can be used as the building blocks to create more complex objects
(child objects). This is called inheritance.

Starting Plant Simulation


Method 1:

Double-click the Plant Simulation icon on the desktop.


The Plant Simulation software starts.
Method 2:
Choose Start → Programs → Tecnomatix → Plant Simulation 15.1

The Plant Simulation software starts.


Plant Simulation Interface Overview
Starting Plant Simulation opens the program window that provides menus and toolbars, the empty
Toolbox, the Class Library, the 3D Library, the Console, and the Start Page.
The Start Page offers links to access previously opened models and information about a
variety of topics including the Start Pages.

Choose View → Start Page to show the Start Page window again.
Other viewers are discussed in later lessons.

First Option of the File Menu


Choose File → New to open a new model file. This file contains the Class Library with the
selected built-in Plant Simulation objects.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 15 -
Ways to Open a Plant Simulation Model File
Method 1:
Choose File → Open .
Browse to the folder that contains the model file and either double-click the model file or choose
it and then click Open.
Method 2:
Drag and drop a model file into the Class Library.

Method 3:
Click Open on the Standard toolbar to open an existing model file.
Method 4:
Choose File → Recent Files. The list of recent files shows the last eight model files you
worked with.
Method 5:
Choose it from the Recent Models section of the Start Page window. The list of recent files
shows the last eight model files you worked with.

Ways to Close a Plant Simulation Model File


Method 1:
Choose File → Close .
Plant Simulation asks if the file is to be saved.
Method 2:
Choose the Close icon on the Standard toolbar.
Method 3:
Click Close in the upper right-hand corner of the Class Library window.
Method 4:
Open another model file in the same session of Plant Simulation. (However, Plant Simulation
can be opened more than once on a computer).

Exiting Plant Simulation


Method 1:
Choose File → Exit.
If there is a model file open Plant Simulation asks if the file is to be saved.
Method 2:
Click Close in the upper right-hand corner of the main Plant Simulation window.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 16 -
Plant Simulation Licensing
Primary License types:
Plant Simulation Standard
o Modeling of: Material flow, Table files, table data, Control logic, Evaluation, and Charts
o Limit of 4,000 material flow objects
Plant Simulation Professional
(Most complete package)
o Contains everything from the standard license plus: Experiment manager, Stochastic
(DataFit), HTML-Report, Profiler, Merge/Update, Attribute Explorer, XML interface Dialog
editor, Genetic Algorithms
o No limit to the number of objects

Other License types:


Plant Simulation Application
o Allows modeling with application objects
Plant Simulation Runtime
o Licenses for options and libraries are included.
o Models cannot be created.
o Changing of parameters in existing models and data exchange via interfaces
Plant Simulation Viewer
o Loading and simulation of Plant Simulation models (2D + 3D) without a license.
o Limitations: no modeling, no parameter change, no In- or Output
Plant Simulation "Simulation Package"
o For distributed simulation
o No graphical interface

Optional Plant Simulation Options:


Plant Simulation 3D
o It allows creating and running 3D simulations.
o It can convert the 2D simulations to 3D as well.
Plant Simulation Interface Package
o It provides an interface to various databases via ActiveX, C, ODBC, Socket, or Oracle
SQL.
Plant Simulation Gantt
o It provides a Gantt diagram for the graphic display and interactive alteration of production
plans. Data from a simulation run are displayed using a Gantt diagram and changed if
necessary.

Optional Plant Simulation Integrations (Additional Cost):


Plant Simulation FactoryCAD (SDX) Interface
o It is used to evaluate and optimize Factory layouts (creating by AutoCAD / FactoryCAD) by
running throughput simulations in Plant Simulation.
Process Designer Interface
o Data exchange to Process Designer and automated model generator

Optional Plant Simulation Libraries (Free):


AGVS, Assistant for the libraries of material flow equipment, CNC_Machines, 3D Comau
Robots, Conveyor, Conveyors 3D, EOM (Electrified Overhead Monorail), EOM 3D, Fuzzy
Logic, HBW (High Bay Warehouse), 3D HBW, Kanban, Machines 3D, Shop Light, and 3D
Truck.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 17 -
Optional Plant Simulation Libraries (Additional Cost):
Assembly Library
o It is an object library for modeling, simulating and evaluating assembly systems. With it,
model construction is graphical and interactive. Material flow objects such as assembly
stations and buffers are provided together with objects for the organization and
administration of the assembly process such as assembly control, part list administration,
material supply, worker allocation. This library adds around 43 objects. More about this at
this end of class.
Shop Library
o It is an object Library is designed to model workshop production where the material flow is
defined independently from the conveyor elements. This library adds around 14 objects.
More about this at this end of class.
Transport Library
o It contains these types of additional objects: AGVS (Automated Guided Vehicle System),
Conveyors, EOMs (Electric Overhead Monorail) and HBWs (High Bay Warehouse). They
are used to model material flow systems. This library adds around 25 objects.
Finite State Machines Library
o The objects of the FSM library (Finite State Machines) allow the modeling of complex
material flow systems and using industrial robots (for example, it allows visualization of the
PLC logic controlling robots). This library adds around 7 objects.
Personnel Library
o It used to create and manage worker pools and worker stations. This library adds around 2
objects.
And more: AMG, Assembly Line, FactoryCAD, and Logistics libraries.

Many Other Optional Objects. For example:


Genetic Algorithms
o It enables automatic optimization. It operates in a manner analogous to natural selection to
assemble better solutions out of good ones over a number of generations. The evaluation
of a solution is by simulation and the quality of the calculated solutions is displayed as a
barchart.
o Typical applications of Genetic Algorithms include: Lot size and & sequence planning,
Layout optimization, Personnel and resources allocation, Capacity Determination, and
Minimizing of set-up times.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 18 -
Plant Simulation Graphical User Interface

Purpose
In this lesson, you learn about the various window types.

Objectives
After you complete this lesson, you should be able to:
Use the various windows types.
Dock/Undock windows.
Use the Class Library and Toolbox viewers.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Getting to Know Tecnomatix Plant Simulation > Working with the Program,
Basics > Working with Window Types

Hitachi Sunway Information Systems (Thailand) Ltd.


- 19 -
Introduction to the Graphical User Interface
Plant Simulation uses an object-oriented interface similar to other Windows applications. This means
that you must first choose the object(s) that you would like to work on, after which the relevant options
required become available

Options can be accessed from the following three places:


Menu bar: The menu bar is located along the top of the Plant Simulation window. It displays the
version of Plant Simulation, the name of the module, and the menu buttons pertaining to the
selected module.
Toolbars: By default, the toolbars are located just below the top menu in the toolbar area.
These contain shortcuts for functions available on the menu bar.
Right-click popup menus: Different popup menus are displayed by right-clicking various Plant
Simulation objects. These menus are discussed in more detail later.

Window Types
Plant Simulation has three types of windows:
Viewers
Object Windows
Dialog Windows

Plant Simulation Viewers


There are several viewers available in Plant Simulation:

The 3D Library window contains a list of 3D objects in the model.


The Class Library window contains a list of 2D objects in the model.
The Favorites window contains links to windows that are used frequently (such as frame,
method, or attribute windows)
The Console window displays important messages that occur during the running of a
model.
The Toolbox window contains shortcuts to various objects from the Class Library.

Each of these are explained briefly in this section:


Opening and Closing Views -- Viewers can be opened or closed at any time, based on need.
Docked or Floating Viewers -- Viewers can be docked side-by-side, docked as tabs within
other viewers, or floated at any time, based on need.
On Demand Window Viewing - All docked windows can be collapsed or expanded on
demand, providing more screen space for main tasks.
To open or close a Viewer:
To show or hide the windows and toolbars: Either click the desired icon on the toolbar or
choose it from the View → Toolbars and Docking Windows list.
To close a Viewer you can also:
Click Close in the right-hand corner of the viewer window.
Plant Simulation provides a standard Microsoft Windows graphical user interface. It contains different
kinds of windows. Dialog windows are always located in front of all other windows.
You can customize the Menu bar and the Toolbars as well as the shape and size of the Viewer
windows.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 20 -
Plant Simulation Object Windows
Object windows:
Frame
Method
Table

Docked and Floating Viewers and Toolbars


To undock (float) a viewer or toolbar:
There are two methods to do the first step:
o Method 1: Drag the window using the title area of the window.
o Method 2: Double-click the title area.

o Drag it to the middle of the viewer area, not near the viewer area edge or the edge of an
existing viewer.

To dock a floating viewer:


Method to Return to the Previously Docked Position:
o Double-click the floating viewer
Methods to Change the Docking Position:
o Begin dragging the (floating or docked) viewer using the title area of the window.

o Method 1:
Make it part of a tab group with another viewer:
▪ Drag and drop the viewer onto the title bar of another viewer.
o Method 2:
Shared/Stacked Viewer Area Edge:
▪ Drag and drop the viewer onto the middle of an edge of another viewer.

o Method 3:
Whole Viewer Area Edge:
▪ Drag and drop the viewer onto the middle of the entire viewing area.
▪ The viewer docks along that edge and take up the entire viewing area edge.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 21 -
On Demand Window Viewing
By default the Operation Tree is only shown "On Demand". This means that there is an icon along the
left edge of the Process Simulate window named Operation Tree.

If you mouse over it, the window is shown. The window remains displayed until you are either not
mousing over the Operation Tree icon or window.

To disable this feature and keep the Operation Tree displayed, click the tack in the upper right
corner of the window

Arranging Windows
Object Windows of Frame, Method, and Lists windows are, as a rule, located within the program
window. You cannot drag them outside of the program window.
Open viewer windows are always located in front of object window.
Open dialog windows are always located in front of viewer windows and object windows.
Values are entered into the text boxes.
Settings are selected from the list boxes.
You can arrange the open object windows with these commands:
Window → Cascade
Window → Tile Horizontally
Window →Tile Vertically

Hitachi Sunway Information Systems (Thailand) Ltd.


- 22 -
Toolbox Viewer

Basic Content:
By default, this viewer has five tabs: Material Flow, Resources, Information Flow, User Interface,
and Tools. These tabs show groups of objects that can be added to our Plant Simulation model.
The Material Flow tab contains the basic building blocks provided with Plant Simulation.
The Resources tab contains objects to model workers.
The Information Flow tab contains objects that can be used by advanced users to customize
the functions of the basic Plant Simulation objects or to create your own objects.
The User Interface tab contains special objects such as graphs, charts, etc.
The Mobile Units tab contains the objects you are conveying or operating on:
o Entity (such as part)
o Container (such as part assembly, container, skid, palette, etc.)
o Transporter (such as forklift, AGV, truck, etc.)
The Tools tab contains special tools such as the bottleneck analyzer.

Note:
Other tabs can be added either by adding additional build-in objects to this model, or by creating
additional tabs yourself (More this later).

Adding to the Class Library and Toolbox

When a new model is created (such as File → New ), it contains the Class Library with the build-in
Plant Simulation objects.

Choose File → Manage Class Library to view or update the list of build-in Plant
Simulation objects loaded into the current model. Some add-ins are free and some are
licensed.

Note:
The Manage Class Library window:
o Shows the version number of loaded libraries.
o Highlights in red libraries for which a newer version is available.
o Can choose and update single or multiple libraries.

As a rule these optional products, for which you have to purchase a license, provide solutions
for certain modeling tasks and help you optimize your simulation models in a number of areas.
ActiveX
An object technology allowing you to activate objects (Microsoft ActiveX controls) in a container
application and to exchange data with these objects using defined interfaces.
Common examples of ActiveX controls include the Windows Explorer, Word, Excel and the
media player. Complete Word documents can be integrated into the simulation for
documentation purposes. Excel evaluations can controlled interactively by the simulation and
AVI or MP3 videos can be started from the simulation environment.

GA
Genetic algorithm is a tool for automatically optimizing your model.
Typical applications of Plant Simulation Genetic Algorithms include:
o Lot size and sequence planning
o Layout optimization
o Personnel and resources allocation
o Capacity determination
o Minimizing of set-up times

Hitachi Sunway Information Systems (Thailand) Ltd.


- 23 -
GanttChart
The Gantt chart is a tool for graphically displaying and for interactively modifying production
plans.
Data from a simulation run are displayed using a Gantt diagram and changed if necessary.
After the entry, a plausibility check is performed on the data. The alterations are then available
for the next simulation run as input data.
ODBC
An interface for bi-directional data exchange between Plant Simulation and a number of ODBC
(Open Database Connectivity) servers running on Microsoft Windows. ODBC is a standard
database connectivity method.
ODBC allows, for example, data from an existing orders database to be used. Also simulation
results can be written into the external database.
Oracle (9i, 10g, 11g)
An interface for connecting to any Oracle data base server within your computer network.
SQL commands are sent from Plant Simulation to the database. The information from the
database is then provided in automatically generated lists for further processing in Plant
Simulation.
It thus enables orders or work plans from a SQL database to be integrated into a Plant
Simulation model and simulation results to be written back to the database.
Socket
An interface for real-time connection via the TCP/IP Protocol (used in the internet or intranet) between
Plant Simulation and other applications providing a socket interface.
The connection can be established to an intranet or worldwide on the internet. With simple
commands, messages can be sent out to other applications.
Messages received by Plant Simulation can, in a similar way, be decoded and used.
Communication between several Plant Simulation systems
o Real time communication with production planning and operational data logging systems
(SAP R/3 ® and others)
o Integration of Plant Simulation into other software e.g. ARIS.
o Communication via standard services (Telnet, POP3, WWW, etc.)
And More...
etc.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 24 -
Customizing Menu and Tool Bars

Purpose
In this lesson, you learn how to customize the window display, toolbars, and more.

Objectives
After you complete this lesson, you should be able to:
Customize toolbars.
Etc.

Help topics
Additional information for this lesson can be found in:
Reference Help > The Plant Simulation Program Window > Menu Bar > View Menu > Toolbars
and Docking Windows > Customize

Hitachi Sunway Information Systems (Thailand) Ltd.


- 25 -
Toolbars
Here are some examples of standard toolbars that contain features that are used in this course. By
default, the toolbars reside in the toolbar area just below the top menu:

Customizing the Toolbar


You can customize the menus and toolbars of Plant Simulation:

Right-click the menu bar or toolbar you want to customize and choose the Customize menu
command from the context menu. This opens the Customize window.
It displays the Categories of commands. When a category is selected the associated menu
commands and icons are displayed in the Commands tab.

Choose a command in the list, drag it to a location of your choice on the menu bar or on a toolbar and
drop it there.

Example:
You could change Help → Contents to Help → Online Help.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 26 -
Introduction to Modeling

Purpose
In this lesson, you learn about modeling.

Objectives
After you complete this lesson, you should be able to:
Know some possible modeling strategies.
Know the default class library for a model file.
Create, move, rename folder.
Saving and backing up a model file.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Working with Classes in the Class Library > Work with Folders, Frames and Objects in
the Class Library
Setting-Up and Starting > Starting Tecnomatix Plant Simulation > Entering Start Options

Hitachi Sunway Information Systems (Thailand) Ltd.


- 27 -
Introduction to Modeling
In Plant Simulation you work within a Model file. A model file can contain as many models as desired.
First, you create a rough simulation model representing the production facility. For this purpose, you
split up the production into smaller units, which correspond to a processing cell of the facility.
In this course, you model each unit separately and reproduce the specifics of the processing area with
the desired level of detail.

Modeling Strategies
Top-down strategy:
A top-down strategy is characterized by a roughly structured model that you break down step-by-step.
The more refined the model becomes, the more detailed it becomes. This approach requires a large
degree of abstraction. The big picture becomes obvious quickly.

Bottom-up strategy:
A bottom-up strategy is characterized by a detailed model created by using prefabricated structures
with a rather small degree of abstraction. This enables a quick analysis of the details but makes it
harder to recognize the big picture.
In our training model, you use the top-down strategy as well as the bottom-up strategy.
Models are created in the frame object. The frame has a menu, toolbar and an area to place other
objects. Other objects are placed in the frame, arranged in the desired configuration and then
connected with the connecting tool. Models usually consist of an object to introduce parts into the
system, objects that process the parts, and an object to remove the parts from the system. A special
object called the EventController must be added to control the simulation.

The objects you use in our basic model are:


Frame - The object that can contain other objects. Every model contains at least one frame.
Part - A single part whose process is being tracked in this model
Source - An entry point for an entity into the model.
Drain - An exit point for an entity from the model.
Station - A single operation performed on the entity that takes up time.
Event Controller - The controlling object for starting, stopping, and initializing a simulation.

Organizing the Class Library


To add a new Folder, Frame, or Toolbar: In the Class Library, right-click the folder in which you
would like to add the new element and choose New → Folder

Moving a Folder
To Move Within the Same Structure:
To move a folder or an object within the same structure, choose the folder or object, drag it to another
location and drop it there.
To Move to Another Structure:
To move a folder or an element to another folder, choose the element, hold down the [Shift] key, drag
it to another location and drop it there.

Caution:
Be aware that changing the structure and the names of folders in an existing simulation model may
cause this model to not function anymore.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 28 -
The Default Class Library of a Model File

A model file contains the generic class library in a hierarchical structure.


The different folders contain the object classes provided.
You can modify and expand the structure according to the requirements of your simulation project.

You might, for example, add additional folders to save your simulation models, the test runs and the
different components of your model too.

Note:
* MUs are the moving objects, that move from material flow object to material flow object in the
simulation model

Renaming a Folder
You can rename an object in several ways:
By double-clicking it.
By pressing the [F2] key.
By selecting Rename on the right-click menu.

Note:
For all objects except folders: when selecting Rename from the right-click menu, the Rename window
is opened allowing entering a name and a label for the object. You learn more about labels later in
this course.

Note:
Another way to rename an open frame, make it the active window, press the [F4] key, type in the new
name into the Rename window, and click OK.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 29 -
User-defined Names
User-defined names (identifiers) may be assigned to many modeling elements and are not case
sensitive. There are some limitations on these names:
Those names have to begin with a letter, followed by letters, numbers or the underscore-sign.
Special characters are not allowed (such as spaces, dashes, $, &, etc…).
A name may contain a maximum of 20 characters
None of the keywords used by the program may be used, such as: if, then, else, from, until,
loop, result, sin, cos, …
A name may not be assigned twice within a single name area
The program does not differentiate between upper- and lower-case-letters. For example:
Station = Station...
Examples:
valid: station_1, Station1, mill, assembly, shipping, millingMachine, conveyor, agvs
not valid: station 1, IF, 35-inch-conveyer, 275Station

Saving a Model File


Default Saving Technique
To save your model file, click Save on the Standard toolbar or choose File → Save .
When you save your model for the first time, Plant Simulation creates a file with the extension .spp.
After this Plant Simulation saves your changes to the model to this model file (*.spp).
At the same time Plant Simulation renames the previously saved version of your model file to a
backup file with the extension .spp.bak.
The backup file contains the last saved changes to your model. To revert to this state, and to discard
changes you meanwhile made to your model, open the backup file.
Saving with History Activated
To activate saving the model history each time you click Save, first choose Tools → Preferences,
click the General tab, and choose Without Comment for Model saving history.

Now, after choosing Save a few times, you can choose File → Show Model History to see
when and by whom the model was modified and saved.

Note:
This option will cause the model file to grow each time you click save, even if no changes to the
model were made. It may also case problems with emergency saves that may occur before the
software crashes.

Opening a Backup File

Choose File → Open . In the Open window, choose which model file you want to open from the
Files of type drop-down combo box: .spp (model file) or .bak (backup file).

When you saved a certain view in the 3D viewer, you can also choose to display a preview of the
model.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 30 -
Working with Objects

Purpose
In this lesson, you learn about the source, drain, Station, entity, and event controller basic objects.

Objectives
After you complete this lesson, you should be able to:
Insert objects into a frame.
Connect objects.
Simulate a simple facility in Plant Simulation.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
States and Icons of the Material Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 31 -
Frames
Create your simulation model in a frame object, by inserting and connecting the material flow objects
with it. You also execute your simulation runs here.
You can create any number of new frames on each level of the hierarchy in the Class Library viewer:
Right-click the desired hierarchy level and choose New → Frame from the context menu.

Units Setup
To change the current units, choose Tools → Preferences to set the permanent settings or Tools →
Modeling Settings to change settings for this specific model. In the Preferences window (or Model
Settings window), choose the Units tab.
Plant Simulation automatically converts the values you entered in the text boxes on this tab for the
Mass, Speed and the Length when you choose a different unit.
For the Length you can also choose a Length Unit that suits your needs, such as 1 LU = 0.341
miles.

Plant Simulation does not convert the value for the Currency.
Make the Time scale suit your needs by entering the corresponding values into the text boxes.

Inserting Objects
Objects can be inserted into a model by dragging and dropping them from the Toolbox viewer or by
dragging and dropping from the Class Library.

Here are the steps to insert an object:


Choose the object in the Toolbox viewer.
Move the cursor to the position within the frame where you want to insert the object.
A left mouse-click inserts the object.

Note:
An object can be inserted from the Toolbox by drag and drop as well.
To insert more object of the same type, hold the [CTRL] key then click in all the desired locations for
the selected Toolbox viewer object.

Aligning and Distributing Objects:


This set of tools can be used to:
Set the horizontal or vertical distance from each other to zero.
Distribute objects equal distantly along the horizontal or vertical axes.
Right-click selected objects in a frame gives these options:
Arrange Icons → Align Horizontally
Arrange Icons → Align Vertically
Arrange Icons → Distribute Horizontally
Arrange Icons → Distribute Vertically
Arrange Icons → Reverse Order Horizontally
Arrange Icons → Reverse Order Vertically

Hitachi Sunway Information Systems (Thailand) Ltd.


- 32 -
Connecting Objects
A part flow can be defined between two objects by adding a Connector object (looks like a line with an
arrow).

To Add a Connector to the Model:


From the Toolbox viewer, click the Material Flow tab and choose Connector to add it to the
model.
Position the cursor in the MIDDLE of the object you want to connect FROM.

The mouse cursor becomes a cross hair. clickCE and release. The cursor changes to a bent
arrow.

Move the cursor to the MIDDLE of the object you want to connect TO and clickce and release.

The connection is established and a line appears between the objects.

When connecting objects corners may be placed in the connection after the FROM selection has
been made by clicking in where the corner is desired in the frame. The moment a click is made when
the mouse pointer is on an object the connection is completed.
Moving the end of a Connector from one object to another:
Pick the connector
Pick the desired green drag point at the end of the connector
Drag and drop it onto the new target object

Other Selected Topics


Graphical Simulation:
Graphical Simulation can be toggled on and off
From the main Plant Simulation menu, choose View → MU Animation

From the main Plant Simulation menu, choose View → Icon Animation
Window Management:

From the toolbar, choose Show/Hide Dialogs - Toggles the display of open object

windows (does not affect Frame windows)


Choose Window → Cascade - Good way to get back windows that where moved out of
the selectable portion of the viewer area.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 33 -
Simulating a Facility
In our training activities, you model a facility that produces tables:
First a sawing station cuts the table-tops to size.
Then two milling machines mill the edges of the table-tops.
After that a paint robot paints the table-tops in different colors. The quality control station sends
tables with a defective paint job to the rejects station that repairs the paint job.
The Assembly station adds the table-legs to the table-tops.
The finished tables then move to the Packing station, where they are readied for Shipping.
The packaged tables end up in Shipping waiting to be sent to the customer.
First, you create a rough simulation model representing the production facility. For this purpose, you
split up the production into smaller units, which correspond to a processing cell of the facility.
You model each unit separately and reproduce the specifics of the processing cell with the desired
level of detail.

States of Material Flow Objects


The states of material flow objects change throughout a simulation run. By default a small LED
appears at the top of the object displaying the current state of the object.

The most basic ones are Working (green LED), Waiting (orange LED), Blocked (yellow LED), and
Failed (red LED). These four should be memorized by all Plant Simulation users. Here is a complete
list of built in states for material flow objects:
No Dot - the object is non operational and empty
Red Dot - the object is failed
Pink Dot - the object is stopped
Blue Dot - the object is paused
Light Blue Dot - the object is unplanned
Green Dot - the object is working
Yellow Dot - the object is blocked
Brown Dot - the object is being set up
Purple Dot - the object is powering up or down)
Cyan Dot - the object is recovering or entrance locked
Orange Dot - the object is waiting for an exporter (worker)

Hitachi Sunway Information Systems (Thailand) Ltd.


- 34 -
Help Access

Purpose
In this lesson, you learn several ways to access to online help that comes with Plant Simulation.

Objectives
After you complete this lesson, you should be able to:
Access the quick help and the full help from several locations.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Frame > The Frame Window > Menu Bar > Help
Menu
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Dialog Items of the Objects > Help Menu

Hitachi Sunway Information Systems (Thailand) Ltd.


- 35 -
Introduction to Help
Quick Help
Mouse over a button on the toolbar. Quick help is shown there and at the bottom of the Plant
Simulation window.
Quick help can be accessed for just about any field on an object’s property window by picking in
the field and pressing [F1].
Full Help
More detailed help can be found by accessing the online documentation.
Method 1
If you have an object open, choose Help → Help On Object to jump to that part of the help
document.
Method 2
If you have the Attributes and Methods window open, choose the desired attribute and pick
[F1]. You learn more about this window later in this course.
Method 3
Access the help document directly.
o From the main Plant Simulation menu, choose Help → Contents.
o Choose the Search tab.
o Enter a topic.
o Press [Enter].
o Double-click the desired topic from the search results.
o Click the Contents tab and browse as desired.
The online help is divided into several main categories including:
What’s New
Quickly describes the new features in this version of Plant Simulation.
Step-by-Step Help
Quick tutorial for selected features in Plant Simulation.
Tecnomatix Plant Simulation Reference
Provides a detailed description (field-by-field) of Plant Simulation.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 36 -
Basic Objects

Purpose
This lesson overviews several objects within Plant Simulation. Some are covered in more detail early
and others are covered later in this course.

Objectives
After you complete this lesson, you should be able to:
Have an idea of which comes are part of the default model file’s class library.

Help topics
Additional information for this lesson can be found in:
Reference Help > The Plant Simulation Program Window > Toolbox

Hitachi Sunway Information Systems (Thailand) Ltd.


- 37 -
Material Flow and MUs
These objects are used to model the material flow in the model. Objects types vary from simple time
consuming objects (such as Single Procs) to complex assembly machines. There are three types of
MUs (moveable objects): passive, passive carrier, active carrier.
There are several locations to pull objects into your model from:
The Material Flow tab of the Toolbox viewer.

The Mobile Units tab of the Toolbox viewer.

The MaterialFlow and MUs folders in the Class Library.

Note:
The Box, TableTop, TableLeg, and Truck are not part of the standard list of MUs in the Class
Library. However, they are included in the starting model file used in this training class. This is the
only difference between the training model and the default model file.

Resource Objects
These objects are used to model workers or other shared resources like tools. There are two
locations to pull them into your model from:
The Resources tab of the Toolbox viewer.

Information Flow Objects


These objects are used for control strategies, as information interface or compiling of results. There
are two locations to pull them into your model from:
The Information Flow tab of the Toolbox viewer.

User Interface Objects


These objects are used for gathering of results, or as User Interface. There are two locations to pull
them into your model from:
The User Interface tab of the Toolbox viewer.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 38 -
Tools
These objects are used for information gathering (Sankey, Bottleneck wizard) or special uses (portal
crane or transfer station). There are two locations to pull them into your model from:
The Tools tab of the Toolbox viewer.

Viewing Information about Library objects:


Right-click an object, such as BottleneckAnalyzer in the Tools folder of the Class Library, and
choose Edit Library Information.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 39 -
Introduction to Material Flow Objects

Purpose
This lesson describes several material flow objects and moving objects (a.k.a. MUs).

Objectives
After you complete this lesson, you should be able to:
Have an idea what are some of the core material flow and MU objects.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 40 -
The Source

From the Toolbox viewer, click the Material Flow tab and choose Source to add it to the model.
It is where parts originate. Here are some of the attributes of a source.
Capacity = 1
Active material flow object
Time of Creation
Creates MUs (mobile units) as defined in the setting:
Number Adjustable: Creates a fixed amount
Interval Adjustable: Creates at a constant interval
MU Selection
The Source produces an MU according to the setting you choose from the MU selection drop-down
list box:
Constant -- When the MU type is always the same (default).
Sequence Cyclical -- According to the sequence you entered into a table, the table may also
contain additional information. Plant Simulation processes the table repeatedly.
Sequence -- Plant Simulation processes the table, whose name you enter, one time only.
Random -- Plant Simulation creates the MUs, which you enter into the table, according to the
random number distribution you select.
On the bottom of the Attributes tab, click the Select Object for MU.

Note:
.MUs.Part is the Absolute path, whereas ~.~..MUs.Part is a relative path. The default in previous
versions was Absolute path. More about this later.

To choose the MU, click the button with the ellipse next to MU:
Choose the MUs folder in the Select Object window.
Choose the MU type to be produced from the list of MU objects. Note that it also contains
the MUs you defined that are in the MUs folder of the Class Library.
Note:
If you would like to choose MUs from another folder, specify it in the Path field in the
Select Object window.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 41 -
The Station

From the Toolbox viewer, click the Material Flow tab and choose Station to add it to the
model. It is where parts are processed. Here are some of the attributes of the Station.
Capacity = 1
Active material flow object
Takes up 1 MU and forwards it to the following station, after the processing and set-up times have
passed. If the type of MU differs from the preceding type, the Station may have to set-up for
processing it.
Note:
Whether a Station needs to set-up is determined by the processing requirements of the selected MU
on a given machine in a plant.

The Drain

From the Toolbox viewer, click the Material Flow tab and choose Drain to add it to the model.
It is where parts leave the model. Here are some of the attributes of a drain.
Capacity = 1
Active material flow object
After processing and set-up-time have passed, it destroys the MUs.
Statistics
The drain collects statistical information of the MUs arriving.
The statistical data of the MUs are shown in an overall statistic and can also be accessed depending
on the type of the MUs. After a simulation, result statistics are shown on the Type Statistics tab.
From the object window menu, you can also choose View → Statistics Report:

The Part

Part is the part itself. Here are some of the attributes of an entity.
Capacity: 0
Movable Material flow object
It represents mobile units (MUs) that are produced and the material flow through the model; it does
not have capacity to carry another mobile unit.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 42 -
The Event Controller
From the Toolbox viewer, click the Material Flow tab and choose EventController to add it to the
model. It coordinates all events during the simulation. Here are some of the attributes of the Event
Controller:

Capacity: 0
Information flow object
Controls Tab
Clicking Reset calls up all methods named reset in the model and executes them. It deletes
unprocessed events, resets the simulation time to 0, resets the statistics, and clears any failure of any
machine. At the same time, it resets the state of the EventController.
Clicking Start/Stop begins the simulation. If this is the first simulation run or you clicked Reset before,
Plant Simulation executes all Init methods in the model.
Clicking Start/Stop again stops the simulation. The simulation can be continued by clicking
Start/Stop.

Note:
It is recommended to leave the Delete MUs on reset checkbox selected.
Enter the date on which the simulation starts (Date) and the elapsed time at which it ends (End) on
the Settings tab. Enter the time the EventController resets the statistics and starts collecting
statistics values again.

Note:
The Statistics field in the Event Controller window represents the warm-up time. The default value is
zero. It is important to "warm-up" a simulation in order to run it until it reaches a steady state before
collecting statistics.
Note:
It is recommended to Reset and initialize the model before running any simulation.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 43 -
Material Flow Object States
The states of material flow objects change throughout a simulation run. By default, a small LED
appears at the top of the object displaying the current state of the object.

The most basic ones are Working (green LED), Waiting (orange LED), Blocked (yellow LED), and
Failed (red LED). These four should be memorized by all Plant Simulation users. Here is a complete
list of built in states for material flow objects:
No Dot - the object is non operational and empty
Red Dot - the object is failed
Pink Dot - the object is stopped
Blue Dot - the object is paused
Light Blue Dot - the object is unplanned
Green Dot - the object is working
Yellow Dot - the object is blocked
Brown Dot - the object is being set up
Purple Dot - the object is powering up or down)
Cyan Dot - the object is recovering or entrance locked
Orange Dot - the object is waiting for an exporter (worker)

Frame Window Toolbar

Note:
You learn more about these buttons throughout this course.
Simulation related buttons of this toolbar:
Open event controller (or create and open event controller)
Reset
Start/Stop
Start without animation
Zoom in/Zoom out buttons of this toolbar:
Zoom in

Zoom out
Visual clean up related buttons of this toolbar:

Show Names -- show/hide the object names.


Note:
To show/hide only the MU names, choose View → Options → Show MU Names.
Note:
To show/hide the object labels, choose View → Options → Show Labels.
Show Connections -- show/hide the connector objects.

Show comments -- show hide comment objects.


Show grid -- show/hide the grid.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 44 -
Common Material Flow Object Properties

Purpose
In this lesson, you learn about common properties of material flow objects.

Objectives
After you complete this lesson, you should be able to:
Have an idea what properties are available on the various tabs of material flow objects such as
a Station.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 45 -
Resources
Each of the objects that were used in the previous example as well as the rest of the objects in Plant
Simulation share some common attributes and the same basic dialog box structure. Once one is
familiar with the common attributes of the objects it is easy to build and configure a simulation model.
All time attributes can be assigned as a probability distribution.
Many of the material flow objects share common types of data. The Station is a good example of what
most of the dialogs look like and what attributes can be manipulated.

Times Tab
All of the following times can be used in the model. A time set to zero is ignored by Plant Simulation.
Processing Time is the amount of time that a part resides on the resource (in other words: the
cycle time of the operation). It does not include Blocked Time, Down Time, etc.
Set-Up Time - Used to model a time for a setup.
Recovery Time - The recovery time is the time during which the first gate at the entrance of a
material flow object is closed after an MU entered the station. The recovery time is useful to
model material handling equipment, such as a robot, that requires a certain time to insert into or
remove work pieces from processing stations. When you enter 0 the gate is always open, a
value greater than 0 closes the gate for the specified interval as soon as the front of the MU has
entered the object.
Cycle Time - The cycle time is the time during which the second gate at the entrance of a
material flow object opens and closes cyclically, regardless of MUs entering the object. The
cycle time is useful to model chain conveyors with a fixed chain interval that only transport
material when a free hook is available. A fixed interval that parts are allowed to enter the
station. Used to model behavior like a bottle filler where the bottles are fed into slots on a
transport belt or hooks on an overhead chain for auto parts.

Set Up Tab
Different options for set up can be selected on the Set Up tab. For example: If a different class of
mobile unit arrives at the resource, the setup takes place when the related checkbox is selected.
Otherwise it takes place for each mobile unit that arrives.

Failures Tab
The Failures tab sets up the failure or maintenance behavior of the station. When a station fails, any
mobile units on it does not move and the processing time is appropriately extended. No parts may
leave or enter the station while it is failed.

Note:
By default there is no failure profile defined for an object. Each can have its own distribution function
and start/stop times. You learn about failure profiles in more detail later in this course and in the
MT46300 Plant Simulation Advanced course. However, to create a new one with a default 95%
availability, click New and OK.

Active check box - sets whether the resource fails or whether the rest of the tab contents is
ignored.
Start - The time the first failure takes place during the simulation. If the start time is zero, then
the station fails immediately when the simulation starts.
Stop - The time during the simulation after which no more failures may occur.
Note:
On the Failures tab, Availability must be deselected to display Interval and Duration.

Interval - Mean Time Between Failures (MTBF) the time that the resource can work between
failures.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 46 -
Duration - Mean Time To Repair (MTTR) the time that is required to repair the resource.

MU Failure tab:
Note:
All objects on the Material Flow tab of the Toolbox can have failure profiles defined for them. For
Transporter MUs, only the Transporter you can have a failure profiles defined. \\

Controls
Controls are covered later in this course and the MT46300 Plant Simulation Advanced course. They
allow the modification of the default (logic) behaviors of all objects and the modifications of any setting
during a simulation run.

Exit Strategy
On a material flow object, if more than one possible exit exists for the resource the exit behavior can
be set here. You learn more this topic in more detail later in this course.

Statistics
On a material flow object, comprehensive statistics can be collected by checking the Resource
Statistics box and clicking Apply. Some common statistic values are displayed on the tab and more
detailed statistics are available in the table that is opened by clicking Resource Statistics Table.

Stationary Importer and Failure Importer Tab


These tabs control (worker) resources that are used in processing, setup, or repairing of equipment.
Very often they are used to represent workers and maintenance personnel or limited but movable
equipment. These tabs, along with the broker and exporter objects, are covered later in this course
and in the MT46300 Plant Simulation Advanced course (Importers, Brokers, and Exporters are
discussed in the last part of this course).

User-Attributes Tab
Most objects in Plant Simulation have the ability to hold an unlimited number of custom (user-defined)
attributes. These attributes can be used for production plans, identifying product options, or holding
and type of extra information associated with that object.

The Icons Menu

In the frame window, there is a menu named Icons. You can choose commands for the position
(such as Inherit Position and Align to Grid), the orientation (such as Mirror Vertically and Rotate),
for the size (such as Enlarge (x2) and Reduce (/2)) of the icons of the objects and you can edit the
icons.

The Icons menu is active only when you selected an object in a frame window.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 47 -
Using Object Labels
In addition to its Name, you can also enter a Label for an object.
Note:
The Name field must be filled in and must be unique. However, the Label field doesn’t need to be
entered. The Name field is how the object is referenced by various parts of the model during
simulation. The Label is text which appears under the object in a frame. If the Label is not entered,
the Name are used for the Label.
To show or hide the names and/or the labels of objects:
Displaying Labels:
Note:
Normally either the Name of Label is displayed, but not both. To turn off the Names: In the Options

window, choose Show Object Names . (uncheck this option)

From the frame menu, choose View → Options.


In the Options window, choose Show Object Labels. (check this option)
Add Labels to Objects:
Choose an object in a frame and press the [F2] key.
Note:
In some cases (like this one), pressing the [F4] key is the same as pressing the [F2] key.
Enter the Label and click OK.

How to Continue with the Activities


In general each activity starts out with the result of the previous lesson, for example the present task
uses the previous frame as the starting point.
For this reason, you first duplicate the Frame in the Class Library:
In the Class Library, right-click the desired frame and choose Duplicate.
Pick the new frame and press the [F2] key to rename it.
(Optionally) Move it to another folder by holding down the [Shift] key and drag and dropping it.
You can also use this technique for your real-life projects.

Copying the Contents of a Frame


This technique can be used to copy some or all of the contents of a frame to another frame.
In the source frame, click the left mouse button and drag a window around the desired objects.
Copy these objects to the clipboard using Edit → Copy (or [Ctrl]-[C]).
Open the destination frame.
Paste the contents of the clipboard using Edit → Paste (or [Ctrl]-[V]).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 48 -
Global Options and Preferences Windows
There are two ways to access the Options and Preferences windows to set the frame options:
Method 1: General options
Note:
The default measurement units, the model limits, the simulation time options and the
defaults for the method editor are set here.
o From the Plant Simulation window menu, choose Tools → Preferences.
Method 2: Frame specific options (override general options)

o From the frame window, choose View → Options.

Typically, the new options take effect after restarting Plant Simulation. Some changes, on the other
hand, take effect immediately, such as a change of units.
General Tab
The General tab contains the settings for the language and the time format.

Modeling Tab
The Modeling tab contains the default settings for the frames that are created. In the Options
window, choose the Modeling tab.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 49 -
Simulation Tab
The Simulation tab contains the settings for controlling simulation experiments and the amount of
computer resources that they can consume.

Units Tab
The Units tab contains the settings for what measurement units are used.

User Interface Tab


The User Interface tab contains options for setting up the Console window, toolbox button size, and
window transparency.
Siemens PLM Software recommends leaving the Delete objects Confirm checkbox selected since
there is no undo in Plant Simulation.

Editor Tab
The Editor tab contains the default settings for the method editor. Methods are an advanced topic
and are covered later in this course.

License Tab
The License tab is used by IT personnel to query and set your license file.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 50 -
Default strategy for moving a MU from station to station

Purpose
In this lesson, you learn how compare the effect of various exit strategies.

Objectives
After you complete this lesson, you should be able to:
understand how several exit strategies work.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Modeling the Flow of
Materials, Basics > Transferring Parts from Station to Station > Select an Exit Strategy

Hitachi Sunway Information Systems (Thailand) Ltd.


- 51 -
Introduction to the Default strategy for Moving a MU
By default, Plant Simulation moves parts at branching stations to each of its successors in turn. This
behavior can be changed by modifying the exit strategy of the object or by adding a flow control
object.

This allows you to create simulation models quickly and easily.


The MU default exit strategy is non-Blocking. Plant Simulation transfers the MUs along the sequence
of successors. When multiple successors exist, and the current target successor is occupied, the MU
continues to the next successor.
However if the exist strategy is changed to blocking, and multiple successors exist, and the current
target successor is occupied; the MU waits until this successor is ready to receive the MU.

The Standard Converging Behavior

When converging the flow of materials, Plant Simulation transfers the MUs according to the order they
arrived, first in first out (FIFO). When the successor is occupied, the MU enters itself into the Forward
Blocking List of that successor.

Setting Up Exit Strategies


Exit strategies can be defined directly on a Station object or by adding a special exit strategy object
(such as FlowControl). The FlowControl object is rarely used in the creation of new models (years
ago its use was required since Station objects did not have an Exit Controltab).
The exit strategy of a material flow object is defined using the Exit Strategy tab. The exit strategy
determines how the object passes the MU on to its successor(s).
When you clear the Blocking checkbox, the material flow object moves the MU when any of its
successors is ready to receive it. Some strategies, such as Percentage, open additional user
interfaces for setting them up.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 52 -
Modifying Exit Strategy Behavior
Available Exit Strategies for Station objects:
Choose the strategy the material flow object uses to move the MU to its successors:
To make the Worker carry the MU to the target object, choose Carry part away.
To move the MUs cyclically to the next successor in line, choose Cyclic.
To cyclically move the MU to the object's successor according to the sequence of successors,
which you entered into the list, choose Cyclic sequence.
To move the MUs to the successor that has been waiting the longest for an MU, choose Least
recent demand.
To move the MUs to the material flow object's successor in a linear fashion, according to the
sequence of successors, which you entered into the list, choose Linear sequence.
To move the MUs to the successor that contains the greatest number of MUs, choose Max.
contents.
To move the MUs to the successor that received the most MUs, choose Max. num. in.
To move the MUs to the successor with the longest processing time, choose Max. proc. time.
To move the MUs to the successor with the highest relative occupancy, choose Max. rel. occu.
To move the MUs to the successor with the longest set-up time, choose Max. set-up time.
To move the MUs to the successor that contains the smallest number of MUs, choose Min.
contents.
To move the MUs to the successor that received the smallest number of MUs, choose Min.
num. in.
To move the MUs to the successor with the shortest processing time, choose Min. proc. time.
To move the MUs to the successor with the lowest relative occupancy, choose Min. rel. occu.
To move the MUs to the successor with the shortest set-up time, choose Min. set-up time.
To move the MUs to the successor that has been waiting the least amount of time for an MU,
choose Most recent demand.
To move the MUs to a successor based on the value of an attribute of the MU, choose MU
Attribute.
To move the MUs to the successors according to a percentage distribution, choose
Percentage.
To move the MUs to the successors in a random fashion, choose Random.
To always move the MU to the object's successor with the number 1, choose Start at
successor 1.

The FlowControl

The FlowControl object (which is rarely used now, since you can define an exit strategy
directly on the material flow objects) controls how parts enter and exit objects in a model. It is used to
sort objects into their corresponding categories or behaviors/attributes. It is the only material flow
object with built-in Entry Strategies and contains additional Exit Strategies.
Note:
Other material flow objects can have their entry strategy set using a custom created place on the
Controls tab. This is discussed later in this course.
The FlowControl allows the choice of strategies for branches and confluences.
The Exit Strategy (Behavior) can be to set any one of thirteen values. Each of these choices is
described in detail in the next section.
The Entry Strategy (Behavior) can be set to any one of ten values. Each of these choices is
described in detail later in this next lesson.
Note:
This object is described here for reference but is not be used in this course.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 53 -
Introduction to Bottleneck Analyzer and Sankey Objects

Purpose
This lesson covers the first of several analysis tools found in Plant Simulation. Several more are
described in the later in this course and in the MT46300 Plant Simulation Advanced course.

Objectives
After you complete this lesson, you should be able to:
Use the Bottleneck Analyzer.
Use the Sankey Diagram.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Animating the Simulation Model and Viewing the Results > Working with
Evaluation Tools > SankeyDiagram
Step-by-Step Help > Animating the Simulation Model and Viewing the Results > Working with
Evaluation Tools > BottleneckAnalyzer

Hitachi Sunway Information Systems (Thailand) Ltd.


- 54 -
BottleNeck Analyzer
It is an analysis tool used to find bottlenecks (maximum utilization) in a model.

Basic Usage:

1. Add Bottleneck Analyzer to the desired frame from the Tools tab of the Toolbox.
2. Play the simulation.
3. Right-click the Bottleneck Analyzer and choose Analyze. Small charts are shown over each
station showing the amount of time of the station spends in each state.
Note:
Analyze Colors:
o Gray bar - waiting
o Green bar - working
o Yellow bar - blocked
o Red bar - failed
o Blue bar - paused
4. Follow the trail of blocked (yellow) stations to the station that is working 100% (green) and is
followed by a station that is waiting (gray).

Sankey Diagram
It is wizard used to visualize the material flow. This is especially helpful when several branching
connections exist in a simulation model. A thicker line denotes the more widely used successor.
Note:
According to www.Wikipedia.org:
Sankey diagrams are a specific type of flow diagram, in which the width of the arrows is shown
proportionally to the flow quantity. They are typically used to visualize energy or material transfers
between processes. Sankey diagrams are named after Irish Captain Matthew Henry Phineas Riall
Sankey, who is considered to have been the first to use this type of diagram in 1898 in a publication
on the energy efficiency of a steam engine

Hitachi Sunway Information Systems (Thailand) Ltd.


- 55 -
Basic Usage:

1. Add Sankey Diagram to the desired frame from the Tools tab of the Toolbox.
2. Setup the Sankey. (Drag and drop the desired MU onto the Sankey Diagram. The double-
click it to set up the Graphics).

3. Play the simulation.


4. Right-click the Sankey Diagram and choose Sankey.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 56 -
Statistics and Charts

Purpose
In this lesson, you learn about collecting statistics and creating charts (graphs).

Objectives
After you complete this lesson, you should be able to:
Create charts of object statistics generated during simulation.

Help topics
Additional information for this lesson can be found in:
Reference Help > Display and User Interface Objects > Chart

Hitachi Sunway Information Systems (Thailand) Ltd.


- 57 -
Introduction to Statistics and Charts
Statistic Tables:
As a rule all objects collect statistics values. Deactivate it by clearing the checkbox for Resource
statistics or Product statistics on the Statistics tab of the object.
Plant Simulation shows the most important statistics values on the Statistics tab or Product
statistics tab.
All material flow objects and all moving objects enter their statistics values into the Resource
Statistics Table, the Product Statistics Table or into the Complete Statistics Table.
Statistic Values:

When you click Reset in the EventController, Plant Simulation resets the statistics values to 0.
When you click Detailed Statistics Table, Plant Simulation opens a table that contains all values it
collected during a simulation run. The different values are explained in the online help (search for
Detailed Statistics Table).
You can query individual values of the Detailed Statistics Table or you can save the entire table to a
table file.

Collecting Statistics
Different types of statistics:
Depending on their type, the material flow objects and the MUs collect different types of statistical
values:
Resource Statistics
Product Statistics
Driving Statistics
Type Statistics
Statistics Report
Note:
The statistics tab displays a snapshot in time. Each time that you view this tab, while a simulation is
running, the statistics change.
You learn more on statistics and charts in the last part of this course.

Resource Statistics
These can be contained by all material flow objects and depends on the type of resource selected
(production, transport, or storage). They are setup and displayed on the Statistics tab.
Resource Types:
Production
Default for Station, ParallelStation, Assembly, and DismantleStation objects
Transport
Default for PlaceBuffer, Buffer, Sorter, Track, Line, Transporter, and Container objects
Storage
Default for Store objects
Production Statistics Comparison Example:

Recall the number of exits for Milling1 and Milling2 in the Plant3 frame:

Recall the number of exits for Milling1 and Milling2 in the Plant3a frame:

Hitachi Sunway Information Systems (Thailand) Ltd.


- 58 -
Product Statistics
These can be carried by all mobile units. They are setup and displayed on the Product Statistics tab
of MU.

Single values or the complete table can be extracted or saved to external data sources. The Product
Statistics recording must be turned on. By default, it is turned on. The statistical data are reset after

clicking Reset on the EventController.

Driving Statistics
In addition to product and resource statistics, the Transporter collects driving statistics data about the
states Order occupied, Order empty, Home driving, Ready, Failed, Paused, Unplanned, the
battery consumption and the number of jobs performed. They are setup on the Battery tab and
displayed on the Statistics tab. This type of statistics is not active by default.

Type Statistics
On Drain objects, they are setup on the Type Statistics tab, displayed on the Detailed Statistics
Table. A separate row in the statistics table is shown for each MU (or differently named MU).

Statistics Report
It is accessed via the [F6] key or the Object View menu. It contains a summary of all the Resource,
Product, and Driving Statistics collected during the current run of the active frame.
You can access separate values with the statistics methods which all starts with "stat...". You learn
about writing methods later in this course.
The different values are explained in the online help under the topic Statistics Report.

Statistics Tables
As a rule all objects collect statistics values. Deactivate it by clearing the Resource statistics and
Product statistics checkboxes on the Statistics tab.
Plant Simulation shows the most important statistics values on the Statistics tab or Product
statistics tab.

Statistics Values
To refresh values displayed in an open window, press [F5] or choose View → Refresh from the
objects menu.

When you click Reset in the EventController, Plant Simulation resets the statistics values to 0.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 59 -
The Chart Object

From the Toolbox viewer, click the User Interface tab and select Chart to add it to the model. It
displays statistics data and allows you to quickly evaluate and present the results of your simulation
runs. Next to the states working, waiting, blocked, failed, and paused it can also collect other
percentages.

The Chart displays statistics data and allows you to quickly evaluate and present the results of your
simulation runs. Next to the states working, waiting, blocked, failed, and paused it can also collect
other percentages.
Insert the Chart into the Frame. Then drag the material flow objects whose statistics you want to
display, onto the icon of the Chart and drop them there.

Display Panel
A display panel is a configurable display used to visualize various attributes of simulated objects. It
can show important simulation values next to the object improving ease-of-use by focusing your view
to simulation results of interest.
It is part of a material flow object and is created automatically when the object is inserted into a
model. However, it is inactive by default.

Right-click a material flow object and choose Edit Display Panel to set it up or activate it.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 60 -
More Chart Techniques (Optional Lesson)

Purpose
In this lesson, you learn use other user interface techniques to visualize the statistics:

Objectives
After you complete this lesson, you should be able to:
Use plotter, histogram, and display objects.
Help topics

Additional information for this lesson can be found in:


Reference Help > Display and User Interface Objects > Display

Hitachi Sunway Information Systems (Thailand) Ltd.


- 61 -
Introduction to Chart Techniques
The Chart object can be used to represent either a:

Chart

Histogram

Plotter
Other related objects:

Display - works like a material flow object’s display panel, except that it is independent
of a specific material flow object

GanttWizard - Display a Gantt chart


Chart object settings:

The values are displayed in a grid, which is set by the Number X-axis. The Number of values defines
the number of values held in the plotter’s internal memory.

In the Data Source field on the Data tab, you can define paths to the values to be displayed in a
table. It is also possible to assign values from an existing table.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 62 -
Histogram

A Chart can be changed into a Histogram , if it is dropped on a buffer.

The Histogram is a setting in the ordinary Chart object. For example, it allows the display of the
buffer contents over time. The easiest way to work with the histogram is to insert the Chart object and
then drag and drop a buffer object on to the Chart. The icon changes automatically and a histogram
chart window opens.

Note:
The histogram above shows the contents of a Buffer with a Capacity of 10 inserted between Paint
and Assembly (where Assembly has a Processing time of 4:01). This is not part of the course
activities.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 63 -
Plotter

A Chart can be changed into a Plotter , as well.


The Plotter is a setting in the ordinary Chart object that allows you to display time dependent values.
It is possible to display more than one value at a time. The icon changes automatically.

Example Plotter:

Display

From the Toolbox viewer, click the User Interface tab and select Display to add it to the
model.
Capacity: 0
Active information flow object

With the Display object values can be displayed as a string or in graphical form as well as the
minimum and the maximum value that are displayed by a red line. These values can be seen in the
Data tab and can be reset by clicking reset MinMax. The current value of the gauge is shown in the
Value field.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 64 -
Gantt Wizard
This tool is covered in the MT46300 Plant Simulation Advanced course.

The GanttWizard can be added to the current model using Manage Class Library .
It records data for a Gantt chart for certain stations. Instead of showing the chart, you can also write
the data into a table.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 65 -
Hierarchy and Interfaces

Purpose
In this lesson, you learn how to build a hierarchal model built from components (custom
objects/building blocks).

Objectives
After you complete this lesson, you should be able to:
Create a component.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Modeling Hierarchically

Hitachi Sunway Information Systems (Thailand) Ltd.


- 66 -
Introduction to Hierarchy and Interfaces
Hierarchy is the use of submodels (frames) contained within other models (frames). Each submodel is
a detail or logical section of the process such as the station on a line. These stations are reusable and
can be duplicated in other models or even model files.
This way you can model and test the individual components of the model detached from the frame
into which you insert it.
You can thus model them close to their counterpart in your real-life facility. You can use these
components you developed (user-defined objects) just like the built-in objects and reuse them in other
models.
Hierarchical modeling also adds to a clear structure of your simulation model.

Building a Component
You model the component in the Class Library as a new Frame and insert the objects you need for
this module. You then insert this component into our simulation model and use it just like one of the
built-in objects, for example you can also reuse it in the same or other projects. You can save this
component as an object, which you can then load into another project.
To Reuse a Component in Other Model Files:
In the Class Library, right the desired object and choose Save Object As. An .OBJ file is created that
can be imported into other models. (A similar process can be used for folders as well).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 67 -
Interfaces

From the Toolbox viewer, click the Material Flow tab and choose Interface to add it to the
model. An interface is a way to send a part from one level of model hierarchy to another.
Capacity: 0
Material flow object

The Interface object provides the ability to pass MUs from one frame to another using the connection
object. The interface is used to connect frames and other objects in a hierarchical environment, and it
determines the position of the connector. The position of the entry and exit points on the icon defines
the entry and exit. It sets on which side of the Frame the flow of materials enters and exits.
Maximum External Connections - The number of connections that can be made with the
interface.
Position in % - The relative position the connection appears to join the frame on the specified
side.
Side - Which side the connection it appears to join the frame.

The Hierarchical Structure of the Model


Use components, for example user-defined objects, that you modeled in a Frame the same way you
use any of the other objects. Create icons for them and insert them into your model just as you would
any of the material flow objects. You can then re-use these components in other simulation models.
Modeling components within Frames also gives your simulation model a clear structure.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 68 -
Selecting and Copying Objects
Objects can be selected using windows default methods. A single object can be selected by clicking
on it with the mouse. More objects can be selected by holding the control key and selecting multiple
objects in succession. Multiple objects can also be selected by drawing a box around the objects.
Selected objects can be copied by using the right mouse click context menu, the edit menu in the
menu bar or by using the windows default [Ctrl]-[C].
Copied objects can be pasted in the same or a new frame, but assume their original positions.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 69 -
Test Models

Purpose
In this lesson, you learn how to create a test environment so that you can verify that a component is
working before you put it into the larger model.

Objectives
After you complete this lesson, you should be able to:
create and use a test environment for a component.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Modeling Hierarchically > Test a Component You Modeled

Hitachi Sunway Information Systems (Thailand) Ltd.


- 70 -
Introduction to Test models
It is advisable to test each component frame in a separate environment before using it. After the test
has been successful, the frame can be inserted in the model.
Build up the partial model, test it in a test environment, and if it is operational, insert it in the model.

Testing a Module of the Simulation Model


Test the functionality of the component (user-defined object) before you insert it into the model of your
facility.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 71 -
Re-using User-defined Objects
Save an Object Out of the Model:
Detach objects or folders from the Class Library by saving them as an object file that has the
extension *.obj
Right-click an object in the Class Library and choose Save Object As.
Load an Object into a Model:
Load this object into the Class Library of another project
Right-click an object in the Class Library and choose Load Object.
If the name of the object or one of its classes already exists in the Class Library, choose if you want to
replace it with the object in the Class Library or if you want to add the object to the Class Library with
a different name.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 72 -
Icon Editor and Component Representation

Purpose
In this lesson, you learn how to use the Plant Simulation Icon Editor.

Objectives
After you complete this lesson, you should be able to:
use the Icon Editor to create. edit, and import clip art as icons for objects.
Create different representations for objects.

Help topics
Additional information for this lesson can be found in:
Reference Help > The Plant Simulation Program Window > Icon Editor > Window of the Icon
Editor

Hitachi Sunway Information Systems (Thailand) Ltd.


- 73 -
Icons
Plant Simulation uses the icon to display the object in the Class Library, the Toolbox, and in the
Frame. The icons can also serve to display the state of operation of the object, such as failed,
paused, etc. Modify the built-in icons, including the animation paths, or design new ones in the Icon
Editor window.
Before:

After:

Icon Editor

Using the Icon Editor window, you can modify an object’s icon and define how you want the icon
animated.
One way to open the Icon Editor window is to right-click an object in the Class Library and then
choose Edit Icons.
You can also open the Icon Editor window with the context menu or the keyboard-shortcut [Ctrl]-
[I].
Note:
Icons are a class property; an object in the Class Library and all of its instances have the same set of
icons. Modifying the icons of one instance change the icons for the entire object class.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 74 -
The Icon Editor’s Main Window
The Icon Editor’s Main Window

About Icons
Most objects found in the Class Library and Toolbox viewer can be provided with one or more user-
defined pictures.
Each icon is assigned a number by the system. A name could be added by the user if desired.
The names have to be unique, and a name may only be allocated once per class object.
The number of icons for each class object is unlimited.
The maximum size is 4000 x 4000 pixels
As icons take up a large amount of memory space, a set of pictures of an object type is saved
only once. All objects of this type use the same icon. When the icon of an object type is
changed, the change is passed on to all other objects of this type (icons are a class property).
The only exceptions are objects with a fixed icon, such as the EventController, the FlowControl
or Connectors.

The Icon Toolbar, Draw Mode

Hitachi Sunway Information Systems (Thailand) Ltd.


- 75 -
Creating a New Icon

1. Open the Icon Editor window from the context menu in the Class Library or click Edit

Frame Icons in the Frame window toolbar.


2. From the Icon Editor window, choose Icon → New from the Icon Menu Bar to create a
new icon.
3. From the Icon Editor window, choose Icon → Size from the Icon Menu Bar to change the
size of the icon.

4. From the Icon Editor window, choose either Tools → Clipart Library or File → Open to
choose the desired picture for the icon.

Using the Clipart Library


You can insert a picture out of the Clipart Library by dragging and dropping it over the drawing board
of the Icon Editor.

Note:
The drawing board is the graph area of the Icon Editor.

Icons from the Internet can be easily imported by specifying the desired web page in the address bar.
If Microsoft Internet Explorer is used, a graphic can be simply dragged to the Icon Editor. Other
browsers may require the use of copy and paste functions.

Note:
Make sure before inserting any icon from the internet that it is freely available (such as shareware) or
if it is copyrighted, trademarked, or otherwise controlled, that you have permission to use the icon.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 76 -
Importing Images and Drawings

From the Icon Editor window, choose File → Open.


Choose the file type that you want to open.

You can insert external images or AutoCAD drawings into the editor:
Note:
Autodesk drawings are automatically converted to pixel graphics.
In the Open window, browse and choose the desired file.
Click Open.

Transparent Icons
To make portions of an icon transparent:
In the Icon Editor pallet double-click a color you are not using.
In the Color window, typing it in 0,128,128 for the Red, Green, and Blue values to choose the
new color. Click OK.
Use the Icon Editor to apply this color to the desired areas of the icon.
From the Icon Editor menu, check Icon → Transparent.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 77 -
Animating Icons

Purpose
In this lesson, you learn how to change how MUs move across the icon of an object during simulation.

Objectives
After you complete this lesson, you should be able to:
Setup how MUs move across the icon of an object during simulation.

Help topics
Additional information for this lesson can be found in:
Reference Help > The Plant Simulation Program Window > Icon Editor > Window of the Icon
Editor > Toolbar > Animation Mode

Hitachi Sunway Information Systems (Thailand) Ltd.


- 78 -
The Icon Toolbar, Animation Mode
All basic objects and simulation models consist of a symbolic and logical level.

Symbolic and Logical Levels


Symbolic Level
The symbolic level describes the graphics of the object.

Logical Level
The logical level determines the function of the object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 79 -
Animating a Picture Using Animation Points
In order to see the MUs moving on the picture assigned, animation points must be defined on the
symbolic level.

Animation Points are visualizing points used to display the icons of the MUs located on the object
during simulation.

Connecting the Animation Points

Stay in the Animation Mode to connect the animation points to the objects or locations on the

objects in the model. Click Link/Unlink Animation Points then choose the animation point to be
connected. Plant Simulation automatically opens the logical frame and then choose the corresponding
object in the logical frame by clicking on it.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 80 -
Other Icon Editor Topics

Purpose
In this lesson, several other features of the Icon Editor, not typically covered in this course, are
reviewed.

Objectives
After you complete this lesson, you should be able to:
Use the state to control the icon.
Setup the icon background icon.
Change an icon reference point.
Change an icon animation point.
Add icons to the Toolbox viewer.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
States and Icons of the Material Flow Objects
Reference Help > The Plant Simulation Program Window > Icon Editor > Window of the Icon
Editor > Toolbar > Animation Mode > Add/Remove Animation Point

Hitachi Sunway Information Systems (Thailand) Ltd.


- 81 -
Automatic Icon Control (State Icons)
Note:
State icons cannot be used for a frame (by default without the use of a method). More about this
later...
Plant Simulation automatically switches between icons, depending on the state of the object, and
provided, the icons have corresponding names.
Activating icon animation and MU animation reduce performance. Plant Simulation does not provide
built-in state icons.
Material flow objects and moving objects can automatically change to a different icon, when the object
changes its state. This only works, if you defined an icon for each of these states and named them
like this:
To use the state icons:
Choose the menu command from the Icon Editor window, choose Object → State Icons / LEDs
→ Use State Icons.

Note:
By default, the material flow objects do not provide predefined state icons. If you want to use icons for
the different states of the object, you have to create these icons yourself.

Also icons must be created with the following names:


For stationary objects:
o operational
o failed
o pause
o setup
o entrance blocked
For movable objects:
o operational
o waiting
In addition for transporters:
o failed
o pause

Frame Background Image


If an icon is given the name Background, the symbol used for it is displayed as the background
picture for the frame. You learn More about this in the last part of this course.

Moving an Icon Reference Point


Each icon has a reference point. Plant Simulation uses it to determine the position of the object when
you insert it into a Frame. By default the reference point is located in the top left corner of the icon.
To move the icon reference point:

From the Icon Editor window, verify that Draw Mode is activated.

From the Icon Editor window, choose Set Reference Point .


Pick the new location for the red point.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 82 -
Moving an Icon Animation Point
To move the animation point:
From the Icon Editor window, verify that Animation Mode is activated.

From the Icon Editor window, choose Move Animation Point .


Drag and drop the animation point to the new location in the window.

Icons in the Toolbox


To add toolbars for the objects you defined:
In the Class Library, right-click a folder (or Basis) and choose New → Toolbar. A new toolbar
is added to the Toolbox.
You can open the object or the class or remove the object from the toolbar with the context menu of
the Toolbox.
To change the icon of the objects in the Toolbox viewer:
Open the Icon Editor window for the object.
Note:
Each object has an icon with the number 0 (zero) named Default and a maximum size of
40 x 40 pixels. This is the icon the object is represented by in the Class Library.

Edit the icon Number 0 with the Name of Default. There are samples in the Plant Simulation
clipart/Training folder (for example for the CompMilling object, mill.gif could be used).
Save icon changes.
Save the model file.
Close the reopen the model to see the changes.
To extend or modify the Toolbox Toolbars:
Drag the object from the Class Library to the Toolbox and drop it there.

MU Graphics tab
MUs can be represented during a simulation using one of its icons or by a vector graphic. The icon
size is specified in the Icon Editor independent of the size specified for the MU. However the vector
graphic size is directly tied to the MU size.
For example, If the MU length is set to 2 and the MU width is set to 1 this would be the icon
representation (using the default icon):

Hitachi Sunway Information Systems (Thailand) Ltd.


- 83 -
This would be the vector graphic representation:

Note:
In order to use icon representation effectively, make sure to change the icon to match the MU size, or
use graphic representation

To use vector graphic representation for an MU:


1. In the Class Library, double-click the MU.

Note:
It is suggested to not make changes to the core MU objects such as Entity ,
Container , or Transporter . Instead duplicate or derive a new MU and change
instead.

2. From the Graphics tab, check Vector graphics active.

3. Click OK.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 84 -
Vector Graphics and Comments

Purpose
This lesson describes how to use vector graphics to improve the look of your frames. Another
technique is to add an AutoCAD background to the frame. You learn this technique in the last part of
this course.

Objectives
After you complete this lesson, you should be able to:
Create and edit vector graphics for an object.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Working with the Frame > Draw Vector Graphics or Text onto the Background of the
Frame

Hitachi Sunway Information Systems (Thailand) Ltd.


- 85 -
Using Vector Graphics in the Background of a Frame

To activate the drawing mode, from the Frame window click Vector Graphics Mode .
While this mode is active, you cannot modify any other objects in the frame. To exit the draw mode,
press the button again.
Note:
The Vector Graphics Mode is a toggle that turns Vector Graphics Mode on and off.
It is possible to draw geometric figures and text blocks; you can configure the color and weight etc.
Several objects can be grouped together.

To set a picture or a drawing as a frame background, use the icon editor and save an icon with the
reserved name Background (Later in this course you use an AutoCAD drawing as a background for
our main plant frame).

Adding Comments to a Frame

Comment objects are helpful to document how a model was designed or to display other
useful information.

Modifying the Frame Display


Setting the Background Color of a Frame:

From the Frame window menu, choose View → Background → Select Color.
Choose a color.
Click OK.
Show / Hide Information in a Frame:

- Show / hide the name of objects


- Show / hide the connection between objects

- Show / hide Comment objects


- Show / hide the grid

Hitachi Sunway Information Systems (Thailand) Ltd.


- 86 -
Classes, Instances, and Inheritance Introduction

Purpose
In this lesson, you learn how to use create, and navigate classes, instances, and inheritance.

Objectives
After you complete this lesson, you should be able to:
Duplicate and copy classes.
Make instances of a class.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Introducing Classes > Classes, Subclasses, and Instances

Hitachi Sunway Information Systems (Thailand) Ltd.


- 87 -
Inheritance Basics
One of the most important features of object-oriented programs is Inheritance.
All the objects provided in the Plant Simulation Class Library are classes.
You can add more detail to these classes and thus create new classes that inherit properties from the
original classes.
When using class objects in your simulation model, you can employ inheritance, as a class passes all
of its properties on to the objects derived from it.
By changing a property in the class object, you change that property for all derivatives of this class.
This is much less error-prone than having to change a property for each and every individual object.

Classes and Instances


Class - All objects in the Class Library are defined as a "class". They serve as a pattern for the
instances that are inserted in a frame.
o For example, let’s say that you create a class called Automobile. In this class, you define
all the attributes (and behaviors) that are common to all cars.
Subclass - This is an object within the Class Library that is derived from a class. All attributes
(and behaviors) of the original class are inherited to the subclass.
o For example, you create a subclass of Automobile named Ford Explorer. This subclass
inherits all the attributes (and behaviors) from Automobile; in addition you define additional
attributes that are specific to this type of car.
Instance - An instance is an object that was derived from a class in the Class Library, an
example of the class. An instance of a class is created when the class is added to a frame.
o For example, you create an instance of the Ford Explorer subclass by adding to a frame
called My_Garage. An instance is an actual incarnation sitting in My_Garage of the
theoretical subclass.
Inheritance - An instance inherits all its features from the class that it was derived from. Each
attribute (and behavior) on the object window has a checkbox that allows to inherit a default
value from the class (or sub-class) or change it.
Note:
Important: Changes valid for all examples of an object should always be done in the object class (in
the Class Library). If you change the object instance in a frame, the change only affects that instance.
Example for Class and Instance:
Class Example - The object named CompMilling in the Class Library.

Instance Example - The CompMilling instance in the TestMilling frame.

Example for Class and Subclass:


The Line class defines the properties of the object, such as its length, final speed, capacity, etc.
You now derive two additional Lines from the Line object and assign them different lengths. All other
properties are kept the same.
1. In the MaterialFlow folder of the Class Library, right-click Line and choose Derive.
2. In the MaterialFlow folder of the Class Library, double-click the new Line1.
3. On the Attributes tab, notice the cyan inheritance checkbox to the right of the length field.
Currently this field (on this Line1 Subclass) is inheriting a value of the 2 meters from the class
it was derived from.
4. Enter a different value for the length such as 100. The inheritance checkbox turns yellow and
has a line through it. This attribute no longer be inherited.
5. However, Line1 inherits all other properties from the Line class object in the Class Library.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 88 -
Inheritance
Derive, available when right-clicking an object in the Class Library, is for creating a copy of the
object in the same folder. The new object is a class object, but maintains the inheritance links to
the original object. This new object is called a subclass.

Duplicate, available when right-clicking an object in the Class Library, is for creating a copy of
the object in the same folder. The new object is a class object, but does not contain any
inheritance links to the original object. This new object is a class object.
Example of Inheritance:
Create a duplicate CompMilling and a CompMilling subclass from the Milling frame in the Class
Library. These three objects share the same structure. You now modify the CompMilling class by
adding another milling machine.

As inheritance is active, any changes you make to the class are passed on to the subclass. The
duplicate on the other hand is not aware of these changes, as any inheritance relation was severed,
when you created the duplicate object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 89 -
Recognizing Inheritance Structures: Frame:
The Open Origin button is active only when the Frame has an origin. When you click the button,
Plant Simulation opens the origin of this Frame.

This means that Plant Simulation passes changes you make on this hierarchy level on to the derived
objects. Plant Simulation shows the icon of the object Interface with a solid black fill when you
attached a Connector to the Frame.
Recognizing Inheritance Structures: Objects
Take a look at the toggle button to the right of a dialog element to see if inheritance is active or not.
A released inheritance checkbox (a minus sign in a yellow box) means that inheritance is not
active. Values you enter only apply to the present object, the instance of the class, not to the
class itself.

A pressed inheritance checkbox (a cyan box) means that inheritance is active. Then the
object inherits, in other words "uses" the value from its parent object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 90 -
More on Classes, Instances and Inheritance

Purpose
In this lesson, you learn how to understand more about the relationship of a object class and its
instances.

Objectives
After you complete this lesson, you should be able to:
navigate the instance and class relationships.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Introducing Classes > Classes, Subclasses, and Instances

Hitachi Sunway Information Systems (Thailand) Ltd.


- 91 -
Showing Inheritance Structures
Choose one of the menu commands of the Navigate menu of all objects. You use it to navigate
through the inheritance structure.

These menu options are located on the frame Navigate menu:

Open Location - This opens the folder in the Class Library where the object is located.
When no inheritance relation to an object higher up in the structure exists, Open Location is the
only active menu command.

Open Origin - This opens the object in the Class Library the current object was originally
derived from.
Go To Origin - This does the same as Open Origin, except that it also closes the instance
object.
Open Class - This opens the object the current object is derived from.
Go To Class - This highlights the object in the Class Library, the current object was originally
derived from.
Up one Level - This jumps up one level in the path (hierarchy).
When no inheritance relation to an object higher up in the structure exists, Open Location is the only
active menu command.
Changing which class that an instance inherits from:
Drag and drop the new class onto the instance with the [Alt] key depressed.
Note:
To see what you’ve done: Open the object window for the instance and choose Navigate → Open
Origin (The class that the instance is derived from is shown).
These menu options are located on the Class Library right-click:
Show Origin - Shows the origin of the selected object by selecting the object in the Class
Libraryy or the original frame the selected object was derived from.
Show Structure - This shows a list of all objects used to create the current object.

Show Inheritance - This shows you a list of all objects derived from the current object.

Note:
When no inheritance relation to an object higher up in the structure exists, Open Location is the only
active menu command.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 92 -
Paths and Name Space
Each element has to be identified in a unique manner. As a model consists of several hierarchy
levels, paths are required.
All objects possessing a common superior object in the hierarchy (for example are contained in
the same object) form a name space.
Within a name space, names of objects have to be unique. No two objects are permitted to
have the same name.
Identical names are allowed to appear several times in different name spaces.

The Relative Path


A relative path begins in a name space that is located below the object library in the hierarchy. Within
the frame the name of the object alone can be used to address the object. For example, the

CompMilling frame is a name space. Within the frame each object can be addressed by its name.

To address the Milling1 object within the CompMilling frame use the name Milling1.

The Absolute Path


An absolute path can be used to address a specific object from anywhere in the project file. An
absolute path always starts in the Class Library that is represented by the first dot. Each object in the
path (hierarchy) is listed in order separated my dots.

The absolute path to the Milling1 object is .FacilitiesComponents.CompMilling.Milling1

The path is displayed in the tile bar of the frame window.

Using the Interfaces , hierarchies can be created and inserted in a model just like an object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 93 -
Machine Failures

Purpose
In this lesson, you learn the basics to simulating failures in your system.
Note:
You learn more on this topic in the MT46300 Plant Simulation Advanced Modeling course.

Objectives
After you complete this lesson, you should be able to:
Manually force a machine failure.
Make the machine fail according to periodic distribution.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Modeling the Flow of
Materials, Basics > Modeling Failures

Hitachi Sunway Information Systems (Thailand) Ltd.


- 94 -
Introduction to Machine Failures
Note:
Failure data can come from a machine manufacturer, or through individual observation.
This lesson introduces the use of failures and random number streams in Plant Simulation.
To closely model real-life situations where machines fail at times, (which affects the technical or
organizational availability of the individual stations) you can define failures.
This sets the state of the component from operational to failed. Plant Simulation adds the duration of
the failure to the processing time or the dwelling time.
You can define failures for all material flow objects.

The object shows a red dot in the LED display area along the top border of the icon

When you want to use an icon for each of the different states, like the previous versions of Plant
Simulation did, create a new icon in the Icon Editor, and name it failed. Choose Object → State
Icons / LEDs → Use State Icons in the Icon Editor, to make the object use state icons, instead
of the LED.

Defining Failures
Multiple Failure profiles can be defined for a single object:
Each with its own distribution function
Individual start/stop times
Note:
On the Failures tab, click New to create a new failure profile. Each can simulate a different reason for
failure of the object.
Note:
Failures can be defined on individual objects (Stations) or at the class level and inherited to all
stations by default.
Two modes for entering failures:
(Toggled by selecting or deselecting Availability):
With Availability checkbox deselected, use the Interval (mean time between failures: MTBF)
and the Duration (mean time to repair: MTTR) to calculate the times of a failure. In this case
you choose your own distribution
With Availability checkbox selected, enter the percentage of the availability and the MTTR.
Plant Simulation uses the Negative Exponential distribution for the Interval and the Erlang
distribution for the Duration.
Note:
Erlang distribution - It was developed by A. K. Erlang to examine the number of
telephone calls which might be made at the same time to the operators of switching
stations. This work on telephone traffic engineering has been expanded to consider waiting
times in queuing systems in general (according to wikipedia.com).
Negative exponential distribution - The negative exponential distribution is called
negative because of the negative prefix of the exponent. Use it to visualize times between
independent events, and to model in-between arrival times of customers in a service
system, the duration of a repair job or the absence of employees from their job site. The
exponential distribution plays an important role in reliability theory. The random life times of
systems that fail during a certain time interval regardless of their life time is distributed in an
exponential way.
Weibull distribution - It was named after Waloddi Weibull. It can mimic the behavior of
other statistical distributions such as the normal and the exponential for the analysis of
failure rates

Plant Simulation offers a number of distributions to define the failure interval and the failure duration.
Choose one of the distributions and enter the parameters the selected distribution requires.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 95 -
Note:
Multiple failure profiles can be specified.

Plant Simulation shows which parameters you have to enter above the textbox for the Start time.
Note:
For Normal and Erlang:
Mu - The mean.
Sigma - the range that the number can vary from Mu.
Lower Bound and Upper Bound are optional.
Failure mode relates to:
Simulation Time - Relative to the entire simulation time (Starting with the start of the simulation
and the stop/reset of the simulation)
Processing Time - Relative to the time an MU is actively being processed.
Operating Time - Relative to the total simulation time minus the pause time of the machine
(The machine is on but may or may not be processing a part).

Random Number Introduction


It is not possible for a computer to generate a series of truly random numbers. With a computer there
is always a pattern to the random numbers generated. It is a point when the random numbers repeat,
known as the period.
In order to introduce randomness into our computer simulations, pseudo random numbers are used.
A mathematical function (sometimes called a pseudorandom number generator: PRNG) is used to
generate the sequence. Where you start in this sequence is determined by the function’s independent
variable known as a seed. This technique for creating random numbers is both fast and reproducible.

Random Number Streams-Seed Values


Seed Values for Object Dialogs
Plant Simulation automatically uses a dedicated random number stream for each material flow object.
For this reason you don’t specify the random number stream from the text boxes of the object dialogs
(such as the Station window).
Using a dedicated random number stream for each material flow object has a number of advantages:
When you insert an object it is guaranteed that all random components of this object are
different and stochastically independent from all other objects. Inserting an object with random
behavior does, for example, not influence any other objects.
As the number of the random number stream is no longer part of the parameterization of a
statistical distribution, you can now inherit the parameterization although different random
numbers are used.
Seed Values for Distribution Functions in Methods (advanced topic not discussed in this course)
Warning:
This is an advanced topic for those that would like to call the distributions using the z_ methods. This
is discussed in more detail in the MT46300 Plant Simulation Advanced course.
From the Plant Simulation window, choose Tools → Random Number Seed Values to open
the seed values table for distribution functions.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 96 -
The Random Number Seed Values table lists the random number streams in consecutive
order. Each row number corresponds to the number of the random number stream.
Each stream requires two integer seed values. These values determine the sequence of the
random numbers that Plant Simulation generates.
Different random number streams with identical seed values generate the same sequence of
random numbers.

How are Random Number Streams Accessed


Plant Simulation now automatically uses a dedicated random number stream for each material flow
object.
The first request to the stream is given the first number in the stream; the second request gets the
second number in the stream, etc. Using a dedicated random number stream for each material flow
object has a number of advantages:
When you insert an object it is guaranteed that all random components of this object are
different and stochastically independent from all other objects. Inserting an object with random
behavior does, for example, not influence any other objects.
As the number of the random number stream is no longer part of the parameterization of a
statistical distribution, you can now inherit the parameterization although different random
numbers are used.
To control whether successive runs using random number streams are identical, use Tools → Reset
Random Number Streams on Reset from the Event Controller object’s menu:
Checking it resets the internal random number generator of Plant Simulation during a Reset

This means that it generates the random number stream anew beginning with the seed
values you set.

When it is deselected, a Reset does not initialize the random number stream anew. This
means that a new simulation run does not use the same random numbers. For this reason the
simulation runs no longer produce identical results.

Note:
Plant Simulation uses the MRG63k3a random number generator to populate the random number
streams (which is shown to have a period of approximately 2377).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 97 -
Buffers and Other Material Flow Objects with a Capacity > 1

Purpose
This lesson enhances our model by adding various material flow objects with a capacity greater than
one. The most basic object is the buffer, but there are many others.

Objectives
After you complete this lesson, you should be able to:
Be exposed to several objects in Plant Simulation that have a capacity greater than 1, such as
a buffer.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Buffer

Hitachi Sunway Information Systems (Thailand) Ltd.


- 98 -
The Buffer

From the Toolbox viewer, click the Material Flow tab and choose Buffer to add it to the
model.
Capacity: user defined
Location-oriented material flow object
This is another Buffer object, which is more restricted than the PlaceBuffer. However, it has a much
faster computing time when the capacity is large.
Note:
The default processing time (delay) on a buffer is 1 minute.

The PlaceBuffer

From the Toolbox viewer, click the Material Flow tab and choose PlaceBuffer to add it to
the model.
Capacity: user defined
Location-oriented material flow object
The PlaceBuffer has a number of stations, arranged in a row, one behind the other. It can process or
store any number of MUs.
You can set the processing time for the entire PlaceBuffer, but not for the individual stations
that make it up. It divides this processing time among the specified number of stations, in orther
words the processing time is the time the MU takes to cover all stations. Note that the MUs cannot
pass each other. However, you can also enter a processing time of 0 minutes.

The Sorter

From the Toolbox viewer, choose the Material Flow tab and choose Sorter to add it to the
model.
Capacity: user defined.
Location-oriented material flow object.
The Sorter sorts the MUs located on it using a sort criteria you define. The exit sequence of the MUs
depends on the priorities you define. The Sorter moves the MU with the highest priority first,
regardless of when it entered. Define the priority of the MU with the Sort criterion and the sort Order.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 99 -
The Parallel Station

From the Toolbox viewer, click the Material Flow tab and choose ParallelStation to add it to
the model.
Capacity: user defined, matrix-based
Location-oriented material flow object
The ParallelStation object has several stations for processing moving units in parallel.
You can change the processing time at any point in time. This does not affect MUs located on other
stations within the ParallelStation. This way MUs can pass each other.
The Pick and Place Robot

Note:
This object is found on the Material Flow tab of the Toolbox.

PickAndPlace - a robot that picks up a part from one location and drops it at one or
more target locations.

Others Covered in MT46300

The StorageCrane (previously known as a PortalCrane) is located on the Cranes tab of


the Toolbox. It can be added to a model by checking Crane from the Libraries tab of the
Manage Class Library window.
It is a crane with vertical legs, which passes over a store and places parts into stock and
removes parts from stock. It can move large parts in the X, Y, and Z dimensions. You can
define the dimension of the storage area, the dimension of the crane gantry and the position of
the legs of the gantry.

The MultiPortalCrane is located on the Cranes tab of the Toolbox. It can be added to a
model by checking Crane from the Libraries tab of the Manage Class Library window. It can be
added to a model by checking Crane from the Libraries tab of the Manage Class Library
window.
Contains multiple cranes (portals) and collision detection abilities.

The Stores is a located on the Material Flow tab of the Toolbox.


It stores any number of MUs you define. They remain in the Store until you remove them using
a Method.

Others Covered in this Course


Line
Track
Container
Transporter

Hitachi Sunway Information Systems (Thailand) Ltd.


- 100 -
Introduction to Length-Oriented Objects

Purpose
This lesson begins the length-oriented object discussion. The processing time for these objects is
determined by their length.

Objectives
After you complete this lesson, you should be able to:
Create and use length-oriented objects.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Line

Hitachi Sunway Information Systems (Thailand) Ltd.


- 101 -
Introduction to Length-Oriented Objects
Primary Length-Oriented Objects:
Line (also known as a conveyor) - This object can convey Entity (for example parts) and
Container MUs. The speed is defined on the Line.
Track (also known as a road) - This object allows Transporter MUs (for example powered
devices such as forklifts and trains) to move on it. The speed is defined on the Transporter.
Footpath (also known as an isle) - Designated areas where Worker objects can walk. The
speed is defined on the Workerpool creation table. We’ll cover these objects later in this
course.
Note:
More is covered on Length-Oriented objects in this course and in the MT46300 course.
Other Length-Oriented Objects covered in MT46300:

AngularConverter - changes the conveying direction of the moving objects from


lengthwise to crosswise conveyance or from crosswise to lengthwise conveyance.

Converter - used to model material handling equipment. When the part moves onto the
Converter, it either passes straight through in the conveying direction, or it is lifted onto a
laterally moving transport level by a lifting mechanism and then conveyed laterally to the left or
right. Parts can arrive from all sides and be conveyed to all sides, but are not rotated.

TurnTable - a rotating platform, which moves the part onto one of several connected
material flow objects (using the Target Control) and/or turns it around (using the Pull Control).

Turnplate - a rotating platform, which rotates the loaded parts (in multiples of 90) and
ensures the uniform orientation of the leaving parts. A typical usage is in the package shipping
industry where all packages have to be rotated to a uniform direction so that a scanner can
automatically read the barcode holding the address information.

CrossSlidingCar - facilitates quick, easy and cost-effective cross transport if other


material handling equipment obstructs the way. It is mainly used for moving the conveyed parts
from one conveyor onto another one.

The TwoLaneTrack is a standard part of the Material Flow tab of the Toolbox. There
are several settings which are unique to two lane tracks:
o Traffic can either be right-handed (for example how you drive in the USA) or left-handed
(for example how you drive in Europe)

o Separate attributes and controls can be set for lane A and lane B of the track.
Conveyor and Electrified Overhead Monorail (EOM) libraries
Note:
The 3D versions of these libraries are covered in the MT46110 Plant Simulation 3D course.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 102 -
The Conveyor

From the Toolbox viewer, click the Material Flow tab and choose Conveyor to add it to the
model.
Capacity: User defined, length dependent
Length-oriented material flow object
When a Line is inserted, it begins drawing a polyline. Right-click to end the polyline.

The Conveyor object is used to transport MUs. The transport time is defined by the length and the
speed of the line. When two of the three attributes of speed, length and time are defined, the other
attribute is calculated. A capacity of -1 indicates that the capacity is defined as the sum of the length
of the MUs compared to the length of the line.
If the Acceleration checkbox is selected, the acceleration and the retardation of the line can be
specified while the speed control (method) is called when the line accelerates or decelerates.
Using the Curve tab, the polyline curve attributes can be modified. For example, a different width or
color can be set.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 103 -
Tracks, Transporters, and Transfer Station Objects

Purpose
This lesson discusses tracks, transfer stations and transporters. You return to this topic later in this
course when creating our last component for our plant. This topic is farther expanded in the MT46300
course.

Objectives
After you complete this lesson, you should be able to:
Set and use a Transfer Station object to load and unload MUs to/from a transporter on a track

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Track
Reference Help > Tools > TransferStation
Reference Help > Mobile Objects > Transporter

Hitachi Sunway Information Systems (Thailand) Ltd.


- 104 -
Track Object
Track Attributes:
The track object can be used to simulate tracks for transporters.

The track can be built up using the curve functionality.


To create a specific number of transporters use setting Number adjustable of the source.
Source Attributes for Tracks:
Note:
Transporters run on tracks (like Parts or containers run on conveyor lines).
Define the number of transporters you need.
Define the transporter as MU type.

Loading and Unloading


For loading and unloading, use the transfer station.
Add two transfer stations to the model created before.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 105 -
Transfer Station: Loading
Define transfer station as loading station.
Set where to take the parts.
Define where to place the part.

In case source or target object is a track or conveyor, define the position where to load/unload.
Loading parameters:
Define the loading time on the Times tab.
Define how many blocks and how many parts per block should be transferred.

The empty transporter has to wait until it is loaded.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 106 -
Transfer Station: Unloading
Define transfer station as unloading station
Set from where to get the parts for unloading.
Define where to place the parts.

Unloading parameters:
Define unloading time on the Times tab.
Unload all parts on the transporter.

Stop transporter while unloading.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 107 -
Setup Time, Assembly, and Dismantle Objects

Purpose
This lesson describes the assembly and dismantle station objects.

Objectives
After you complete this lesson, you should be able to:
Take a look at the different features that go along with the assembly process and utilize them in
our process.

Help topics
Additional information for this lesson can be found in:
Reference Help > Mobile Objects > Container
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Dialog Items of the Objects > Tab Set-Up
Reference Help > Material Flow Objects > Assembly Station
Reference Help > Material Flow Objects > DismantleStation

Hitachi Sunway Information Systems (Thailand) Ltd.


- 108 -
MUs with a Capacity
The Transporter
The Container

From the Toolbox viewer, click the Material Flow tab and choose Container or Transporter to
add it to the model.
The Container object is used for modeling things that can carry or contain other Moving Objects such
as a palette, box, or the base part of an assembly.
The container has been used for the tabletops because you need to attach 4 legs to each table.

The Assembly Station

From the Toolbox viewer, click the Material Flow tab and choose Assembly to add it to the
model. It is used to assemble MUs.
Capacity: 1 main part, mounting parts
The Assembly station adds mounting parts to a main part, for example doors and fenders to a car
body. It moves the mounting parts either to the main MU--according to the value you enter into the
Assembly Table--or it deletes them.
When the assembly process requires services, you can assign the order in which the Assembly
station requests mounting parts and services.
Assembly table with -- Choose No if you want to get a entity from each predecessor, or
choose Predecessors or MU Types, then open the TableFile table and enter the number of the
predecessor or the name of the MU type.

Main MU from predecessor -- Enter the number of the predecessor (Tools → Options →
Modeling → Show Predecessor).
Note:
The Show Predecessor option displays the number of processors on the connectors in a
frame. This option can be toggled on and off as needed.
Assembly mode -- Choose Delete MUs to delete the mounting parts after the assembly
process or Attach MUs to load the mounting parts onto the main MU.
Exiting MU -- Choose if the Assembly station moves the Main MU or the New MU on to the
succeeding object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 109 -
The Dismantle Station

From the Toolbox viewer, click the Material Flow tab and choose DismantleStation to add it
to the model. It is used to assemble MUs.
Capacity: 1 main MU, including mounting parts.
Location-oriented material flow object.
The Dismantle Station object removes mounting parts from the main MU or creates new ones. Use it
to model dismantle processes.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 110 -
Attributes

Purpose
In this lesson, you learn to edit and look at the attributes of an object using several techniques.

Objectives
After you complete this lesson, you should be able to:
Use the Object window.
Use the Attributes and Methods window.

Help topics
Additional information for this lesson can be found in:
Reference Help > The Plant Simulation Program Window > Class Library > Context Menu of
the Selected Object in the Class Library > Show Attributes and Methods
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Attributes of All Objects
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Attributes of the Material Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 111 -
Introduction to Attributes
Each object in Plant Simulation has a number of built-in attributes (such as length, speed, time
capacity, name and number of the icon, etc.) and methods (such as createAttr, closeDialog,
moveToFolder, etc.).
An attribute defines the behavior or state of an object. A method queries information of an object and
returns a value. It calculates a value and/or starts one or several actions that control the behavior of
the object.
The Show Attributes and Methods window displays all built-in attributes and methods of the object.
Open it by right-clicking the object and selecting the Show Attributes and Methods menu command.
Show Attributes and Methods is on the right-click menu of an object:
o In the Class Library
o In the Toolbox
o In a Frame
Show Attributes and Methods is on the Objects menu in the Frame.
You can also choose the object and press [F8].

You can define any number of User-Defined Attributes (Custom Attributes). Plant Simulation treats
these attributes just like the built-in attributes.

Show Attributes and Methods Window


In the Show Attributes and Methods window, double-click the name of the attribute to open a dialog
where you can modify the value of the attribute.
Object Attributes
Name - name of the attribute or method in either English or German.
Signature - data type of the attribute, or of the arguments.
Value - Only attributes have a value. Double-click it to edit.
Inherited / Not Inherited - Shows if the value is inherited (i) or not inherited (ni).
Watchable - Shows if Plant Simulation can watch the attribute or the state (for example if a
waituntil instruction can observe the attribute).
Attribute Filters

Attributes/Methods for Standard Users

Attributes/Methods for Expert Users

Show General
Show User Interface related attributes of the object.
Show Controls related attributes of the object.
Show Simulation related attributes of the object.
Show Engergy related attributes of the object.
ShowStatistics related attributes of the object.

Show Attributes of the object.


ShowRead Only Attributes of the object.
ShowMethods of the object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 112 -
Data Types and User-defined Attributes

Purpose
In this lesson, you learn about data types and user defined attributes.

Objectives
After you complete this lesson, you should be able to:
Create your own custom attribute on an object and observe its value during simulation.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Modeling the Flow of
Materials, Advanced > Customize the Behavior of Objects > Create a User-defined Attribute
Manually

Hitachi Sunway Information Systems (Thailand) Ltd.


- 113 -
Data Types
Data types define the value range of the data the objects use as input data or as variables. Plant
Simulation offers a number of data types.
For the data type integer, for example, you can only enter an integer number. For the data type
Boolean you can only enter TRUE and FALSE.
Data type Value
Boolean True or False
Integer Whole Number
Real, Length, Speed, Weight, Money Number
Date date statement (yyyy/MM/dd)
Time time statement (hh:mm:ss.ss)
Datetime date statement, including the time (yyyy/MM/dd hh:mm:ss)
List, Stack, Queue list with one column
Table list with one or more columns
Object Reference to an object in the model file

User Defined Attributes


Define a user-defined attribute to add properties and features to an object in order to meet your
modeling needs. During the simulation run, Plant Simulation can query, assign or modify these
attributes just like the built-in attributes.
You might, for example, define a custom attribute for the color, size, type of article, order number, etc.
You can define any number of custom attributes.

You can define the Name, the Data Type, and a Value of a custom attribute. You can either assign a
value when you create the custom attribute, or you can assign and modify it later on during the
simulation run.
Defining a User-defined Attribute
Define the custom attribute on the User Defined Attributes tab in the object’s window. The list
window also shows the custom attributes you have already defined.
Click New to open the User-Defined Attributes window. Choose a data type and enter a value.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 114 -
Working with TableFiles

Purpose

In this lesson, you learn how to use TableFile objects during a simulation.

Objectives
After you complete this lesson, you should be able to:
export and import data into a Plant Simulation table.
Use a table to control a Source.
Use attributes of an MU as an exit strategy.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > TableFile

Hitachi Sunway Information Systems (Thailand) Ltd.


- 115 -
Introduction to TableFiles

From the Toolbox viewer, click the Information Flow tab and choose TableFile to add it to the
model.
Note:

A TableFile is not really a file. It is really just a table in Plant Simulation.

You can format the TableFile according to your needs: You can set the Number of
columns/rows, the data type of the columns, the range of values, assign access rights, and add a
Column and/or a Row index for which you can enter any term of your choice.

Inherit Contents/Inherit Format


Choose these settings before entering values into the table or changing the data type of the
column(s):
Deactivate the inherit format command in the format menu by unchecking the Inherit Format
option.

After you deactivate Inherit Contents, you can modify the contents of the table.
After you deactivate Inherit Format, you can modify the format of the table. This also
deactivates Inherit Contents.
Activating Column Index and Row Index
Activate the column index and/or the row index: Enter meaningful names to make the table
more understandable. Plant Simulation surrounds the column index and the row index with
black lines and places them in column/row 0.
Show or hide the Column Index and the Row Index by selecting the menu commands on the
Format menu.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 116 -
Settings of the TableFile
To change the settings for a column, click the column in the column index row. To change the settings
for the entire TableFile , click Select All in the top left corner of the TableFile (or use the Edit
→ Select All command). Choose Format → Format and choose the most important settings of the
TableFile.

A TableFile Including Subtables


To create a subtable, a nested table, within a TableFile. To create one: right-click a column in the
TableFile and choose Format. In the List Format window, choose the Data Type tab. For the
Data type, choose Table.

You can then format the subtables on the TableFile tab that Plant Simulation now activates.
Instantiate the table (enter name in cell) and right-click the cell and click Open Object. Or double-click
the cell in the TableFile to open the subtable.

Exporting and Importing Data


The data of a table can be stored as a text file which can be read by other applications. For exporting
and importing the data to/from Microsoft Excel the .XLS file format can be written and read. The whole
table can also be stored as an object and can be reused by other simulation models.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 117 -
Tables Defining How the Source Creates Parts
In a Source for MU selection, when you choose anything except Constant, you have to:
Enter the path to a TableFile and click Apply
Note:
Plant Simulation automatically formats the table for the desired selection after clicking
Apply.
After it has been formatted, entered the different MU types and their names and attributes into
the table.

The TableFile Sequence of the Source

Open the TableFile and enter or choose the


MU: Drag the MU type from the folder MUs in the Class Library to the cell MU.
Number: Enter an integer number.
Name: If you want to, you can assign a name to the MU.
Attribute: Enter a name for the sub-table, and open the sub-table by double-clicking it. Enter the built-
in attributes and/or the custom attributes with the name and the value of the corresponding data type.

Using Attributes of MUs as an Exit Strategy


On the Station, choose the Exit Strategy tab. For the Strategy, choose Attribute so that the Station
exit strategy transfers the MUs according to the value of an attribute you enter.
Then choose the Custom Attribute data type from the drop-down list Attribute type, and click Apply.
Click Open List and enter the name of the attribute to be searched for, of its value and along which
successor (number of the Connector) the MU is going to be transferred.
The Default successor is the successor with the number 1. If the attribute with that value does not
exist, Plant Simulation moves the MU to successor number 1 or to the successor whose number you
entered in the text box.

Introduction to the Paint Object


The paint shop sorts the table tops according to the quality of the paint job: good or bad.
You want to simulate a reject rate of 10%.
For this reason, you add quality properties to the table tops: Each 10th table top is going to be a bad
one.
The paint shop is going to check these quality properties and use them to determine the succeeding
station.
For this, you need information about data types, tables and sequence-controlled production.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 118 -
Each object in Plant Simulation has a number of built-in attributes (such as length, speed, time
capacity, name and number of the icon, etc.) and methods (such as createAttr, closeDialog,
moveToFolder, etc.).
An attribute defines the behavior or state of an object. A method queries information of an object and
returns a value. It calculates a value and/or starts one or several actions that control the behavior of
the object.
The Show Attributes and Methods window displays all built-in attributes and methods of the object.
Open it by right-clicking the object and selecting the Show Attributes and Methods menu command.
Show Attributes and Methods is on the right-click menu of an object:
o In the Class Library
o In the Toolbox
o In a Frame
Show Attributes and Methods is on the Objects menu in the Frame.
You can also choose the object and press [F8].

You can define any number of User-Defined Attributes (Custom Attributes). Plant Simulation treats
these attributes just like the built-in attributes.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 119 -
Production Schedules

Purpose
In this lesson, you learn how to create a product schedule using a cyclical sequence source.

Objectives
After you complete this lesson, you should be able to:
Using a cyclical sequence source.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Source > Dialog Window of the Source > Tab
Attributes > MU selection > Sequence cyclical

Hitachi Sunway Information Systems (Thailand) Ltd.


- 120 -
Introduction to Production Schedules
There are several ways of selecting which MU a source creates:
It always produces the same one (Constant).
It produces one based on a table using one of these techniques:
o Sequence - produce MUs by following the sequence (and amount) once in order.
o Sequence cyclical - produce MUs by following the sequence (and amount) in order
continuously.
o Random - produce MUs from the table in a random order based on the specified
frequency.
o Percentage - produce MUs according to the percentages in the table.

Cyclical Source Sequence


Open the Source object and for MU Selection, choose Sequence cyclical to create different MU’s in
a repeating sequence.
The source object looks to the table that is specified and produce MU’s accordingly. To format the

table correctly, insert a TableFile into the frame with the source object and then click table file
in the source object. Choose the table file and when prompted, choose yes to format the table. Now
the desired information can be entered into the table.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 121 -
Event Debugger

Purpose
This lesson introduces the use of debugging tools in Plant Simulation:
Event Debugger - This topic is continued in the MT46300 course.
Method Debugger - This topic is covered in this course and in the MT46300 course.

Objectives
After you complete this lesson, you should be able to:
Use the EventDebugger.
Find objects and text.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Controlling the Simulation with the EventController > Working with the Event Debugger

Hitachi Sunway Information Systems (Thailand) Ltd.


- 122 -
Event Debugger
Use the EventDebugger to watch how Plant Simulation processes the individual events during a
simulation run.
Use it to detect errors in your model. It displays all events that have not been processed yet in a list.
Insert a breakpoint in front of an event and then process the events step by step
The Event Debugger Can Be Used To:
Step through the event list one step at a time.
Set Breakpoints in front of an event.
To close it:
Click Close .

Finding Objects and Text


The Find Object window is used to search based on the name of an object, the name of a condition or
any text you entered as source code into a method in your simulation model.

Examples of Event Debugger Usage


Example 1
In this example, you watch all exit (Out) events for the Entity with the ID 1, meaning that you track the
course the Entity takes through the installation.

If you would like to create a breakpoint for each Entity, delete the ID of the MU.
Example 2
In this example all MUs leaving Station1 define a breakpoint.

This time, you do not enter a Receiver, since you want the EventController to insert a breakpoint for
each leaving part. The Sender is Station1.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 123 -
Example 3
In this example only MUs of a certain class located on Station1 insert a breakpoint during a certain
time span.

Plant Simulation inserts a breakpoint when a part of the class .MUs.Entity located on Station1
creates an Out event between 1 hour and 3 hours.
At times you only want to insert breakpoints when certain conditions are met. Enter these conditions
into the text box next to Condition. A condition may be a certain value or certain states of the
simulation model or properties, for example, attributes, of MUs. You can also enter methods, returning
a boolean value as a result, which is then evaluated.
Example 4
In this example, you use a property of the part as a condition for a breakpoint.

Plant Simulation inserts a breakpoint, when a part of the class .MUs.Entity, which is less than 100
meters long, causes an Out event on Station1. Note that the unit depends on the settings you
selected under Tools → Model Settings/Preferences → Units → Length.
If you would like Plant Simulation to create a trace file that tracks all events, enter a name into the text
box Trace File in the Event Debugger window and choose the Trace active checkbox.
If you would to only create a trace file for a certain event, enter a file name into the text box Trace File
in the Breakpoint window.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 124 -
Example 5
In this example, you track the course the Entity with the ID 9 takes through a simulation model and
write the stations to a trace file.

With the settings shown in the dialog above, Plant Simulation inserts a breakpoint for each Out event
of the Entity with the ID 3 and writes this event to the file c:\exercises\trace3.txt. Note that this only
works when you selected the Trace active checkbox in the Event Debugger window. When you
deselect the Breakpoints active checkbox, Plant Simulation writes the trace file without stopping
your simulation using a breakpoint.
In the examples above, you only used Out events. You can, of course, also use any of the available
types of events, compare the List of Scheduled Events.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 125 -
Shift Calendar

Purpose
In this lesson, you learn how to use a ShiftCalendar to control when workers and machines are
scheduled to work throughout the week.

Objectives
After you complete this lesson, you should be able to:
Add a ShiftCalendar to our model and see its affect on throughput.

Help topics
Additional information for this lesson can be found in:
Reference Help > Resource Objects > ShiftCalendar

Hitachi Sunway Information Systems (Thailand) Ltd.


- 126 -
Introduction to Shift Calendar
In this lesson, you discuss the ShiftCalendar object. Use it to model the different shifts worked in
your facility. In it you define the start and stop times for each shift for each day of the week. Breaks
(pauses) and holidays can also be specified.
Be aware that with the combination of the ShiftCalendar and discrete simulation in a situation where
the machines are only operational on Mondays and Wednesdays, the simulation jumps between
these two days of the week (skipping days where no "events" take place in your model).

Shift Calendar Object

From the Toolbox viewer, click the Resources tab and choose ShiftCalendar to add it to the
model.
Capacity: 0
Information flow object
Shift Times tab:
Double-clicking the ShiftCalander icon in a frame opens the following window.

Before entering or editing settings, deactivate Inheritance and click Apply.


Enter the name of the Shift, the time it starts (From), the time it ends (To), and the duration of Pauses
on the Shift Times tab. To choose which shift works on which day, click in the cells below Mo, Tu,
We, Th, Fr, Sa, Su.
Note that shifts may overlap. While no shift is working, the respective objects are paused. Plant
Simulation enters this time as UnplannedTime into the statistics table.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 127 -
The ShiftCalendar - Reduced Times
Calendar tab:

Enter the days on which your facility does not work at all (Date From, and Date To) or only works part
of the time (Reduced Time), and a Comment describing the event on the Calender tab. You can
enter the second of January 2012 for example as 02.01.2012 or as 2002/01/02.
Enter the time during which your installation works a reduced shift into the cells below Reduced
Time. For the time you enter the facility works a normal shift, using the settings you entered on the
Shift Times tab.
When your installation does not work at all on a certain day, do not enter anything into the Reduced
Time column.
Importing a Shift Calendar

You can import a calendar that contains public holidays and other days off from a tab-delimited text
file:
Click the background on the Calendar tab and choose Import.

Activating the ShiftCalendar


To activate a resource to the ShiftCalendar, use one of these methods:
Method 1: Drag it to the ShiftCalendar icon and drop it there (absolute path inserted)
Method 2: Enter the name of the ShiftCalendar object on the Controls tab of the material flow
object (relative path inserted).
Method 3: Drag the material flow object and drop it on the ShiftCalendar object (relative path
inserted).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 128 -
Resource Exporters and Importers

Purpose

This lesson describes how to use the Broker , Importer, and Exporter .

Objectives
After you complete this lesson, you should be able to:
Setup an importer, exporter, and broker as a more detailed way (than a ShiftCalendar) to
handle when workers and machines are scheduled to work.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Station > Dialog Window of the Station > Tab
Importer
Reference Help > Resource Objects > Exporter
Reference Help > Resource Objects > Broker

Hitachi Sunway Information Systems (Thailand) Ltd.


- 129 -
The Concept
When simulating the flow of materials, the processing of a part in a station often requires certain
services. Processing only starts when these services are available, for example transport service, oil
change worker, maintenance specialist, setup specialist etc.
The station requests the services as soon as an MU arrives, more accurately the Importer triggers
the request.
Plant Simulation passes the request on to the Broker which has to fulfill the requests for services in
some way.
The Exporter then has to provide certain services in an amount/capacity you define and offer these
services to the Broker.
Note:
An Exporter is an individual (or a group of people whose members you cannot distinguish
individually).
The Broker manages the services requested and assigns them the services available.

Types of Importers
There are three types of importers in Plant Simulation:
Setup importers - Used for setup time. Located on the Importer tab. Can be handled together
or separately from processing importers.
Processing importers - Used for processing time. Located on the Importer tab. Can be handled
together or separately from setup importers.
Failure (repair) importers - Called to fix failed Stations (representing machines). Located on the
Failure Importer tab.
You begin discussing how to setup and use all three during the lessons and activities.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 130 -
Importer Settings
Importer Settings:
Choose settings on the Importer tab of the Station object. Do not forget to choose the Active
checkbox.
You can enter a Request control, a Receive control, and a Release control method to customize
how this is done.
Note:
To fail a station based on the provided services: On the Importer tab of the Station, uncheck Release
when services are failed. For requested Services, enter Expert. On the Exporter set up the
available Services to be Unskilled. When you run the simulation, the Station fails when an MU
enters the station.
Enter several alternative services.

Exporter Settings
Define the Capacity (max number of jobs he can do at once) and the Broker (the manager) brokering
the Services (the skills). A Priority of 10 is higher than 1.

Click Services and enter the services the Exporter supplies.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 131 -
Worker Basics

Purpose
This lesson explains how to use the worker object.

Objectives
After you complete this lesson, you should be able to:
Add a Worker, Workplace, and WorkerPool to a simulation as a more detailed way (than a
ShiftCalendar or Exporter) to handle when workers and machines are scheduled to work.

Help topics
Additional information for this lesson can be found in:
Reference Help > Resource Objects > Worker
Reference Help > Resource Objects > WorkerPool
Reference Help > Resource Objects > Workplace

Hitachi Sunway Information Systems (Thailand) Ltd.


- 132 -
The Concept
The worker resource is based on the importer/exporter/broker mechanism of Plant Simulation, so you
can use it only with material flow objects which support the importer (for example Station,
ParallelStation, Assembly, and Dismantle).
To use the worker you have to add the WorkerPool, broker and workplace objects to your simulation
model.

WorkerPool
o Amount, skill level, walking speed, efficiency, and shift model.
o Defines the workers available. It is possible to have more than one worker pool in your
simulation model. It is also possible to assign a worker pool to a calendar object.

Workplace
o Physical location of an operator at the station.
o The place where the worker performs his job. The workplace must be assigned to a station.

Broker
o Resource manager, receives operator requests and assigns operators to stations.
o Gathers statistics of the requested services.

Define the services you need for processing a part, using the standard importer definition sub tables.

WorkerPool
Use drag and drop to define the broker for a WorkerPool.
The definition table for the worker is opened by clicking Creation Table (remember to deactivate
inheritance fist, before you enter values).

In this table you can define the amount of a special worker type, the speed for walking and the
efficiency of the worker. The value of the efficiency be used to calculate the processing time, so an
efficiency of 50% doubles the processing time.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 133 -
Workplace
Use drag and drop function to assign a Workplace to a material flow object.
If the station needs more than one service at the same time to process a part, you can insert more
than one workplace for a station and define which workplace supports which service.
Note, that there can be only one worker located on a workplace at once.
Define the necessary services at the station as usual.

Worker Stays at Station


To make the worker stay at a workplace after completing the job do two things:
Checking the Worker stays here after completing the job checkbox on the Workplace.

Deselect the Get job orders in the pool only checkbox from the WorkerPool.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 134 -
Assigning a Workplace to a Station
To assign the station to a workplace, do one of the following steps:
Enter the path of the station in the Station text box.
Drag the station onto the workplace and drop it there.
Insert the Workplace close to a station. This automatically assigns the station to that
workplace.

Defining Services of a Station


Open the station (Station, ParallelStation, etc.) and choose the Importer tab.
Activate the importer. Choose the broker which manages the services.
Open the service table, enter any value for the alternatives. Enter the service and the amount
needed into the suitable alternative.

Defining the Worker from the Workerpool


Open the Workerpool.
Enter the Broker object.
Open the Creation Table for defining the workers that are to be available.
Enter the service the worker is providing.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 135 -
Footpaths and Shift Calendars for Resources

Purpose
In this lesson, you learn how to use footpaths and to integrate a ShiftCalendar with a worker model.

Objectives
After you complete this lesson, you should be able to:
Use footpaths and integrate a ShiftCalendar with a worker model.

Help topics
Additional information for this lesson can be found in:
Reference Help > Resource Objects > FootPath

Hitachi Sunway Information Systems (Thailand) Ltd.


- 136 -
Using Footpaths

To add a footpath to your simulation model, choose the FootPath object from the Resource
tab of the Toolbox. Add the footpath with the layout of your choice. Connect the worker pool and the
workplace with the footpath using the standard connector. Now the worker uses the footpath to walk
from the worker pool to the workplace and back again.
Defining the Footpath:
As soon as you define the starting point of the footpath, a parameter windowl opens, where you can
exactly define the parameters of the footpath. Pressing the [Ctrl] key activates the curve parameters.
Releasing the [Ctrl] key activates the line segment.
If you want to specify a certain value in the dialog, so you don’t have to determine it by moving the
mouse, select the Fixed checkbox.
For Example:
If you always want to draw a curve of 90°, 2.5 m radius then fix the three values Tangential Angle
(0°), Center angle (90°) and Radius 2.5m.

Automatic Selection of Footpath:


In case there are different paths from WorkerPool to a workplace, Plant Simulation automatically uses
the shortest path.

Workers and Shifts


ShiftCalendar objects can be used in conjunction with WorkerPool objects.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 137 -
Workers Carrying Parts

Purpose
In this lesson, you learn to use workers to not only perform work at a station, but to carry the parts
between the stations.

Objectives
After you complete this lesson, you should be able to:
Use a worker to carry a part between the stations.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Modeling Workers and the
Jobs They Do > Model a Worker Who Carries Parts > Model a Worker Who Carries Parts
between Workplaces
Reference Help > Resource Objects > Worker > How the Worker Carries Parts
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Dialog Items of the Objects > Tab Exit Strategy > Strategy > Carry part away

Hitachi Sunway Information Systems (Thailand) Ltd.


- 138 -
Introduction to Workers Carrying Parts
In this lesson, you setup a worker to carry one or many parts. This done by:
Specifying the Carry Part Away exit strategy on the material flow object (such as a Station)
and clicking Apply.
Enter the desired worker parameters (the MU target is either the target Station or Workplace
object) and clicking Apply again.

Note:
However, when this option is combined with a ShiftCalendar, the worker has to be told where to put
the parts he is carrying when his shift ends. This is done by specifying a PartsBuffer on the
WorkerPool object. It can be any object that has room to hold the parts when the shift ends.

Introduction to Worker Charts

The Worker Chart can also be added to a model from the Tools section of the Info Pages.
It shows a chart of the usage of all workers of a given WorkerPool.
You can group the workers by individuals and classes or show the entire pool as one chart. You
can also hide the pauses, regarding only the working time.
The worker chart works in sample mode. You can change the type of chart from bar to pie
chart.

Usage:
Add the worker chart to the model (as described above).
Drag and drop the WorkerChart from the Tools tab of the Toolbox into the frame.
Drag and drop the Workerpool, already located in the frame, onto the WorkerChart.
Double-click the Utilization of workers window and configure the chart as desired.

Start the simulation.

Stop the simulation.


Right-click the WorkerChart and choose View Chart.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 139 -
Setting up the Worker Chart
To view the average of all the Workers in the pool or of a class, Group the Workers by Pool or by
Classes respectively. You can also display the activities of each individual worker. Typical Worker
activities are repair, set up or waiting for something to take place.
There are two points of view to sort and present the statistics. The Working time view shows the
activities according to the worker or how you grouped them. The Overall time view provides an
overview of the activities according to who executes them.
Caution:
Be aware that the displayed portions Waiting for MU and Waiting for importers contain not only the
time during which a worker is waiting, but also the time consumed by the worker walking on a footpath

Introduction to Failure Importers


A failure importer can be called when a machine fails. It is setup on the Failure Importer tab of the
Station. This type of worker (service) comes and fixes the failed machine. In general, it is setup the
same as the setup and processing importers.

Introduction to Adding Workers to our Plant


For this you have to add the Workplace, Broker and WorkerPool objects. All these objects are
located on Resources tab in the Plant Simulation Toolbox window.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 140 -
Time Sequence

Purpose
In this lesson, you learn how to use a time sequence to track aspects of a simulation.

Objectives
After you complete this lesson, you should be able to:
Use a time sequence to track aspects of a simulation.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > TimeSequence

Hitachi Sunway Information Systems (Thailand) Ltd.


- 141 -
Layout
Now, you have reached the final part of our process. After you finish packing the product, you create
a process to move the product from the packing area to the shipping area.
You want to view statistics, when the assembled tables arrive in Shipping. You use the
TimeSequence object to record the point in time and the number of tables that arrive at the shipping
department. For this, you use the statNumIn attribute of the Drain object.

The TimeSequence

From the Toolbox viewer, click the Information Flow tab and choose TimeSequence to add it
to the model.
Capacity: 0
Active information flow object
The TimeSequence object is used to collect values with a time stamp. Ensure that the data type for
the value column matches the data type of the statistic to be recorded.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 142 -
Note:
Make sure that Resource statistics is active for the object that records the values.
Start Values Tab:
Choose the Time Reference on the Start Values tab:
Absolute -- Enter a point in time.
Relative -- Enter a duration.
In most cases you use a relative time reference and a reference time of 0, which means that the
TimeSequence records the active values immediately.

Record Tab:
Here is where the path to the value to be recorded is set. The mode watched means that the value is
recorded every time it changes. Sample mode records the value at the interval specified.

Choose the Mode for recording the value:


Watch -- When the watchable value actually does change.
Sample -- Periodically during the interval you enter in the text box Interval, no matter if the
value actually changes or not.
Choose the Active checkbox in the instance of the TimeSequence you inserted into your Frame, so
that it records the values.
Note:
If you want to change the value in the Path text box, you have to clear the check Active checkbox
beforehand.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 143 -
Performing a Power Consumption Analysis

Purpose
In this lesson, you learn estimate energy usage by equipment in your facility.

Objectives
After you complete this lesson, you should be able to:
Setup and use the energy statistics for material flow objects.

Help topics
Additional information for this lesson can be found in:
Step-by-Step > Modeling in Tecnomatix Plant Simulation 2D >Simulating the Power
Consumption in Your Facility
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Dialog Items of the Objects > Tab Statistics > Energy Statistics

Hitachi Sunway Information Systems (Thailand) Ltd.


- 144 -
Simulating the Power Consumption in Your Facility
To accommodate the growing environmental awareness, Plant Simulation provides features on the
Energy tab of the material flow objects to keep track of energy consumption in the face of rising
energy costs and the depletion of energy resources. These features provide these evaluations
regarding energy usage during the production process in the facility:
Power consumption per machine.
Total power consumption for all objects contained within a Frame.
On the Energy tab of material flow objects, you enter settings pertaining to the power input and to the
transition times from one energy state to another.
Note:
Only the active material flow objects offer energy settings and that the length-oriented objects do not
provide the states setting-up and standby.

Energy Related Attributes: Power Input


Note:
You can enter a real number or a formula for these fields.
Working -- Enter the power input in kilowatts for the machine when it is working.
Setting-up -- Enter the power input in kilowatts for the machine when it is setting-up for a part
type.
Operational -- Enter the power input in kilowatts for the machine when it is operational, e.g.,
when it is waiting for a part.
Failed -- Enter the power input in kilowatts for the machine when it is failed.
Standby -- Enter the power input in kilowatts for the machine when it is on standby.
Off -- Enter the power input in kilowatts for the machine when it is on off.
Note:
Customers can also measure the power input values at their own equipment using Siemens b.data or
calculate this roughly based on the nominal value printed on the main engine.
For tooling machines (for example grinding, drilling, etc.) 3.0 to 8.0 kW is realistic. For example in the
automotive industry: use 4.357k W for Working, 0.001 to 2.0 kW for Standby, and 0.0001 to 0.5 kW if
switched to Off. A conveyor ( weighing between 1 to 20 kg) with a length of between 3 to 6 m, can be
assumed to use 2 to 4 kW for Working and 0.01 to 0.1 kW in Standby.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 145 -
Energy Related Attributes: Transition times
Operational to Off
Off to Operational
Operational to Standby
Standby to Operational
Standby to Off
Off to Standby
Energy Related Attributes: State Transition
In the Energy state Transition window, you can choose the state transition settings at the Start and
the End of a Pause and if you want to Power up early or not.
You can also choose the state transition settings at the Start and the End of the Unplanned state
and if you want to Power up early or not.

Energy Statistics of the material flow object(s)


To check the statistics values of the energy states, click Energy Statistics on the Statistics tab.

Note:
The states of a machine are not always directly comparable to the Plant Simulation states of the
machine.

The energy states of the material flow objects differ from the resource states with the same name.
The values for the resource states refer to the statistics collection period, while the values for the
energy states refer to the total energy consumption.
Green bar - the percent of the total energy consumption during which the object was working
Brown bar - the percent of the total energy consumption during which the object was being set
up
Yellow bar - the percent of the total energy consumption during which the object was operational
Red bar - the percent of the total energy consumption during which the object was failed
Light gray bar - the percent of the total energy consumption during which the object was on
standby
Dark gray bar - the percent of the total energy consumption during which the object was off
Note:
To view Energy Statistics in the Statistics Report, click the object in the Frame, and press [F6]
(Show Statistics Report), or choose View --> Show Statistics Report.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 146 -
Loading a CAD Model as a Background

Purpose
In this lesson, you learn how to load CAD model as a background icon.

Objectives
After you complete this lesson, you should be able to:
Load CAD model as a background icon.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Creating a Simulation
Model > Working with the Frame > Add a Graphic and a Color to the Background or the Icon of
the Frame

Hitachi Sunway Information Systems (Thailand) Ltd.


- 147 -
Introduction to Background Icons
Why use a CAD File as a Background?
Better understanding of the layout
Lines and tracks can use the scale
Clear positioning
Add a Graphic to the Background of the Frame:
Many file formats including AutoCAD and Microstation files can be used as the background icon for a
frame. To add a graphic to the background of a Frame, do one of the following:
Drag a .GIF, .BMP, .PPM, .PPM RAW, .DXF or .DWG file from the Windows Explorer, an
internet browser, the icon library etc. over the background of the Frame and drop it there.
This new graphic replaces the icon named background of the Frame. If you have not assigned
a background icon, Plant Simulation automatically creates a background icon.
Note:
Note that Plant Simulation does not automatically scale the size of the background icon to
the size of the Frame. You can also add a background picture with the method
setBackgroundImage.
Drag a layout drawing you created in Autodesk over the background of the Frame and drop it
there.
You can use this layout drawing as the actual background of the Frame and insert the Plant
Simulation objects on top of it. This is feasible when your simulation model is not too complex. If
you are modeling a complex installation, this might not be practicable, as it might lead to a
cluttered layout. Then, you might want the layout drawing to be one of the icons of the Frame,
and have the MUs move through the installation on the animation lines you define in the class
of that Frame. Be aware that these .DXF or .DWG files are vector based, whereas Plant
Simulation uses pixel based graphics. This means that you have to think about how to transfer
one size to the other.
Frame Grid Spacing:
From the Frame menu, choose Tools -> Scaling Factor. The Scaling Factory is the length of one
pixel in length units. Using the default setting of 0.05, the length between two grid points (20 pixels) is
one meter.

Note:
If the Scaling Factor is set to 0.5, then the horizontal and vertical grid spacing becomes 10 meters
each.
Drawing Scale:
Each drawing can be scaled during import as well.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 148 -
How to Bring in an AutoCAD Drawing and Scale it Correctly
1. You can measure the extensions of your AutoCAD drawing (using AutoCAD measurement
functionality) and convert these extensions to meters. You compare the extension in x
dimension with the extension in y dimension and take the maximum value - e.g. 90 meters.
2. You divide this value by the frame size you want to use. The maximum frame size which Plant
Simulation version 9 allows is 6000 x 6000 pixels. In my example 90 / 6000 = 0.015. This is
the required scaling factor for the frame.
3. In the Plant Simulation frame, under Tools -> Scaling factor, you set the scaling factor to the
new value (for example to 0.015).
4. When you drag and drop the .DWG drawing on the frame background, a window opens asking
for the scaling factor of the drawing. In this window, you enter the factor to convert the drawing
units to meters. So if the drawing units are millimeters, then you enter 0.001 in this dialog.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 149 -
Preview of Experiment Manager

Purpose
This tool is only briefly covered in this course. It is covered in more detail in the MT46300 course,
since there are all sorts of Plant Simulations tools (for example Data Fit, Trunc Distribution,
Confidence Intervals, Chi Square Independence, Analysis Of Variance, Roll Dice, Variants
Generator, Regression Analysis, NeuralNetworks, etc…) that can be used in conjunction with
ExperimentManager.

Objectives
After you complete this lesson, you should be able to:
Use the basic features of the ExperimentManager.

Help topics
Additional information for this lesson can be found in:
Reference Help > Tools > ExperimentManager

Hitachi Sunway Information Systems (Thailand) Ltd.


- 150 -
Experiment Manager
The idea of the ExperimentManager is that you have a goal (such as to improve parts produced per
day) and you have an idea how to do it (for example modify the size of some buffers). The
Experiment Manager is used to setup, run, and evaluate these types of experiments. You can enter
the input values and perform the runs in many ways:
Define Input Values - manually enter the values to try for the inputs in order to achieve our
goal. (covered in this course)
Multi-Level Experimental Design - automatically vary the input values within a range.
(covered in the MT46300 course)
Rules - user defined rules vary input values based on user defined criteria. (covered in the
MT46300 course)
Distributed Simulation - to simultaneously use the computing power of several computers to
perform the experiments. (covered in the MT46300 course)
Neural Networks - use a learned behavior to approximate the results of many runs using the
results of only a few runs. (covered in the MT46300 course)
And more (covered in the MT46300 course)
Basic Usage:
1. Add and end time/date for the simulation.
2. Add the Experiment Manager object to the desired frame.

3. Setup output values


4. Setup input values
5. Setup number of observations per experiment
6. Perform a test run.
7. Perform the actual run
8. View the results.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 151 -
Presentation of Results in Custom Reports

Purpose
In this lesson, you discuss the Report object and HTML Wizard object. Several parts of Plant
Simulation use this object internally to create specific reports.

Objectives
After you complete this lesson, you should be able to:
Use it to create reports of desired information.

Help topics
Additional information for this lesson can be found in:
Reference Help > Display and User Interface Objects > Report

Hitachi Sunway Information Systems (Thailand) Ltd.


- 152 -
The HTML Wizard Object

The HTML Wizard can also be added to a model from the Tools section of the Info Pages. It
generates a report of a simulation run. You can save it as an HTML file.

The Report Object

From the Toolbox viewer, click the User Interface tab and choose Report to add it to the
model. It is used to create html-reports from frames, charts, gauges etc. in the model.

Details on The Report Object:


Properties:

Icon:
Capacity: 0
Active UserInterface object
Use the Report to present simulation results as an HTML Report.
The report can be saved and loaded to an intranet or send to other people.
Report -- General Parameter:
General Parameter: You can define parameter, that is used for displaying or saving the report, such
as:
Name and version
Person in charge
Folder to save to
Filename to save to
Etc.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 153 -
Report -- Content Definition:
Structure:
Right-click Report or any existing page to add or delete new pages

Headline:
Contains the headline for the selected page (test definition only)
First, Second and Third Column:
o Data can be displayed in up to 3 columns. For each column, the content can be defined as
text, object or icon.
o Enter the text or path to an object into the cell (Drag and drop of object possible)
HTML Object Format:
o Double-click a column cell to select, whether the text entered should be displayed as a text,
an object or an icon.

o When selecting object or icon, you can define the display size of this object.
o In addition you can enter additional HTML code, e.g. for formatting the entry.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 154 -
Introduction to the Method Object

Purpose
In this lesson, you learn a little bit about what a method object is within Plant Simulation.

Objectives
After you complete this lesson, you should be able to:
Know what a method is.
Be exposed to some preferences related to methods.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk
Reference Help > Information Flow Objects > Method
Reference Help > Information Flow Objects > Method > The Method Window > Toolbar of the
Method Editor

Hitachi Sunway Information Systems (Thailand) Ltd.


- 155 -
Introduction to Our Task
Here is the model you have created so far:
A Plant Producing Tables

In order to create this model, you created components using standard objects:
In this course, you take this model and enhance it by creating several custom objects (a.k.a.
methods).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 156 -
Hitachi Sunway Information Systems (Thailand) Ltd.
- 157 -
Object-Oriented Programming
Object-oriented languages are based on encapsulated objects, that consist of data structures and the
operations (methods) defined with them. The information, which is encapsulated in an object, can only
be manipulated from the outside by the methods defined for an object class. To execute a method of
an object, a message is sent to the object containing name and arguments of the method. The
operation is only assigned to a message at run time. ...*
* Dubbel Taschenbuch für den Maschinenbau (Dubbel paperback for mechanical engineering), 18.
Edition

What is a Method?
A Method is a small program, comparable to a procedure or a function in other programming
languages (for example Basic, Pascal or C++).
SimTalk, the programming language of Plant Simulation, is based on the programming language
Eiffel (an ISO-standardized object-oriented programming language). It resembles other programming
languages.
You can program a Method to read the attributes of the objects you inserted into your model and
change these attributes. Select an object and then choose Objects → Show Attributes and
Methods to show all built-in attributes and methods that object provides.
In addition you can define any number of user-defined, custom attributes.
The object Method is fully integrated into the object-oriented concept of Plant Simulation. Enter your
source code into the object Method. Then the built-in Interpreter processes these statements during
the simulation run.

What Can a Method Do?


A Method can:
React to certain events during a simulation run.
Get and set conditions.
Execute statements.
Modify and extend the behavior of objects.
Prepare a model for new users with custom dialogs (windows).
It allows you to:
Implement different approaches; adapt your model to your needs.
Increase the efficiency of your simulation model.
Increase the flexibility of your simulation model

The Method Object


Use a Method to program controls that other objects start and execute during the simulation run.
Properties:

Capacity: 0
Information flow object

When you insert the instance of a Method into your model, Plant Simulation deactivates Inherit

Source Code .

Hitachi Sunway Information Systems (Thailand) Ltd.


- 158 -
Toolbar of the Method

Editor Preferences
Editor Preferences:
Choose Tools → Preferences.
In the Preferences window, click the Editor tab. This tab is used to choose settings for the Method
Editor.

Display line numbers checkbox - It is recommended to check this. This allows you to quickly
change to the line that contains wrong source code in the Method Debugger.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 159 -
Simulation Preferences
Choose Tools → Preferences.
In the Preferences window, click the Simulation tab. This tab is used to choose settings for the
Method Editor.

Maximum depth of calls - Sets how many methods may be called by another method.
Maximum number of call chains - Sets the maximum number of methods that may be called
at the same time.
Maximum number of suspended methods - Sets the number of methods that may be
suspended at the same time and wait for an event to occur.
Note:
These settings can help improve simulation runtime performance.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 160 -
The Syntax for Writing a Method

Purpose
In this lesson, you learn the syntax of writing a method.

Objectives
After you complete this lesson, you should be able to:
Create a simple method and run it.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Method > Programming a Method
Reference Help > SimTalk > Operators and Expressions

Hitachi Sunway Information Systems (Thailand) Ltd.


- 161 -
Syntax of a Method

SimTalk Operators
Assignment Operator
o The assignment operator := assigns a new value to a variable.
o <variable> := <new value>;
Arithmetic Operators
o Addition, subtraction, multiplication, division (+, -, *, /) and standard functions, such as
trigonometric functions, logarithm, and exponential function.
Relational Operators
o Relational operators =, /=, >, >=, <, <=, and == compare two values. The result, TRUE or
FALSE, is of data type Boolean.
Note:
Tolerance for about equal (==) can be changed in Tools → Preferences →
Simulation.
o Boolean operators and, or, not combine expressions.
Input and Output Operators
o Load and save data.

Document Conventions
Names of attributes begin with an upper case letter. Each new term after that begins with an
upper case letter, such as GenerationTableActive.
Names of methods begin with a lower case letter. Each new term after that begins with an
upper case letter, such as currIcon and absSimTime.
Methods show keywords in blue (examples are is, do, and end) and comments in green.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 162 -
Method Templates
Using templates of methods enables a very easy and secure way of programming by inserting
complete control structures.
The definition of your own method templates allows the usage of predefined methods.
Note:
To set the location of the method templates, choose Tools → Preferences → Editor→ Template
Folder. Here is the syntax for a method template file:
The first comment is the name shown in the user interface.
The second comment is the description shown in the user interface.
The rest is the inserted text.

Comments
Comments improve the legibility of a method and help to understand its function.
Enter two hyphens - - to start a one-lined comment that ends at the end of the line.
Enter a forward slash and an asterisk (/*) to start a comment line that covers several lines and
an asterisk forward slash (*/) to end the commented lines.
The Method displays the text of the comment in green.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 163 -
Sample Statements
The following are sample statements used in a method. They show a simple statement sequence, a
local variable, input and return arguments

Hitachi Sunway Information Systems (Thailand) Ltd.


- 164 -
The Method Debugger

Purpose
In this lesson, you learn how to trace or debug method logic using the method debugger.

Objectives
After you complete this lesson, you should be able to:
Trace or debug method logic using the method debugger.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Method > The Method Window > Method
Debugger

Hitachi Sunway Information Systems (Thailand) Ltd.


- 165 -
The Method Debugger
Plant Simulation automatically runs the debugger when the source code contains errors that prevent
the method from being executed. The debugger can also be used to detect errors in the simulation
model and can be used to watch how the procedures are executed.
Open the debugger using one of these techniques:

From the Method window toolbar, choose Debug .

Or set breakpoints (right-click a line in the Method window and choose Class
Breakpoint) and run the method.

Or from the Method window toolbar, choose Run → Debugger or press [F11].

Warning:
VERY IMPORTANT: Or hold down [Shift]-[Alt]-[Ctrl] while a method is being executed that is stuck in
an infinite loop.
Switch to an open debugger window:
Press [F12] or choose Debugger → Switch to Debugger .
Use the Debugger to:
Watch local variables, arguments and information about the calling object and the MU that
triggers an action in the Watch Window.
Track how the method is executed step-by-step.
Detect errors using the messages the debugger shows.

Breakpoints: Executing a Method Step-by-Step


Set breakpoints in the method to watch how it is executed or to execute it step-by-step.
Setting breakpoints:

Open the Method window.


Right-click and choose Class Breakpoint (or place the cursor on the line where the breakpoint
is to occur and press the [F9] key).
When the source code reaches this line while executing, Plant Simulation opens the debugger
window and selects the breakpoint.
Click the buttons on the toolbar to continue executing the program or to abort it.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 166 -
The Debugger Toolbar

Viewing a Method in the Debugger Window


The Watch Window shows the MU that calls the Method (@), and the name of the object that calls the
Method (?).
Watch the values of arguments and of local variables in the Watch Window.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 167 -
Names, Identifiers, Paths, and Anonymous Identifiers

Purpose
In this lesson, you learn about name space and identifying objects directly and anonymously.

Objectives
After you complete this lesson, you should be able to:
Understand several terms such as absolute path and relative path.
Begin scratching the surface of anonymous identifiers.
Note:
This is a complex part of Plant Simulation to understand at first. You come back to this
topic several times throughout this course.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Names > Paths
Reference Help > SimTalk > Names > Anonymous Identifiers

Hitachi Sunway Information Systems (Thailand) Ltd.


- 168 -
Paths
Each object has an individual address to uniquely identify the object residing in the hierarchy level,
within the name space, or within another name space.
The relative path calls the object when it is located within the same name space.
The absolute path calls the object when it is located on another hierarchy level.
In addition you can use anonymous identifiers to call an object with a general identifier.

Name Space
All objects on the same hierarchy level are located within the same name space.
Within a name space all objects must have unique names.
Within different name spaces objects can have the same names.

Absolute Path
Example of the Absolute path to the Milling2 object:

Identifies the exact location of an object, irrespective to its hierarchy level within the frame.
The absolute path is required to call an object located on another hierarchy level.
The absolute path always starts in the Class Library and then proceeds through the folders
and frames to the object.
The absolute always begins with a period followed by a name, a period, a name, a period until
it has reached the name of the object.. <name>.<name>...<object>
Contains the name of the object you are calling at the last position.
When you place an object onto another hierarchy level Plant Simulation has to rename the
absolute path.
Note:
Takes more processing time than a relative path.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 169 -
The Relative Path
Example of the Relative path to the Milling2 object:

Calls an object within the same name space without having to enter the hierarchy level.
This path never starts with a period.
Enables you to flexibly and universally deploy Methods and objects.
Is correct even after the structure of the model has been changed.

Anonymous Identifiers
The paths to your objects should be as universal as possible, to enable you to deploy the called
object as flexibly as possible. For this you can employ a number of anonymous identifiers, which
serve as placeholders.
In spite of their universality they still uniquely identify a certain object.

Calling the MU Triggering the Method -- @

The @ anonymous identifier uniquely identifies the MU, such as table_top:6712, which triggered the
Method when entering or exiting the object.
Plant Simulation even uniquely assigns the MU, when several controls are triggered. The MU might
also be located on another object.
Note:
This is a very powerful feature.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 170 -
Calling the Active Method - Self
The self anonymous identifier returns the path of the currently executed method.
Self; returns the path to the name of the Method (for example .Activities.Frame.M1). Returns
the absolute path.
Self.name; returns only the name of the Method (for example M1). Returns the relative path.

Calling the Object Calling the Method -- ?


The ? anonymous identifier refers to the material flow object or the control (Method) that called the
Method. Using ? allows a Method to be used without modifications by several objects.

Calling the Active Frame - Current


The current anonymous identifier returns the frame the method object is located in. This is used to
enter the location of a frame into tables and lists or passes it as an argument to methods in other
frames.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 171 -
Calling the Location of the Active Frame - Location
The location method returns the object located directly above the object designated by the path. The
location of the MU is the object it is currently located on.
<object>.locationreturns the path to the frame where the object is located.
@.location returns the location of the object where the MU is located.

Calling the Topmost Level of the Hierarchy - root

The root anonymous identifier returns the topmost frame in the hierarchy of frames. This identifier is
especially useful when you do not know the name of the root frame (the frame located at the top of
the hierarchy).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 172 -
Scheduling Method Calls

Purpose
In this lesson, you learn how to create and use variable objects as well as predefined (build in)
methods.

Objectives
After you complete this lesson, you should be able to:
Use variable objects.
Create and use reset and init methods.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Names > Predefined Names
Reference Help > Information Flow Objects > Variable

Hitachi Sunway Information Systems (Thailand) Ltd.


- 173 -
Variables
Variables can be defined in many places. You continue to expand our knowledge in this area
throughout this course:
In the is section of a method - it is only "alive" while the method is running.
On an object (for example a Station, Frame, Entity, etc.) by selecting Tools → User-Defined
Attributes.

Adding a Variable object (global variable) into a frame from the Information Flow tab of
the Toolbox.

Events in the Model - Calling Methods


An event taking place at a certain time in the model can call a Method:
Clicking this button on the EventController calls this Method:

o Reset: Calls all Methods named reset located in the open model.

o Init: Calls all Methods named init after resetting the model.

Plant Simulation executes the autoexec Method located in the class library, when
opening the model file.

Plant Simulation calls all Methods named endSim at the end of a simulation run.
The simulation ends when the EventController has processed all events from the List of
Scheduled Events or when Plant Simulation reaches the end time you entered in the textbox
End on the Settings tab.

The Trigger and the Generator can also call a Method.

The Reset Method

Whenever you click Reset in the EventController, Plant Simulation scans the entire model,
including all Frames you inserted, for Methods named reset and executes them.
Our reset Method deletes all MUs in the model.
Insert a Method object into your model (insert it into the being run or one of its sub-frames), and
change the name to reset. Enter the text into the method from the following image.

The Init Method


Plant Simulation calls this control once at the beginning of the simulation run during the init phase

before the objects are initialized. Init Methods can initialize your model, for example set the
values of variables, place MUs onto material flow objects, etc.
Insert a Method object into your model, and enter init into the text box Name in the Rename window.
Insert the text as follows:

Hitachi Sunway Information Systems (Thailand) Ltd.


- 174 -
Entrance and Exit Controls

Purpose
In this lesson, you learn about entrance and exit controls.

Objectives
After you complete this lesson, you should be able to:
Understand the order of execution of the various controls of point-oriented and length-oriented
objects.
Create and use exit and entrance controls.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Dialog Items of the Objects > Tab Controls > Exit control
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Modeling the Flow of
Materials, Advanced > Create Entrance and Exit Controls

Hitachi Sunway Information Systems (Thailand) Ltd.


- 175 -
Introduction to Entrance and Exit Controls
You can program and choose Entrance an Exit controls for each material flow object. You might
compare them to a photo sensor placed at the entrance/exit of the material flow object.
You can attach a Method to each of these photo sensors that Plant Simulation executes as an MU
move through an object.

You can browse and choose and existing control (for example Method) or right-click in the field to
create a new control that is stored within this object.
There are different controls available for point-oriented and length-oriented objects.

Point-Oriented Objects
Pull Control of Point-Oriented Objects
Plant Simulation activates the pull control, whenever the object is ready to accept a new part or when
it is ready, when a new part is Waiting at its entrance. In the pull control you can decide which of the
MUs, which you intend to move onto the object, the object actually accepts.
Setup Control of Point-Oriented Objects
Plant Simulation activates the setup control, whenever a set-up process starts or ends.
Entrance Control of Point-Oriented Objects

This is activated as soon as an MU enters the object. The MU is located all the way on the object,
irrespective to its length.
Note:
Once set, the time the MU remains on the object cannot be changed, unless a formula is entered as a
processing time.
Note:
The Before actions checkcbox is used to execute the entrance control before the standard actions
are executed. Standard actions encompass starting the processing time or the setup time, requesting
services through the importer, or evaluating the assembly table of the Assembly station. When you
activate it, you can for example change the processing time in the entrance control, which then affects
processing of the part that is already located on the object.
Front-Activated Exit Control of the Point-Oriented Objects

This is called when the MU intends to exit the object. The MU is still located on the object.
The exit control may be activated several times: when the MU cannot exit the object or because the
successor is full. Plant Simulation calls the exit control again once the successor is unblocked.
Note:
The front-activated exit control overrides the default exit strategy of Plant Simulation, the MUs must
be moved manually using methods.
Rear-Activated Exit Control of Point-Oriented Objects

This is called once the MU exits the object. The MU is located on the successor.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 176 -
Note:
The rear-activated exit control is called only once and it does not override the default strategy.
Basic Order of Execution for Point-Oriented Objects
An example of point-oriented objects are Station, Buffer, etc. They contain these controls: Entrance,
Front Exit, Rear Exit, Set-up, and Pull. Some of these are described later. They are executed in this
order:
1. Pull Ctrl
2. Set-up Ctrl
3. Setup Time
4. Set-up Ctrl
5. Enter object
6. Entrance Ctrl
7. Processing Time
8. Front Exit Ctrl
9. Exit object
10. Enter next object
11. Rear Exit Ctrl
Example Order of Execution for Two Point-Oriented Objects (default settings)
If you have two pointed oriented objects in sequence, they are executed in this order:
1. SP1 Pull Ctrl
2. SP1 Set-up Ctrl
3. SP1 Entrance Ctrl
4. SP1 Set-up Ctrl
5. SP1 Front Exit Ctrl
6. SP2 Pull Ctrl
7. SP1 Front Exit Ctrl
8. SP2 Set-up Ctrl
9. SP2 Entrance Ctrl
10. SP2 Set-up Ctrl
11. SP2 Front Exit Ctrl
Example Order of Execution for Two Point-Oriented Objects (with Before Actions)
If you have two pointed oriented objects in sequence with the Before Actions checkbox selected for
the entrance control, they are executed in this order:
1. SP1 Pull Ctrl
2. SP1 Entrance Ctrl
3. SP1 Set-up Ctrl
4. SP1 Set-up Ctrl
5. SP1 Front Exit Ctrl
Note:
Must define an exit strategy such as @.move;
6. SP2 Pull Ctrl
7. SP1 Front Exit Ctrl
Note:
Must define an exit strategy such as @.move;
8. SP2 Entrance Ctrl
9. SP2 Set-up Ctrl
10. SP2 Set-up Ctrl
11. SP2 Front Exit Ctrl
Example Order of Execution for Two Point-Oriented Objects (with Rear Exit Controls)
If you have two pointed oriented objects in sequence with the Rear checkbox selected for the exit
control, they are executed in this order:
1. SP1 Pull Ctrl
2. SP1 Set-up Ctrl
3. SP1 Entrance Ctrl
4. SP1 Set-up Ctrl
5. SP2 Pull Ctrl
6. SP2 Set-up Ctrl
7. SP1 Rear Exit Ctrl
Note:
Do not define an exit strategy.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 177 -
8. SP2 Entrance Ctrl
9. SP2 Set-up Ctrl
10. SP2 Rear Exit Ctrl
Note:
Do not define an exit strategy.

Length-Oriented Objects
An example of a length-oriented objects are Line, Track, etc … They contain these controls: Front
Entrance, Rear Entrance, Front Exit, Rear Exit, Front Backward Entrance, Rear Backward
Entrance, Front Backward Exit, Rear Backward Exit, Speed, Pull, and Sensors. Some of these
are described later.
Front-Activated Entrance Control of Length-Oriented Objects
This is called as soon as an MU wants to enter the object. The front of the MU is located on the object
when the method is called.

Note:
Once set, the time the MU remains on the object cannot be changed, unless a formula is entered as a
processing time.
Rear-Activated Entrance Control of Length-Oriented Objects

This is called once the entire length of the MU is located on the object.
Note:
The point-in-time the MU enters the object until the point-in-time the rear-activated entrance control is
activated is the time the MU needs to entirely move onto the object.
Front-Activated Exit Control of Length-Oriented Objects

This is called once the MU intends to exit the object. The MU is located entirely on the object.

Note:
The front-activated exit control overrides the default exit strategy of
Plant Simulation. You yourself are responsible for moving the MU.
The exit control may be activated several times: When the MU cannot exit the object, because the
successor is full, Plant Simulation calls the exit control again, once the successor is unblocked.
Rear-Activated Exit Control of Length-Oriented Objects

This is called once the MU has exited the object. The MU is located on the succeeding object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 178 -
Note:
The rear-activated exit control is called once only and it does not override the default exit strategy.
Backward Entrance and Exit Controls of Length-Oriented Objects
The MU does not change its orientation (for example it does not turn around and move with its front
end against the direction of motion of the simulation).

Sensors of Length-Oriented Objects


For the length-oriented objects you can define sensor controls for any location on them.
From within the length-oriented object window Controls tab, click Sensors to open the sensor
list.

Click New or Edit to open the Sensor window.

Choose and enter settings there, or choose to specify a control.

Note:
Sensors are a very powerful feature.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 179 -
Moving an MU to the Next Object
The move method moves the MU from one object to another object. Plant Simulation moves the MU
onto a point-oriented object with the speed entered.

insert
The insert method moves the MU completely to the destination object. It has to provide enough
space to accommodate the MU.
Example:
@.insert(track,3.3);
transfer
The transfer method transfers the MU to the next material flow object. The transfer method
completely removes the MU from the present object, even if the successor does not provide
enough space. The remainder of the MU hangs in the air.
Example:
@.transfer(track,3.3);
The move, insert, and transfer Methods return true, when the MU was moved, false, when it was not
moved.

Predecessors and Successors


Use the methods to check the predecessor and/or successor of an object:
succ(<integer>)
pred(<integer>)
This is helpful for modeling an exit strategy.
Starting with the path of the called object the method accesses its successor or predecessor provided
the objects are connected. The number is the number of the connector.
Example:
@.move(source.pred(1));
@.move(?.succ(1));
if milling.pred(1).name = "CutToSize" then...

Other Notes
If you want to use the same method for both the front and rear exit control, then add it to both fields.
Then an If, then, else statement to compare where the part is ? = @.location.
A similar process can be used for setup controls: In this case If ?.setup = true, then the setup is
starting, otherwise it is ending.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 180 -
Statements

Purpose
In this lesson, you learn to assign values to attributes using methods.

Objectives
After you complete this lesson, you should be able to:
Assign values to attributes using methods.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Method > The Method Window > Menu Bar of the
Method Editor > View Menu > Show Tooltip with Completion

Hitachi Sunway Information Systems (Thailand) Ltd.


- 181 -
Introduction to Statements and Assigning a Value
Statements
The attributes/methods of a class can be viewed using the Show Attributes and Methods from the
context menu.
The attributes/methods of the selected instance can be viewed using Objects → Show Attributes
and Methods in the Frame.

Name - Name of the attribute or method.


Signature - Data type of the attribute, or data type of the argument(s).
Value - Only attributes have a value. Double-click to edit.
Inherited /Not Inherited - Shows if the value is inherited (i) or not inherited (ni).
Watchable - Shows if Plant Simulation can watch the attribute or the state.
Assigning a Value
A value can be assigned by entering the value to the right of the assignment operator: <expression>
:= <value>.
Example:
buffer.capacity := 8;
Station.Pause := true;
@.currIcon := "TableTop";
When assigning a value as a string, enter the string in quotation marks.
Using Auto Complete
Use auto-complete when entering source code. Enter the first one or two characters of an object, an
attribute, or a method and press [Ctrl] + [Space] or choose Edit → Auto Complete.
Plant Simulation completes the word, and if necessary it adds the corresponding characters - period,
left parentheses, assignment operator and right parentheses.

If the name is not unique, Plant Simulation opens a window where you choose an item, press the up
or down arrow to choose the desired expression and press [Enter] (or double-click it).
Note:
Don’t forget that statements must end with a semicolon.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 182 -
Conditional Statements

Purpose
In this lesson, you learn to use if-then-else and inspect statement in our methods.

Objectives
After you complete this lesson, you should be able to:
Use if-then-else and inspect statement in our methods.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Control Flow Statements

Hitachi Sunway Information Systems (Thailand) Ltd.


- 183 -
Branching using "If Then"

Use the if statement to make the execution of a Method depend on the result of a condition.
If the condition returns true, the Method executes statement sequence 1. If the condition returns false,
the Method executes statement sequence 2.
If you do not need it, you can also omit the else branch with statement sequence 2.
Example of an If statement:
This example states that if the MU quality (attribute) is good, then move it to the station material flow
object (for example Station). Otherwise, move it to the rework material flow object (for example a
Station).

Branching using If Elseif


Using the if then elseif statement, the Method can react to different conditions. Plant Simulation
analyzes the conditions one after the other until one condition is true. Then it executes the respective
statement sequence. If no condition is true, it executes the optional else branch. When the else
branch is not present, Plant Simulation continues after the final end statement.

Example of an ElseIf statement:


This example states that if the MU quality (attribute) is good, then move it to the station material flow
object (for example Station). Next if the part has a minor defect, then move it to the rework material
flow object (for example a Station); otherwise send it to the scrap material flow object (for example a
Station).

The Inspect Statement

The inspect statement enables Plant Simulation to make easier and clearer choices when presented
with several possibilities. This way you do not have to use lengthy if-then-elseif-chains.
Note:
This is similar to the case statement in the C programming language.
Example of an Inspect Statement:
This is example actually does the exact same thing as the previous "If Elseif" example. It is just
different way to write it. This technique is common for situations where there are more than three
results from the conditional statement.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 184 -
Tables and Global Variables

Purpose
In this lesson, you learn how to use a method to interact with a TableFile.

Objectives
After you complete this lesson, you should be able to:
Format a TableFile.
Access a TableFile with a method.
Access a TableFile using a custom index.
Searching TableFiles.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > TableFile > Methods of the TableFile

Hitachi Sunway Information Systems (Thailand) Ltd.


- 185 -
Using Tables and Global Variables in the Paint Shop

TableFile Inheritance

The TableFile is a list with several columns that can be modified for content or format by
deactivating the inherit commands from the Format menu, Inherit Format, or Inherit Contents.
After you deactivated Inherit Contents you can modify the contents of the table either manually or
using a Method.
After you deactivated Inherit Format you can modify the format of the table. This also deactivates
Inherit Contents.
Choose View → Comment, and document your intentions in using the data in the table.

Formatting the TableFile


Before selecting a data type, choose the entire table or a column of you choice.
Choose Format → Format.
Choose the Data Type tab.
Choose the data type.
Enter the dimension of the table:

Hitachi Sunway Information Systems (Thailand) Ltd.


- 186 -
Accessing the TableFile with a Method
When accessing a TableFile, Plant Simulation first calls the column and then the row.

Reading column 1 row 2 from a table: print TableFile [1,2];


Writing to a table:
o TableFile [1,3] := "grinding";
o TableFile [2,3] := 180;
o Where [2,3] refers to column 2 row 3.
Here, you assign the contents of a cell from the table to a variable, attribute, etc.
<Object>.procTime := TableFile [2,1];

Accessing a TableFile Using a Custom Index


You can also call a cell using the column and row index. Here, you assign the processing time to a
material flow object by using the contents of the cell in column 2, row 1 of the table.
<Object>.procTime: = TableFile ["Time", "operation1"];

Methods for Lists and Tables

<TableFile>.setCursor(1,1); Sets the cursor to the designated cell.


<…>.find({1,1}..{*,*},<value>); Finds the value in the designated range.
<…>.CursorX;, <…>.CursorY; Sets the cursor to a column (X) or to a row (Y)
<…>.xDim;, <…>.yDim; Returns the last column or row with an entry.
Sorts the table depending on one or several columns in
<…>.sort(3,"ascending");
ascending order.
Returns the arithmetic mean of all values of data type real or
<…>.meanValue({1,1}..{1,*});
integer in the range.
<…>.standardDeviation({1,1}..{1,*}); Returns the standard deviation of the values in the range.
<…>.max({1,1}..{1,*}); Returns the greatest value in the range.
<…>.min({1,1}..{1,*}); Returns the smallest value in the range
<…>.sum({1,1}..{1,*}); Totals the values in the range.
<…>.delete({1,1}..{*,1}); Deletes the range or the entire contents.
<local_variable>.create; Creates the table as a local variable, without contents.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 187 -
Searching a TableFile
Plant Simulation searches the table starting at the position of the cursor and returns a "true" value
when the item is found and places the cursor within that cell. If the item is not found a value of "false"
is given.
Here is an example of a Method searching a TableFile for the column and row that contains
grinding:

The Variable
Capacity = 0
Information Flow Object
Note:
Programmers call this a Global Variable.
Use the variable to store values over an extended period of time during your simulation run. You can
call it as any other object. The range of values depends on the data type. Other objects or methods
can call the Variable.
To reset the value to an initial value during the init phase choose the checkbox and enter the initial
value.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 188 -
The StackFile, QueueFile and CardFile
The StackFile, QueueFile and CardFile are lists with one column. These objects can be found on
the Information Flow tab of the Toolbox. They cannot have empty cells. They provide different
features for reading, inserting and cutting the contents of a cell.

StackFile (corresponds to the stack data type) inserts entries at the top and removes the
contents of the object added last (the LIFO method: Last In First Out). An archeologist experiences
this when digging at a site.
QueueFile (corresponds to the queue data type) saves entries added in the order inserted and
removes the element waiting in the queue the longest. (the FIFO method: First In First Out). You
experience this when you wait in line at the amusement park.
CardFile (corresponds to the list data type) is accessed in a random manner using the position of
the cell, the following cells move up.

Method for Writing into StackFiles, QueueFiles and CardFiles

<…>.push(<value>); Inserts the value into the topmost cell of the StackFile or the QueueFile.
<…>.insert Inserts the value into the cell in a row (3) of the CardFile and moves the
(3,<value>); contents of this cell and the following cell down one.
Removes the contents of the last cell of the StackFile and removes the
<…>.[]; contents of the first cell of the QueueFile. The following cells move up one
position.
Reads and removes the contents of the cell in a row (3) of the CardFile. The
<…>.[3];
following cells move up one position.
Reads the content of the last cell of the StackFile and reads the content of
<…>.pop;
the first cell in the QueueFile and removes them.
<…>.read (3); Reads the content of a row (3) of the CardFile without removing it.
<…>.dim; Returns the last row with any entry.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 189 -
Introduction to Distribution Functions
You can create random numbers:
In the dialogs of the objects, (preferred method)
With a Variable of data type randtime, (alternate method)
And in a Method using these functions: (for special situations only)
Note:
When specifying a distribution using an object dialog or a variable you do not need to
specify a stream, However, when using the Z_ functions a stream must be specified. In this
case on all distributions the s parameter is the stream number and is an integer. All other
parameters, including the result, are real numbers.
o Beta - z_beta(s, Alpha1, Alpha2)
o Binomial - z_binominal(s, n, p)
o Cauchy - z_cauchy(s, Mu, theta, lowerBound, upperbound)
o Continuous Empirical - z_cEmp(s, Table)
o Discrete Empirical - z_dEmp(s, Table)
o Primitive Empirical -z_emp(s, Table, column)
o Erlang - z_erlang(s, Mu, Sigma, lowerBound, upperbound)
o Frechet - z_frechet(s, Mu, theta, lowerBound, upperbound)
o Gamma - z_gamma(s, Alpha, Beta, lowerBound, upperbound)
o Geometric - z_geom(s, p, lowerBound, upperbound)
o Gumbel - z_gumbel(s, Mu, theta, lowerBound, upperbound)
o Hypergeometric - z_hypergeom(s, m, n, p)
o Laplace - z_laplace(s, Mu, theta, lowerBound, upperbound)
o Logistic - z_logistic(s, Mu, theta, lowerBound, upperbound)
o Log Logistic - z_loglogistic(s, Mu, theta, lowerBound, upperbound)
o Log normal - z_lognorm(s, Mu, Sigma, lowerBound, upperbound)
o Negative exponential - z_negexp(s, Beta, lowerBound, upperbound)
o Normal - z_normal(s, Mu, Sigma, lowerBound, upperbound)
o Para Logistic - z_paralogistic(s, Mu,theta, lowerBound, upperbound)
o Pareto - z_pareto(s, Mu, theta, lowerBound, upperbound)
o Poisson - z_poisson(s, Lambda)
o Triangular - z_triangle(s, c, a, b)
o Uniform - z_uniform(s, Start, Stop)
o Weibull - z_weibull(s, Alpha, Beta)

Note:
You learn more about this distributions through out this class and the MT46300 course. This lesson is
meant as only an initial exposure to the distributions.
For example:
Note:
This is not part of the activity.
Earlier in this course, the PickAndPlace robot randomly sent 10% of the parts to PaintFailed.
However, you could have set an attribute while painting the part whose value can be changed or
evaluated throughout the simulation.

Note:
In this example, the PickAndPlace robot exit strategy would need to be change the MU Attribute.
Also another method would need to be added in order to fix the paint job.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 190 -
Operations Converting Data Types

Purpose
A condition is an expression that returns a Boolean value. Use conditions in conditional branching
and loops.
You can also use the operators AND, OR and NOT to concatenate the return values.

Objectives
After you complete this lesson, you should be able to:
Use logical, arithmetic, relational operators.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Operators and Expressions

Hitachi Sunway Information Systems (Thailand) Ltd.


- 191 -
Logical Operators
The following tables provide information on how Boolean values can be set and combined to set
another Boolean value.
Logicial Operator Basics:
Operator Scenario Result
Not True False
NOT
Not False True
False = False True
= (is equal to)
True = True True
/= (is not equal to) False /= True True
And Table:
In this table insect a value from the left column with a value from the top row to set the result.
TRUE FALSE
TRUE TRUE FALSE
FALSE FALSE FALSE
Or Table:
TRUE FALSE
TRUE TRUE TRUE
FALSE TRUE FALSE

Integer Operators

Real Operators

Hitachi Sunway Information Systems (Thailand) Ltd.


- 192 -
String Operators

Note:
About equal (==) for strings is case insensitive.
ascii
chr
copy
incl
omit
pos
strlen
strRcopy
strRpos
toUpper
toLower
trim

Bit Operators
Plant Simulation provides these functions for manipulating individual bits of an integer value:
BitAND
BitOR
BitSet
BitShift
BitTest
BitXOR

Operator Precedence
Mathematical functions assume that multiplication takes precedence over addition. Plant Simulation
can combine mathematical as well as relational operators. The given precedence of the operators
spares you the effort of having to insert too many parenthesis. You only have to set them if you would
like to deviate from that given order. An expression within parenthesis is executed first. Within the
parenthesis, the precedence rules do apply. For parenthesis within parenthesis, Plant Simulation
analyzes the innermost expression first. The table lists the precedence of operators. Operators with
the same precedence are listed in the same line. The highest priority is listed first.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 193 -
Converting Data Types

Purpose
Data types can perform certain actions. Not all operations can be applied to all data types.
Before concatenating different data types, you might have to convert them to make them compatible.
Only then can Plant Simulation execute the operations.

Objectives
After you complete this lesson, you should be able to:
Automatically and Manually Convert Data Types

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Data Types > Converting Data Types

Hitachi Sunway Information Systems (Thailand) Ltd.


- 194 -
Automatic Data Conversion
Some conversions can be done without a special function (for example converting time to an integer).
For example:
Time and integer
Date and Datetime (the time is discarded)
Integer and Real (the number after the decimal point is discarded)

Manually Converting Data Types


Plant Simulation provides several functions for converting data types.
Functions for Converting Numerical Values
bool_to_num
num_to_bool
num_to_hex
num_to_str
sprint
str_to_bool
str_to_num
time_to_str
to_str
Functions for Converting Physical Data Types
str_to_acceleration
str_to_length
str_to_speed
str_to_weight
Functions for Converting Physical Data Types with Units into Data Types without Units
acceleration_to_num
length_to_num
speed_to_num
time_to_num
weight_to_num
Functions for Converting Values without Units into Physical Data Types with Units
num_to_acceleration
num_to_length
num_to_time
num_to_speed
num_to_weight
Functions for Converting References
str_to_obj
str_to_method
Functions for Converting Times and Dates
datetime_to_string
str_to_date
str_to_datetime
str_to_time
timeRepresenation

Hitachi Sunway Information Systems (Thailand) Ltd.


- 195 -
Loops

Purpose
This lesson describes several ways to loop such as For, Repeat-Until, and While.

Objectives
After you complete this lesson, you should be able to:
Create a loop in a method.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Control Flow Statements > Loops

Hitachi Sunway Information Systems (Thailand) Ltd.


- 196 -
The For Loop

The for loop passes over a range between a beginning and an end value. The loop variable has to be
of data type integer and denotes the beginning of the loop. Once the loop is closed, Plant Simulation
adds 1 to the variable (setting to) or deducts 1 (setting downto). It executes the loop until it reaches
the end values.
Here is an example of a for loop where i is the loop variable which increments from 1 to 10:

Here is an example of a for loop where i is the loop variable which increments from 10 down to 1:

Here is an example of a for loop where i is the loop variable which increments from 1 to 10 (using a
local variable):

Hitachi Sunway Information Systems (Thailand) Ltd.


- 197 -
The Repeat-Until Loop

Plant Simulation executes the repeat loop at least once and exits when the condition is true. If the
condition never is becomes true, Plant Simulation runs forever (unless the execution of the method is
stopped, suspended, or exitLoop is performed).
Note:
Simulation executes the loop infinitely. You can interrupt an infinite loop by pressing [Shift] + [Alt] +
[Ctrl] to open the Debugger.
Here is an example of a Repeat Until loop:

The While Loop

Plant Simulation executes the while loop until the condition is true. Here is an example of a While
Loop:

Hitachi Sunway Information Systems (Thailand) Ltd.


- 198 -
Conditional Suspensions - waituntil and stopuntil

Purpose
In this lesson, you learn how to suspend the execution of method using a specified criteria.

Objectives
After you complete this lesson, you should be able to:
Understand how the suspension statements work.
Be exposed to some of the methods of a method.

Help topics
Additional information for this lesson can be found in:
Reference Help > SimTalk > Names > Keywords > waituntil
Reference Help > SimTalk > Control Flow Statements > Suspending Methods
Reference Help > Information Flow Objects > Method > Methods of the Method

Hitachi Sunway Information Systems (Thailand) Ltd.


- 199 -
Introduction to Conditional Suspensions
Overview:
StopUtil WatchableCondition Prio WatchableExpression
WaitUtil WatchableCondition Prio WatchableExpression
The WatchableCondition must evaluate to a boolean value.
The WatchableExpression must evaluate to an integer that is used as the priority. A priority of
10 is higher than 1 (for example If your job is number one, it is executed last).
For WaitUnitl the interpreter evaluates the conditions after the previous reactivated method is
doing executing.
For StopUntil does not analyze the conditions a second time.
More Details:
If the condition is not true, Plant Simulation interrupts the execution of the method program. It
suspends the method and saves the entire call chain, including all arguments and local variables. It
then monitors the condition while the simulation continues.
As soon as the condition is true and is evaluated again, Plant Simulation interrupts the execution of
the active methods and continues executing the once suspended method at the place in its source
code where it was suspended.
When several suspended methods wait for the same condition to be true, Plant Simulation reactivates
them at the same time and executes them according to the priority (prio) that was entered.
For methods suspended with waituntil, the interpreter re-evaluates the condition before executing the
individual methods. The interpreter again suspends the other methods, which have to wait until the
condition comes true again.
For methods suspended with stopuntil, Plant Simulation does not re-evaluate the condition again
before executing the individual methods. It reactivates all of the methods at the same time and
executes them one after the other according to their priority.
Here is an example of waituntil:
You do an activity with waituntil later in this course when you learn brokers and importer methods. For
now, here is a simple example:

Note:
Enter the maximum number of suspended methods under Tools → Preferences → Simulation.

Other Related
CallEvery(<path>,<method>,<argument>)
o Calls all methods designated by the argument method in the frame <path> on all levels of
the hierarchy. Arguments are passed as arguments to the calling methods.
methCall(<time/date/datetime>,<argument>)
o Calls a method after the number of seconds designated by <time> has passed. For
<datetime> or <date> Plant Simulation calculates the time span using the date of the
EventController and the date you entered as the arguments <datetime> or <date>.
Arguments are passed when the method is called next.
DeleteMethCall
Wait(<real>)
o Interrupts executing a call chain for the number of seconds passed as <real>. The
EventController receives a MethWakeup event.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 200 -
Methods using Attributes of Assembly Objects

Purpose
In this lesson, you learn how to use some attributes of Assembly station objects.

Objectives
After you complete this lesson, you should be able to:
Use some attributes of Assembly station objects.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Assembly Station > Attributes of the Assembly
Station

Hitachi Sunway Information Systems (Thailand) Ltd.


- 201 -
Introduction to Methods using Attributes of Assembly Objects
<…>.PartListMode - Can be set using a method or the Assembly table on the Assembly
object window. Is a string that can have three possible values:
o None
o Predecessors
o MU types
<…>.AssemblyList - Can be set using a method or the Assembly tab Open button on the
Assembly object window. Defines the list of add-on parts when Predecessors or MU types is
selected for PartListMode.
o For Predecessors, column one is the predcessor number and column two is the amount.
o For MU types, column one is the MU’s name and column two is the amount.
For example:
Note:
This is not an activity.
Previousl,y you created the CompAssembly object to handle either 3 leg or 4 leg tables by creating
separate paths for each. This was because you did not have the knowledge at the time to modify the
Assembly object on the fly to accommodate tables having different numbers of legs.
This could be done using a method and this simplified CompAssembly object:

This method is called from FeedTableTops as a Front Exit Control:


is
tab :table[integer,integer];
do
waituntil Assembly.empty prio 1;
tab := Assembly.AssemblyList;
tab[2,1] := @.YDim;
Assembly.AssemblyList := tab;
@.move;
end;
Note:
Using this method, you could accommodate any number of legs on a TableTop.
Note:
This method is for a PartListMode = "Precessors" scenario. To modify it for a PartListMode = "MU
type" scenario, change the first parameter of the tab table to a string.
Another Example:
The assembly object be completely removed and replaced with a method as well. In this scenario, the
TableTop is in a container (for example pallet). The assembly object is not able to add the legs to the
table (you need to replace it with a method). This is discussed in more detail in the next lesson.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 202 -
Accessing the Contents of an Object with a Method

Purpose
In this lesson, you learn how to access the contents of an object with a method.

Objectives
After you complete this lesson, you should be able to:
Access the contents of an object with a method.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Methods of the Material Flow Objects > Methods for Accessing the Contents of the Material
Flow Objects > cont

Hitachi Sunway Information Systems (Thailand) Ltd.


- 203 -
The Container
The container has a matrix based loading space. It can load and transport any MU.
Enter the capacity on the x-axis and the y-axis. The container does not take the actual length of the
loaded object into consideration.
Containers and transporters can have multiple levels of contents.
Note:
The default container holds 4 MUs (2x2). If this is not desirable, duplicate the .MUs.Container object
and define your own size.

Accessing the Contents of an Object


Use the cont method to call the contents of the material flow objects and the container.
Example 1:
Move the Entity on the Saw station to the MillingMachine station.
@.move(MillingMachine);
o @, when the current MU calls the Method
Saw.cont.move(MillingMachine);

Example 2:
Move the Entity in the Container on the Saw station to the MillingMachine station.
@.cont.move(MillingMachine);
saw.cont.cont.move(MillingMachine);

Hitachi Sunway Information Systems (Thailand) Ltd.


- 204 -
Example 3:
Moving the Entity from the Saw station into the Container on the MillingMachine station.
@.move(MillingMachine.cont);
saw.cont.move(MillingMachine);

Example 4:
Move the Entity from column 1, row 2 of the store matrix to the next station.
store[1,2].cont.move;
Note:
The cont method always returns the next MU that is ready to exit the object, even when it has other
MUs loaded (for example container).
Note:
This also applies when moving containers loaded onto other containers (… .cont.cont.cont…).
Note:
You can only access the contents of an object that actually contains MUs.

The Contents of a Material Flow Object


Before accessing the contents of an object, make sure that the object has contents. Use one of the
built in methods for querying the state of the contents of a material flow object (for example full,
ready, etc.).
A material flow object can be in different states, which you can set and get with methods. The
respective method returns true when the object is in that state, false, when it is not in that state.
Methods for the Contents of a Material Flow Object/MU:
<object>.empty; returns TRUE, when no MU is located on the station, FALSE when an MU is
located on it.
<...>.full; returns TRUE, when all stations of a ParallelStation or a Buffer are occupied, FALSE
when this is not the case.
<...>.occupied; returns TRUE, when at least one MU is located on the station, FALSE when no
MU is located on it.
<...>[2,1].occupied; returns TRUE, when an MU is located on the station denoted by the integer
coordinates.
<...>.cont.finished; returns TRUE, when the processing time of the MU has elapsed and the MU
is ready to exit the object.
<...>.ready; returns TRUE if the object is occupied and an MU is ready to exit. Combination of
occupied and cont.finished.
Note:
It cannot be watched with waituntil.
<…>.stopped; The MU is stopped, when it is located on a material flow object that is stopped by
a LockoutZone, not Paused, and not Failed

Hitachi Sunway Information Systems (Thailand) Ltd.


- 205 -
Creating the Assembly Cycle

Purpose
In this lesson, you learn how to create a custom assembly object.

Objectives
After you complete this lesson, you should be able to:
Create a custom assembly object.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Attributes of the Material Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 206 -
Introduction to the Assembly Cycle
You want to create an assembly cycle where you load the TableTops onto pallets, which transport
them to the assembly station. Here, the TableLegs are added to the TableTops. Then the assembled
tables move out of the assembly station, while the pallets are fed back to the buffer, to be used again.

To accomplish this you model:


1. Loading the TableTop on the Pallet
2. Adding the TableLegs to the TableTop
3. Unloading the TableTop from the Pallet
4. Cycling the Pallet back to the beginning

Hitachi Sunway Information Systems (Thailand) Ltd.


- 207 -
Calling Methods and Frame Controls

Purpose
In this lesson, you learn about calling methods.

Objectives
After you complete this lesson, you should be able to:
Use the pause and unplanned frame controls.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Dialog Items of the Objects > Tools Menu > Select Controls

Hitachi Sunway Information Systems (Thailand) Ltd.


- 208 -
Calling Methods

Method Called by a Frame Control

From the Frame window (or Material Flow object window), choose Tools → Select Controls. Enter
the names of the methods for a number of purposes.
Note:
A shift calendar can also control the frame, not just stations. From the Frame window, choose Tools
→ Select Shift Calendar. Program a method that modifies the Pause state , which activating the shift
calendar sets.
The method entered into the Pause text box is called and executed whenever the Pause attribute
changes its state.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 209 -
(Resources) Broker Controlled Animation

Purpose
In this lesson, you learn how to change the behavior the importer/exporter using a method.

Objectives
After you complete this lesson, you should be able to:
Create a custom method for an importer.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Shared Properties of the Material Flow Objects >
Methods of the Material Flow Objects > Methods of the Importer

Hitachi Sunway Information Systems (Thailand) Ltd.


- 210 -
A Method as a Custom Attribute
A Method as a Custom Attribute -- Attach a method as a custom attribute of a method data type to
an object. This is where to place program methods that are stored and handled directly by this object.
You can then program controls in the method that apply to this material flow object.

The self.name_of_method statement calls and executes the method you programmed as a custom
attribute.
This method is not a method object, but an attribute of type method of the object. This method is part
of the object, even when you copy it or save it as an object.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 211 -
Brokers and Importer Logic
In this lesson, you use the broker to control the frame and failure animation. This process is controlled
with a small method that you write.
In general, what you are doing is creating a custom object that you intent to reuse several times. The
custom object could be based on a Station if you could embed everything (including methods) inside
of it. Otherwise for more complex custom objects, you would create a frame to represent it. The logic
you would create for these two scenarios is similar, but slightly different.
Here is a logic example that would be for a custom object that was a Station:

Note:
This logic assumes the method is embedded within the Station Station.
Note:
The Broker reference would be Broker in this case.
Here is a logic example that would be for a custom object that was a Frame (containing one or more
Stations):
If the Station Station was located in another frame (that it was supposed to change the icon of), you
would use current.curricon instead of ?.curricon.
Note:
The Broker reference would be ~.Broker in this case.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 212 -
Modeling Transport Systems

Purpose
In this lesson, you learn how to model passive or active transport systems.

Objectives
After you complete this lesson, you should be able to:
Model passive or active transport systems.

Help topics
Additional information for this lesson can be found in:
Step-by-Step Help > Modeling in Tecnomatix Plant Simulation 2D > Modeling Transport
Systems

Hitachi Sunway Information Systems (Thailand) Ltd.


- 213 -
Introduction to Transport Systems
This lesson desccribes more about transport systems. There are several types of transfer system
objects available in Plant Simulation.
Basic Transport System Object Types:

Line - This active object is used model a simple transport system. This object was
introduced earlier in this course.

Track - This passive object is used to model cross- transfer systems, AGV systems,
cranes, etc. You receive an introduction to this object in this lesson. More uses of this object
and other transport system objects is provided in the MT46300 (Plant Simulation Advanced)
course.

AngularConverter - Covered in the MT46300 (Plant Simulation Advanced) course.

TurnTable - Covered in the MT46300 (Plant Simulation Advanced) course.

TwoLaneTrack - Covered in the MT46300 (Plant Simulation Advanced) course.


Basic Transport System Object Characteristics:
All are length-oriented objects.
You can define controls, define sensors, and compare sensors.
MUs completely transfer from location-oriented objects to length-oriented objects the moment it
touches the length-oriented object.
MUs completely transfer from length-oriented objects to length-oriented objects at the speed
the length-oriented object. (This is important for entrance controls).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 214 -
Modeling a Transport System with Active Elements
When you model a transport system with active elements, you use the Line object. A line can be
either accumulating (allows them to stack up on the line) or non-accumulating (objects maintain a
distance from each other). The capacity of a line can be either set or determined by the length of the
line (default behavior when the capacity is set to -1).
Adding a Line
To add a conveyor, drag and drop it into a frame. Then define the shape using straight line and
curved segments. The resulting conveyor can be any shape.
Line - Define Segments
Just keep picking the desired points to define the segments of the conveyor.
To insert a segment of the conveyor as a curve, activate the curve mode by pressing the [Ctrl] key.
Editing a Conveyor
Line Attributes - The line calculates its length using the length of the curve. If this is not useful,
this feature may be switched off on the Curve tab.
o The Segments table shows the parameters of any segment of the curve.

Edit the anchor points of the curve.


o Right-click the desired position on the conveyor and choose Insert Points.
o Select the conveyor once, then drag the existing points around.

Conveyor (Line) Controls:

Hitachi Sunway Information Systems (Thailand) Ltd.


- 215 -
Modeling a Transport System with Passive Elements

When you model a transport system with passive elements, you use the Track and

Transporter objects. A track is a passive object. You need to make sure that a transporter on
the track is available. If it is available you need to load and unload it.
Note:
To prevent MUs from automatically transferring from the previous station to the Track, do not connect
them.
The Track

The Track is used for modeling transport lines. It also supports automatic routing. The Transporter is
the only movable object able to use the Track. You might, for example, utilize both to model an AGV
system. You can also change the dimension of the Track.
Properties:
Icon
Capacity: any
Length oriented material flow object
You can enter its Length and its Capacity. The Transporter is the only moving material flow object
able to use the track in a meaningful way. The container and entity remain where they are and are not
moved.

Enter the objects that the track can access into the destination list.
Track Controls

Hitachi Sunway Information Systems (Thailand) Ltd.


- 216 -
The Transporter

The Transporter is a MU with a propulsion system of its own. You can define its loading
capacity. The Transporter can hold MUs and move them about freely. It represents forklifts, AGVs,
etc.

Select the Acceleration checkbox and enter the Final speed and the Acceleration into the text
boxes.
Deselect the Matrix load bay checkbox, enter the Load bay length, the Capacity, and Sensors.
On the Battery tab you can enter properties for operating the Transporter under battery power.

Creation of a Transporter during Simulation:


To create a Transporter during simulation, do one of the following:
Method 1: Use a source
o Add a Source to the frame.
o Connect a Source to the Track.
o Set the Time of creation to Number adjustable with an Amount of 1.
o Set the source to create the Transporter MU.
Method 2: Use a method
o Add a Method the frame, named Init.
o The Init method should include the name and the distance (in meters) from the beginning
of the track where the transporter MU is created using this syntax:
.MUs.Transporter.create(myTrack, 5.1);

Transporter Controls
Enter Methods on the Controls tab for controlling the Transporter and the Track.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 217 -
Driving control - sets the Track the Transporter moves to.
Destination - controls which successor the object moves to when the Transporter has covered
the entire Track and you did not enter an exit control.
Destination control - activated once the Transporter reached and covered its destination.
Collision control - activated when the Transporter crashes into another Transporter, for
example the successor moves with a higher speed than the predecessor.
Speed control - activated when the Transporter reaches its final speed after accelerating or
retarding on a Track or when it stops after accelerating or retarding.
Methods to Control a Transporter
Plant Simulation moves the transporter to the succeeding track along the connection lines or with a
method.

In addition, the transporter can move on the track under its own power. When you connected the
tracks on which the transporter moves with a connector, it moves from track to track.
The transporter moves on the track using the settings you selected when the simulation started. You
can also stop the transporter, make it continue on its way and make it move backwards in relation to
the direction of motion.
Use the cont method of the track to call the transporter. Use the @ identifier to call the transporter,
provided the transporter calls the methods:
@.stop;
@.continue;
@.backwards := true;
track.cont.stop,...
For example:
By default (without a method) the Transporter just moves to the end of the track and stops there. To
make it return to the beginning:
Is
Do
If @.empty then
@.backwards := true;
End;
End;

Hitachi Sunway Information Systems (Thailand) Ltd.


- 218 -
Trigger and Line Logic

Purpose
In this lesson, you learn how to use a trigger object.

Objectives
After you complete this lesson, you should be able to:
Use a Trigger object like a PLC to control a simulation using custom logic.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Trigger

Hitachi Sunway Information Systems (Thailand) Ltd.


- 219 -
Introduction to Triggers
Triggers can be used for several things:
Triggers can be used like a mini PLC (as shown in this lesson’s activity) to watch the values of
attributes and then perform tasks when the attributes change.
Triggers can also be used to do the same thing as ShiftCalendars, so most of the time the
ShiftCalendar is used instead. However even though Triggers add more complexity than
ShiftCalendars, they offer more options.

The Trigger

From the Toolbox viewer, click the Information Flow tab and choose Trigger to add it to the
model.
Capacity: 0
Active information flow object
The Trigger object is used to simulate periodical processes or to manipulate attributes of objects at a
given time.

Period Tab
The starting time is the time in the simulation that the trigger is to start operating. It operates for the
time specified in Active Interval. To set the trigger to run in a cycle (such as each day) check the
repeat periodically box and enter the period length in the field. For example the trigger can be set to
run shifts in a day and be run repeatedly every day.

Values Tab
In Values tab you can open a table for definition of time and values by selecting input for the trigger
type and clicking Values.

To enter data in the table, Inherit Format must be deactivated. Choose Format→Inherit Format in
the menu. It must be deselected to enter data. In the first column enter the time desired that the value
of an attribute is to change and then add the new value in the second column on the same row. The
format of the second column of the table must correspond to the data type of the values.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 220 -
Actions Tab
The Actions tab provides the ability to determine what attributes, methods or both are activated by
the trigger.

To define which attributes receive the new values at the times determined in the Values tab, open the
attributes table. To enter data into the table, Inherit Format must be deselected (raised). Click the
button with the mouse and click Apply.
In the first column enter the path to the object where you want the attribute to change. In the second
column enter the name of the attribute that is to change. The third column is a place for Plant
Simulation to write errors in case something is configured incorrectly.

Methods can be called from the trigger as well. Open the methods list by clicking on methods to enter
data into the table. Inherit format must be deselected (raised). click the button with the mouse and
click Apply. Enter the names of the methods to be called in the list. Every method is called at the time
specified in the values tab and both the old and the new values are passed as variables.

Representation Tab
A graphical representation of the trigger times and values is available in the Representation tab.
Ensure that the Time unit is set to a reasonable scale to check the pattern generated by the settings
entered in the Period and Values tabs.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 221 -
How the Trigger Works
The Trigger becomes active at the times you defined, and passes the current value, such as true or
false for the data type boolean, or a string, to the attribute of the object you entered into the
Triggered Attributes table.

The Trigger can also call methods, that then execute the actions you programmed.

Note:
Operational:

pause:

Note:
The Trigger could be used to change the icon of a frame when ever it is paused (for example the
other icon might not include the person). Typically a trigger is used to call a method when makes
something happen. The trigger does not do much without a method.

High Speed Line Logic

Initially Machine B is off.


MUs are sent from Machine A to Machine B with a space between them.
Parts move from Machine A to the end of the conveyor and begin to accumulate.
If Machine A and Machine B, are turned off, then they first have to "warm up" (The amount of
parts it can produce at first is low, then it gets , higher, and higher, until it is at full speed).
HighHigh logic: If the HighHigh Sensor detects that MUs are accumulating to this point, then
send a signal to turn off Machine A.
High logic: If the High Sensor detects MUs accumulating to this point, then send a signal to turn
on Machine B.
Low logic: If the Low Sensor detects that MUs are accumulating to this point, then send a signal
to turn on Machine A.
LowLow logic: If the LowLow Sensor no longer detects MUs accumulating to this point, then
send a signal to turn off Machine B.
Note:
Normally a sensor is constantly changing between TRUE (a part is present) and FALSE (a part is not
present) as the parts pass it with a gap between them. However, once parts begin to accumulate, the
gap is gone. This causes the sensor to continuously be TRUE. If the sensor is TRUE for let’s say 0.3
seconds, then the parts have accumulated to this point. And Machine B only starts once the Low
sensor is triggered and runs until the LowLow is unblocked.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 222 -
MU Dimensioning

Hitachi Sunway Information Systems (Thailand) Ltd.


- 223 -
Preparations and Maintenance

Purpose
This lesson examines setup behavior.

Objectives
After you complete this lesson, you should be able to:
Use a few new MU selection methods.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > Source > Dialog Window of the Source > Tab
Attributes > MU selection

Hitachi Sunway Information Systems (Thailand) Ltd.


- 224 -
Set up a Production Resource
You want to simulate a station which needs a to be setup whenever the type of part to be processed
is changed. The setup can be caused by a change of the tool or the necessity of cleaning. The MU
type is determined using one of these techniques:
By the name
By the value of a custom attribute
Example:
Suppose that the processing time of a Station is 1 min and the set-up time is 2 min.
What is the minimal running time of the displayed sequence?

Sequence cyclical - by default it does the same number of parts (in batches) in the same order
continuously.

Random - randomly selects which part comes next, but produces the same ratio of part over time.
Not batched
Note:
A hybrid of the two: Choose Sequence cyclical, but create a method to randomly set the size of the
batches in the source table each time.

Setting a Station Up
Here are the three steps:
Select Setup options - performed on the Set-Up tab of the station.
Select setup criteria - performed on the Set-Up tab of the station and, optionally, the Custom
Attributes tab of the MU. For example perform setup when the color custom attribute changes
or when the MU name changes.
Select the setup time - Typically performed on the Times tab of the station.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 225 -
Other Selected Topics

Purpose
In this lesson, you learn about the built in icons of a method.

Objectives
After you complete this lesson, you should be able to:
See some of the built in icons for methods and there purpose.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Method > Icons Showing the Function of the
Method

Hitachi Sunway Information Systems (Thailand) Ltd.


- 226 -
Built-in Method Icons
The name of these methods runs them at specific times

Reset -- Resets your simulation model. It deletes all unprocessed events, resets the
simulation time to 0, resets the statistics, and clears any failure of any machine.

Init -- Plant Simulation activates and executes all methods named Init (even the Init
controls of a Transporter).

Endsim -- The simulation ends when the EventController has processed all events
from the List of Scheduled Events or when Plant Simulation reaches the end time you entered
in the text box End on the Settings tab in the EventController.
AutoExec -- A method by this name is executed when the model is opened
These method names set the icon of the method only:

Default -- the icon used in the class library.

ExitCtrl -- an exit control.

EntranceCtrl -- an entrance control.

Error -- a method with errors.

User

Interface

Dialog

Hitachi Sunway Information Systems (Thailand) Ltd.


- 227 -
Methods for Collecting Statistical Values

Purpose

In this lesson, you learn about more methods of a TableFile and how to write it out externally.
Objectives
After you complete this lesson, you should be able to:
Save a Plant Simulation table as a file.
Use more methods for lists and tables.
Create methods for collecting and displaying statistics.
Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Shared Properties of Lists and Tables > Methods
of Lists and Tables > Methods for Importing and Exporting Data in Text Format
Reference Help > Information Flow Objects > TableFile > Methods of the TableFile

Hitachi Sunway Information Systems (Thailand) Ltd.


- 228 -
How Does This Relate to Our Plant?
In this lesson, you work on the CompShipping frame of our training model.

Saving a Plant Simulation Table as a File


Two different ways to save the content of a table to a file:
Method 1: From the TableFile window menu, choose the desired file format, enter a name
for the file, and choose a folder.
o File → Save as Excel File
o File → Save As Text
o File → Save as Object
o File → Save as XML File

Method 2: Use a method of the Tablefile object:


o For a Microsoft Excel File (XLS, XLSX, or XLSB format):
<TableFile>.writeExcelFile("C:\temp\file.xlsx","worksheet");
o For a Text File: <TableFile>.writeFile("C:\temp\file.txt");
o For an Object: <TableFile>.writeObjectFile("C:\temp\file.obj");
o For an XML File: <TableFile>.writeXMLFile("C:\temp\file.txt");

Hitachi Sunway Information Systems (Thailand) Ltd.


- 229 -
More Methods for Lists and Tables
You build on the methods and attributes for tables that you learned about in the previous lessons (for
example find, CursorX, CursorY, xDim, yDim, etc.).
Other selected file related methods:
<TableFile>.setDataType(1,"real") sets the data type of the column.
<TableFile>.cutRow(1); cuts the row.
<TableFile>.insertColumn(1); adds a column to the right of the designated column.
<TableFile>.openfile("C:\... .txt"); opens the designated file.
< >.readFileRow; reads the row where the file cursor is located, inserts it into the list/table.
<TableFile>.FileCursor := <5>; sets the internal file cursor to the row designated by integer.
<TableFile>.closeFile; closes an open file.

Review: Complete Statistics Table


The complete statistics table collects the statistical values of all objects, material flow objects, as well
as moving objects.
The method statistics for the individual objects returns the statistics table for this object. For
example:
Drain.statistics(tbl);

Detailed Statistics Table


Clicking Detailed Statistics Table from the Type Statistics tab displays the following table:

The table shows the values in 111 columns, which you can address using the column index. The table
contains the mean, standard deviation, min, and max for:
LT - life time of investigated parts
TPh - throughput per hour
TPd - throughput per day
CT/CTS - cycle time difference of two parts that arrive back-to-back
IP - processing time of the investigated parts.
S - set-up time of the investigated parts.
W - waiting time of the investigated parts
Stp/StpF - time that the investigated parts were located on a stopped resource.
F - time that the investigated parts were located on a stopped resource.
P - time that the investigated parts were located on a stopped resource.
IP_P - processing times of the investigated parts on a resource of type Production.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 230 -
S_P - processing times of the investigated parts on a resource of type Production.
W_P - processing times of the investigated parts on a resource of type Production.
Stp_P - processing times of the investigated parts on a resource of type Production.
F_P - processing times of the investigated parts on a resource of type Production.
P_P processing times of the investigated parts on a resource of type Production.

Note:
Repeat for resources of type Transport and Storage.
Note:
Specific values or the entire table can be accessed it via a method.

Statistics Report
Better for showing and looking at data is the HTML Statistics Report, open it with View → Show
Statistics Report.

The Statistics Method-Accessing the Complete Statistics Table


The statistics method opens the complete statistics table. The initial parameter is an object, for
example the current MU.
You can show the complete statistics table on screen, you can write it into a table or you can write it
into a file:
To access the individual values in the complete statistics table with a method, first write it into a table,
for example into a local variable.
<name_of_object>.statistics(<table>);
No argument - Shows the table on screen.

Table as argument - Writes the values into this table, which can be a TableFile object or
a local variable.
String as argument - Writes the values into the file with this name.

Querying Statistical Values/Attributes


You can also query a number of methods that collected statistics values for the material flow objects,
such as statNumIn, statNumOut, etc.
<Variable> := <object>.statNumIn;
To view a complete list of all attributes, right-click an object in the Frame and choose Show
Attributes and Methods (or press [F8]).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 231 -
An Alternate Way to Write the RecordTPT Method

Note:
tab : table; The local variable of type table stores the values of the complete statistics table.
tab.create; Create the local variable of type table.
@.statistics(tab); This table temporarily stores the complete statistics table, so that you can access
the individual values with a method.
throughput_log[1,throughput_log.ydim + 1] := @.id; Writes the ID of the MU into the first column and
the first available row of the throughput_log table.
throughput_log[2,throughput_log.ydim] := tab["avgLT",1]; Writes the average throughput time into the
second column and the last occupied row of the throughput_log table

Acquiring Data Depending on an Attribute

In most cases you only need information about certain products, which you can differentiate with an
attribute.
Here, you show how to acquire data depending on an attribute, in our case the color of the table.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 232 -
The Event Controller

Purpose
This lesson contains information about selected event controller methods and attributes.

Objectives
After you complete this lesson, you should be able to:
Use some of the methods and attributes of an eventController.

Help topics
Additional information for this lesson can be found in:
Reference Help > Material Flow Objects > EventController > Methods of the EventController
Reference Help > Material Flow Objects > EventController > Attributes of the EventController

Hitachi Sunway Information Systems (Thailand) Ltd.


- 233 -
Selected Methods and Attributes of the EventController
absSimTime - returns the current simulation time as an absolute date and time.
SimTime- returns the current simulation time.
absTimeFormat - (boolean) set true to show the EventController time as an absolute time or
set as false to show a relative time.
actReceiver - returns the receiving object of the event Plant Simulation currently is executing or
about to execute next.
getEventList (Integer) - returns the list of scheduled events as a TableFile. The integer
parameter designates the maximum number of events, which the EventController writes to the
table file.
getNextEventTime - returns the time the next event in the event list is scheduled to be
executed.
start - activates the EventController and starts the simulation run. If the method is called
during the simulation run, Plant Simulation pauses the current simulation run until the newly
started simulation is finished.
init - executes all Methods in your simulation model named init. Plant Simulation initializes the
simulation model using the Init method before it executes the next scheduled event.
reset - executes all methods in the active model named reset. Plant Simulation deletes all
unprocessed events, resets the simulation time to 0, resets the statistics, and clears all failures
of all objects. It does not change the paused state of objects.

Controlling the EventController with Methods


In this example, a table of data is created and saved to a file after the model is finished running. The
first model kicks off the running of a second model, which reads the exported data as a starting point
for it to run. In this case both models are in the same file.
Example:
The arrival times of the MUs are to serve as delivery times for parts.
Enter the End time of the simulation into the EventController.
Write the current arrival time of the MUs into a table. Save the table as a text file using:
<tablefile>.writeFile("D:\...")
Wait until the simulation is finished. Start the EventController in the succeeding model with the
Endsim method:
EventController.reset;
EventController.init;
EventController.start;
The Init method of the called model has to load the text file with:
<tablefile>.readFile("D:\...")

Hitachi Sunway Information Systems (Thailand) Ltd.


- 234 -
Saving a Plant Simulation Table as a Text File

Purpose
In this lesson, you learn about saving a Plant Simulation Table as a Text File.

Objectives
After you complete this lesson, you should be able to:
To exchange data with other Plant Simulation models: As an object.
To exchange data with other applications:
o As a text File.
o As a Microsoft Excel File (can write to XLS, XLSX, or XLSB formatted files).
o As a XML File.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > TableFile > Window of the Table File > Menu Bar

Hitachi Sunway Information Systems (Thailand) Ltd.


- 235 -
Why Save a Table as a Text File

You can save the contents of an object, for example a Plant Simulation TableFile , as a text file.
This way you can use the collected data in other applications.

Example:
To use the values the Plotter collects in an Microsoft Excel table, insert a Method object instead of a
Plotter into your Frame, and write the values to a table. Then save this Plant Simulation table as a
text file and open it as a file of type text file in Microsoft Excel and further manipulate it there.

Collecting Values and Writing them to a Table


You could enter a Method as the Interval control of a Generator. Each minute it records the entire
number of MUs in the Buffer as well as the current point in time of the EventController. You then
write these values into a Plant Simulation table, and later save it as a text file.

Settings for Text Files Settings for Text Files

Before saving the Plant Simulation table as a text file. Format the result file: From the TableFile
window menu, choose File → Format.

Make sure that the Decimal separator is a period.


When possible, choose S(econds) as the Time format. This prevents MS Excel from incorrectly
reading the data.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 236 -
The Generator Object

The Generator object is both similar and different from the Trigger object discussed earlier
when creating the high speed line.
The Generator activates method objects from the time you enter under Start in regular or statistically
distributed intervals, for the time interval you enter for the interval control. After the time span, you
enter for the duration, has elapsed, Plant Simulation calls the method object you entered as duration
control on the Controls tab. Note that Interval and Duration controls always appear in pairs.
Example 1:
Generator.Interval = 2:00, Generator.Duration = 3:00, EventController.End = 8:00
EventController.SimTime Generator Control Executed
0 Interval Ctrl
2 Interval Ctrl
3 Duration Ctrl
4 Interval Ctrl
5 Duration Ctrl
6 Interval Ctrl
7 Duration Ctr

Example 2:
Generator.Interval = 3:00, Generator.Duration = 2:00, EventController.End = 10:00
EventController.SimTime Generator Control Executed
0 Interval Ctrl
2 Duration Ctrl
3 Interval Ctrl
5 Duration Ctrl
6 Interval Ctrl
8 Duration Ctr
9 Interval Ctrl
Notice that in both cases the Interval control is run at time 0 and at the time Interval after that. The
Duration control is first run after the Duration time has passed and again after the time Interval has
passed.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 237 -
Loading a Text File into a Plant Simulation Table

Purpose

In this lesson, you learn to read external data into a Plant Simulation TableFile .

Objectives
After you complete this lesson, you should be able to:
Read external data into a Plant Simulation TableFile.

Help topics
Additional information for this lesson can be found in:
Reference Help > Information Flow Objects > Shared Properties of Lists and Tables > Methods
of Lists and Tables > Methods for Importing and Exporting Data in Text Format

Hitachi Sunway Information Systems (Thailand) Ltd.


- 238 -
Loading a Text File
To load a text file into Plant Simulation:
<TableFile>.readFile("C:\temp\TableX.txt");
<TableFile>.openFile("C:\temp\TableX.txt");
<TableFile>.readFileRow;
If you want to load the text file row-by-row, first open the file with the method described above. The
file has an internal file cursor.
Plant Simulation loads the data from the file designated by the string " " into a list or table. It
overwrites any data already present in this file. The data types of the columns of this Plant Simulation
table should be the same as that of the data to be loaded or should be of data type string. In the latter
case you can change the data type after loading the data.
The table into which you want to write the data has to exist either in the Frame or Method.
This example could be used to create a table in a frame:
.InformationFlow.TableFile.createObject(current,10,30);
This example could be used to create a table in a method:
Set
tab : table;
Do
Tab.create;

End;

Importing a Production Table


Here is an example of the production data for a Source: It contains names of parts and their amount.

Note:
The example above assumes that the table it is read into has the column index turned on. If it isn’t, do
not include the header in the text file. To turn on the column index as part of a method enter:
<TableFile>.ColumnIndex := true;
The text file to be loaded should have a tab, or a semicolon as the column separator (compare the
settings under File → Format of the Plant Simulation table).

Hitachi Sunway Information Systems (Thailand) Ltd.


- 239 -
Another Example:
Note:
You may want to read the table from a file into a table in a method, do some manipulations to the

data, and then write it to a TableFile in the frame. For example, maybe your text file does not
include the .MUS. because of the system that generated it, but it is needed in Plant Simulation.

To Read a Microsoft Excel file (.XLS, .XLSX, .XLSM, or .XLSB formated file) into Plant Simulation:
<TableFile>.readExcelFile("D:\Files\test.xlsx", "worksheet");

Hitachi Sunway Information Systems (Thailand) Ltd.


- 240 -
Interfaces to Other Applications Overview

Purpose
In this lesson, you learn about several interfaces to Plant Simulation.

Objectives
After you complete this lesson, you should be able to:
Learn about several interfaces to Plant Simulation.

Help topics
Additional information for this lesson can be found in:
Add-Ins Reference Help > Inter-Process Communication Interfaces
Reference Help > Information Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 241 -
Standard Interfaces in Plant Simulation
Plant Simulation provides these standard interfaces to other applications. All these icons appear on
the Information Flow tab of the Toolbox. If they are not there, add them using File → Manage Class

Library (from the Basic Objects tab).


File Interfaces:
DDE (Dynamic Data Exchange)

File Link

File Interface

XML Interface
Communication Interfaces:

Teamcenter Interface

ODBC (Open Database Connectivity)

SQL Lite (SQL - Structured Query Language)

Oracle

OPC Interface

SIMIT Interface

Socket

Active/X
C Interface - Integrate functions you program in C into Plant Simulation. Not covered in this
course.
Control Interfaces:
Not part of this training course:
COM Remote Control Interface - can control Plant Simulation from other applications that can
address COM objects (for example such as Microsoft Office applications).
HTML (web-based) - can control Plant Simulation from the Internet Explorer viewer.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 242 -
File Interfaces to Other Applications

Purpose
In this lesson, you learn about file interfaces.

Objectives
After you complete this lesson, you should be able to:
Use file interfaces.

Help topics
Additional information for this lesson can be found in:
Add-Ins Reference Help > Inter-Process Communication Interfaces
Reference Help > Information Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 243 -
DDE-Interface
The DDE Interface integrated in Plant Simulation allows accessing the DDE (Dynamic Data
Exchange) communication system that MS Windows provides. Plant Simulation can serve as a DDE
server or as a DDE client.
Plant Simulation as a DDE-Client - Allows the transmission of any kind of data from your
simulation model to another application, such as a Microsoft Access, an MS Excel or an MS
Word file.
Plant Simulation as a DDE-Server - Other applications can access values of Plant Simulation
Variable via DDE-Hotlinks and entering the following into an Excel field:
"='eM-Plant'|data!'.Models.Frame.Variable'"
The addressed application and the corresponding file have to be open.
Note:
The DDE Interface does not require a separate license. This technique is good for a small number of
variables, however performance may become an issue when exchanging a large number of variables.

The File Interface Object


Properties:

Icon:
Capacity: 0
Active InformationFlow object
The FileInterface is an older interface used to access data stored in external text files. Better (faster
and more modern) ways to access this data would be to use the ActiveX, COM, or ODBC interfaces.

XML Interface
Not covered in this course.

To get the most out of the XML Interface , you have to be familiar with XPath (XML Path
Language) instructions. You might, for example, check the web site http://www.w3.org/TR/xpath for
more information. In addition, you have to be familiar with programming in SimTalk.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 244 -
Communication Interfaces to Other Applications

Purpose
This lesson describes various communication interfaces to Plant Simulation. However, ActiveX is
described separately in the next lesson.

Objectives
After you complete this lesson, you should be able to:
Have an idea how the Teamcenter, Oracle, and OBDC interfaces work.

Help topics
Additional information for this lesson can be found in:
Add-Ins Reference Help > Inter-Process Communication Interfaces
Reference Help > Information Flow Objects

Hitachi Sunway Information Systems (Thailand) Ltd.


- 245 -
Teamcenter Interface

Teamcenter - used to retrieve PLMXML data and JT data from a Teamcenter Database via a
Teamcenter web server.
The figure below gives a general overview about data exchange between Teamcenter and Plant
Simulation.

Teamcenter provides product data, process data, and working area data. Your Teamcenter colleague
assembles this data via a Collaboration Context in Teamcenter. He then exports a snapshot of the
data via an application interface (AI) object. The data is provided in PLM XML format, which you can
import into a Plant Simulation table with the Teamcenter interface. You can use this data, together
with the JT files that were exported from Teamcenter, as input data for your simulation models in
Plant Simulation.
Note:
Using a Style sheet, you can format the data of the exported PLM XML file in a way that the data
relevant for the simulation can be arranged in a table structure that can be imported into Plant
Simulation.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 246 -
ODBC Interface

ODBC (Open Database Connectivity) - An object in the class library, requires a license.
Universal SQLInterface that establishes a connection with any data base that provides an ODBC
driver, such as MS Excel, dBase, text files, Oracle, Informix, etc. (as long as the corresponding drivers
are installed on your computer).
After the connection has established, SQL commands can be sent to the data source.

Note:
For 64-bit Plant Simulation, you need Microsoft Office 2010 or higher to communicate with Microsoft
Access or Excel.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 247 -
SQL Lite Interface

SQL Lite (SQL - Structured Query Language)


SQLite is a software library that implements a self-contained, serverless, zero-configuration,
transactional SQL database engine. For more information, consult http://www.sqlite.org. According
to this web site SQLite is the most widely deployed SQL database engine in the world. The source
code for SQLite is in the public domain.

This database engine implements most of the SQL92 standard, meaning that you can use every book
about SQL92 as a reference. There is also extensive documentation available on the web site of
SQLite. From the web site you also can download a small program, called sqlite.exe, to access the
database without using Plant Simulation.
This SQLite database engine is embedded in Plant Simulation. You can access it with the object
SQLite.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 248 -
Oracle Interface

Oracle - Add-in, an object in the class library, requires a license. Allows to connect to Oracle
databases (versions 9i, 10g or 11g) via SQL*Net.

Note: Tecnomatix Plant Simulation supports Oracle Netclients or Instant Clients to access Oracle
databases. Netclients must be installed separately. However, you can use the Oracle Instant Client,
which is installed together with Plant Simulation, to access an Oracle database without an Oracle
Client.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 249 -
OPC Interface

OPC Interface - can read control variables and signals from a PLC and provide other
applications with data.

The simulation in Plant Simulation runs in real-time, as controls work with a real-time-timer and do not
provide a fast forward function. If the external application sets the value of a variable to right, then
Plant Simulation might react with an exit control. You might use observer methods to react to values
provided by the external application.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 250 -
SIMIT Interface

SIMIT Interface - Provides access to process control devices, such as PLC controls, via SIMIT
(Simulation & Testing).

SIMIT is an open platform for testing automation software. Using scalable models of the technical
process, the correct functioning of the automation system can be ensured. The result is greater
planning security, closer adherence to schedules, reduced costs, and fewer risks, and means
considerably better budget adherence and absolute compliance with required quality standards.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 251 -
Socket Interface

Socket - Requires a license. Supports the communication between two processes via the
TCP/IP-Protocol, no matter if the processes run on the same or on different computers. Allows for the
bi-directional exchange of strings.

Socket communication is the foundation of the most widespread communication software. Sockets
are point-to-point connections, established during initialization, allowing the online exchange of data.
As the socket connection is directly based upon the TCP/IP protocol, it ensures fast communication
without much data overhead.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 252 -
ActiveX and Plant Simulation Example (Optional Lesson)

ActiveX is an object technology allowing you to activate objects (ActiveX controls) in a


container application and to exchange data with these objects using defined interfaces. The ActiveX
technology is based on OLE (Object Linking and Embedding). You can choose from a wide variety of
ActiveX controls or you can develop them yourself, provided you have access to appropriate
development tools, such as Microsoft Visual C++, Microsoft Visual Basic, etc. Examples of ActiveX
controls you use daily within Microsoft Windows are the Internet Explorer viewer or the Media
Player.

An ActiveX control has to register with the operating system so that you can use it. The control may
either register with the program regsvr32.exe or with Plant Simulation.
Note:

To add the ActiveX class object to the model file, choose File → Manage Class Library , check
the ActiveX checkbox, and click OK.
ActiveX Methods:
The ActiveX object provides the following methods and attributes:
Application - attribute setup on the ActiveX object describing the name of the application to
start
getParam
invoke
load
overview
registerControl
save, setParam
setWindowPosition
typeInfo
unregisterControl

Hitachi Sunway Information Systems (Thailand) Ltd.


- 253 -
Putting It All Together
At the beginning of this class you had little or no knowledge of Plant Simulation Methods and
Strategies. Through class you have been exposed to these features and had time to practice what
you have seen. You must continue to use this tool after class in conjunction with other users in your
company, additional training classes, and Siemens PLM Software services personnel in order to
become an expert.

Hitachi Sunway Information Systems (Thailand) Ltd.


- 254 -

You might also like