Dynsim 5.3.2 Utilities: Simsci

You might also like

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

SimSci ®

DYNSIM® 5.3.2
Utilities

December 2016
All terms mentionedin this documentation that are known to be trademarks or service marks have
been appropriately capitalized. Schneider Electric Software, LLC. cannot attest to the accuracy of
this information. Use of a term in this documentation should not be regarded as affecting the
validity of any trademark or service mark.

ActiveFactory, ArchestrA, ARPM, AssayCentral, Autonomous, Avantis, Avantis.PRO,


Connoisseur, CrudeManager, CrudeSuite, DATACON, DATAPREP, DT Analyst, DYNSIM,
DYNSIM Power, Esscor, EYESIM, Factelligence, FactorySuite, FactorySuite A², Foxboro,
Foxboro Evo, FSIM Plus, HEXTRAN, Hot Links, I/A Series, IMPACT, IMServ, InBatch,
InControl, Industrial Portal, IndustrialSQL Server, InFusion, INPLANT, InSQL, IntelaTrac,
InTouch, IPact, Invensys, Logic Validator, MBM, NETOPT, PIPEPHASE, PRO/II,
PROVISION, QI Analyst, ROMeo, SCADAlarm, SIM4ME, SimCentral, SimSci, SimSci-Esscor,
Skelta, Skelta BPM.NET, Skelta Sharepoint, Skelta Sharepoint Accelerator, Spiral Software,
SuiteVoyager, TACITE, Tactical Batch, The Simulator, TRISIM Plus, VISUAL FLARE,
VISUAL FLOW, VISUAL FLOW SUITE, VISUAL NETWORK, Visual Solutions,
VOYAGER, WindowMaker, WindowViewer, Wonderware, Wonderware InTouch, and ZI ZHI
are trademarks of Schneider Electric SE, its subsidiaries and affiliated companies.
© 2015 by Schneider Electric Software, LLC. All rights reserved.
No part of this documentation shall be reproduced, stored in a retrieval system, or transmitted by
any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior
written permission of Schneider Electric Software, LLC. No liability is assumed with respect to
the use of the information contained herein.
Although precaution has been taken in the preparation of this documentation, Schneider Electric
Software, LLC assumes no responsibility for errors or omissions. The information in this
documentation is subject to change without notice and does not represent a commitment on the
part of Schneider Electric Software, LLC. The software described in this documentation is
furnished under a license agreement. This software may be used or copied only in accordance
with the terms of such license agreement.
ArchestrA, Avantis, DYNSIM, EYESIM, Foxboro, Foxboro Evo, I/A Series, InBatch, InduSoft,
IntelaTrac, InTouch, PIPEPHASE, PRO/II, PROVISION, ROMeo, Schneider Electric, SIM4ME,
SimCentral, SimSci, Skelta, SmartGlance, Spiral Software, VISUAL FLARE, WindowMaker,
WindowViewer, and Wonderware are trademarks of Schneider Electric SE, its subsidiaries, and
affiliated companies. An extensive listing of Schneider Electric Software, LLC trademarks can be
found at: http://software.schneider-electric.com/legal/trademarks/. All other brands may be
trademarks of their respective owners.
Schneider Electric Software, LLC
26561 Rancho Parkway South
Lake Forest, CA 92630 U.S.A.
(949) 727-3200
http://software.schneider-electric.com/.
Table of Contents

Table of Contents
Introduction.................................................................................... 1
Summary of Models ......................................................................................... 1
Model Hierarchy .............................................................................................. 1
CustomMalfAnalog ........................................................................ 2
Discussion - CustomMalfAnalog...................................................................... 2
Data Entry Window Usage - CustomMalfAnalog............................................. 3
Parameter Table - CustomMalfAnalog ............................................................ 5
CustomMalfDiscrete ...................................................................... 7
Discussion - CustomMalfDiscrete.................................................................... 7
Parameter Table - CustomMalfDiscrete .......................................................... 7
GaussRand..................................................................................... 8
Discussion - GaussRand ................................................................................. 8
Data Entry Window Usage - GaussRand ........................................................ 8
Parameter Table - GaussRand........................................................................ 8
Integrator… .................................................................................. 10
Discussion - Integrator ................................................................................... 10
Data Entry Window Usage ............................................................................ 11
Parameter Table - Integrator ......................................................................... 11
MiscEqtn…. .................................................................................. 12
Discussion - MiscEqtn ................................................................................... 12
MiscEqtn Examples ....................................................................................... 12
Data Entry Window Usage - MiscEqtn .......................................................... 13
Parameter Table - MiscEqtn .......................................................................... 13
PackInt……................................................................................... 14
Discussion – PackInt ..................................................................................... 14
PackInt Example ............................................................................................ 14
Parameter Table – PackInt ............................................................................ 15
ProcLag…… ................................................................................. 16
Discussion - ProcLag ..................................................................................... 16
ProcLag Example .......................................................................................... 16
Data Entry Window Usage - ProcLag ............................................................ 17
Parameter Table - ProcLag ........................................................................... 17
ROC……….. .................................................................................. 18
Discussion - ROC .......................................................................................... 18
Data Entry Window Usage - ROC ................................................................. 18
Parameter Table - ROC ................................................................................. 19
RollAvg…… .................................................................................. 20
Discussion - RollAvg ...................................................................................... 20
RollAvg Example ........................................................................................... 20
Data Entry Window Usage - RollAvg ............................................................. 21
Parameter Table - RollAvg ............................................................................ 21

Utilities Contents - 1
Table of Contents

Conditional Sound Play .............................................................. 23


Discussion – Conditional Sound Play ............................................................ 23
Conditional Sound Play Example .................................................................. 24
Data Entry Window Usage – Conditional Sound Play ................................... 25
Parameter Table – Conditional Sound Play .................................................. 27
UnPackInt… ................................................................................. 28
Discussion - UnPackInt ................................................................................. 28
UnPackInt Example ....................................................................................... 28
Parameter Table – UnPackInt ....................................................................... 29
Data Import................................................................................... 30
Overview ........................................................................................................ 30
Parameter Settings ........................................................................................ 30
CSV Configuration ......................................................................................... 31

Utilities Contents - 2
Introduction

Introduction

The Utilities library provides a collection of standalone objects for various custom calculations.

Summary of Models
General Use Models

Model Typical Uses See Also See Also


Model Library
CustomMalfAnalog • Analog Malfunction

CustomMalfDiscrete • Discrete Malfunction

GaussRand • Gaussian Random Number


Generator
MiscEqtn • User defined calculations

ProcLag • First Order Lag on a Process Rlimit XferFuncs


Variable
Roc • Rate change, over specified
filter time
RollAvg • Rolling Average of a
Process Variable

Model Hierarchy
ModelObject
|__________ CustomMalfAnalog
|__________ CustomMalfDiscrete
|__________ GaussRand
|__________ MiscEqtn
|__________ ProcLag
|__________ RollAvg
|__________ Roc

Utilities Version 5.3.2, December 2016 1


CustomMalfAnalog

CustomMalfAnalog

Discussion - CustomMalfAnalog
CustomMalfAnalog extends ModelObject

The custom analog malfunction model is as a generic malfunction initiation interface to a custom
malfunction. The following example uses the custom analog malfunction to modify the normally
calculated value of a header temperature. In this example the output of the malfunction block
may be directly cross-referenced, since the value of the malfunction output will be equal to the
input, when it is not active. In other applications, it may be desirable to use the OUT parameter
as an input into other model calculations. There is also an integer output (STATE), which is 0
when the malfunction is inactive, and 1 when the malfunction is active.

CUSTOMMALFANALOG: MALF2
Example Temperature Deviation Malfunction
Parameter Assignment Units Description
In HCW1.T F Header temperature to be malfunctioned
Min 32.0 F Minimum malfunction value
Max 200.0 F Maximum malfunction value
DefaultOut 100.0 F Default malfunction value

NOTE: there is also an OUT parameter, which does not need to be initialized, and will be set
equal to either the IN parameter, or the value of the currently active malfunction.

Utilities Version 5.3.2, December 2016 2


CustomMalfAnalog

Data Entry Window Usage - CustomMalfAnalog

Configuration Tab

Custom malfunction UOM corresponds to Input UOM Type. Selection of UOM type is based on
the variable being measured.

Utilities Version 5.3.2, December 2016 3


CustomMalfAnalog

Basic Tab

Input parameter reference corresponds to the In parameter. Only a parameter reference or an


equation is accepted here. Out will be set to this value when the malfunction is not active.

Default malfunction value corresponds to the DefaultOut parameter. This is the default mature
value of the Out parameter when the malfunction is active.

Minimum malfunction parameter corresponds to the Min parameter. This is the minimum mature
value of the Out parameter when the malfunction is active. The mature value can be changed
through the malfunction interface.

Minimum malfunction parameter corresponds to the Max parameter. This is the maximum
mature value of the Out parameter when the malfunction is active. The mature value can be
changed through the malfunction interface.

Results are placed in the Out parameter.

Utilities Version 5.3.2, December 2016 4


CustomMalfAnalog

Parameter Table - CustomMalfAnalog


Configuration
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
In Normal (non- POINT Yes N/A No KF 0.0
malfunction) value
Min Minimum value of POINT Yes N/A No KF 0.0
mature malfunction
Max Maximum value of POINT Yes N/A No KF 1.0
mature malfunction
DefaultO Default value of POINT Yes N/A No KF 1.0
ut mature malfunction
MalfUOM Input UOM Type POINT No N/A No KI Other
Selection of UOM
type is based on the
variable being
measured. Used for
UOM display
purpose only.
0 - OTHER
1 - TEMPERATURE
2 - PRESSURE
3 - TRAYLEVEL
4 - LEVEL
5 - MOLERATE
6 - MASSRATE
7 - VOLUMERATE
8 - FRACTION
9 -MOLEFRACTION
10 - SPEED

PowerUO Power library UOM POINT No N/A No KI 0.0


MFlag flag
Set to 1 when using
Power Library
models.
Set to 0 when using
DYNSIM® Base
equipment models

Utilities Version 5.3.2, December 2016 5


CustomMalfAnalog

Analog State
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
Out Malfunction value POINT No N/A Yes DF 0.0
This value will be set
to IN, when the
malfunction is not
active, and set to the
current value of the
malfunction when it
is active.
State Malfunction state POINT No N/A Yes DI 0.0
0 = not active
1 = active

Utilities Version 5.3.2, December 2016 6


CustomMalfDiscrete

CustomMalfDiscrete

Discussion - CustomMalfDiscrete
CustomMalfDiscrete extends ModelObject

The custom discrete malfunction model is as a generic malfunction initiation interface to a


custom malfunction. The custom malfunction logic must be implemented individually, possibly
using logic objects from the Controls library. The following example uses the custom discrete
malfunction to cause an equipment trip. In this example the equipment trip may also occur by
some other inputs to the "OR" object, independent of the malfunction.

CUSTOMMALFDISCRETE: MALF1
Example Equipment Trip Malfunction
Parameter Assignment Units Description

NOTE: there is only 1 parameter (STATE), which does not need to be initialized.

OR: EQUIPTRIP
Example Equipment Trip
Parameter Assignment Units Description
Inp[0] ExtTrip1 Normal operating trip
Inp[1] ExtTrip2 Normal operating trip
Inp[2] MALF1.STATE Malfunction trip

Parameter Table - CustomMalfDiscrete


Discrete State
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
State Malfunction state POINT No N/A Yes DI 0.0
0 = not active
1 = active

Utilities Version 5.3.2, December 2016 7


GaussRand

GaussRand

Discussion - GaussRand
GaussRand extends ModelObject.

This model calculates a Gaussian distributed random number, for a given user mean and standard
deviation input. Note: The random number will be limited to within 5 standard deviations of the
mean.

Data Entry Window Usage - GaussRand

Mean corresponds to the Mean parameter.

Standard deviation corresponds to the Sigma parameter. The random number will be limited to
five standard deviations of the mean.

Results are placed in the Out parameter.

Parameter Table - GaussRand


Inputs
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
Mean Mean Gauss value POINT Yes N/A No KF 0.5
Sigma Standard deviation POINT Yes N/A No KF 0.1

Utilities Version 5.3.2, December 2016 8


GaussRand

Outputs
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
Out Random Gaussian POINT No N/A Yes DF 0.0
value

Utilities Version 5.3.2, December 2016 9


Integrator

Integrator

Discussion - Integrator

Integrator provides the integration of a process variable.

The Integrator model calculates the Sum and the d(Sum)/dt (the integrated value).

The user defines the Input, Gain, and Bias. Results are in Sum and Output.

Input and Gain are vectors of the same size.

The Sum is calculated as follows:

The Out is the Integral of Sum*dt

Out = ∫ Sum * dt

Utilities Version 5.3.2, December 2016 10


Integrator

Data Entry Window Usage


Basic Tab

Input parameter corresponds to the In parameter, Gain in the Gain parameter, and Bias in the
Bias parameter.

Parameter Table - Integrator


Name Description Units Class Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
In Input POINT Yes No DD 0.0
Gain Gain POINT Yes No KD 1.0
Bias Bias POINT Yes No KD 0.0
Sum Calculated sum POINT No No DD 0.0
Out Calculated output POINT No No SD 0.0

Utilities Version 5.3.2, December 2016 11


MiscEqtn

MiscEqtn

Discussion - MiscEqtn
MiscEqtn extends ModelObject.

The MiscEqtn object allows for any number of user-specified equations or calculations. See the
Dynamic Simulation Suite User Manual for a discussion of equation operators.

MiscEqtn Examples
The following are examples of MiscEqtn objects.

MISCEQTN: BRGVIB
MiscEqtn used for bearing vibrations
Parameter Assignment Units Description
OUT[0] EQUATION Boiler Feed Pump Bearing vibration table lookup:
vibration vs. speed
Equation: CINTRP1(BFP.SPEED, BFPVIB[0])
OUT[1] EQUATION Boiler Feed Pump Turbine Bearing vibration table
lookup: vibration vs. speed
Equation: CINTRP1(BFPT.SPEED,BFPTVIB[0])
NOTE: The BFPVIB and BFPTVIB array definitions are not shown here and the BFP and BFPT
object definitions are not shown here.

Notice in the following example that the parameter specification begins with OUT[1] instead of
OUT[0]. This is perfectly legal and convenient because there is no feedwater heater 0. Also
notice that OUT[4] was skipped. This too is perfectly legal.

MISCEQTN: LFWH
MiscEqtn used for feedwater heater transmitter level calculations
Parameter Assignment Units Description
OUT[1] EQUATION Feedwater Heater 1 Transmitter Level
Equation: MAX(-15.0, MIN( 15.0, FWH1.L - 20.0))
OUT[2] EQUATION Feedwater Heater 2 Transmitter Level
Equation: MAX(-15.0, MIN( 15.0, FWH2.L - 20.0))
OUT[3] EQUATION Feedwater Heater 3 Transmitter Level
Equation: MAX(-15.0, MIN( 15.0, FWH3.L - 20.0))
OUT[5] EQUATION Feedwater Heater 5 Transmitter Level
Equation: MAX(-12.0, MIN( 12.0, FWH5.L - 18.0))
OUT[6] EQUATION Feedwater Heater 6 Transmitter Level
Equation: MAX(-12.0, MIN( 12.0, FWH6.L - 18.0))
NOTE: The FWH1, FWH2, FWH3, FWH5, and FWH6 object definitions are not shown here.

Notice in the following example that the parameter specification OUT[1] references the value
calculated in OUT[0].

Utilities Version 5.3.2, December 2016 12


MiscEqtn

MISCEQTN: LDA
MiscEqtn used for deaerator transmitter level calculations
Parameter Assignment Units Description
OUT[0] EQUATION Deaerator Level Transmitter A
Equation: MAX(-15.0, MIN( 15.0, DA.L - 20.0))
OUT[1] EQUATION Deaerator Level Transmitter B
Equation: MAX(-12.0, MIN( 12.0, LDA.OUT[0]))
NOTE: The DA object definition is not shown here.

Data Entry Window Usage - MiscEqtn

Equation is attached to the OUT vector. This field accepts only equations. The result of the
equation is assigned to the OUT vector.

Parameter Assignment is attached to the OUT vector. This is an optional entry. The result of the
equation is assigned to any other model parameter or standalone point specified here.

Parameter Table - MiscEqtn


Name Description Units Model Eqt Arra Sort Pnt Pnt
Allowed OK y Out Dft Dft
Size Cls Val
Out Calculated output POINT Yes None No DF

Utilities Version 5.3.2, December 2016 13


PackInt

PackInt

Discussion – PackInt
The PackInt model takes up to 32 integer inputs and packs them into a signed/unsigned, 32-bit
integer. Earlier PACKINT model was supporting only signed integer, but now a new output
parameter DOUBLEOUT is added which gets set for both signed and unsigned integers. Hence
user has to use DOUBLEOUT to pass an unsigned integer through Xref utility.

Here INTSIGN should be 0 for unsigned integer and 1 for signed integer.

To configure a PackInt object, expand the input array ‘IN’ and enter data in the appropriate array
index.

The OUT parameter is a 32-bit signed integer that represents the data entered.

Future development may allow the user to choose the output representation to be a signed
(INTSIGN = 1) or an unsigned (INTSIGN = 0) integer. Presently, INTSIGN is fixed at 1, and
thus the output is always a signed integer (i.e. if IN[31] is true, the OUT value is negative, if
IN[31] is false, the OUT value is positive).

Future development may allow the user to change the size of the packed word. Presently, the
number of inputs and the size of the output word are fixed at 32.

PackInt Example
The following table indicates the indexes of the IN array that are true and the resulting OUT
value.

Indexes of IN array that are true Integer Representation of OUT


0, 1 3
12 4096
0, 12 4097
30 1073741824
31 -2147483648
0, 31 -2147483647
0, 1, 12, 15, 22 4231171
0, 1, 12, 15, 22, 31 -2143252477
All bits are set -1

Utilities Version 5.3.2, December 2016 14


PackInt

Parameter Table – PackInt

Output Parameter Feature supported Description


Name (Signed/Unsigned)
OUT Signed only Integer representation of packed IN
array.
DOUBLEOUT Both signed and Integer representation of packed IN
Unsigned array.

Utilities Version 5.3.2, December 2016 15


ProcLag

ProcLag

Discussion - ProcLag
ProcLag extends ModelObject.

The ProcLag object provides a first order lag state of any number of process parameters. The
derivative for the ith process is given by:

ProcLag Example
The following is an example of how to configure a ProcLag object. This example is a simple
temperature model based on pump speed and has a lag that depends on pump running status.

PROCLAG: BFBP_TEMP
Boiler feed boost pump motor temperatures
Parameter Assignment Units Description
IN[1] EQUATION Lag setpoint
Equation: BFBP1.SPEED * 114.0
TAU[1] EQUATION Time constant
Equation: IF(BFBP1.POS, 0.25, 5.0)
IN[2] EQUATION Lag setpoint
Equation: BFBP2.SPEED * 115.0
TAU[2] EQUATION Time constant
Equation: IF(BFBP2.POS, 0.25, 5.0)
NOTE: The BFBP1 and BFBP2 object definitions are not shown here.

Utilities Version 5.3.2, December 2016 16


ProcLag

Data Entry Window Usage - ProcLag

Input parameter reference corresponds to the In vector. Only parameter references are accepted
here.

Time constant corresponds to the Tau vector. Tau is the time constant used in a first order lag.

Results are placed in the Out vector.

Parameter Table - ProcLag


Name Description Units Model Eqt Arra Sort Pnt Pnt
Allowed OK y Out Dft Dft
Size Cls Val
In Lag setpoint command POINT Yes None No DF
Tau Time constant POINT Yes IN No KF 1.0
Out Calculated output POINT No IN No SF 0.0
dOut Derivative of POINT No IN Yes DF 0.0
calculated output

Utilities Version 5.3.2, December 2016 17


ROC

ROC

Discussion - ROC

The ROC (Rate of Change) model calculates a rate of change (RATE) of the input (IN) over a
filter time (FILTTIME). The user defines the number of samples in the buffer (NSAMPLE) and
the execution period (default PERIOD = DELT). The preprocessor calculates how many minutes
(AVGTIME) contained in the buffer.

Data Entry Window Usage - ROC

Input parameter reference corresponds to the In parameter. Only a parameter reference or an


equation is accepted here.

Filter time corresponds to the FiltTime parameter.

Number of samples corresponds to the Nsamples parameter.

Results are placed in the Out parameter.

Utilities Version 5.3.2, December 2016 18


ROC

Parameter Table - ROC


Working variables
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
FiltTime Rate Calc Sample sec POINT No N/A No KF 1.
Period
Rate Rate of Change POINT No N/A No DF 0.
Nsample number of samples POINT No N/A No KI 1440
to avg.
AvgTime Rolling Average minu POINT No N/A No KF 0.
Period tes
Isample current index in POINT No N/A No DI 0
Buffer
Jsample startup index POINT No N/A No DI 0
Sum Sum of stack values POINT Yes N/A No DF 0.
Zbuff history of In value POINT No NSA No SF 0.
MPL
E

Variable to be averaged
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
In Input value POINT Yes N/A No DF 1.

RollAvg output
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
Out Rolling Average POINT No N/A Yes DF 0
Output

Utilities Version 5.3.2, December 2016 19


RollAvg

RollAvg

Discussion - RollAvg
RollAvg extends ModelObject.

The RollAvg object calculates a rolling average.

The user defines the number of samples (Nsample) and the period between samples (Period). The
object will calculate the averaging time period (AvgTime). The default Period of the RollAvg
object is 0.25 seconds.

The averaging time (in minutes) is calculated as follows:

The number of samples is calculated from the desired averaging time (in minutes) as follows:

RollAvg Example
The following is an example of how to configure a RollAvg object.

ROLLAVG: BH1TEMP
10 minute average, BagHouse temperature, compartment 1
IN BH1.T Value to be averaged
NSAMPLE 2400 Number of samples to average
2400 = 60*(10min)/0.25
NOTE: The BH1 object definition is not shown here.

Utilities Version 5.3.2, December 2016 20


RollAvg

Data Entry Window Usage - RollAvg

Input parameter reference corresponds to the In parameter. Only a parameter reference or an


equation is accepted here

Number of samples corresponds to the Nsample parameter.

Results are placed in the Out parameter.

Parameter Table - RollAvg


Variable to be averaged
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
In Input value POINT Yes N/A No DF 1.0

Working variables
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
Nsample number of samples POINT No N/A No KI 1440
to avg.
AvgTime Rolling Average min POINT No N/A No KF 0
Period
Isample current index in POINT No N/A No DI 0
Buffer
Jsample startup index POINT No N/A No DI 0
Sum Sum of stack values POINT Yes N/A No DF 0.
Zbuff history of In value POINT No NSA No SF 0.
MPLE

Utilities Version 5.3.2, December 2016 21


RollAvg

RollAvg output
Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
Out Rolling Average POINT No N/A Yes DF 0
Output
Oldest Oldest value stored, POINT No N/A Yes DF 0
used as delay
algorithm

Utilities Version 5.3.2, December 2016 22


Conditional Sound Play

Conditional Sound Play

Discussion – Conditional Sound Play

The Conditional Sound Play model enables the user to link an alarm expression to a *.wav file of
their choice. When an alarm expression is true, the specified *.wav file plays. When an alarm
expression goes false, the sounding of the *.wav file stops.

The *.wav file is specified by the SOUNDFILENAME parameter. The *.wav file must be
located in a directory analogous to .\Simulations\SimulationName\sound where SimulationName
is the name of the simulation that contains the Conditional Sound Play object. Full path names to
alternate directories are not supported at this time. Only one *.wav file can be specified per
Conditional Sound Play object.

The number of alarm expressions is specified by the NOOFALARMS parameter. The


NOOFALARMS parameter sets the array size of the OUT arrays. OUT can be assigned to a
single variable or to the output of an equation.

If the MODE parameter is 1, the *.wav file will play continuously until an OUT goes false. If the
MODE parameter is 2, the *.wav file will play once through, or until an OUT goes false,
whichever comes first.

If MODE = 1

OUT

*.wav file plays until


expression goes to 0

(dashed line represents duration of


*.wav file played once through)
If MODE = 2

OUT

*.wav file plays once


through and stops.

(dashed line represents duration of


*.wav file played once through)
If MODE = 1 or 2

OUT

*.wav file stops when


expression goes to 0

Utilities Version 5.3.2, December 2016 23


Conditional Sound Play

If MODE = 2 and more than one OUT parameter is true, the once through play of the *.wav file
is reset when a new OUT becomes true.

OUT[0]

OUT[1]

Once through sounding of


*.wav file resets when
OUT[1]
becomes true (dashed line)

Conditional Sound Play Example

In the example below, NOOFALARMS is set to 3. The OUT array is automatically sized to 3.
OUT [0] is set to the variable “di1” and OUT [1] is set to the variable “di2”. OUT [2] is set to the
output of the equation “di3+di4”. Thus, if either di3 or di4 goes true, OUT [2] will be true.

The MODE parameter is set to 2, which means that when any of the alarm expressions becomes
true, the firstup.wav file will play once through. In this example, the simulation in which the
Conditional Sound Play object resides is called “Test2”. The DYNSIM model version is 4.3.
The firstup.wav file must therefore reside in the following directory in order for the sound to
play: Installdrive:\SIMSCI TM \DSS43\Simulations\Test2\sound.

If “di1” is true, OUT[0] becomes true.

Utilities Version 5.3.2, December 2016 24


Conditional Sound Play

Data Entry Window Usage – Conditional Sound Play

Mode of sound corresponds to the Mode parameter.

Sound file name corresponds to the SOUNDFILENAME parameter.

Utilities Version 5.3.2, December 2016 25


Conditional Sound Play

Equation is attached to the OUT vector. The result of the equation is assigned to the OUT
vector.

Input parameter reference corresponds to the OUT vector.

NOOFALARMS is automatically adjusted when rows are added or removed.

New rows must be saved by clicking Apply before editing their fields.

Field edits are saved by clicking Apply again.

Utilities Version 5.3.2, December 2016 26


Conditional Sound Play

Parameter Table – Conditional Sound Play


Name Description Units Model Eqt Array Sort Pnt Pnt
Allowed OK Size Out Dft Dft
Cls Val
MODE 1 = Continuous POINT No 0 No KI 1
(Conditional Sound Play
object will play the
*.wav file continuously
until any of OUT is
false).
2 = Once Through
(Conditional Sound Play
object will play the
*.wav file once through
and then stop. If the
OUT goes false before
the completion of the
*.wav file, the sound
will stop immediately,
prior to the completion
of the *.wav file).
NOOFAL Number alarms POINT No 0 No KI 1
ARMS configured to play the
*.wav file associated
with this object. Sets the
array size for OUT.
SOUNDFI Name of *.wav file that No 0 No
LENAME is played when any of
the OUT is true. The file
must be in a directory
analogous to
\Simulations\Simulation
Name\sound. (For
example, in a simulation
called “Test2” in
DYNSIM model version
4.3, the *.wav file must
reside in the following
directory:
Installdrive:\SIMSCI\DS
S43\Simulations\Test2\s
ound).
The name of the
conditional sound play
file can be specified with
or without the .wav
extension.
OUT Output. Result of an POINT Yes NOO No DF
assignment or the FALA
equation evaluated. RMS

Utilities Version 5.3.2, December 2016 27


UnPackInt

UnPackInt

Discussion - UnPackInt
The UnPackInt model takes a 32-bit signed/unsigned integer, unpacks its bits and represents them
as 32 separate integers in an output array.
Earlier UNPACKINT model was supporting only signed integer, but now a new input parameter
DOUBLEIN is added which gets set for both signed and unsigned integers. Hence user has to use
DOUBLEIN to pass an unsigned integer through Xref utility.

To configure an UnPackInt object, simply connect the ‘IN’ parameter to an integer value. In the
example below, DataPoint is a 32-bit signed integer (Dynamic Integer Point).

The OUT parameter is a 32-index array that represents each bit of the integer DataPoint as a
separate integer.

Future development may allow the user to choose the input variable to be a signed (INTSIGN =
1) or an unsigned (INTSIGN = 0) integer. Presently, INTSIGN is fixed at 1, and thus the input is
always a signed integer (i.e. if IN is positive, IN[31] is false, if IN is negative, IN[31] is true).

Future development may allow the user to change the size of the packed word. Presently, the
number of outputs and the size of the input word are fixed at 32.

UnPackInt Example
The following table indicates the indexes of the IN array that are true and the resulting OUT
value.

Integer Representation of IN Indexes of OUT array that are true


3 0, 1
4096 12
4097 0, 12
1073741824 30
-2147483648 31
-2147483647 0, 31
4231171 0, 1, 12, 15, 22
-2143252477 0, 1, 12, 15, 22, 31
-1 All bits are set

Utilities Version 5.3.2, December 2016 28


UnPackInt

Parameter Table – UnPackInt

Input Parameter Feature supported Description


Name (Signed /Unsigned)
IN Signed only Integer representation of packed
word to be unpacked.
DOUBLEIN Both signed and Integer representation of packed
Unsigned word to be unpacked.
INTSIGN N.A. 1 = Signed Integer
0 = Unsigned Integer
INTSIZE N.A. Number of bits in packed word.
32 = default (no other sizes yet
available)

Utilities Version 5.3.2, December 2016 29


UnPackInt

Data Import

Overview
This utility allows the real-time importation of text CSV data into a DYNSIM simulation.
Considerations have been made to support the different sampling rates and different time offsets
with the CSV data. Also, multiple components, each importing a different file, may be mixed and
matched within the simulation.

Parameter Settings
Parameter Configuration Choices

These are the parameters that need to be configured for each instance of the CSV Text File:

Parameter Class Description


FADJUST A time offset to adjust the data being imported. A negative
value means wait that many seconds before starting; while a
positive value will skip forward that many seconds.
FNAME The path and filename of the input CSV data file.

Parameters Produced From the CSV File

These are the parameters generated by the CSV Text File:

Parameter Class Description


CSV[ ] An array of data values imported from the file. After EOF,
array values go to zero.
CSVNAME[ ] An array of column names.
FLINENUM The number of the last line read. This will go to -1 after end-
of-file is reached.
FNXTTIME The next file time available in the data in seconds. After EOF
is reached, the last good time is kept.
FOFFSET The time in seconds of the first timestamp of the data file.
FPERIOD The sample resolution of the data file in seconds.

Parameters that show Status and Control

These are the parameters generated affect how the CSV Text File is managed:

Parameter Class Description


CSVTIME The amount of elapsed time since the simulation was started.
Note: this is not reset when an IC resets the simulation clock
to zero.
DISABLEFLAG Setting to true disables this model object.

Utilities Version 5.3.2, December 2016 30


UnPackInt

Parameters imported as Tag Names

Each named column except for the TIMESTAMP, in the first row of the data file, will be created
as new parameters in the model. Each of these parameters will have the data from the import file
at the specified timestamp, available to be used in the simulation.

CSV Configuration
The text file described here comes from a Microsoft Excel® spreadsheet using the Export
function. Other utilities may generate the file as described below.

The Label row

The first row of the data file is the column heading names for each column of data. Each column
name will be imported as a separate parameter name to reference its data. This may instead be a
blank row.

The first column is always named TIMESTAMP, and it shows the number of seconds relative to
the beginning of the file.

Only valid tag names should be imported into the mode. To be a valid tag name, it should have at
least one letter in its name. Also, the name should consist of only the following: letters, numbers,
the period character, and the underline character. All lowercase letters in the tag name will be
converted to uppercase before being imported.

The Data rows

All the rows after the Label row are data rows. The values for each time sample are stored on one
line, separated by a comma. The first value must be the timestamp of the data in that row. The
format of the timestamp is “MM/DD/YY HH:MM:SS AM”. The year can be two or four digits. If
two digit year is used, it is in the range of 1970 to 2069. The seconds filed are optional. Also, the
AM/PM is optional, but strongly recommended.

Utilities Version 5.3.2, December 2016 31


Invensys Systems, Inc.
26561 Rancho Parkway South
Lake Forest, CA 92630
United States of America
http://iom.invensys.com

Global Customer Support


Inside U.S.: 1-866-746-6477
Outside U.S.: 1-508-549-2424 or contact your
local Invensys Representative.
Email: iom.support@invensys.com
Website: http://support.ips.invensys.com

You might also like