Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
User Manual
UM25.0:SPE311
Original September 1995
D4U01321002
ENVOX, Instrument Information System, PROFLEX, PROVOX, PROVUE, and RS3 are marks of one
or more of the Fisher-Rosemount group of companies.
The contents of this publication are presented for informational purposes only, and while every effort
has been made to ensure their accuracy, they are not to be construed as warranties or guarantees,
express or implied, regarding the products or services described herein or their use or applicability. We
reserve the right to modify or improve the designs or specifications of such products at any time without
notice.
SIMVOX -- Version 2.3
Table of Contents
1.0 Introduction to SIMVOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 What is SIMVOX? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
Figure 1.1 Real I/O vs. SIMVOX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
Figure 1.2a Real I/O vs. SIMVOX for Allen Bradley PLC3 . . . . . . . . . . . . . . 4
Figure 1.2b Simulated I/O vs. SIMVOX for Allen Bradley PLC3 . . . . . . . . . . 4
Figure 1.3a Real I/O vs. SIMVOX for Allen Bradley PLC5 . . . . . . . . . . . . . . 5
Figure 1.3b Simulated I/O vs. SIMVOX for Allen Bradley . . . . . . . . . . . . . . . 5
Figure 1.4a Real I/O vs. SIMVOX for Modicon MODBUS . . . . . . . . . . . . . . 6
Figure 1.4b Simulated I/O vs. SIMVOX for Modicon MODBUS . . . . . . . . . . 6
Figure 1.5a Real I/O vs. SIMVOX for Modicon MODBUS + . . . . . . . . . . . . . 7
Figure 1.5b Simulated I/O vs. SIMVOX for Modicon MODBUS + . . . . . . . . 7
Figure 1.6a Real I/O vs. SIMVOX for TI Siemens . . . . . . . . . . . . . . . . . . . . . 8
Figure 1.6b Simulated I/O vs. SIMVOX for TI Siemens . . . . . . . . . . . . . . . . . 8
Figure 1.7a Real I/O vs. SIMVOX for GE Series 6 . . . . . . . . . . . . . . . . . . . . . 9
Figure 1.7b Simulated I/O vs. SIMVOX for GE Series 6 . . . . . . . . . . . . . . . . 9
Figure 1.8a Real I/O vs. SIMVOX for Rosemount RS3 . . . . . . . . . . . . . . . . . . 10
Figure 1.8b Simulated I/O vs. SIMVOX for Rosemount RS3 . . . . . . . . . . . . . 10
1.1.1 SIMVOX -- Controller Communications . . . . . . . . . . . . . . . . . . . . . . . . . 11
1.1.2 SIMVOX Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
1.1.3 Simulations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
1.2 Why SIMVOX? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
1.3 About the Manual . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
1.4 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
2.0 Computer System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.0 SIMVOX Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
3.1 Installation of hardware on Windows NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.1 Serial Card Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.1.2 Adding COM ports to Windows NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
3.2 Installation of hardware on OpenVMS AXP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.1 RS232 Ports Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.2 Terminal Server and VAX LAT Port Configuration . . . . . . . . . . . . . . . . 23
3.2.2.1 Terminal Server Configuration . . . . . . . . . . . . . . . . . . . . . . . . . 23
3.2.2.2 VAX LAT Port Configuration . . . . . . . . . . . . . . . . . . . . . . . . . . 26
3.3 Installation of software on Windows NT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.1 Copying the Software to your hard disk . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.2 Windows NT Registry changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
3.3.3 Windows NT Tasking changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.3.4 Installing VAX/HP utilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
3.4 Installation of software on OpenVMS AXP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
3.5 Architecture/Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.5.1 PROVOX E/I Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
3.5.2 PROVOX IDI Card . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.5.3 Allen Bradley PLC3 & PLC5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.5.4 Modicon MODBUS & MODBUS+ . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41
3.5.5 TI565 (NITP) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.6 Cable Connections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43
4.0 SIMVOX Functionality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
4.1 SIMVOX Main Menu . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Communications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 48
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49
Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
Exit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
4.2 Modify SIO File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Modify Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54
Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56
4.3 Tieback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Tieback Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 57
Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 61
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62
4.4 Tags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Tags Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63
Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67
4.5 Calculations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Calculations Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69
Edit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73
4.6 Manipulate by Channel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Manipulate Menu Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74
Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75
Help . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
Process simulation has many advantages. Primarily, simulations mimic process conditions,
enabling engineers to answer a number of important questions about their process prior to
start--up, such as:
D Are the logical operating rules correct and adequate for this process?
D Are the failure sequences valid for all possible upset conditions?
... and many more. The answers, in turn, enable the engineer to better understand the process
through the Distributed Control System (DCS) or PLC system, expedite analysis of the
configuration, test desirability of system modifications and consequently, start up the DCS or
PLC faster.
SIMVOX simulation tools are designed to enable the engineer to answer these questions faster,
and more accurately than ever before.
1. Configuring personalities of Discrete Devices, Loops, and objects comprising Flow, Level,
Temperature and Pressure without programming in 3GL (3rd Generation Languages, i.e., C,
FORTRAN, Pascal, etc.), within the modeling environment provided by SIMVOX.
2. Exercising full control over behavior of each modeled object within the environment from the
workstation. Specifically, Point--and--Click access to object parameters as they are being
executed in the background, on--line modification and the ability to view results immediately.
3. Seamless integration of special, process specific object handling specified as 3GL programs
(if necessary) or spreadsheet calculations. External programs access the SIMVOX environment
and affect the built--in models via the programming API (section 5.0). Spreadsheets, e.g., Excel
may access the SIMVOX environment via DDE (section 6.2.3.). Similarly, the SIMVOX
graphical front end (Real Time Vision Pro) may access the SIMVOX environment via DDE.
The following subsections are a brief overview of the SIMVOX environment, with figures
depicting SIMVOX vs. real I/O and simulated I/O.
DataHighway
SR 90 Controller
20 -- Series Controller
124 DEGREES
External Interface Card 40 GPMC
I / O Card File
64% LEVEL
I/O Termination Panels 1200 LBS
RS232C
AI
Continuation of
I / O Bus AO
DataHighway
SR 90 Controller
20 -- Series Controller
External Interface Card
I / O Card File
Interface Cable
Continuation of
SIMVOX
I / O Bus Workstation
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
SIMVOX PLC3
Workstation
Remote I/O
Figure 1.2a Real I/O vs. SIMVOX for Allen Bradley PLC3
SIMVOX
PLC3
Workstation
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
Figure 1.2b Simulated I/O vs. SIMVOX for Allen Bradley PLC3
RS232
SIMVOX
Workstation
1785 KE/KF 1770 KF2
PLC5 PLC5
Remote I/O Remote I/O
Figure 1.3a Real I/O vs. SIMVOX for Allen Bradley PLC5
RS232
SIMVOX
Workstation
1785 KE/KF 1770 KF2
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY DataHighway Plus
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
PLC5 PLC5
RS232
SIMVOX
Modicon MODBUS
Workstation
Remote I/O
AI
SIMVOX SOFTWARE
AO
SIM CONFIGURATION UTILITY
TIEBACK/MODEL: DI/DO
DCD, SIMPLE LOOPS,
Mass & Energy Balance
RS232
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
AI
AO
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY DI/DO
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
SIMVOX
Modicon MODBUS +
Workstation
SA85 Remote I/O Disabled
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
AI
SIMVOX SOFTWARE AO
SIM CONFIGURATION UTILITY
TIEBACK/MODEL: DI/DO
DCD, SIMPLE LOOPS,
Mass & Energy Balance
RS232
SIMVOX
TI Siemens
Workstation
Remote I/O Disabled
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
SIMVOX GE Series 6
Workstation
RemoteI/O
AI
SIMVOX SOFTWARE
AO
SIM CONFIGURATION UTILITY
TIEBACK/MODEL: DI/DO
DCD, SIMPLE LOOPS,
Mass & Energy Balance
SIMVOX
GE Series 6
Workstation
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
Peerway
Remote I/O
AI
AO
DI/DO
Peerway
SIMVOX
Workstation
Remote I/O Disabled
SIMVOX SOFTWARE
SIM CONFIGURATION UTILITY
TIEBACK/MODEL:
DCD, SIMPLE LOOPS,
Mass & Energy Balance
* SIMDI is the SIMVOX Device Interface (Intelligent I/O card for RS--485 communications).
In SIMVOX, control information is received/read from the control device and process
information is sent/written back to the control device. The process model can only access the
control information as read only. Based on the control information, the process behavior
changes and new information is sent back to the control device. Communication between the
Controller and SIMVOX is accomplished via serial COM ports or special hardware as described
in the following table:
For example, for the PROVOX/EIC connection to SIMVOX, the External Interface (E/I) card is
installed in a Control Input/Output Card File. The card files Power/Communication card is then
connected to the I/O Driver Board of a Unit Operations Controller plus (UOC+), an Integrated
Function Controller (IFC) or an SR90 Controller. Finally, the top serial port on the E/I card is
connected to an RS--232 COM port on the Workstation that has SIMVOX installed in it.
Establishment of communication between SIMVOX and the E/I card is accomplished by first
creating a simulated I/O configuration file. SIMVOX provides this operation through a menu
selection. This disk--resident I/O configuration file details the I/O channel types to be simulated
and should conform to the channel definitions in the Controller. SIMVOX then communicates
with the Controller through the E/I card. The simulated I/O channels appear as physical
hardware to the Controller. Consequently, to the Controller, there is no difference between
SIMVOX generated signals and real field I/O.
Similarly, for PLC controllers, a disk--resident I/O configuration file detailing maximum table
sizes is utilized.
For RS3, a special intelligent I/O interface card (SIMDI, SIMVOX Device Interface) is used. On
the RS3 side, each SIMDI communicates to 16 RS--485 communications lines. Specifically, each
RS3 File has 8 controllers and each controller has 8 RS--485 communications lines which are
brought out to the Comm Term Panel. From the Comm Term Panels, one, two or more lines per
controller are connected to each SIMDI, with a maximum of 16 lines per SIMDI. On the
SIMVOX side, SIMDI communicates with the SIMVOX I/O driver. Similar to other platforms, a
disk resident file is used to describe the I/O configuration to be simulated.
1.1.3 Simulations
Simulations are specified directly through the SIMVOX user interface. There are three different
subsystems which affect and control the modeling of various objects. These are:
These subsystems are discussed in detail in section 4 (for navigation) and section 6 (for
modeling configuration).
To allow user written simulations as external 3GL programs to read from and write to I/O
channels, SIMVOX provides a library of callable subroutines. Functionally, simulations are
partitioned as tiebacks and models.
Tieback applications are generally used to resolve Discrete Control Devices and simulate
single--input, single--output loop tag operations. In both cases the outputs are tied back in
software to the inputs, hence the name. In the case of Discrete Device tiebacks, a template is
used as a pattern for issuing changes to inputs corresponding to changes in output (setpoint). For
loop tiebacks, analog output channels are tied to analog input channels in software.
Models, on the other hand, emulate the actual process and may be simple or complex.
Simulation of a single input such as a limit switch closure based upon a level is an example of a
simple model. More complex models may be programmed to emulate process conditions based
upon predetermined equipment status in system dynamics. The level of simulation complexity is
restricted only by the computing power of the SIMVOX Workstation.
FEATURE BENEFIT
Configurable tieback simulation Eliminates need for
through software. hardwired switches and
signal generators to perform
tieback.
The remainder of the manual is intended for Process Engineers and Simulation Programmers
with an understanding of the host operating systems (Windows NT and OpenVMS AXP), menu
driven systems, inter--computer communications and any 3GL programming language. The
thrust is to facilitate rapid understanding, installation and productive use of SIMVOX. From that
standpoint, various problem scenarios and troubleshooting aids are given.
Section 2 of this manual describes the computer system requirements for SIMVOX. Section 3
guides the user through the installation process of both software and hardware. SIMVOX
functionality is described in detail in Section 4. The syntax of each command, its parameters and
its result is given. Then in Section 5, functionality of SIMVOX library subroutines is discussed.
In sections 4 and 6, the user is given a flavor of how to use the various menus to specify a
simulation. Examples are presented for Tiebacks of different types, and models of different
types. Additionally, for external programs, the user is guided through compilation and linking
of model/tieback programs.
In section 7, various communication and configuration problem situations are discussed and their
solutions are proposed.
The Examples section (section 8) comprises models of various complexities and types. This
section is intended such that new example sheets may be inserted to add to your library of
solutions using SIMVOX.
1.4 Summary
The use of SIMVOX and its integration into projects has produced many positive results.
SIMVOX provides comprehensive and quality results on current and future control system
configuration, testing, and operator training projects.
PROVOX and RS3 are registered trade marks of Fisher--Rosemount Systems, Inc.
Windows and Windows NT are registered trade marks of Microsoft Corporation.
DEC, Alpha, AXP and OpenVMS are registered trade marks of Digital Equipment Corporation.
SIMVOX is a registered trade mark of Munger Company, Inc.
Munger Company, Inc. acknowledges all other tradenames and trademarks used in this document as the property of their respective owners.
In general, the following is the list of lowest level Intel--based hardware required to use
SIMVOX.
In order to port existing simulation code into the Windows NT environment, one or both of the
following compilers will be required:
Note that compilers are primarily required if you are porting existing VAX simulation code to
the Windows NT or OpenVMS AXP Workstation. Please refer to Section 6 where porting issues
are addressed. Additionally, a compiler may be required if special process conditions must be
handled which are not available in the built--in SIMVOX environment.
NOTE
For OpenVMS AXP, the SIMVOX software is distributed on 4mm tape. Customers can request
distribution on 8mm tapes or TK50 CompacTapes. The standard OpenVMS backup utility must
be used to restore the files from tape to disk.
The following serial card configuration instructions are specific for the DigiBoard manufactured
DigiCHANNEL PC/4 cards (ISA bus). Furthermore, the configuration of the serial card should
conform to whatever other devices are already included in the Workstation.
NOTE
Prior to installing the serial card, it must be configured. Configuring the serial card comprises the
following steps:
Note that with few exceptions, all the DigiBoard factory settings will be adequate for SIMVOX.
These are noted as follows. For hardware specific details, please refer to the DigiBoard
documentation you received with the serial card.
The factory setting for the serial card is 140h. This does not need to be changed. The status
register is the leftmost bank of rocker/dip switches on the serial card.
D switches 1--7 specify the address and should be (left to right for 140h)
ON OFF ON OFF ON ON ON
D Port 1 100h
D Port 2 108h
D Port 3 110h
D Port 4 118h
No change is required to the I/O port addresses. There are four banks of rocker/dip switches on
the serial card, next to the status register switches. For factory settings, these should be as
follows (left to right):
Port 1 ON OFF ON ON ON ON ON ON
Port 2 ON OFF ON ON ON ON OFF ON
Port 3 ON OFF ON ON ON OFF ON ON
Port 4 ON OFF ON ON ON OFF OFF ON
Note that switch 8 is the enable/disable switch for the port. It must always be ON.
Factory setting for the serial card is IRQ3. This must be changed. SIMVOX recommended
setting is IRQ5 (but this is dependent on existing devices and their use of the IRQ lines). Please
follow manufacturers instructions.
d. Jumper locations.
For the DigiBoard, you must configure two jumpers. These are the Odd/Even interrupt jumpers
and the Board Id jumper.
If the selected IRQ is even, then configure the even jumpers by placing the shunt on pins 2 & 3
of J1--8. If the selected IRQ is odd, then configure the odd jumpers by placing the shunt on pins
1 & 2 of J1--8.
The factory setting for the board ID is 0. No change is required for SIMVOX. SIMVOX
currently supports only 1 serial card for communications.
a. Double click on the control panel icon. This will display the control panel group. Now double
click on the Ports icon. The Ports dialog box will be displayed with the existing COM ports.
b. Press the Add push--button. The Advanced Setting for the New Port dialog box will be
displayed. The COM port number of the next available port will also be displayed. Select this
number.
c. Next enter the Base I/O port address of the COM port. This will be 100h, 108h, 110h and 118h
for the 4 ports, respectively.
d. Now specify the IRQ selected and configured on the serial card.
f. Press the OK push--button to add the COM port to the system. Windows NT will now prompt
you to reboot the system or not. Wait to reboot after all COM ports have been added. Add the
remaining 3 ports in the same manner, specifying their port number and port address. After this,
reboot the system.
NOTE:
Munger Company, Inc. does not support this feature
because of SIMVOXs inability to enforce strict timing
constraints on local area network communications. We
would appreciate any feedback of your success or
failure.
#
DECserver 200 Terminal Server V2.0 (BL29) -- LAT V5.1
DHM St. Louis Terminal Server #1
Local>
DTS1 is the terminal server name as configured in the DECnet node database. The server
expects a password at the #. The DECserver 200 default password is ACCESS.
From the Local prompt you need to set privilege as follows. The DECserver 200 default
password is SYSTEM:
Local> set privilege
Password>
Local>
The port that you wish to configure will probably have the following default settings:
Port 7:
Character Size: 8 Input Speed: 9600
Flow Control: XON Output Speed: 9600
Parity: None Modem Control: Disabled
Authorized Groups: 0
(Current) Groups: 0
Enabled Characteristics:
Port 7:
Authorized Groups: 0
Enabled Characteristics:
You must logout the newly configured port to get the new settings to take effect:
Local> logout port 7
Note the name of the port in the LIST PORT display above. In our example, the ports name is
PORT_7. You will need this information in the next section when you configure the VAX
port.
Next, determine the LAT node name of your terminal server. You can do this by typing the
following command:
Local> list server
DECserver 200 V2.0 BL29 LAT V5.1 ROM BL20 Uptime: 37 04:14:40
Service Groups: 0
Enabled Characteristics:
The servers name is shown in the Name: field of the display. Depending on how your system
manager has set up your server, this name may or may not be the same as the node name in the
DECnet database. In our example, the servers name is DTS1. You will need this information
in the next section.
If you connected to the server using NCP, logout of the server and exit NCP as follows:
Local> logout
Local --020-- Logged out port 49
NCP>exit
This example will create port LTA3. Note that VMS allows you to have LAT ports in the range
LTA0 thru LTA999. Because of the four character limitation for port ID in SIMVOX, only LTA0
thru LTA9 should be used. However, if this is not possible you can define any port in the given
range and then define a four character VMS logical name to point to the port. When specifying
the port ID in SIMVOX, you can now use the four character logical name.
To create a port you must run the LATCP program as follows:
$ set default sys$system
$ run latcp
LCP> exit
$
DTS1 is the terminal servers LAT node name, as shown in the LIST SERVER display from
the previous section. PORT_7 is the terminal server port name, as shown in LIST PORT
display from the previous section.
You must also configure the LAT terminal with notype_ahead and altypeahd, as in the
previous SIMVOX release, as follows:
$
The terminal configuration is complete.
To copy files from the distribution media to the hard disk, do the following:
a. From the Program Manager window, pull down the File menu and choose the Run option.
Complete the Run dialog box with:
a:instalit
a:\instalit
c. From the File Manager, select the drive that contains the SIMVOX diskette labeled 1. Then
double click on the instalit.exe file.
This procedure prompts you to specify the hard disk where SIMVOX will be located. It then
copies all the SIMVOX files to the SIMVOX directory, and creates the SIMVOX program group
and icon. When this procedure completes, SIMVOX software is installed.
Prior to modifying the Windows NT Registry, you must add the Registry Editor to your
Administrative Tools group. To do this, select the Administrative Tools group, and then perform
the File--New option. This will display the New Program Object dialog box. Select the Program
Item radio button, and press OK. This will display the Program Item Properties. Browse your
hard disk to locate the WINMSD.EXE file. It should be located in the Windows NT system32
directory.
Complete the Program Item Properties dialog box with WINMSD.EXE and press the OK
push--button. This will add the Registry Editor to your Administrative Tools group.
Now double click on the WinMSD icon. Select the Tools pulldown and select Registry Editor.
This will display the top level registry keys.
NOTE
a. Double click on the SYSTEM entry. This will display keys under System. One of these will be
CurrentControlSet.
b. Double click on CurrentControlSet. This will display keys under CurrentControlSet. One of
these will be Services.
c. Double click on Services. This will display a large number of keys. One of these will be
Serial.
d. Double click on Serial. This will display the Parameters key. Also, the Parameter keys will be
displayed. One of these keys will be RxFIFO, of type REG_DWORD, and value 0x8. To edit the
value for this key, double click on the key entry on the right side of the display. A dialog box will
be displayed prompting you to enter new data. Complete and save the dialog box with the value
0xE. Alternatively, you may first delete this key and then add it again with the value 0xE. To
delete the key, single click on RxFIFO so that the line is highlighted. Then select Edit--Delete
from the menu bar. This will delete the key. To add it back, select Edit--Add Value from the
menu bar and complete the dialog boxes. The value to specify must be 14 decimal or E hex.
e. Now double click on the Parameters key. This will display the keys for the four serial ports.
Single click on each serial key and the corresponding values will be displayed. For each serial
key, select the Edit--Add Value from the menu bar to add the following values:
NOTE
f. After adding values for all four ports, exit the Registry Editor. This will save the specified
values.
Select the Control Panel group and then select the System icon. This displays a dialog box with
various system settings. Press the Tasking... push--button to display the tasking parameters. In
this dialog box, specify Foreground and Background Applications Equally Responsive, and
press the OK push--button.
Press OK again in the System dialog box. This will save the new settings.
To install the VAX utilities from tape to your hard disk, follow these steps:
To copy files from the distribution media to the hard disk, follow these steps:
NOTE
Replace ddcn with the device name, controller letter, and unit number of the disk where
SIMVOX programs will reside. SIMVOX may be installed on any device in the VAX.
However, [SIMVOX] must be a root level directory.
Replace mmcn with the device name, controller letter, and unit number of the drive on which
SIMVOX distribution media will be mounted.
$ CREATE/DIR/PROT=(S:RWE,O:RWE,G:RWE,W:RWE) SIMVOX_DIR
$ ALLOCATE $DIST
$ MOUNT/FOR $DIST
8. Copy files from the distribution media to the SIMVOX directory by typing:
$BACKUP/REW/VER$DIST:SIMVOX.BCK/SAVE/SELECT=[SIMVOX_ALP.RELEASE...]*.* *.*
$ DISMOUNT $DIST
$ DEALLOCATE $DIST
$ @SIMVOX_INSTALL
11. Move the SIMVOX UID files to SYS$SHARE by invoking the command procedure,
SIMVOX_MOVE_UID.COM, as follows:
$ @SIMVOX_MOVE_UID
The following additional steps are required for SIMVOX installation each time the computer
system is booted and for proper functioning of communications between the VAX and the
Controller Device.
1. The user must now modify the system login and startup command procedures to insure that
SIMVOX is installed each time the system is booted. To accomplish this, edit
SYS$MANAGER:SYLOGIN.COM to include the following:
$ @SIMVOX_DIR:SIMVOX_LOGIN.COM
$ @ddcn:[SIMVOX]SIMVOX_INSTALL.COM
Replace ddcn with the device name, controller letter, and unit number of the disk where
SIMVOX programs reside.
2. It is recommended that the user dedicate serial ports for SIMVOX communiactions with the
controller device. These ports must be setup with typeahead disabled and alternate typeahead
enabled.
SYS4MANAGER:SYSTARTUP_VMS.COM should be edited to incorporate the following
commands for boot--up setup of serial ports.
Replace ttcn with the device name, controller letter, and unit number of the communication port.
3. The alternate typeahead buffer size should be at least 512 bytes. To check buffer size on your
system, do the following:
$ RUN SYS$SYSTEM:SYSGEN
This will give you the prompt SYSGEN>. At this prompt, enter the following:
The current buffer size is displayed by the system. If it is already 512 bytes, no changes are
required. The user may simply enter a CONTROL--Z and exit. If, however, the buffer size is
less than 512 bytes, the following commands must be entered to modify it:
SYSGEN> ^Z
If a change was required to the alternate typeahead buffer size, the user must reboot the
VAX/VMS computer operatting system.
In the final step of SIMVOX installation, it is the System Managers responsibility to issue user
accounts with the necessary privileges. From the SIMVOX standpoint, users accessing the
SIMVOX simulation tools should have the following minimum privileges:
3.5 Architecture/Installation
A Control Input/Output Card File is utilized to mount the E/I card. The first slot (left to right) of
the card file is reserved for the power connector card, the second slot for the primary
power/communication card, and the third slot for the secondary power/communication card.
The remaining 14 slots are reserved for I/O cards. Any one of the 14 slots may be used for the
E/I card; however, for ease of configuration, it is highly recommended that the E/I card be
mounted in card slot 14. Figure 3.2 shows the Control I/O Card File slot assignments.
Each card file on the system I/O bus must have a unique address. The power connection card
has a set of DIP switches which allow the user to assign an address to each card file. This
address should be assigned with power turned off. Figure 3.3 details the switch settings
corresponding to the various card file addresses. It is recommended that for SIMVOX use, the
user assign address 16 to the card file. Together with the E/I card being installed in card slot 14,
this scheme allows the user full flexibility in using File--Card--Channels in the remaining address
space with little obstruction from the E/I card.
The installation of power cables to the card file is beyond the scope of this manual. Please refer
to Fisher Controls Planning Notes for information on how to connect the power.
Connection of cable (I/O bus in Figure 3.1) from the controller to the power/communication card
in the I/O card file completes the hardware installation of the E/I card. The cable pinout used is
described in Section 3.6.
NOTE
DataHighway
SR 90 Controller
20 -- Series Controller
I / O Card
File
Interface Cable
I / O Bus
SIMVOX
FILE SWITCH
ADDRESS SETTINGS
4 3 2 1
1 O O O O
2 O O O C
3 O O C O
4 O O C C
5 O C O O O = OPEN
6 O C O C C = CLOSED
7 O C C O
8 O C C C
Ex. Address 8:
9 C O O O
10 C O O C 1
11 C O C O 2
12 C O C C 3
13 C C O O 4
14 C C O C CLOSED OPEN
15 C C C O
16 C C C C
NOTE
DataHighway
SR 90 Controller
I / O Card
File
SIMVOX
PLC3 SIMVOX
RS232
Channel 0 port
PLC5
DataHighway
1770 KF2 or
1785 KE/KF
RS232
SIMVOX
Modicon MODBUS:
RS232
Modicon SIMVOX
Special
cable
Modicon MODBUS +:
PLC PLC
MODBUS+ Special
Network cable
SIMVOX
The Modbus Plus cable is a special cable with two end node connectors, one on each end, or a
cable to place the SIMVOX workstation on the MODBUS+ network. This cable is available
from Modicon as the following part numbers:
97--9841--100 MBPlus 100 Foot Reel
97--9841--500 MBPlus 500 Foot Reel
97--9841--01K MBPlus 1000 Foot Reel
(For further information, refer to the Modicon Modbus Plus Network Planning and Installation
Guide)
RS232
TI565 SIMVOX
(NITP)
The E/I card has two 25--pin D--shell female connectors, for communication with various field
devices. With card mounted in the file, only the top connector may be used to communicate with
SIMVOX. For SIMVOX, the bottom connector is unusable.
The required pinout for cable between the SIMVOX Workstation and the control system
communication device is identical and is detailed in Figure 3.4a and Figure 3.4b. The only
exceptions to this rule are Modbus, Modbus+, and RS3 connectivity which are described below.
By installing a Communication Line Monitor in the cable between the PC and the E/I card, the
user can check line status. Figure 3.5 depicts the Quick Check status with both the PC and the
E/I card connected, and Figure 3.6 is the required pinout of the cable.
Modicon MODBUS:
Modicon MODBUS+:
If SIMVOX will be a node on the MODBUS + network with multiple PLCs then a cable with a
Terminating Connector (AS--MBKT--185) and an Inline Connector (AS--MBKT--085) will be
required. The Terminating Connector side of the cable is attached to the SIMVOX Workstation
and the inline connector side is attached to the MODBUS + network. If the SIMVOX
Workstation and PLC are directly connected, a cable with two terminating connectors will be
used.
RS3:
A special cable is used to connect the RS3 Comm Term Panels to the SIMDI Intelligent I/O card.
This cable is available from Munger Company, Inc. Please contact SIMVOX Tech Support for
information.
In this case, the Option 1 cable connects the SIMDI to RS3. Additionally, this external PC
connects to the SIMVOX Workstation via RS--232.
13
25
12
24
11
23
Data Terminal Ready 10
22
9 Signal Ground
21
8 Data Set Ready
20
7 Clear To Send
19
6 Request To Send
18
5 Received Data
17
4 Transmitted Data
16
3
15
2
14
1
2 3 E/I Card
3 2 IDI
4 VIOC
PLC3
Workstation 5
PLC5
6 TI565
20 GE
7 7 RS3 --Option 2
Figure 3.4b
Figure 3.5
E/I Card
PC IDI
VIOC
PLC3
PLC5
DB25 Pin DB25 Pin TI565
Female Pin Connections: Male GE
2 3 RS3
3 2
4
5
6
20
7 7
Figure 3.6
NOTE
In this section, an overview of the various menu systems is presented. The Tieback, Tags, and
Calculations subsystems are presented in greater detail in section 6.
D Communications
D Tools
D Simulation
D Help
Communications
The Communications sub menu of the SIMVOX main menu allows you to initiate and
terminate communications with the control system using one of the communication drivers
(PROVOX EIC, PROVOX IDI, PROVOX DM6004 VIOC, Allen Bradley PLC3, Allen Bradley
PLC5, Modicon MODBUS etc.). The following Communications options are provided:
1. Initiate;
2. Terminate; and
3. Speed.
The Initiate option is used to start communications with control hardware, e.g., EIC, IDI, VIOC,
Allen Bradley PLC3, Allen Bradley PLC5, Modicon MODBUS etc. on a specific dataset, based
on the driver selected. It displays a dialog box from which you can select the dataset, the COM
port to use and the Simulated I/O (SIO) file to use. This option is also available as a toolbar icon
labeled I.
The datasets are displayed in a dropdown list. A dataset is synonymous to data associated with a
single I/O communication driver. Your SIMVOX version may have one, four or more datasets.
Each dataset has independent communications control, and every dataset in active
communication allocates a port until communications are terminated. You cannot select a
dataset which already has communications active on it. If such a dataset is selected, the OK
push--button will be greyed.
The drivers are also displayed in a dropdown list. Only the drivers available in your version will
be usable. Files for other drivers may not exist or will be unusable.
The COM ports are also displayed in a dropdown list. Only the available COM ports are
displayed. Consequently, you cannot select a port that already has communications on it or is
being used by another process.
To successfully communicate data between SIMVOX and the control device, a simulated I/O file
is used. This I/O file describes the addressing configuration and
address types for the simulated dataset. Except for PROVOX EIC, IDI and DM6004 VIOC (for
which the simulated I/O file is binary with an unpublished format) the SIO file can be created
using any text editor. However, the SIO files must be in a specified format in order for them to
be read correctly. This format is different for different drivers. Directory names and filenames
can be directly entered in the available fields or available directories can be browsed by pressing
the Browse push--button.
The Process Speed effects the scaling time of processed events which use Integration. Its default
value is 1.00 indicating that the process will run real--time. A speed of 2.00 indicates that the
process will be running twice as fast.
The Status field displays the current communication status of the selected dataset i.e. Active or
Inactive. It is not editable.
After completing the displayed dialog box, you must press the OK push--button for
communications to start.
When communications are started, a separate process is created. This process will have a name
based on the driver. For example, an EIC process will be called EIC--n, where n is the dataset.
Under Windows NT, this process has its own window and it continues to run in the background
performing communications with the controller. You can double click on the Process icon to get
its window. The current communications status for the dataset is displayed in the window. You
can minimize the window and send it to the desktop without affecting communications.
Terminating this process will terminate communications. Under OpenVMS, this process is
detached and runs in the background without a window.
The Terminate communications option first determines if there are any communication
processes active. If none are found, it posts a message that no communications are active.
Alternatively, it displays datasets which have active communications processes, in a dropdown
list,. You must select one and then press the OK push--button to terminate communications.
After communications are established, the Speed option can be used to adjust the process speed.
Tools
The following Tools options are provided:
1. SIO Generate;
2. Control Device Tieback Generate;
3. Non Control Tags Generate; and
4. Modify SIO.
Note that these tools are specifically designed for Fisher--Rosemount ENVOX and Proflex
configuration platforms only. For RS3, tools are being developed to extract configurations from
the ConfiguWrite system. For PLC systems, and external Convert utility exists which takes
spreadsheet configuration data into SIMVOX readable files.
The SIO Generate, Control Device Tieback Generate, and Non Control Tags Generate
options allow you to first select ENVOX or PROFLEX as the DCS configuration source .
For ENVOX, SIO Generate, Control Device Tieback Generate, and Non Control Tags
Generate depend on a network link between the NT workstation and the VAX/VMS workstation
where the ENVOX Sybase database is located. On the NT workstation, the Sybase Net Library
software must be present. On the VAX/HP system, the appropriate TCP/IP Network software
must be present such that the NT workstation can access the Sybase database. With this link
present, the SIMVOX tools directly read the ENVOX databases (and corresponding devices), for
I/O information, Discrete Control Device and Loop information, and AI, AO, DI, DO and PCI
object information. The read data is written to text files in the NT workstation in a specific
format, ready to be loaded into the SIMVOX environment.
If the Network link between the NT workstation and the VAX/HP system is not present, 3
VAX/HP resident utilities are provided with SIMVOX which perform the same tools functions.
These utilities (which reside on the OpenVMS/OpenVMS AXP/HP system) are TBGEN.EXE
(for Tieback files), PNTGEN.EXE (for Tags files) and SIOGEN.EXE. They allow you to select
the ENVOX database, and the PROVOX device, from which configuration data is read and a
target file created. Target files are ASCII, CDV for control devices (Tiebacks) and non--control
devices (Tags). For SIO, the target file is binary (non printable). The created SIO, Tieback or
Tags files can be transferred to the NT Workstation using Kermit, FTP or any other file transfer
program.
For PROFLEX, you can specify the controller device definition file, which SIMVOX will read
and then parse out the necessary information. A log file will be created with any errors found.
The format of SIO files, Tieback files, and Tags files created from either ENVOX or PROFLEX
is identical. After generation, these files are ready to be loaded into SIMVOX for simulation.
The Control Device Tieback Generate option is discussed fully in Section 6.1.2.
The Non Control Tags Generate option is discussed fully in Section 6.1.3.
The Modify SIO option allows you to create a new SIO file or to edit an existing file which was
created at the VAX/HP level. When the option is selected, a separate window is opened, into
which, you can load existing files or open blank sheets to create new Simulation I/O
configurations. Please refer to section 4.2 for details regarding the Modify SIO window. With the
exception of IDI block data, all other EIC, IDI and VIOC simulated I/O data is editable. For IDI
block data, it is recommended that you use the host resident utilities as discussed above.
Simulation
The Simulation options allow you to manage the tieback and model processes. The following
Simulation options are provided:
1. Start Model;
2. Stop Model;
3. Calculations;
4. Control Device Tieback;
5. Non Control Tags;
6. Manipulate by Channel;
7. Training Manager; and
8. Launch Application.
The Start Model option allows you to select an external program to run under the SIMVOX
environment. The program selected is executed as a detached process. Such a program may be
existing code which has been ported to the Workstation, or it may be a program written to handle
special process conditions not available in the built--in SIMVOX environment.
When selected, this option displays a dialog box which requires you to specify the Directory and
File name of the executable model to start. You can browse available directories and filenames
by pressing the Browse push--button. Also, the dataset to be attached to must be specified. All
datasets available on your version are displayed in a dropdown list. You may select none, one or
any number for the subject program to attach to. When the program is started, the selected
datasets are formatted into the command line which the program can retrieve to determine which
datasets it must attach to. Please refer to the Programming API for detailed information on this.
The Stop Model option first determines if there are any simulation processes active. If none are
found, it posts a message that no models are active. Alternatively, it displays a dropdown list of
active models. You must select one and then press the OK push--button to terminate it.
The Calculations option allows you to Add, Modify, Delete, View, and control user defined
calculations by tag. Calculations are mathematical expressions based on Process and Control
variables which evaluate into values. When the option is selected, a
separate window is opened, into which, you can load existing calculations files or open blank
sheets to create new calculations. Please refer to Section 4.5 and 6.1.4 for details regarding the
Calculations window. This option is also available from the Toolbar as an icon labeled C.
The Control Device Tieback option allows you to open tieback files created from the ENVOX
database, and to View and control individual tieback objects by tag. Specifically, tieback objects
are Discrete Control Devices and Loops. These tieback objects can be individually controlled to
have personalities. When the option is selected, a separate window is opened, into which you can
load existing tieback files. Please refer to Sections 4.3 and 6.1.2 for details regarding the Tieback
window. This option is also available from the Toolbar as an icon labeled TB.
The Non Control Tags option allows you to open tags files created from the ENVOX database,
and to Add, Modify, Delete, View and control individual tag objects. Specifically, tag objects are
Analog Inputs, Analog Outputs, Discrete Inputs, Discrete Outputs and Pulse Count Inputs. These
tag objects can be individually controlled to have personalities. When the option is selected, a
separate window is opened, into which you can load existing tags files or open a blank sheet to
create new tag objects. Please refer to Sections 4.4 and 6.1.3 for details regarding the Tags
window. This option is also available from the Toolbar as an icon labeled TAGS.
The Manipulate by Channel option allows you to open datasets and view/control data at the
lowest level. When the option is selected, a separate window is opened from which you can open
one or all four datasets. The simulated I/O in SIMVOX can be modified using the channel
values. Channel corresponds to an I/O channel in PROVOX; an I/O/N register in Allen Bradley;
a coil, discrete input, input register, holding register in Modicon; and a WX, WY, X or Y register
in TI. The values of Analog Inputs, Discrete Inputs, Weigh scales and other types are displayed
and can be directly edited. Please refer to Section 4.6 for details regarding the Manipulate
window. This option is also available from the Toolbar as an icon labeled M.
The Training Manager option is a training tool used to setup complex field scenarios. Once a
scenario is started it executes a list of macros that simulate various failures and actions. The
operator trainee responds/reacts to failures and actions injected into the process by scenarios.
This option is also available from the Toolbar as an icon labeled Training. While scenarios are
active, the Event Logger captures operator actions into a text file. This log is useful for training
purposes to identify deficiencies in operator responses and recording operator ability/compliance
to Standard Operating Procedures for regulatory purposes.
The Launch Application option allows you to run any external program (not related to
SIMVOX) by selecting the filename from the list of available directories.
Help
The following Help options are provided:
1. Help; and
2. About.
The Help option allows you to access the SIMVOX on--line help. Much of the information in
this document is also included in the on--line help.
The About option displays the About box. The SIMVOX revision level, licensee and serial
number information is included here.
Exit
The following Exit options are provided:
The To Command Prompt option opens a command prompt window, allowing you to perform
MS--DOS commands under Windows NT.
The SIMVOX option will terminate SIMVOX and close the window. Note that if any of the
other SIMVOX windows were opened, e.g., Tags, Tieback, Calculations, etc., they will continue
working regardless of the main menu window being inactive. However, the main menu window
must stay running if SIMVOX data is being accessed via DDE by other applications.
1. File
2. Edit; and
3. Help
File
Under File, the available options are:
1. New;
2. Open;
3. Save;
4. Save As; and
5. Exit.
The New option allows you to open a blank sheet. This opens a child window under the Modify
window entitled new.sio. Once opened, you can specify a simulated I/O configuration using the
Edit pull--down or by using the Toolbar icons.
The Open option allows you to open an existing SIO file for editing. This opens a child window
under the Modify window with the file name as its title. Once opened, you can edit the simulated
I/O configuration using the Edit pull--down or by using the Toolbar icons.
The Save option allows you to save the file to disk. The contents of the window are saved in the
SIO format on disk. The window is left open.
The Save As option allows you to save the open file to disk and give it a new name. Again, the
window remains open. To shut a child window, simply double click on the top left corner of the
child window.
The Exit option exits Modify SIO and the main window and all child windows are shut down.
Edit
Under Edit, the available options are:
1. Add Channels;
2. Delete Channels;
3. Cut;
4. Copy;
5. Paste;
6. Undo; and
7. Dialog.
The Add Channels option allows you to add new channels to the SIO file. It can either define a
single channel or a range of I/O channels on a single I/O card. When selected, a dialog box is
displayed, where platform specific data can be specified. The File field is used to select the I/O
file for the operation. The valid range for I/O files is between 1 and 16. The Card field is used to
select the I/O card for the operation. The Channel field supports a variety of ways to specify a
channel range for EIC and IDI I/O file types. VIOC types do not utilize this field. Cards may be
defined or redefined by selecting the * in the channel field and selecting a type. For example,
for PROVOX, the file, the card, and the channel numbers must be specified in addition to the
channel types. Channel types are available in a drop down list. Note that the dropdown list is
context sensitive, i.e., if a card has been defined as analog, the list does not present you with
discrete channel types. Additionally, the Modify process enforces channel mixing rules from a
platform specific standpoint.
The Delete Channels option allows you to delete existing channel definitions from the SIO file.
When selected, a dialog box is displayed, where platform specific data can be specified. For
example, for PROVOX, the file, the card, and the channel numbers must be specified.
The Cut option allows you to cut a card definition from the specified location. You must select
the card to cut first. To select a card, simply click on the card number column heading. The
selected card will be highlighted. Once cut, the data is saved in an internal buffer and can be
pasted at a new location. Again you must select the paste location before pasting.
The Copy option simply copies the selected card into an internal buffer. The buffer may be
pasted any number of times in subsequently selected card locations.
The Paste option pastes the internal buffer in the selected location.
Lastly, the Dialog option activates a dialog box, giving all the I/O block information (which has
already been defined for the card).
Help
Under Help, the available options are:
1. Help; and
2. About.
The Help option allows you to access the Modify SIO on--line help. Much of the information in
this document is also included in the on--line help. Additional details regarding Toolbar icons are
also provided.
The About option displays the About box. The Modify revision level, licensee and serial number
information is included here.
4.3 Tieback
When this option is selected, the Tieback program is started and the tieback main window is
displayed. At the top of this window is the menu bar and immediately below it is the Toolbar.
Much of the functionality provided by the menu bar options is also provided by icons on the
Toolbar with a single mouse click.
Note that only one main Tieback program need be started. Within the main window of the
tieback, you can open a child window for each dataset. Opening multiple tieback programs will
result in data loss and unpredictable window events.
1. File;
2. Edit;
2. Tools; and
3. Help.
File
Under File, the available options are:
1. New;
2. Open;
3. Close;
4. Save;
5. Save As;
5. Save All; and
6. Exit.
The New option allows you to open a blank sheet for a given dataset. A dialog box will be
displayed, where you can specify the target dataset. Only the available datasets, i.e., datasets
which do not currently have a file open will be available to select from. The communications
platform that this tieback file will be using also needs to be specified. Available platforms are
displayed in a dropdown list. The child windows displayed will not have any Discrete Control
Device or Loop objects in them. You can, however, use the Edit--Add pulldown menu option to
add Discrete Control Device or Loop objects to the child window. The titles of these blank child
windows will be as follows:
The Open option allows you to open a tieback file for a given dataset. A dialog box will be
displayed, where you can specify the target dataset and the tieback file to open. Only the
available datasets, i.e., datasets which do not currently have a file open will be available to select
from. You can either directly enter the directory and file name into the dialog box fields or use
the Browse button to select from available files on disk.
After completing the dialog box, press the OK push--button to load the selected file into the
selected dataset. This opens two child windows under the main Tieback window. One for
Discrete Control Device objects, and the other for Loop objects. The titles of these child
windows will be as follows:
Opening a tieback on a dataset whose simulated I/O file does not match the addresses for the
Discrete Control Device and Loop tags will result in a communications error with the tieback
program. The type of tieback file loaded must match the communications type on that dataset.
Once opened, the Discrete Control Device and Loop object data is displayed in a
spreadsheet--like form. Each row corresponds to a single object. To allow multiple child
windows on the screen without forming a clutter, each child window only displays 10 objects at
a time. Of course, you can scroll within each child window to view records as necessary.
The top right corner of each child window has the maximize and minimize buttons. By pressing
the minimize button, the child window can be reduced to an icon, and placed at the bottom of the
main tieback window. You can drag the icon and move it to improve the visibility as necessary.
Double clicking on the icon will restore the child window to its original dimensions.
The top left corner of the child window contains the System menu options for the window.
Double clicking on it will close the window.
As mentioned, each tieback file is loaded into a pair of child windows. Closing one will close the
other as well.
After loading the tieback into a dataset, there is a 15 second delay. After this delay, the tieback
process starts resolving the Discrete Control Device and Loop objects on a 1 second scan. Each
Discrete Control Device and Loop can be defined to have it own scan rate. In addition, you can
take individual objects off--line. Off--line objects are not resolved at all. Additional detail of
tieback control is provided in section 6.1.2.
All 4 datasets can be loaded into child windows. It is not necessary to start additional Tieback
programs. In fact, doing so will give unpredictable results.
The Close option allows you to close all open dataset child windows. To close a single dataset,
double click on the top left corner of the Discrete Control Device or Loop window for that
dataset. When either window for a particular dataset closes, other processes in the system, i.e.
Tags, Calculations, Tiebacks in other datasets will fail when they try to reference Discrete
Control Devices/Loops in the now closed dataset. Note that selecting Close will close the
Discrete Control Device and Loop windows on ALL datasets.
The Save option allows you to save open tieback files to disk. If there is only one dataset open,
Save will write its window contents to the disk file. If more than one dataset is open, a dialog
box will be displayed, prompting you to select which dataset to save. When the file is saved, the
original contents of the file are lost, i.e., no backup file is created. The window is left open.
The Save As option allows you to save the open file to disk and give it a new name. Again, the
window remains open. To shut a child window, simply double click on the top left corner of the
child window.
The Save All option allows you to save all the open files to disk.
Note that changes made to the tieback file via the Notepad application, or other text editor, while
the dataset is still open will be overwritten with data from the dataset when the save options are
used.
The Exit option terminates the Tieback and the main window and all child windows are shut
down.
Edit
Under Edit, the available options are:
1. Add;
2. Modify; and
3. Delete.
The Add option can be selected when a new dataset child window (blank sheet) is opened as
well as to add new objects to existing tieback files in open child windows.
When selected, a dialog box is displayed from where you must select the dataset and the tieback
object (Discrete Control Device, Loop or Template) to be added. Only the available datasets, i.e.,
datasets which currently have open child windows will be available to select from. Additionally,
the tag type must be selected by clicking on the appropriate radio button. The default object is
Discrete Control Device. After selecting the tieback object, press the OK push--button.
Depending on the type selected, a dialog box will be displayed. Completing this dialog box and
pressing the OK push--button will add the tieback object to the child window. (Look at Section
6.1.2.3 -- Discrete Control Device Detail Dialog and Section 6.1.2.5. -- Loop Detail Dialog for
details on completing the dialog box)
Now you can elect to add another tieback object of the same type or select a different type.
When you are done adding tieback objects, simply press the Done push--button to return to the
child window display.
The Modify option can be selected to modify an existing tieback object. When selected, a dialog
box is displayed from where you must select the dataset and the tieback object to be modified.
Only the available datasets, i.e., datasets which currently have open child windows will be
available to select from. Also, the tieback object must be selected by clicking on the appropriate
radio button. The default tieback object is Discrete Control Device. Now you can press the OK
push--button. Depending on the tieback object selected, a dialog box will be displayed.
In this dialog box, you will be able to select, by tag, the object you want to modify. The tags will
be available in a dropdown list. Picking a specific tag will display the object details. Now you
can modify the object fields. You can either Save this object or clone it by using the Save As
button. To save the object, simply press the Save button. If you press the Save As button, a
dialog box will be displayed. In this dialog box, simply enter a new tag and, if the new object is
for a different dataset, specify the new dataset. Now press the OK push--button. SIMVOX will
check for valid tag and valid I/O address before adding the object to the database. Duplicate tags
within the same dataset are not allowed. If the new object passes these tests, it will be displayed
in the appropriate datasets child window.
Now you can elect to modify another tieback object of the same type or select a different type.
When you are done modifying tieback objects, simply press the Done push--button to return to
the child window display.
The Delete option is available only when an entire dataset is off--line. This is because the on--line
nature of objects (interdependence) would otherwise be disrupted. For example, a Loop may be
tracking the value of a tieback object. This link is created when the objects are loaded into child
windows. Subsequent deletion of that tieback object without reloading and reestablishing the
links will give unpredictable results. It is recommended, therefore, that object deletions be
performed with caution.
To delete an object, first take the dataset off--line. This is done from a Toolbar icon. Please refer
to the on--line help for details. Selecting the dataset on/off--line button will display a dialog box.
Select the dataset and then the off--line radio button. Press OK to take the tieback objects for the
entire dataset off--line.
Now select the Delete option. This will display a dialog box from where you can select the
dataset, the tieback object to delete. The tags of the selected tieback object are displayed in a
dropdown list. You can select a specific tag and then press the OK push--button. This will
remove the object from the SIMVOX database, and delete it from the datasets child window.
When you are done deleting, press the Done push--button. This will reload the tieback objects
into the child windows. Note that this does not currently reload other objects, i.e., Tags or
calculations. You must perform that function manually to ensure that the dynamic links are
properly resolved.
Tools
1. Select;
2. Scan On/Off;
3. Reset; and
4. Document.
The Select option allows you to perform searches on tags by specifying specific tags or partial
tags. The specified tag or partial tag is matched with loaded data and the result (matching tags)
are displayed. The * (asterisk) is a wild card. It may be used to prepend or append a series of
letters. For example:
For Tiebacks, you can perform the search for Discrete Devices or Loops by using either a partial
tag substring.
The Scan On/Off option allows you to take an entire dataset Online or Offline. Note that this
does not automatically lock the individual tags. A dataset must be Offline for the Edit--Delete to
be available.
The Reset option allows you to reinitialize the I/O and dynamic links of an entire dataset. All
tags are initialized to their individual initial values and all dynamic links to other tags are
resolved.
The Document option allows you to create and print a document file comprising the tags and
their dependencies for an entire dataset.
Help
Under Help, the available options are:
1. Help; and
2. About.
The Help option allows you to access the Tieback on--line help. Much of the information in this
document is also included in the on--line help. Additional details regarding Toolbar icons are also
provided.
The About option displays the About box. The Tieback revision level, licensee and serial
number information is included here.
4.4 Tags
When this option is selected, the Tags program is started and the tags main window is displayed.
At the top of this window is the menu bar and immediately below it is the Toolbar. Much of the
functionality provided by the menu bar options is also provided by icons on the Toolbar with a
single mouse click.
Note that only one main Tags program need be started. Within the main window of the Tags, you
can open a child window for each dataset. Opening multiple tags programs will result in data
loss and unpredictable window events.
1. File;
2. Edit;
2. Tools; and
3. Help.
File
Under File, the available options are:
1. New;
2. Open;
3. Close;
4. Save;
5. Save As;
6. Save All; and
7. Exit.
The New option allows you to open a blank sheet for a given dataset. A dialog box will be
displayed, where you can specify the target dataset. Only the available datasets, i.e., datasets
which do not currently have a file open will be available to select from. Also, the
communications platform that this tags file will be using needs to be specified. Available
platforms are displayed in a dropdown list. The child window displayed will not have any tag
objects in it. You can, however, use the Edit--Add pulldown menu option to add tag objects to the
child window. The title of the blank child window will be as follows:
The Open option allows you to open an existing tags file for a given dataset. A dialog box will
be displayed, where you can specify the target dataset and the tags file to open. Only the
available datasets, i.e., datasets which do not currently have a file open will be available to select
from. You can either directly enter the directory and file name into the dialog box fields or use
the Browse button to select from available files on disk.
After completing the dialog box, press the OK push--button to load the selected file into the
selected dataset. This opens a child window under the main Tags window. The title of this child
window will be as follows:
Once opened, the Tag object data is displayed in a spreadsheet--like form. Each row corresponds
to a single object. You can scroll within each child window to view records. Vertical scroll bars
are provided so that data, hidden from view, at the bottom of the spreadsheet, can be displayed.
Object data, hidden from view, on the right side of the spreadsheet, can be displayed by scrolling
horizontally.
The top right corner of each child window has the maximize and minimize buttons. By pressing
the minimize button, the child window can be reduced to an icon, and placed at the bottom of the
main Tags window. You can drag the icon and move it to improve the visibility as necessary.
Double clicking on the icon will restore the child window to its original dimensions.
The top left corner of the child window contains the System menu options for the window.
Double clicking on it will close the window.
After loading the tags into a dataset, there is a 15 second delay. After this delay, the tags process
starts resolving the modeling defined for the tag objects on a 1 second scan. Each object can be
defined to have it own scan rate. You can also take individual objects off--line. Off--line objects
are not resolved at all. Additional detail of tag control is provided in section 6.1.3.
All 4 datasets can be loaded into child windows. It is not necessary to start additional Tag
programs. In fact, doing so will give unpredictable results.
The Close option allows you to close all open dataset child windows. To close a single dataset,
double click on the top left corner of the window for that dataset. Selecting Close will close the
windows of ALL the datasets. Closed windows mean that the tag objects are not loaded and
therefore, not being modeled.
The Save option allows you to save open tags files to disk. If there is only one dataset open,
Save will write its window contents to the disk file. If more than one dataset is open, a dialog
box will be displayed, prompting you to select which dataset to save. When the file is saved, the
original contents of the file are lost, i.e., no backup file is created. The window is left open,
however.
The Save As option allows you to save the open file to disk and give it a new name. Again, the
window remains open. To shut a child window, simply double click on the top left corner of the
child window.
The Save All option allows you to save all open files to disk.
Note that changes made to the tags file via the Notepad application, or other text editor, while the
dataset is still open will be overwritten with data from the dataset when the save options are
used.
The Exit option terminates the Tags process and the main window is shut down, including all
child windows.
Edit
Under Edit, the available options are:
1. Add;
2. Modify; and
3. Delete.
The Add option can be selected when a new dataset child window (blank sheet) is opened as
well as to add new objects to existing tag files in open child windows.
When selected, a dialog box is displayed from where you must select the dataset and the tag type
of the object to be added. Only the available datasets, i.e., datasets which currently have open
child windows will be available to select from. Additionally, the tag type must be selected by
clicking on the appropriate radio button. The different type of tags that can be added are Analog
Input, Analog Output, Discrete Input, Discrete Output, and Pulse Count Input. The default tag
type is Analog Input. After selecting the tag type, press the OK push--button. Depending on the
tag type selected, a dialog box will be displayed. Completing this dialog box and pressing the
OK push--button will add the tag to the child window. (Look at Section 6.1.3.3. -- Tag Detail
Dialog for details on completing the dialog box)
Now you can elect to add another tag of the same type or select a different type. When you are
done adding tag objects, simply press the Done push--button to return to the child window
display.
The Modify option can be selected to modify an existing tag object. When selected, a dialog
box is displayed from where you must select the dataset and the tag type of the object to be
modified. Only the available datasets, i.e., datasets which currently have open child windows
will be available to select from. The tag type must also be selected by clicking on the appropriate
radio button. The default tag type is Analog Input. After selecting the tag type, press the OK
push--button. Depending on the tag type selected, a dialog box will be displayed.
In this dialog box, you will be able to select, by tag, the object you want to modify. The tags will
be available in a dropdown list. Picking a specific tag will display the object details. Now you
can modify the object fields. You can either Save this object or clone it by using the Save As
button. To save the object, simply press the Save button. If you press the Save As button, a
dialog box will be displayed. In this dialog box, simply enter a new tag and, if the new object is
for a different dataset, specify the new dataset. Now press the OK push--button. SIMVOX will
check for valid tag and valid I/O address before adding the object to the database. Duplicate tags
and I/O addresses within the same dataset are not allowed. If the new object passes these tests, it
will be displayed in the appropriate datasets child window.
Now you can elect to modify another tag of the same type or select a different type. When you
are done modifying tag objects, simply press the Done push--button to return to the child window
display.
The Delete option is available only when an entire dataset is off--line. This is because the on--line
nature of objects (interdependence) would otherwise be disrupted. For example, a Loop may be
tracking the value of a tag object. This link is created when the objects are loaded into child
windows. Subsequent deletion of that tag object without reloading and reestablishing the links
will give unpredictable results. It is recommended, therefore, that object deletions be performed
with caution.
To delete an object, first take the dataset off--line. This is done from a Toolbar icon. Please refer
to the on--line help for details. Selecting the dataset on/off--line button will display a dialog box.
Select the dataset and then offline radio button. Press OK to take the tag objects for the entire
dataset off--line.
Now select the Delete option. This will display a dialog box from where you can select the
dataset, the tag type to delete and the object to delete. The tags of the selected tag type are
displayed in a dropdown list. You can select a specific tag and then press the OK push--button.
This will remove the object from the SIMVOX database, and delete it from the datasets child
window.
When you are done deleting, press the Done push--button. This will reload the tag objects into
the child window. Note that this does not currently reload other objects, i.e., Discrete Control
Device and Loop, or calculations. You must perform that function manually to ensure that the
dynamic links are properly resolved.
Tools
Under Tools, the available options are:
1. Select;
2. Scan On/Off;
3. Reset; and
4. Document.
The Select option allows you to perform searches on tags by specifying specific tags or partial
tags. The specified tag or partial tag is matched with loaded data and the result (matching tags)
are displayed. The * (asterisk) is a wild card. It may be used to prepend or append a series of
letters. For example:
For Tags, you can perform the search for a particular type of tag, e.g., AI, AO, etc., using either a
partial tag substring or a partial strategy substring.
The Scan On/Off option allows you to take an entire dataset Online or Offline. Note that this
does not automatically lock the individual tags. A dataset must be Offline for the Edit--Delete to
be available.
The Reset option allows you to reinitialize the I/O and dynamic links of an entire dataset. All
tags are initialized to their individual initial values and all dynamic links to other tags are
resolved.
The Document option allows you to create and print a document file comprising the tags and
their dependencies for an entire dataset.
Help
Under Help, the available options are:
1. Help; and
2. About.
The Help option allows you to access the Tags on--line help. Much of the information in this
document is also included in the on--line help. Additional details regarding Toolbar icons are also
provided.
The About option displays the About box. The Tags revision level, licensee and serial number
information is included here.
4.5 Calculations
When this option is selected, the Calculations program is started and the Calculations main
window is displayed. At the top of this window is the menu bar and immediately below it is the
Toolbar. Much of the functionality provided by the menu bar options is also provided by icons
on the Toolbar with a single mouse click.
Note that only one main Calculations program need be started. Within the main window of the
Calculations, you can open a child window for each dataset. Opening multiple Calculations
programs will result in data loss and unpredictable window events.
1. File;
2. Edit;
3. Tools; and
4. Help.
File
Under File, the available options are:
1. New;
2. Open;
3. Close;
4. Save;
5. Save As;
6. Save All; and
7. Exit.
The New option allows you to open a blank sheet for a given dataset. A dialog box will be
displayed, where you can specify the target dataset. Only the available datasets, i.e., datasets
which do not currently have a file open will be available to select from. The child window
displayed will not have any calculation objects in it. You can, however, use the Edit--Add
pulldown menu option to add calculation objects to the child window. The title of the blank child
window will be as follows:
The Open option allows you to open an existing calculations file for a given dataset. A dialog
box will be displayed, where you can specify the target dataset and the calculations file to open.
Only the available datasets, i.e., datasets which do not currently have a file open will be available
to select from. You can either directly enter the directory and file name into the dialog box fields
or use the Browse button to select from available files on disk.
After completing the dialog box, press the OK push--button to load the selected file into the
selected dataset. This opens a child window under the main Calculations window. The title of
this child window will be as follows:
Once opened, the Calculations object data is displayed in a spreadsheet--like form. Each row
corresponds to a single object. You can scroll within each child window to view records which
are not visible. For this vertical scroll bars are provided. Object data, hidden from view, on the
right side of the spreadsheet, can be displayed by scrolling horizontally.
The top right corner of each child window has the maximize and minimize buttons. By pressing
the minimize button, the child window can be reduced to an icon, and placed at the bottom of the
main Calculations window. You can drag the icon and move it to improve the visibility as
necessary. Double clicking on the icon will restore the child window to its original dimensions.
The top left corner of the child window contains the System menu options for the window.
Double clicking on it will close the window.
After loading the calculations into a dataset, there is a 15 second delay. After this delay, the
Calculations process starts resolving the expressions defined for the objects on a 1 second scan.
Each object can be defined to have it own scan rate. You can also take individual objects
off--line. Off--line objects are not resolved at all. Additional detail of calculation control is
provided in section 6.1.4.
All 4 datasets can be loaded into child windows. It is not necessary to start additional Calculation
programs. In fact, doing so will give unpredictable results.
The Close option allows you to close all open dataset child windows. To close a single dataset,
double click on the top left corner of the calculation window for that dataset. Selecting Close
will close the calculation windows for ALL the datasets. Closed windows means that the
calculation objects are not loaded and therefore, not available to other subsystems in SIMVOX.
The Save option allows you to save open calculations files to disk. If there is only one dataset
open, Save will write its window contents to the disk file. If more than one dataset is open, a
dialog box will be displayed, prompting you to select which dataset to save. When the file is
saved, the original contents of the file are lost, i.e., no backup file is created. The window is left
open, however.
The Save As option allows you to save the open file to disk and give it a new name. Again, the
window remains open. To shut a child window, simply double click on the top left corner of the
child window.
The Save All option allows you to save all open files to disk.
Note that changes made to the calculations file via the Notepad application, or other text editor,
while the dataset is still open will be overwritten with data from the dataset when the save
options are used.
The Exit option terminates the Calculations process and the main window is shut down,
including all child windows.
Edit
Under Edit, the available options are:
1. Add;
2. Modify; and
3. Delete;
The Add option can be selected when a new dataset child window (blank sheet) is opened as
well as to add new objects to existing calculation files in open child windows.
When selected, a dialog box is displayed where you must enter the details of the new calculation
to be added. (The data fields to be entered are described in detail in Section 6.1.4.3). Only the
available datasets, i.e., datasets which currently have open child windows will be displayed.
After completing the dialog box, you can press the OK push--button. This will add the
calculation to the child window.
The Modify option can be selected to modify an existing calculation object. When selected, a
dialog box is displayed from where you must select, by tag, the object you want to modify. The
tags will be available in a dropdown list. Picking a specific tag will display the object details.
Now you can modify the object fields. You can either Save this object or clone it by using the
Save As button. To save the object, simply press the Save button. If you press the Save As
button, a dialog box will be displayed. In this dialog box, simply enter a new tag and, if the new
object is for a different dataset, specify the new dataset. Now press the OK push--button.
SIMVOX will check for valid tag before adding the object to the database. Duplicate tags within
the same dataset are not allowed. If the new object passes this test, it will be displayed in the
appropriate datasets child window.
The Delete option is available only when an entire dataset is off--line. This is because the on--line
nature of objects (interdependence) would otherwise be disrupted. For example, a Loop may be
tracking the value of a calculation object. This link is created when the objects are loaded into
child windows. Subsequent deletion of that calculation object without reloading and
reestablishing the links will give unpredictable results. It is recommended, therefore, that object
deletions be performed with caution.
To delete an object, first take the dataset off--line. This is done from a Toolbar icon. Please refer
to the on--line help for details. Selecting the dataset on/off--line button will display a dialog box.
Select the dataset and then the offline radio button. Press OK to take the calculation objects for
the entire dataset off--line.
Now select the Delete option. This will display a dialog box from where you can select, by tag,
the object to delete. The tags in the selected dataset are displayed in a dropdown list. You can
select a specific tag and then press the OK push--button. This will remove the object from the
SIMVOX database, and delete it from the datasets child window.
When you are done deleting, press the OK push--button. This will reload the calculation objects
into the child window. Note that this does not currently reload other objects, i.e., Discrete
Control Device and Loop, or Tags. You must perform that function manually to ensure that the
dynamic links are properly resolved.
Tools
Under Tools, the available options are:
1. Select;
2. Scan On/Off;
3. Reset; and
4. Document.
The Select option allows you to perform searches on tags by specifying specific tags or partial
tags. The specified tag or partial tag is matched with loaded data and the result (matching tags)
are displayed. The * (asterisk) is a wild card. It may be used to prepend or append a series of
letters. For example:
The Scan On/Off option allows you to take an entire dataset Online or Offline. Note that this
does not automatically lock the individual tags. A dataset must be Offline for the Edit--Delete to
be available.
The Reset option allows you to reinitialize the I/O and dynamic links of an entire dataset. All
tags are initialized to their individual initial values and all dynamic links to other tags are
resolved.
The Document option allows you to create and print a document file comprising the tags and
their dependencies for an entire dataset.
Help
Under Help, the available options are:
1. Help; and
2. About.
The Help option allows you to access the Calculations on--line help. Much of the information in
this document is also included in the on--line help. Additional details regarding Toolbar icons are
also provided.
The About option displays the About box. The Calculations revision level, licensee and serial
number information is included here.
1. Options;
2. Tools;
3. Functions; and
4. Help.
Options
Under Options, the available options are:
1. New Dataset;
2. Update Rate; and
3. Exit.
The New Dataset option allows you to open a dataset child window under the Manipulate main
window. Prior to opening the child window, a dialog box is presented where you can select the
dataset. It is assumed that you started communications on the selected dataset prior to opening
the dataset for data manipulation. Consequently, the child window will be titled as follows:
[filename.sio] Dataset n
where filename.sio is the file you used to start communications with and n is the dataset number.
The data displayed in the child window is formatted as dictated by the SIO file used for the
dataset. You can use the keyboard arrow keys to navigate the rows and columns of data
displayed or use the mouse to position the cursor on a specific cell. Only the input channels, e.g.,
Analog Inputs and Discrete Inputs will be editable. The Output channels are controlled by the
controller. You can, however, move the cursor to an output channel and edit a value in. The value
is discarded by the manipulate process. Only the values edited into input channel cells are
checked for validity and then saved in the SIMVOX database. Once saved in the SIMVOX
database, they are asynchronously communicated to the controller by the communication
process.
With a dataset open, the channel data values are updated by default on a 15 second scan.
The Update Rate option can be used to change the rate of update. When selected, a dialog box is
displayed with a dropdown list of time values in seconds. The maximum time value is 15. You
can select an update time value from the list and press the OK push--button. This will change the
update time for the subject child window (window in focus).
The Exit option exits the Manipulate program and the main window and all child windows are
shut down.
Tools
The SIO Configuration option immediately changes the display to show the underlying SIO
configuration. This allows you to view the type of channels for which data was being displayed.
This is an invaluable tool in troubleshooting configuration problems. By selecting SIO
Configuration again, the display will change back to the default.
The Counts option switches the I/O channel value display format. For Analog channels, it
changes the display to show A/D counts. For discrete channels, no data is displayed. By selecting
Counts again, the display will change back to the default where analog data is displayed in
percent and discrete data is displayed as 0 or 1.
Functions
1. Lock;
2. Unlock;
3. Unlock All;
4. Toggle;
5. Set Input; and
6. Ramp Input.
The Lock option allows you to lock channels such that they may be accessed for modification
only through the Manipulate window. A locked channel cannot be modified programmatically
using library functions or by other features of SIMVOX. Locked channels have a red
background and a white foreground. A dialog box is displayed where you can specify the
platform specific address of the channel to be locked. This functionality is also provided from
the Toolbar icon labeled L. With the cursor positioned on a specific file--card--channel, press
the toolbar icon L to lock that channel.
The Unlock option allows you to unlock channels such that they are again accessible for
modification either from the built--in modeling environment or programmatically by external
programs. Unlocked channels have a white background and a grey/black foreground. A dialog
box is displayed where you can specify the platform specific address of the channel to be
unlocked. This functionality is also provided from the Toolbar icon labeled U. With the cursor
positioned on a specific file--card--channel, press the toolbar icon U to unlock that channel.
The Unlock All option allows you to unlock all locked channels such that they are again
accessible for modification either from the built--in modeling environment or programmatically
by external programs. Unlocked channels have a white background and a grey/black foreground.
No dialog box is displayed. The action is carried out immediately. This functionality is also
provided from the Toolbar icon labeled UA.
The Toggle option works only on discrete channels and allows you to toggle the discrete value
from 0 to 1 or 1 to 0. A dialog box is displayed where you can specify the platform specific
address of the channel. Note that this functionality is also provided by simply double clicking on
the discrete channel cell. This functionality is also provided from the Toolbar icon labeled T.
With the cursor positioned on a specific file--card--channel, press the toolbar icon T to toggle the
discrete channel.
The Set Input option allows you to set the value of Analog Input, Pulse Count Input or Weigh
Scale Interface channels. A dialog box is displayed where you can specify the platform specific
address of the channel to be modified, and also specify the new value. Analog Input values are
specified in percent, 0 to 100. Pulse Count Input values are specified as counts and rate. This
functionality is also provided from the Toolbar icon labeled S.
The Ramp Input option allows you to ramp (or linearly increment) the value of Analog Input or
Pulse Count Input channels, either up or down, over a time period. The increments are calculated
by dividing the difference between the target and the original value by the transition time. A
dialog box is displayed where you can specify the platform specific address of the channel to be
ramped, the new value, and a time period. Analog input values are specified in percent, 0 to 100.
Pulse Count Input values are specified as counts and a rate period. This functionality is also
provided from the Toolbar icon labeled R.
Help
Under Help, the available options are:
1. Help; and
2. About.
The Help option allows you to access the Manipulate on--line help. Much of the information in
this document is also included in the on--line help. Additional details regarding Toolbar icons are
also provided.
The About option displays the About box. The Manipulate revision level, licensee and serial
number information is included here.
All library calls follow a similar calling format, comprising a dataset number as the minimum
argument or parameter. Additional parameters are dependent on individual functions and
include an I/O address, e.g., file--card--channel, a value to read/write, a returned error code and
an error destination. The error code returned reflects the success or failure of the call. In all
cases a return code of zero indicates success. Any other return code indicates failure. Non--zero
error codes with corresponding messages are detailed in Appendix F.
Tiebacks and Models may access I/O channels on a given dataset only if they are attached to that
dataset. SIMVOX library subroutines SIM10_ATTACH_DS, SIM20_ATTACH_DS,
SIM_AB_ATTACH_DS, SIM_MOD_ATTACH_DS or SIM_TI_ATTACH_DS (for Provox
VIOC, Provox EIC/IDI, Allen Bradley PLC3/PLC5, Modicon MODBUS/MODBUS+, or TI565
respectively) must be called to perform the attaching process. Details for these subroutines can
be found in Appendices A--E and also in the SIMVOX on--line help.
Typically, each tieback and model has a hard coded dataset number in it. Should the need to
attach to a different dataset arise, this hard coded number must be changed and the program
recompiled and linked. Alternatively, you may use the SIM10_GETDS, SIM20_GETDS etc., or
SIM10_GET_ALL_DS, SIM20_GET_ALL_DS etc. functions which retrieve the dataset
number(s) from the command line. Dataset numbers are placed in the command line when
external tiebacks/models are started from the SIMVOX main menu system. With these functions,
programs need not be compiled and linked each time a dataset changes.
It is important to remember that while both input and output channels can be monitored, only
inputs may be changed. Furthermore, individual input channels may be locked by the user.
Please refer to section 4.6 for details on channel locking. Such locked channels are inaccessible
for changing by tiebacks and models and attempted modifications will result in an error
condition. This error condition is mainly for the users information and does not affect the
simulation in any way.
SIMVOX library routines can be grouped together based on the function and type of channel
they access. These groups are: Analog I/O, Discrete I/O, Discrete Control Devices, Loops, Pulse
Count Inputs, Time Proportional Outputs, and miscellaneous support routines. The following
subsections describe functionality of these groups. Detailed information about each subroutine
and its corresponding argument list can be found in Appendices A--E.
Note that for all Analog I/O channel types, 0% corresponds to 819 counts. If for any reason, you
must know or set the exact number of counts on the channel, working in counts is suggested.
For most applications, however, working in percent or engineering units is much easier.
WSI channel types behave the same as analog inputs, with values in the range --25.0 to 100.0
percent. If the configuration has WSI channels in it, use the Analog Input GET and SET
functions to retrieve and set WSI channel values.
The following are the analog input/output subroutines for PROVOX EIC and IDI:
Analog input/output subroutines for PROVOX VIOC, Allen Bradley PLC3 and PLC5, Modicon
MODBUS and MODBUS+, and TI565 are similar to the above (Appendices B--E).
Discrete input/output subroutine calls can operate on a single channel or on all sixteen channels
of a card. The single--channel GETDI call returns a value of 1 or 0; likewise the single--channel
SETDI call will accept only values of 1 or 0. The GETDIW call returns a value corresponding
to all sixteen channels of the card. Only the bottom 16 bits of the variable are used. Each bit
represents the value of a channel on that card (channel 1 corresponds to bit 0, or the least
significant bit; channel 8 corresponds to bit 7); likewise the SETDIW call will accept only values
in the range of 0 through 65535.
The following are the discrete input/output subroutines for PROVOX EIC and IDI:
Discrete input/output subroutines for PROVOX VIOC, Allen Bradley PLC3 and PLC5, Modicon
MODBUS and MODBUS+, and TI565 are similar to the above (Appendices B--E).
Each Discrete Control Device template requires a 35--element array to define the template. The
elements of the array are defined as follows:
Elements Use
1 Number of setpoints (1--16)
2 Number of discrete outputs (1--8)
3 Number of discrete inputs (1--16)
4--19 Discrete output patterns for each of the 16 possible set-
points (0--255)
20--35 Discrete input patterns for each of the 16 possible setpoints
(0--65535)
To further clarify, element 4 contains the output pattern for setpoint #1, element 5 contains the
output pattern for setpoint #2, e.t.c. The output pattern is the decimal representation of the bit
pattern of the discrete outputs for a given setpoint. For example, if setpoint #3 has outputs 1, 2,
3, and 5 in the ON or ONE state, the number that goes into element 6 would be 23. Note that
output 8 represents the most significant bit while output 1 is the least significant bit.
Output # 1 2 3 4 5 6 7 8
Value 1 1 1 0 1 0 0 0
Weight: 1 2 4 8 16 32 64 128
Each Discrete Control Device tag to be evaluated requires a separate call to the Discrete Control
Device subroutine. The Discrete Control Device subroutine requires a 16--element input array
and an 8--element output array. These arrays contain the file--card--channel addresses of the
discrete input and output channels associated with the Discrete Control Device. The names of
the arrays should reflect the tag of the Discrete Control Device to simplify troubleshooting the
tieback program.
For example, if a Discrete Control Devices tag was XV--2217 the input and output arrays could
be named XV_2217_I and XV_2217_O respectively. It is recommended that the array name end
in I if the array is an input array and an O (O, not zero) if the array is an output array.
NOTE
A transition time and transition PV are provided in case the user wishes to simulate the time it
takes for a valve to stroke from one position to another. The transition time is the number of
seconds to wait before setting up the new PV on the inputs after a new SP appears on the
outputs. The transition PV is the PV to set up on the inputs during the transition time. If you do
not wish to simulate a transition time, these arguments should both be set to zero.
NOTE
Following is an example of using the Discrete Control Device subroutine for PROVOX EIC and
IDI to evaluate a two--output, four--input Discrete Control Device with the tag CV--100.
CV--100 uses the template called TEMPLATE which appears as follows:
SP # SP Value O1 O2 I1 I2 I3 I4
1 closed 0 0 0 0 0 0
2 tank A 1 0 0 1 0 1
3 tank B 0 1 1 0 1 0
4 tank A & B 1 1 1 1 1 1
Addresses for outputs and inputs are:
Output 1 @ 2--2--1
Output 2 @ 2--2--2
Input1 @ 1--1--1
Input 2 @ 1--1--2
Input 3 @ 1--1--3
Input 4 @ 1--1--4
The FORTRAN code for the above Discrete Control Device is as follows:
INTEGER DS /1/
INTEGER ERROR
INTEGER CV_100_o (8) /20201,20202,0,0,0,0,0,0/
INTEGER CV_100_i (16) /10101,10102,10103,10104,0,0,0,0,0,0,0,0,0,0,0,0/
INTEGER TEMPLATE (35) /4,2,4,
0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,
0,10,5,15,0,0,0,0,0,0,0,0,0,0,0,0/
.
.
.
CALL SIM20_DCD (DS, TEMPLATE, CV_100_o, CV_100_i, 1, ERROR, 1, 0, 0)
To simulate a transition time of 3 seconds, and a PV of I1=1, I2=1, I3=0, I4=1 as inputs during
the transition time. The following Discrete Control Device call will be used.
long ds =1;
long error
long cv_100_o [8] ={20201,20202,0,0,0,0,0,0};
long cv_100_i [16] ={10101,10102,10103,10104,0,0,0,0,0,0,0,0,0,0,0,0};
long template [35] ={4,2,4,
0,1,2,3,0,0,0,0,0,0,0,0,0,0,0,0,
0,10,5,15,0,0,0,0,0,0,0,0,0,0,0,0};
.
.
.
SIM20_DCD (&DS, TEMPLATE, CV_100_o, CV_100_i, 1, &ERROR, 1, 0, 0);
To simulate a transition time of 3 seconds, and a PV of I1=1, I2=1, I3=0, I4=1 as inputs during
the transition time. The following Discrete Control Device call will be used.
See the SIMVOX Examples section for complete examples of tieback programs which use
Discrete Control Device calls.
5.0.4 Loops
There are two loop functions in the SIMVOX library for PROVOX EIC and IDI. These are
SIM20_LOOP and SIM20_LAGLOOP. For PROVOX VIOC, Allen Bradley PLC3, Allen
Bradley PLC5, Modicon MODBUS, Modicon MODBUS+ and TI565 there is one loop function,
SIM10_LOOP, SIM_AB_LOOP etc.
SIM10_LOOP, SIM20_LOOP etc. simply tie output to input. SIM20_LAGLOOP ties output to
input with a first order lag. The time constant for the lag is specified by the user.
When the loop subroutine is invoked for REVERSE acting loops, the PV (analog input) is set to
the valve output (analog output) multiplied by the gain. For DIRECT acting loops, the PV is set
to (100 -- valve output) multiplied by the gain. This DIRECT/REVERSE action is the SIMVOX
operand described in the following table:
where:
FO/IC = Fail open valve/increasing (signal) closes valve
FO/IO = Fail close valve/increasing (signal) opens valve
DIRECT = If PV increases, valve increases (opens) to maintain control
REVERSE = If PV increases, valve decreases (closes) to maintain control
For a FO/IC valve with direct control action and a FC/IO valve with reverse control action,
(reverse / inversion = yes argument selected):
For a FO/IC valve with reverse control action and a FC/IO valve with direct control action,
(direct / inversion = no argument selected):
These two equations are valid for loops configured to have PV input signals in the range --25%
to 100%. For PVs with elevated input signals (RTDs, Thermocouples, etc.) in the 0% to 125%
range, the loop subroutine will not work properly. Consequently, any signal conditioning must be
performed by the user in code.
5.0.7 Miscellaneous
The following are miscellaneous subroutines for PROVOX EIC and IDI used in coding tiebacks
and models on the VAX.
PROVOX VIOC, Allen Bradley PLC3, Allen Bradley PLC5, Modicon MODBUS, Modicon
MODBUS+ and TI565 have similar miscellaneous subroutines (Appendices B--E).
Then in Section 5, the SIMVOX library of subroutines facilitating programmatic access to I/O
channels was discussed. The philosophy and functionality of each group of access subroutines
was presented.
In this section, we will present detailed examples for Tiebacks, Tags, Calculations, and Channel
Data Manipulation, using the built--in SIMVOX functionality. Additionally, the creation of
external programs is presented. Lastly, issues surrounding porting existing C or FORTRAN code
into SIMVOX are presented.
To create an SIO file from the information contained in an ENVOX database the following
parameters must be specified:
(2) Database -- The name of the ENVOX database where the device is located. Available
databases are displayed in a dropdown list.
(3) Device -- The name of the ENVOX device where the tags are located. Available devices are
displayed in a dropdown list.
(4) Output Directory -- The name of the output directory for the SIO generation.
After the appropriate selections have been made, press the OK push--button to begin SIO
generation.
To create an SIO file from the information contained in a PROFLEX controller definition file,
specify the file and select an output directory. Press the Browse push--button to browse available
directories.
In the case if a network link does not exist between the NT workstation and the VAX/HP,
SIMVOX for Windows NT has 3 companion utilities which reside on the VAX/HP system. One
of these utilities is SIOGEN.EXE. This utility allows you to select the ENVOX database, and the
PROVOX device, from which configuration data is read and written to a target file. The target
file is binary (non printable) for Simulated I/O.
Once created, you must transfer this file to the NT Workstation via Kermit, FTP, or any other file
transfer program. If the Tools option is used, the resulting file is created in the NT workstation.
For example, follow these steps to create the SIO file using the VAX utility. Note that the $ in
the following commands is the VAX/VMS prompt and should not be typed. The bold italics text
is what you have to type, the normal text is computer response.
$ run siogen
ENVOXDB
EXAMPLE
IFC1
IFC2
UOC1
UOC2
The SIO file for IFC1 is now generated. It will be called IFC1.SIO and will be located in the
directory [user.doe], ready for transfer to the PC Workstation. If more than one EIC, IDI, or
VIOC exists in the controller multiple SIO files will be generated, e.g., IFC1--1 and IFC1--2. If
no EI or IDI cards are found, an SIO file is not created.
To create a Tieback file from the information contained in an ENVOX database the following
parameters must be specified:
(2) Database -- The name of the ENVOX database where the device is located. Available
databases are displayed in a dropdown list.
(3) Device -- The name of the ENVOX device where the tags are located. Available devices are
displayed in a dropdown list.
(4) Output Directory -- The name of the output directory for the Tieback generation.
(5) Output File -- The name of the output file for the Tieback generation. If this field is not
entered the default filename is the device name of the tieback followed by the .tbk extension.
After the appropriate selections have been made, press the OK push--button to begin Tieback
generation.
To create a Tieback file from the information contained in a PROFLEX controller definition file,
specify the file and select an output directory. Press the Browse push--button to browse available
directories.
In the case if a network link does not exist between the NT workstation and the VAX/HP,
SIMVOX for Windows NT has 3 companion utilities which reside on the VAX/HP system. One
of these utilities is TBGEN.EXE. This utility allows you to select the ENVOX database, and the
PROVOX device, from which Discrete Control Device and Loop data is read and written to an
ASCII text file in the form of comma delimited values (CDV).
For example, follow these steps to create the CDV file using the VAX utility. Note that the $ in
the following commands is the VAX/VMS prompt and should not be typed. The bold italics text
is what you have to type, the normal text is computer response.
$ run tbgen
ENVOXDB
EXAMPLE
IFC1
IFC2
UOC1
UOC2
The tieback CDV file for IFC1 is now generated. It will be called IFC1.TBK and will be located
in the directory [user.doe], ready for transfer to the PC Workstation.
The file created has a specific format. This format is described in the on--line help of Tiebacks.
When first created from ENVOX, this file does not contain any object personality information.
This must be added by you as described in section 6.1.2.4. Once created, you must transfer this
text file to the NT Workstation via Kermit, FTP, or any other file transfer program. If the Tools
option is used, the resulting CDV file is created in the NT workstation.
Step 1.
Step 2.
Select the dataset from the dropdown list. The list displayed will comprise all the available
datasets.
Step 3.
Press the Browse push--button to get the File Open dialog. You can browse around in the
directories and select the file, wherever it is located. Double clicking on the file, or single
clicking and then pressing the OK push--button will read the file name and directory into the
Load Tieback dialog box.
Step 4.
With the dataset selected and the tieback file selected, press the OK push--button. SIMVOX will
start reading the file, checking it for syntax errors as it goes along. If no errors are detected, the
Discrete Control Device and Loop child windows will be created.
If any errors are detected in the tieback file, an error message prompt will be displayed showing
the text in error. You can correct the errors by editing the tieback file with any standard text
editor. The Toolbar contains the notepad icon. You can use it to edit. Note that if the file was
created automatically by the VAX/VMS utility, it will not contain any errors.
Step 5.
If communications are already active with the controller, the tieback will start resolving. The
Discrete Control Device SP and PV fields of the spreadsheet display will reflect current
data. The Scan T and Scan fields of the display will show the current Discrete Control
Device resolve frequency and whether the Discrete Control Device is being scanned or not,
respectively. Additionally, if a Discrete Control Device personality has been defined, it will be
reflected in the Flow column of the display.
Similarly, the Loop %IVP, %PV, and PV fields will reflect current data.
Step 6.
The tieback file is now loaded. The next step is to assign personalities to Discrete Control
Devices and Loops. This is described below.
Step 1.
Single click on this button. This will display a dialog box showing all the known details for the
Discrete Control Device.
Step 2.
D Tag -- The tag is a label for the Discrete Control Device. This must be less than 16 characters
long.
D Description/Strategy -- (Optional) description and strategy.
D Template -- The Template defines the I/O patterns for this Discrete Control Device. The
template section contains a header and template data. The information must follow a
specified format.
D Scan time -- The scan time is the interval between updates to the tieback value. It can range
from 1 to 15 seconds.
D Transition Time -- Transition time is the amount of time this Discrete Control Device will
take to transition from one setpoint to another. It can range from 1 to 60 seconds.
D Transition PV -- Transition PV is the PV asserted while the Discrete Control Device is going
from one state to another. Note that the only PVs available are those defined by the
Template used for this Discrete Control Device. Additionally, you can choose to leave the
transition PV as undefined. In this case, SIMVOX will leave the current PV as the transition
PV.
D Online/Offline -- Online returns the Discrete Control Device tag to its original status. Offline
causes the Discrete Control Device to no longer be controlled by SIMVOX. An offline
Discrete Control Device is not resolved.
D Input/Output Address -- Addresses are dependent upon the driver that is running on the
current dataset. The addressing scheme for different drivers is given in Appendix H.
D Type -- This specifies the Discrete Control Device type. This is for future expansion of
SIMVOX.
D Discrete Control Device Dynamics -- This is described in section 6.1.2.4.
D Tracking -- This is described in section 6.1.2.4.
Step 3.
After editing, press the OK push--button to save changes in the SIMVOX database (Uneditable
fields will be grey). If no changes were made or to discard changes, press the Cancel
push--button.
Step 4.
Discrete Control Device Dynamics comprises two fields, Setpoint and Value. The Setpoint field
is a dropdown list of the template specific setpoints for this Discrete Control Device, with an
additional setpoint called UNDEF. The purpose here is to assign an engineering units value for
each setpoint. For example, for Valves and Pumps, this value represents flow characteristics
(gpm). So, for a valve Discrete Control Device wih two setpoints, OPEN and CLOSE,
engineering units value may be 200GPM and 100GPM respectively. Additionally, the CLOSE
setpoint may be defined with a non--zero engineering units value to simulate a leaking valve.
With these values specified, the Discrete Control Device will reflect the value indicated by its
current setpoint when it is referenced by other objects in the environment.
Step 1.
Select a setpoint in the dropdown list. This will enable the value edit field.
Step 2.
Step 3.
Repeat Step 1 for the remaining setpoints. As the focus leaves the Value field, its data is read and
saved corresponding to the setpoint in the dropdown list.
The Discrete Control Device personality can further be defined by the Tracking section. You can
use the Tracking section to have the Discrete Control Device track devices upstream from its
location, e.g., other Discrete Control Devices or Loops, or you can use a Calculation to compute
a path based on the conjunction of various devices. In each case, the engineering units value of
the Discrete Control Device, Loop, or Calculation being tracked is used to determine the value of
the subject Discrete Control Device. Note that the minimum is always used. You may not want
to track any devices. In that case, select the Always radio button.
Step 1.
Step 2.
Select the dataset of the Discrete Control Device to be tracked. The tieback for the dataset
selected must already be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Discrete Control Device tag from the dropdown list. This list will be specific to the
dataset selected in step 2.
Step 4.
Select the condition operator. For Discrete Control Devices, only = and <> are available. The =
operator checks for equality, while <> checks for inequality.
Step 5.
Select the SP of the Discrete Control Device being tracked. The Discrete Control Device will be
tracked (its value used), if it is in the SP you select (or not in the SP you select based on step 4).
In the case that this condition evaluates to FALSE, the value returned is 0.0.
Step 1.
Step 2.
Select the dataset of the Loop to be tracked. The tieback for the dataset selected must already be
loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Loop tag from the dropdown list. This list will be specific to the dataset selected in
step 2.
Step 4.
Select the condition operator. For Loops, all operators are available (=, <, >, <=, >=, <>).
Step 5.
Specify a floating point value in the field below the operators. The Loop will be tracked (its
engineering units value used), if its PV compared to this value results in TRUE. Otherwise the
value returned is 0.0.
To track a Calculation:
Step 1.
Step 2.
Select the dataset of the Calculation to be tracked. Note that the calculations must be loaded for
this dataset. Otherwise, step 3 will be meaningless.
Step 3.
Select the Calculation tag from the dropdown list. This list is specific to the dataset selected in
step 2.
After specifying the tracking details, simply press the OK button to save the data to the database.
Because of the online nature of SIMVOX, the changes you made will immediately go into effect.
To discard changes, press the Cancel button.
NOTE
The changes you made are held in memory only. To
save changes to disk, use the File--Save pulldown or
press the Toolbar disk icon.
Step 1.
Single click on this button. This will display a dialog box showing all the known detail for the
Loop.
Step 2.
D Tag -- The tag is a label for the Loop. This must be less than 16 characters long.
D Description -- (Optional) description field.
D Scan time -- The scan time is the interval between updates to the tieback value. It can range
from 1 to 15 seconds.
D Online/Offline -- Online returns the Loop tag to its original status. Offline causes the Loop to
no longer be controlled by SIMVOX. An offline Loop is not resolved.
D Input/Output Address -- Addresses are dependent upon the driver that is running on the
current dataset. The addressing scheme for different drivers is given in Appendix H.
D Valve Gain -- This is the float numerical field that is used to multiply the output of the tag.
The default is 1.5.
D Action -- The action of the loop can be changed by selecting the appropriate radio button.
The Action should be based on the following matrix:
Step 3.
After editing, (non editable fields are grey) press the OK push--button to save changes in the
SIMVOX database. If no changes were made or to discard changes, press the Cancel
push--button.
Step 4.
To Calculate If Tag:
Step 1.
Step 2.
Select the dataset of the tag for the condition. The tags for the dataset selected must already be
loaded. Otherwise, step 4 below will be meaningless.
Step 3.
Select the type of the tag for the condition. The tags for the dataset selected must already be
loaded. Otherwise, step 4 below will be meaningless.
Step 4.
Select the tag from the dropdown list. This list will be specific to the dataset selected in step 2.
Step 5.
Select the condition operator. For tags, all operators are available (=, <, >, <=, >=, <>).
Step 6.
Specify a floating point value in the field next to the operators. This value will be compared to
the engineering units value of the selected tag. The Loop will be evaluated if this condition
evaluates to TRUE. Otherwise the Loop will not be evaluated and, depending on Loop Type, the
decay specification will take effect.
Step 1.
Step 2.
Select the dataset of the Discrete Control Device for the condition. The tieback for the dataset
selected must already be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Discrete Control Device tag from the dropdown list. This list will be specific to the
dataset selected in step 2.
Step 4.
Select the condition operator. For Discrete Control Devices, only = and <> are available. The =
operator checks for equality, while <> checks for inequality.
Step 5.
Select the SP of the Discrete Control Device in the condition. The Discrete Control Device PV
will be compared to the selected SP. The Loop will be evaluated if this condition evaluates to
TRUE. Otherwise the Loop will not be evaluated and, depending on Loop Type, the decay
specification will take effect.
To Calculate If Loop:
Step 1.
Step 2.
Select the dataset of the Loop for the condition. The tieback for the dataset selected must already
be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Loop tag from the dropdown list. This list will be specific to the dataset selected in
step 2.
Step 4.
Select the condition operator. For Loops, all operators are available (=, <, >, <=, >=, <>).
Step 5.
Specify a floating point value in the field next to the operators. This value will be compared to
the engineering units value of the selected loop. The Loop will be evaluated if this condition
evaluates to TRUE. Otherwise the Loop will not be evaluated and, depending on Loop Type, the
decay specification will take effect.
To Calculate If Calculation:
Step 1.
Step 2.
Select the dataset of the Calculation for the condition. The Calculations for the dataset selected
must already be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Calculation tag from the dropdown list. This list will be specific to the dataset selected
in step 2.
Step 4.
Select the condition operator. For Calculations, all operators are available (=, <, >, <=, >=, <>).
Step 5.
Specify a floating point value in the field next to the operators. The Loop will be evaluated if
this condition evaluates to TRUE. Otherwise the Loop will not be evaluated and, depending on
Loop Type, the decay specification will take effect.
After specifying the Calculate condition details, specify the Loop personality as described in
section 6.1.2.7.
Tieback:
A loop tieback ties the output to the input in software. Both input and output addresses must
physically be available to SIMVOX. If an Input or Output address is not defined in SIMVOX,
the loop cannot be tied back. Such loops are forced to be offline.
In tiebacks, SIMVOX reads the output address (IVP) and calculates the PV to be written to the
input address. You can select one of five (or all five) functions to condition the PV prior to
writing it the input channel. These functions are:
D Dead Time
D 1st Order Filter
D 2nd Order Filter
D Polynomial
D Valve Hysteresis
Step 1.
Step 2.
Select the loop type, i.e., Flow, Level, Temperature, Pressure, Other.
Step 3.
Press the Details push--button. The Loop Dynamics dialog box will be displayed. The only
editable fields in this dialog box will be the Modeling functions. You can select one or all of
these functions to perform signal conditioning prior to writing to the PV.
For example, if you choose to add a 1st Order Filter between output and input, simply double
click on Filter1 in the top left corner list. Or select the function and then press the Add
push--button. A dialog box will be displayed where you can specify the filter time and a gain.
Press the OK push--button to add the filter to the tieback.
To edit an already added function, simply double click on the function. A dialog box will be
displayed with the current parameters. Editing the parameters and pressing the OK push--button
will save the new data.
To delete a function, first select it and then press the Delete push--button. To delete all the
selected functions, simply press Clear.
After adding the necessary functions, press the OK push--button to save the tieback signal
conditioning functions and return to the main loop dialog box. Pressing the OK push--button
again saves all definitions in the SIMVOX database. The changes become effective immediately,
and are used in resolving the loop tieback.
Model:
A loop model only controls the input address. Only the input address must physically be
available to SIMVOX. For loops which have only the input address defined, selecting them to be
models allows you to bring them online. While resolving a loop model, the output address or
IVP of the loop may or may not play a significant role. This depends on how you choose to
model the loop.
The different types of loop models are:
Level
Temperature
Pressure
Other
Step 1.
Step 2.
Select the loop type, i.e., Level, Temperature, Pressure, Other. Flow loops are always forced to
be tiebacks.
Step 3.
Press the Details push--button. The Loop Dynamics dialog box for the selected loop type will be
displayed. These dialog boxes are discussed in detail as follows:
After adding the loop specific details, press the OK push--button to save all definitions in the
SIMVOX database. The changes become effective immediately, and are used in resolving the
loop model. To discard changes, press the Cancel button.
NOTE
Initial Value:
You can assign an initial engineering units value to the loop to start the simulation at a specific
place in the process dynamics. For example, if the loop is for Level, the initial value can be used
to set the amount of material in a vessel when the simulation starts.
When the loop starts resolving, the first control action performed by SIMVOX is to write the
specified value into the address representing the level indication (or temperature, pressure, etc.).
Thereafter, the loop dynamics take over and the value changes as dictated by the model.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Average,
Integrate, Minimum, Maximum, Track, Mass Xfer; (2) Dead Time, Filter1, Filter2. Of the
first type, only one can be selected and applied to the level input signals. Of the second type,
one or more can be applied for final signal conditioning prior to writing the PV (The details
of these functions are presented in Appendix G).
D Vessel Type -- Three vessel types are available: Cone, Horizontal, and Vertical.
D Capacity -- the vessel capacity in engineering units. In some cases, the capacity is the same as
the high engineering units. In other cases, the level high engineering units are specified in
percent, i.e., 100%. This capacity field must be actual engineering units.
D Angle -- this field applies only to cone vessels and represents the angle (in degrees) between
the cone and vertical section of the vessel.
D Integration initial -- this field allows you to initialize the starting value for the level
integration. This field is enabled if the Integrate function is applied.
D Integration gain -- This field is enabled if the Integrate function is applied. You can use it to
perform unit conversion. For example, if the input is in gallons, a gain of 7.8 will convert it
to pounds and integrate pounds.
D PV I/O -- PV I/O, Tracking PV and PV Signal are related sections. PV I/O allows you to
specify the level input and output signals. If the PV In radio button is selected, the Tracking
PV and PV Signal represent the signals which increase the level. If PV Out radio button is
selected, then the Tracking PV and PV Signal represent the signals which decrease the level.
If PV In is selected, PV Out will be greyed, and vice versa. To tell SIMVOX that you are
done specifying Input (or Output signals), press the Done push--button.
D Tracking PV -- PV I/O, Tracking PV and PV Signal are related sections. In this section, you
can select the type of signal. Your input signal can be one or upto 10 (any mix) of AI, AO,
Discrete Control Device, Loop, Calculation and Constant. These signals are from devices
with the current dataset. To bring in signals from other datasets, use calculations. When you
select the Track Discrete Control Device radio button, a list of Discrete Control Device tags
will be displayed in the first PV Signal list. If you select the Track Calc radio button, a list of
Calculation tags will be displayed in the first PV Signal list. Note that Calculations must
have been previously loaded for you to be able to get the tags.
D PV Signal -- PV I/O, Tracking PV and PV Signal are related sections. With the selected type
of tags displayed in the list, you can double click on the tag. This will add it to the applied
signals list. Or you can single click and press the Add push--button. SIMVOX allows you to
add more than 10, but only the 1st ten signals in the list are retained. All else are discarded.
The sum of all specified signals is used. To delete a signal from the applied list, simply select
it by single clicking on it, and press the Delete push--button. When you are done adding Input
signals, press the Done push--button. This reads your specifications and saves them, while
enabling you to select the Output signals. You can perform this any number of times to refine
your level loop signals. To discard all selected signals from the applied list, press the Clear
All push--button.
Here we present a simple example of a Level loop, LIC--830--1, for tank T--1. This level has two
inputs and one output. One input is specified by a Flow loop, FIC--830--1, and the other by a
Discrete Control Device valve, XV--830--1. The output is also a Discrete Control Device valve,
XV--830--2. Note that more complex examples are presented in the Examples, section 8.
Step 1.
Select level loop and assign model personality to it as described in section 6.1.2.7.
Step 2.
Press the Details push--button. The Level Dynamics dialog box will be displayed.
Step 3.
Choose modeling functions to be applied. Here we elect to Integrate the level and we want to
apply a 1st order filter to smooth out the level rise. To do this, double click on Integrate in the list
on the left hand side. This will add Integrate to the applied functions list. Now double click on
Filter1 in the list on the left hand side. This will display a dialog box for the 1st order filter.
Complete this dialog box, specifying filter time in seconds and a gain of 1.0. Press the OK
push--button to add Filter1 to the applied functions list.
Note that the function will be added and appear as Filter1 (x.y, 1.0) in the list, where x.y is the
filter time in seconds, and 1.0 is the gain. You can edit this by double clicking on the function.
Step 4.
Select the type of vessel we are modeling. Assuming that T--1 is a Vertical tank, use the
dropdown list to select vessel type as Vertical. This will grey the Angle and Radius fields. You
must, however, specify the Capacity. Our tank here can hold 10,000.00 gallons, so we enter
10000.0 in the capacity field.
Step 5.
Because we selected Integrate in Step 1, the Integration Parameters section is enabled. Here we
specify an initial value of 0.0 and a gain of 1.0. Note that to integrate a value, the gain should
never be 0.0.
Step 6.
Now we are ready to specify what makes our level rise and what makes it fall. We said that we
had two inputs and one output as follows:
Assuming these devices are in the current dataset and already loaded into the tieback, we can go
ahead and complete our loop definition. If these signals were Calculations or Tags which were
not loaded, we could simply switch to the Calculations/Tags windows, load the appropriate files,
and then return to our definition.
When we first enter the Level Dynamics dialog box, the PV In radio button will be selected, so
we can add the input signals right away.
To add the Flow loop, click on the Track Loop radio button. This will display all the available
loops in the current dataset. Select FIC--830--1 by double clicking on it. It will get added to the
applied list.
To add the Discrete Control Device valve, click on the Track Discrete Control Device radio
button. This will display all the available Discrete Control Devices in the current dataset. Select
XV--830--1 by double clicking on it. It will get added to the applied list.
Now press the Done push--button. SIMVOX will read the signal list and save the values, while
enabling the PV Out radio button. Click on the PV Out radio button. This will disable the PV In
radio button and show all the Output signals.
To add the output Discrete Control Device valve, click on the Track Discrete Control Device
radio button. This will display all the available Discrete Control Devices in the current dataset.
Select XV--830--2 by double clicking on it. It will get added to the applied list.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main Loop dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the level loop definition in the SIMVOX database.
NOTE
The loop definition becomes effective immediately. If
the Calculate If condition evaluates to TRUE, the level
will start integrating based on the Input/Output signals.
The integrated level will be clamped by capacity at the
high end and 0.0 at the low end.
Analyzing this level loop definition, we can see that the level will integrate, regardless of
available volumes upstream, i.e., an infinite source is assumed. This can be changed by defining
the input Discrete Control Device (XV--830--1) and Flow loop (FIC--830--1) to examine available
volumes prior to returning their values. For the Discrete Control Device, we can define it to track
a calculation which calculates available volume. For the Flow loop, we can have it calculate only
if there is volume available.
To specify simple mass balance for vessels is as rapid as the above exercise. No code was written
at all and the level definition is complete. More complex mass balance examples are presented in
section 8.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Average,
Integrate, Minimum, Maximum, Track; (2) Dead Time, Filter1, Filter2, Polynomial. Of the
first type, only one can be selected and applied to the temperature input signals. Of the
second type, one or more can be applied for final signal conditioning prior to writing the PV
(The details of these functions are presented in Appendix G).
D Temperature Decay -- This section describes what happens to the temperature when the loop
condition is FALSE. Loop condition is specified in the Calculate If section.
D Integration initial -- this field allows you to initialize the starting value for the temperature
integration. This field is enabled if the Integrate function is applied.
D Integration gain -- This field is enabled if the Integrate function is applied. You can use it to
perform unit conversion.
D PV I/O -- PV I/O, Tracking PV and PV Signal are related sections. PV I/O allows you to
specify the temperature input and output signals. If the PV In radio button is selected, the
Tracking PV and PV Signal represent the signals which increase the temperature. If PV Out
radio button is selected, then the Tracking PV and PV Signal represent the signals which
decrease the temperature. If PV In is selected, PV Out will be greyed, and vice versa. To tell
SIMVOX that you are done specifying Input (or Output signals), press the Done
push--button.
D Tracking PV -- PV I/O, Tracking PV and PV Signal are related sections. In this section, you
can select the type of signal. Your input signal can be one or upto 10 (any mix) of AI, AO,
Discrete Control Device, Loop, Calculation and Constant. These signals are from devices
within the current dataset. To bring in signals from other datasets, use calculations. When
you select the Track Discrete Control Device radio button, a list of Discrete Control Device
tags will be displayed in the first PV Signal list. If you select the Track Calc radio button, a
list of Calculation tags will be displayed in the first PV Signal list. Note that Calculations
must have been previously loaded for you to be able to get the tags.
D PV Signal -- PV I/O, Tracking PV and PV Signal are related sections. With the selected type
of tags displayed in the list, you can double click on the tag. This will add it to the applied
signals list. Or you can single click and press the Add push--button. SIMVOX allows you to
add more than 10, but only the 1st ten signals in the list are retained. All else are discarded.
The sum of all selected signals will be used. To delete a signal from the applied list, simply
select it by single clicking on it, and press the Delete push--button. When you are done
adding Input signals, press the Done push--button. This reads your specifications and saves
them, while enabling you to select the Output signals. You can perform this any number of
times to refine your temperature loop signals. To discard all selected signals from the applied
list, press the Clear All push--button.
Here we present a simple example of a Temperature loop, TIC--810--1. This loop controls the
temperature in a tank based on material present, i.e., more material results in slower temperature
gain. We will use the Level loop, LIC--830--1, defined above to tell us how much material we
have.
1. AvailVol -- This calculation will return the available volume in the tank in percent, i.e., Total
Volume -- Current Volume. It is defined as:
((100.0 -- PV (LIC--830--1)) / 100.0)
2. HeatRise -- This calculation will return the heat rise component of the temperature. It is
defined as:
3. HeatLoss -- This calculation will return the heat loss component of the temperature. It is
defined as:
Step 1.
Select temperature loop and assign model personality to it as described in section 6.1.1.7.
Step 2.
Press the Details push--button. The Temperature Dynamics dialog box will be displayed.
Step 3.
Choose modeling functions to be applied. Here we elect to Track the temperature calculation and
we want to apply a 1st order filter to smooth out the temperature rise/decline. To do this, double
click on Track in the list on the left hand side. This will add Track to the applied functions list.
Now double click on Filter1 in the list on the left hand side. This will display a dialog box for the
1st order filter. Complete this dialog box, specifying filter time in seconds and a gain of 1.0.
Press the OK push--button to add Filter1 to the applied functions list.
Note that the function will be added and appear as Filter1 (x.y, 1.0) in the list, where x.y is the
filter time in seconds, and 1.0 is the gain. You can edit this by double clicking on the function.
Step 4.
We want our temperature to decline to an ambient value if the loop evaluation condition is not
met. We use the Temperature decay section for this.
Select the temperature decay checkbox. This will display a dialog box where we can enter the
decay time and ambient value.
Edit the decay time field to specify the amount of time it will take to go from the current
temperature to the ambient. Enter 600 for ten minutes and a gain of 1.0.
Now select the Track Const radio button. We want the temperature to decay to a constant value
of 0.0. Enter 0.0 in the adjacent field. Press OK to save the decay parameters.
Step 5.
Now we are ready to specify what makes our temperature rise and what makes it fall. We said
that we had 3 calculations, however, only 2 are needed here. The third is called internally by the
other two. The calculations are HeatRise and HeatLoss.
Assuming these calculations are already loaded in the Calculations window, we can go ahead and
complete our loop definition. When we first enter the Temperature Dynamics dialog box, the PV
In radio button will be selected, so we can add the input signals right away.
First click on the Track Calc radio button. This will display all the available calculations in the
current dataset. Select HeatRise by double clicking on it. It will get added to the applied list.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the PV
Out radio button. Select HeatLoss by double clicking on it. It will get added to the applied list.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main Loop dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the temperature loop definition in the SIMVOX
database.
NOTE
To specify simple temperature balance is as rapid as the above exercise. No code was written at
all and the temperature definition is complete. More complex temperature balance examples are
presented in section 8.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Average,
Integrate, Minimum, Maximum, Track; (2) Dead Time, Filter1, Filter2, Polynomial. Of the
first type, only one can be selected and applied to the pressure input signals. Of the second
type, one or more can be applied for final signal conditioning prior to writing the PV (The
details of these functions are presented in Appendix G).
D Pressure Decay -- This section describes what happens to the pressure when the loop
condition is FALSE. Loop condition is specified in the Calculate If section.
D Integration initial -- this field allows you to initialize the starting value for the pressure
integration. This field is enabled if the Integrate function is applied.
D Integration gain -- This field is enabled if the Integrate function is applied. You can use it to
perform unit conversion.
D PV I/O -- PV I/O, Tracking PV and PV Signal are related sections. PV I/O allows you to
specify the pressure input and output signals. If the PV In radio button is selected, the
Tracking PV and PV Signal represent the signals which increase the pressure. If PV Out
radio button is selected, then the Tracking PV and PV Signal represent the signals which
decrease the pressure. If PV In is selected, PV Out will be greyed, and vice versa. To tell
SIMVOX that you are done specifying Input (or Output signals), press the Done
push--button.
D Tracking PV -- PV I/O, Tracking PV and PV Signal are related sections. In this section, you
can select the type of signal. Your input signal can be one or upto 10 (any mix) of AI, AO,
Discrete Control Device, Loop, Calculation and Constant. These signals are from devices
within the current dataset. To bring in signals from other datasets, use calculations. When
you select the Track Discrete Control Device radio button, a list of Discrete Control Device
tags will be displayed in the first PV Signal list. If you select the Track Calc radio button, a
list of Calculation tags will be displayed in the first PV Signal list. Note that Calculations
must have been previously loaded for you to be able to get the tags.
D PV Signal -- PV I/O, Tracking PV and PV Signal are related sections. With the selected type
of tags displayed in the list, you can double click on the tag. This will add it to the applied
signals list. Or you can single click and press the Add push--button. SIMVOX allows you to
add more than 10, but only the 1st ten signals in the list are retained. All else are discarded.
The sum of all selected signals will be used. To delete a signal from the applied list, simply
select it by single clicking on it, and press the Delete push--button. When you are done
adding Input signals, press the Done push--button. This reads your specifications and saves
them, while enabling you to select the Output signals. You can perform this any number of
times to refine your pressure loop signals. To discard all selected signals from the applied
list, press the Clear All push--button.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main Loop dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the pressure loop definition in the SIMVOX
database.
NOTE
The loop definition becomes effective immediately. If
the Calculate If condition evaluates to TRUE, the
pressure loop will resolve based on the Input/Output
signals. The pressure PV will be clamped by
engineering units high and low of the loop.
To specify simple pressure balance is as rapid as the above exercise. No code was written at all
and the pressure definition is complete. More complex pressure balance examples are presented
in section 8.
Tieback execution can be controlled on an individual object level. Each Discrete Control Device
and Loop has its own scan time and online/offline status. Furthermore, the entire dataset can be
taken offline.
Step 1.
Press the detail button for the object. Each object row has a detail button. This will display a
detail dialog box.
Step 2.
To adjust the scan time, select new time in the scan time dropdown list.
Step 3.
Press the OK button to save the definition. Your change goes into effect immediately.
Step 1.
Press the Toolbar Scan On/Off button. This will display a dialog box.
Step 2.
Select the dataset to be controlled from the dropdown list. The select the Online/Offline radio
buttons appropriately.
Step 3.
Press the OK button to save the definition. Your change goes into effect immediately.
To create a Tags file from the information contained in an ENVOX database the following
parameters must be specified:
(2) Database -- The name of the ENVOX database where the device is located. Available
databases are displayed in a dropdown list.
(3) Device -- The name of the ENVOX device where the tags are located. Available devices are
displayed in a dropdown list.
(4) Output Directory -- The name of the output directory for the Tags generation.
(5) Output File -- The name of the output file for the Tags generation. If this field is not entered
the default filename is the device name of the tieback followed by the .pts extension.
After the appropriate selections have been made, press the OK push--button to begin Tag
generation.
To create a Tag file from the information contained in a PROFLEX controller definition file,
specify the file and select an output directory. Press the Browse push--button to browse available
directories.
In the case if a network link does not exist between the NT workstation and the VAX/HP,
SIMVOX for Windows NT has 3 companion utilities which reside on the VAX/HP system. One
of these utilities is PNTGEN.EXE. This utility allows you to select the ENVOX database, and
the PROVOX device, from which Discrete Control Device and Loop data is read and written to
an ASCII text file in the form of comma delimited values (CDV).
For example, the steps to create a tags CDV file using the VAX utility are as follows. Note that
the $ in the following commands is the VAX/VMS prompt and should not be typed. The bold
italics text is what you have to enter, and the normal text is computer generated.
$ run pntgen
ENVOXDB
EXAMPLE
IFC1
IFC2
UOC1
UOC2
Writing ...
The tags CDV file for IFC1 is now generated. It will be called IFC1.PTS and will be located in
the directory [user.doe], ready for transfer to the PC Workstation.
The file created has a specific format. This format is described in the online help of the Non
Control Tags process.
When first created from ENVOX, this file does not contain any object personality information.
This must be added by you as described in section 6.1.3.4. If the tags CDV file is created by the
VAX utilities, it must be transferred to the NT Workstation via Kermit, FTP, or any other file
transfer program. The Tools option creates the CDV files in the NT workstation itself.
Step 1.
Step 2.
Select the dataset from the dropdown list. The list displayed will comprise all the available
datasets.
Step 3.
Press the Browse push--button to get the File Open dialog. You can browse around in the
directories and select the file, wherever it is located. Double clicking on the file, or single
clicking and then pressing the OK push--button will read the file name and directory into the
Load Tags dialog box.
Step 4.
With the dataset selected and the tags file selected, press the OK push--button. SIMVOX will
start reading the file, checking it for syntax errors as it goes along. If no errors are detected, the
tags child window will be created.
If any errors are detected in the tag file, an error message prompt will be displayed showing the
text in error. You can correct the errors by editing the tag file with any standard text editor. The
Toolbar contains the notepad icon. You can use it to edit. Note that if the file was created
automatically by the VAX/VMS utility, it will not contain any errors.
Step 5.
If communications are already active with the controller, the tags will start resolving and
displaying their current data. The EUValue fields of the spreadsheet display will reflect current
data. The Scan T and Scan fields of the display will show the current tag resolve frequency
and whether the tag is being scanned or not, respectively.
Step 6.
The tags file is now loaded. The next step is to assign personalities to tag objects. This is
described below.
Step 1.
Single click on this button. This will display a dialog box showing all the known detail for the
tag object.
Step 2.
D Tag -- The tag is a label for the data. This must be less than 16 characters long.
D Description -- (Optional) description field.
D Scan time -- The scan time is the interval between updates to the tag value. It can range from
1 to 15 seconds.
D Online/Offline -- Online returns the tag to its original status. Offline causes the tag to no
longer be controlled by SIMVOX. An offline tag is not resolved.
D Address -- Addresses are dependent upon the driver that is running on the current dataset.
The addressing scheme for different drivers is given in Appendix H.
D Tag Initial value -- This value is for input tags only and is written to the input address when
the tags file is first loaded.
D Square Root -- The square root calculation of the tag can be enabled or disabled. This is for
Analog Input tags only.
D EU range -- This defines the maximum and minimum value of the engineering unit. This is
for Analog Input, Analog Output and Pulse Count Input tags only.
Calculate If condition -- This is described in section 6.1.3.4.
Tag Dynamics -- This is described in section 6.1.3.5.
Step 3.
After editing, (uneditable fields are grey) press the OK push--button to save changes in the
SIMVOX database. If no changes were made or to discard changes, press the Cancel
push--button.
Step 4.
To Calculate If Tag:
Step 1.
Step 2.
Select the dataset of the tag for the condition. The tags for the dataset selected must already be
loaded. Otherwise, step 4 below will be meaningless.
Step 3.
Select the tag type of the tag for the condition. The tags for the dataset selected must already be
loaded. Otherwise, step 4 below will be meaningless.
Step 4.
Select the tag from the dropdown list. This list will be specific to the dataset selected in step 2.
Step 5.
Select the condition operator. For tags, all operators are available (=, <, >, <=, >=, <>).
Step 6.
Specify a floating point value in the field next to the operators. This value will be compared to
the engineering units value of the selected tag. The tag will be evaluated if this condition
evaluates to TRUE. Otherwise the tag will not be evaluated and, depending on Tag Dynamics
selected, the decay specification will take effect.
Step 1.
Step 2.
Select the dataset of the Discrete Control Device for the condition. The tieback for the dataset
selected must already be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Discrete Control Device tag from the dropdown list. This list will be specific to the
dataset selected in step 2.
Step 4.
Select the condition operator. For Discrete Control Devices, only = and <> are available. The =
operator checks for equality, while <> checks for inequality.
Step 5.
Select the SP of the Discrete Control Device in the condition. The Discrete Control Device PV
will be compared to the selected SP. The tag will be evaluated if this condition evaluates to
TRUE. Otherwise the tag will not be evaluated and, depending on tag dynamics selected, the
decay specification will take effect.
To Calculate If Loop:
Step 1.
Step 2.
Select the dataset of the Loop for the condition. The tieback for the dataset selected must already
be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Loop tag from the dropdown list. This list will be specific to the dataset selected in
step 2.
Step 4.
Select the condition operator. For Loops, all operators are available (=, <, >, <=, >=, <>).
Step 5.
Specify a floating point value in the field next to the operators. This value will be compared to
the engineering units value of the selected loop. The tag will be evaluated if this condition
evaluates to TRUE. Otherwise the tag will not be evaluated and, depending on tag dynamics
selected, the decay specification will take effect.
To Calculate If Calculation:
Step 1.
Step 2.
Select the dataset of the Calculation for the condition. The Calculations for the dataset selected
must already be loaded. Otherwise, step 3 below will be meaningless.
Step 3.
Select the Calculation tag from the dropdown list. This list will be specific to the dataset selected
in step 2.
Step 4.
Select the condition operator. For Calculations, all operators are available (=, <, >, <=, >=, <>).
Step 5.
Specify a floating point value in the field next to the operators. The tag will be evaluated if this
condition evaluates to TRUE. Otherwise the tag will not be evaluated and, depending on the tag
dynamics selected, the decay specification will take effect.
After specifying the Calculate If condition details, specify the tag personality as described in
section 6.1.3.5 below.
Tag personality is the heart of how an input tag will be modeled. Specifying tag personality
comprises selecting from a set of radio buttons to specify type, and then pressing the Details
push--button, to specify type specific parameters. At the most basic level, a tag can be made to
function as a display only object without any modeling. In this state, the tag dynamically
displays the engineering units value of the input address. Tag Dynamics are select by clicking on
a radio button. Follow these steps:
Step 1.
Step 2.
Press the Details push--button. The tag dynamic dialog box for the selected tag type will be
displayed. These dialog boxes are discussed in detail as follows:
After adding the tag specific details, pressing the OK push--button again saves all definitions in
the SIMVOX database. The changes become effective immediately, and are used in resolving the
tag model. To discard changes, press the Cancel button.
NOTE
Initial Value:
You can assign an initial engineering units value to the tag to start the simulation at a specific
place in the process dynamics. For example, if the tag is for Temperature, the initial value can be
used to set the temperature of material in a vessel when the simulation starts.
When the tag starts resolving, the first control action performed by SIMVOX is to write the
specified value into the address representing the temperature indication (or level, pressure, etc.).
Thereafter, the tag dynamics take over and the value changes as dictated by the model.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Average,
Integrate, Minimum, Maximum, Track, Mass Xfer; (2) Dead Time, Filter1, Filter2,
Polynomial. Of the first type, only one can be selected and applied to the level input signals.
Of the second type, one or more can be applied for final signal conditioning prior to writing
the PV (The details of these functions are presented in Appendix G).
D Vessel Type -- Three vessel types are available: Cone, Horizontal, and Vertical.
D Capacity -- the vessel capacity in engineering units. In some cases, the capacity is the same as
the high engineering units. In other cases, the level high engineering units are specified in
percent, i.e., 100%. This capacity field must be actual engineering units.
D Angle -- this field applies only to cone vessels and represents the angle (in degrees) between
the cone and vertical section of the vessel.
D Integration initial -- this field allows you to initialize the starting value for the level
integration. This field is enabled if the Integrate function is applied.
D Integration gain -- This field is enabled if the Integrate function is applied. You can use it to
perform unit conversion. For example, if the input is in gallons, a gain of 8.0 will convert it
to pounds and integrate pounds.
D PV I/O -- PV I/O, Tracking PV and PV Signal are related sections. PV I/O allows you to
specify the level input and output signals. If the PV In radio button is selected, the Tracking
PV and PV Signal represent the signals which increase the level. If PV Out radio button is
selected, then the Tracking PV and PV Signal represent the signals which decrease the level.
If PV In is selected, PV Out will be greyed, and vice versa. To tell SIMVOX that you are
done specifying Input (or Output signals), press the Done push--button.
D Tracking PV -- PV I/O, Tracking PV and PV Signal are related sections. In this section, you
can select the type of signal. Your input signal can be one or upto 10 (any mix) of AI, AO,
Discrete Control Device, Loop, Calculation and Constant. These signals are from devices
with the current dataset. To bring in signals from other datasets, use calculations. When you
select the Track Discrete Control Device radio button, a list of Discrete Control Device tags
will be displayed in the first PV Signal list. If you select the Track Calc radio button, a list of
Calculation tags will be displayed in the first PV Signal list. Note that Calculations must
have been previously loaded for you to be able to get the tags.
D PV Signal -- PV I/O, Tracking PV and PV Signal are related sections. With the selected type
of tags displayed in the list, you can double click on the tag. This will add it to the applied
signals list. Or you can single click and press the Add push--button. SIMVOX allows you to
add more than 10, but only the 1st ten signals in the list are retained. All else are discarded.
The sum of all selected signals will be used. To delete a signal from the applied list, simply
select it by single clicking on it, and press the Delete push--button. When you are done
adding Input signals, press the Done push--button. This reads your specifications and saves
them, while enabling you to select the Output signals. You can perform this any number of
times to refine your level tag signals. To discard all selected signals from the applied list,
press the Clear All push--button.
Here we present a simple example of a Level tag, LI--831--1, for tank T831. This level has three
inputs and 1 output. Each input is specified by flow through a Discrete Control Device valve, so
we have XV--830--1, XV--831--1, and XV--832--1. The output is also a Discrete Control Device
valve, XV--830--2. Note that more complex examples are presented in the Examples, section 8.
Step 1.
Select level tag and assign model personality to it as described in section 6.1.3.5.
Step 2..
Press the Details push--button. The Level Dynamics dialog box will be displayed.
Step 3.
Choose modeling functions to be applied. Here we elect to Integrate the level and we want to
apply a 1st order filter to smooth out the level rise. To do this, double click on Integrate in the list
on the left hand side. This will add Integrate to the applied functions list. Now double click on
Filter1 in the list on the left hand side. This will display a dialog box for the 1st order filter.
Complete this dialog box, specifying filter time in seconds and a gain of 1.0. Press the OK
push--button to add Filter1 to the applied functions list.
Note that the function will be added and appear as Filter1 (x.y, 1.0) in the list, where x.y is the
filter time in seconds, and 1.0 is the gain. You can edit this by double clicking on the function.
Step 4.
Select the type of vessel we are modeling. Assuming that T831 is a Vertical tank, use the
dropdown list to select vessel type as Vertical. This will grey the Angle and Radius fields. You
must, however, specify the Capacity. Our tank here can hold 5,000.00 gallons, so we enter
5000.0 in the capacity field.
Step 5.
Because we selected Integrate in Step 1, the Integration Parameters section is enabled. Here we
specify an initial value of 0.0 and a gain of 1.0. Note that to integrate a value, the gain should
never be 0.0.
Step 6.
Now we are ready to specify what makes our level rise and what makes it fall. We said that we
had 3 inputs and 1 output as follows:
Assuming these devices are in the current dataset and already loaded into the tieback, we can go
ahead and complete our tag definition. If these signals were Calculations or Tieback objects
which were not loaded, we could simply switch to the Calculations/Tieback windows, load the
appropriate files, and then return to our definition.
When we first enter the Level Dynamics dialog box, the PV In radio button will be selected, so
we can add the input signals right away.
To add the Discrete Control Device valve, click on the Track Discrete Control Device radio
button. This will display all the available Discrete Control Devices in the current dataset. Select
XV--830--1 by double clicking on it. It will get added to the applied list. Similarly, double click
on XV--831--1 and XV--832--1.
Now press the Done push--button. SIMVOX will read the signal list and save the values, while
enabling the PV Out radio button. Click on the PV Out radio button. This will disable the PV In
radio button and show all the Output signals.
To add the output Discrete Control Device valve, click on the Track Discrete Control Device
radio button. This will display all the available Discrete Control Devices in the current dataset.
Select XV--830--2 by double clicking on it. It will get added to the applied list.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main tag dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the level tag definition in the SIMVOX database.
NOTE
Analyzing this level tag definition, we can see that the level will integrate, regardless of
available volumes upstream, i.e., an infinite source is assumed. This can be changed by defining
the input Discrete Control Device valves to examine available volumes prior to returning their
values. For the Discrete Control Device, we can define it to track a calculation which calculates
available volume.
To specify simple mass balance for vessels is as rapid as the above exercise. No code was written
at all and the level definition is complete. More complex mass balance examples are presented in
section 8.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Average,
Integrate, Minimum, Maximum, Track; (2) Dead Time, Filter1, Filter2, Polynomial. Of the
first type, only one can be selected and applied to the temperature input signals. Of the
second type, one or more can be applied for final signal conditioning prior to writing the PV
(The details of these functions are presented in Appendix G).
D Temperature Decay -- This section describes what happens to the temperature when the tag
evaluate condition is FALSE. Tag condition is specified in the Calculate If section.
D Integration initial -- this field allows you to initialize the starting value for the temperature
integration. This field is enabled if the Integrate function is applied.
D Integration gain -- This field is enabled if the Integrate function is applied. You can use it to
perform unit conversion.
D PV I/O -- PV I/O, Tracking PV and PV Signal are related sections. PV I/O allows you to
specify the temperature input and output signals. If the PV In radio button is selected, the
Tracking PV and PV Signal represent the signals which increase the temperature. If PV Out
radio button is selected, then the Tracking PV and PV Signal represent the signals which
decrease the temperature. If PV In is selected, PV Out will be greyed, and vice versa. To tell
SIMVOX that you are done specifying Input (or Output signals), press the Done
push--button.
D Tracking PV -- PV I/O, Tracking PV and PV Signal are related sections. In this section, you
can select the type of signal. Your input signal can be one or upto 10 (any mix) of AI, AO,
Loop, Calculation and Constant. These signals are from devices within the current dataset.
To bring in signals from other datasets, use calculations. When you select the Track Loop
radio button, a list of Loop tags will be displayed in the first PV Signal list. If you select the
Track Calc radio button, a list of Calculation tags will be displayed in the first PV Signal list.
Note that Calculations must have been previously loaded for you to be able to get the tags.
D PV Signal -- PV I/O, Tracking PV and PV Signal are related sections. With the selected type
of tags displayed in the list, you can double click on the tag. This will add it to the applied
signals list. Or you can single click and press the Add push--button. SIMVOX allows you to
add more than 10, but only the 1st ten signals in the list are retained. All else are discarded.
The sum of all selected signals will be used. To delete a signal from the applied list, simply
select it by single clicking on it, and press the Delete push--button. When you are done
adding Input signals, press the Done push--button. This reads your specifications and saves
them, while enabling you to select the Output signals. You can perform this any number of
times to refine your temperature tag signals. To discard all selected signals from the applied
list, press the Clear All push--button.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main tag dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the temperature loop definition in the SIMVOX
database.
NOTE
To specify simple temperature balance is as rapid as the above exercise. No code was written at
all and the temperature definition is complete. More complex temperature balance examples are
presented in section 8.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Average,
Integrate, Minimum, Maximum, Track; (2) Dead Time, Filter1, Filter2, Polynomial. Of the
first type, only one can be selected and applied to the pressure input signals. Of the second
type, one or more can be applied for final signal conditioning prior to writing the PV (The
details of these functions are presented in Appendix G).
D Pressure Decay -- This section describes what happens to the pressure when the tag
evaluation condition is FALSE. Tag condition is specified in the Calculate If section.
D Integration initial -- this field allows you to initialize the starting value for the pressure
integration. This field is enabled if the Integrate function is applied.
D Integration gain -- This field is enabled if the Integrate function is applied. You can use it to
perform unit conversion.
D PV I/O -- PV I/O, Tracking PV and PV Signal are related sections. PV I/O allows you to
specify the pressure input and output signals. If the PV In radio button is selected, the
Tracking PV and PV Signal represent the signals which increase the pressure. If PV Out
radio button is selected, then the Tracking PV and PV Signal represent the signals which
decrease the pressure. If PV In is selected, PV Out will be greyed, and vice versa. To tell
SIMVOX that you are done specifying Input (or Output signals), press the Done
push--button.
D Tracking PV -- PV I/O, Tracking PV and PV Signal are related sections. In this section, you
can select the type of signal. Your input signal can be one or upto 10 (any mix) of AI, AO,
Discrete Control Device, Loop, Calculation and Constant. These signals are from devices
within the current dataset. To bring in signals from other datasets, use calculations. When
you select the Track Discrete Control Device radio button, a list of Discrete Control Device
tags will be displayed in the first PV Signal list. If you select the Track Calc radio button, a
list of Calculation tags will be displayed in the first PV Signal list. Note that Calculations
must have been previously loaded for you to be able to get the tags.
D PV Signal -- PV I/O, Tracking PV and PV Signal are related sections. With the selected type
of tags displayed in the list, you can double click on the tag. This will add it to the applied
signals list. Or you can single click and press the Add push--button. SIMVOX allows you to
add more than 10, but only the 1st ten signals in the list are retained. All else are discarded.
The sum of all selected signals will be used. To delete a signal from the applied list, simply
select it by single clicking on it, and press the Delete push--button. When you are done
adding Input signals, press the Done push--button. This reads your specifications and saves
them, while enabling you to select the Output signals. You can perform this any number of
times to refine your pressure tag signals. To discard all selected signals from the applied list,
press the Clear All push--button.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main tag dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the pressure tag definition in the SIMVOX
database.
NOTE
To specify simple pressure balance is as rapid as the above exercise. No code was written at all
and the pressure definition is complete. More complex pressure balance examples are presented
in section 8.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Track, Invert
Track; (2) Dead Time. Of the first type, only one can be selected and applied to the discrete
input signals. In addition, if selected, Dead Time can be applied for final signal conditioning
prior to writing the PV (The details of these functions are presented in Appendix G).
D PV Type -- PV Type and PV Signal are related sections. In this section, you can select the
type of signal. Your input signal can be one of DI, DO, Calculation or Constant. These
signals are from devices within the current dataset. To bring in signals from other datasets,
use calculations. When you select the Track DI radio button, a list of DI tags will be
displayed in the first PV Signal list. If you select the Track Calc radio button, a list of
Calculation tags will be displayed in the first PV Signal list. Note that Calculations must
have been previously loaded for you to be able to get the tags.
D PV Signal -- PV Type and PV Signal are related sections. With the selected type of tags
displayed in the list, you can double click on the tag. This will add it to the applied signals
list. Or you can single click and press the Add push--button. SIMVOX allows you to add only
one signal. To delete a signal from the applied list, simply select it by single clicking on it,
and press the Delete push--button. When you are done adding Input signals, press the Done
push--button. This reads your specification and saves it. To discard the selected signal from
the applied list, press the Clear push--button.
Step 1.
Select the DI tag LS--810--1. This is done by clicking on the down--arrow button on the
spreadsheet display for the LS--810--1 row. The details of the DI tag will be displayed.
Step 2.
Assign an initial value to the DI by clicking on the 0 or 1 radio buttons. The initial value is
asserted when the tags file is first loaded, when you press the Initialize button and OK out, or
when you do a dataset Reset.
Step 3.
In the lower left corner of the dialog, you will find the Calculate If section. Here you can specify
the conditions under which the DI tag dynamics will be modeled. For example, Always, or if
another tag has an engineering units value greater than 50.0.
In our example, select If Tag. Then select Type as AI. All the AI tags will be displayed in the
dropdown list. We want our level switch to be ON when the level LI--810--1 is greater than 80%,
OFF otherwise. To specify this condition, select the > in the condition dropdown list, and type in
80.0 in the value field.
Step 4.
Select Switch in the Point Dynamics section and then click the Details push--button. The
dynamics dialog will be displayed. Select the Track modeling function.
Step 5.
For PV Type, select Const and then enter a 1 by clicking on the 1 radio button. The 1 will be
added to the selected PV Signal list.
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main tag dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the switch tag definition in the SIMVOX database.
NOTE
To specify a level switch is as rapid as the above exercise. No code was written at all and the
switch definition is complete. Whenever, LI--810--1 goes greater then 80.0%, the switch
LS--810--1 will on ON. When the level falls below 80.0%, the switch will be OFF. Note that this
is valid only if the Engineering Units of LI--810--1 were defined as 0--100%. If the Engineering
units had been defined as 0--1000 Gals, for example, then the condition could have been
specified as LI--810--1 > 800.0.
D Modeling Functions -- This comprises selecting one or more functions from the available list
and adding to the applied functions list. There are two types of functions: (1) Track, Sum; (2)
Dead Time. Of the first type, only one can be selected and applied to the pulse count input
signals. In addition, if selected, Dead Time can be applied for final signal conditioning prior
to writing the PV (The details of these functions are presented in Appendix G).
D PV Type -- PV Type and PV Signal are related sections. In this section, you can select the
type of signal. Your input signal can be one of Calculation or Constant. These signals are
from devices within the current dataset. To bring in signals from other datasets, use
calculations. When you select the Track Calc radio button, a list of Calculation tags will be
displayed in the first PV Signal list. Note that Calculations must have been previously loaded
for you to be able to get the tags.
D PV Signal -- PV Type and PV Signal are related sections. With the selected type of tags
displayed in the list, you can double click on the tag. This will add it to the applied signals
list. Or you can single click and press the Add push--button. SIMVOX allows you to add only
one signal. To delete a signal from the applied list, simply select it by single clicking on it,
and press the Delete push--button. When you are done adding Input signals, press the Done
push--button. This reads your specification and saves it. To discard the selected signal from
the applied list, press the Clear push--button.
Step 1.
Select meter tag and assign model personality to it as described in section 6.1.3.5.
Step 2..
Press the Details push--button. The Meter Dynamics dialog box will be displayed.
Step 3.
Choose modeling functions to be applied. Here we elect to Sum the counts to simulate a meter.
To do this, double click on Sum in the list on the left hand side. This will add Sum to the applied
functions list.
Note that the DeadTime function would be added and appear as Deadtime (x.y, S) in the list,
where x.y is the dead time, and S is the unit of time (M/S min/sec). You can edit this by double
clicking on the function.
Step 4.
Now we are ready to specify what makes our counts rise and what makes it fall. We will define
our PV Signal as follows:
Now press the Done push--button. SIMVOX will read the signal list and save it. Press the OK
push--button to return to the main tag dialog box. Verify that your Calculate If condition is
correct. Press the OK push button. This saves the meter tag definition in the SIMVOX database.
NOTE
Specifying a pulse count meter is as rapid as the above exercise. No code was written at all and
the meter definition is complete.
SUM:
Based on the scan time selected for the PCI, the input signal is added and serves as a
pulse increment. The pulse counter counts to 65535 and then rolls over. The resulting pulse
count is written to the SIMVOX database for communication back to the controller.
Additionally, the rate is calculated based on scan time as follows:
rate period * ( (current pulses -- last pulses) / (current time -- last time) ).
The Engineering Units Value displayed for the PCI is the rate * conversion factor.
TRACK:
The input signal is the raw pulse count which the PCI displays. In this case, since the
rate is not changing, the Engineering Units Value is 0.0.
Step 1.
Press the detail button for the object. Each object row has a detail button. This will display a
detail dialog box.
Step 2.
To adjust the scan time, select new time in the scan time dropdown list.
Step 3.
Press the OK button to save the definition. Your change goes into effect immediately.
Step 1.
Press the Toolbar Scan On/Off button. This will display a dialog box.
Step 2.
Select the dataset to be controlled from the dropdown list. The select the Online/Offline radio
buttons appropriately.
Step 3.
Press the OK button to save the definition. Your change goes into effect immediately.
The nature of calculations is such that they provide a bi--directional gateway. Data from external
sources, i.e., 3GL programs or spreadsheets, can be brought in and made available to the
modeling environment via calculations. Additionally, data generated by calculations, can be
accessed by external 3GL programs and spreadsheets. Note that 3GL programs use the
programming API while spreadsheets, e.g., Excel, use DDE, to read/write calculations. This is
described in Section 5 and Section 6.2.3, respectively.
To open a new window, the Calculations main window must already be started. The leftmost
Toolbar icon, blank sheet, is used to open an new child window. Alternatively, the File--New
pulldown menu option can be used.
When selected, a dialog box will be displayed where you must specify the dataset for the new
calculations window. Only the empty and available datasets are presented in the dropdown list.
If a calculations file already exists, and you want to edit it, the second from left Toolbar icon, file
folder, is used to open a child window. Alternatively, the File--Open pulldown menu option can
be used.
When selected, a dialog box will be displayed where you must specify the dataset and the name
of the calculations file to be opened. Only the empty and available datasets are presented in the
dropdown list.
Select a dataset and press OK. This will open a child window as described in Section 4.5.
To save the created calculations to a disk file, use the Toolbar icon (third from left), or select the
File--Save pulldown menu option. To save the file with a new name, use the File--Save As
pulldown menu option.
6.1.4.1.1 Add
Select the Edit--Add pulldown to add new calculations. When selected, the Add Calculation
dialog box will be displayed.
To add the HeatRise calculation we defined for the Temperature loop in Section 6.1.2.7.2, follow
these steps:
Step 1.
Step 2.
Step 3.
Step 4.
Set the calculation to be Internal by clicking on the Internal radio button. External calculations
allow you to bring in information from external 3GL programs or spreadsheets.
Step 5.
Set the evaluation mechanism to be Time Based by clicking on that radio button. On Demand
calculations are evaluated when they are referenced by another object. Now that Time Based has
been specified, the Scan time can be adjusted.
Step 6.
Now we are ready to specify our expression. Single click on the Edit push--button. This will
enable the expression field for data entry. This will grey the OK push--button. Enter the
following:
Step 7.
Press the Check push--button. This will perform a syntax check and inform you if there are any
errors. If no errors are found, The OK push button will become ungreyed. You can also test your
expression to see what it evaluates to under the current system values. To do this, press the Test
push--button. This will display the Test dialog box. Press Test again to evaluate the expression.
The expression value will be shown as well as any errors. Press OK or Cancel to go back.
Step 8.
Step 9.
Press the OK push--button to save the calculation. The calculation will be added to the child
window, and it will start resolving immediately.
6.1.4.1.2 Modify
Select the Edit--Modify pulldown to clone the calculation we just added. When selected, the
Modify Calculation dialog box will be displayed.
To create the HeatLoss calculation we defined for the Temperature loop in Section 6.1.2.7.2,
follow these steps:
Step 1.
Select the HeatRise calculation from the dropdown list. This will display the calculation details.
Step 2.
Now we are ready to specify our new expression. Single click on the Edit push--button. This will
enable the expression field for data entry. This will grey the SAVE and SAVE AS pushbuttons.
Enter the following:
Step 3.
Press the Check pushbutton. This will perform a syntax check and inform you if there are any
errors. If no errors are found, The SAVE and SAVE AS pushbuttons will become ungreyed. You
can also test your expression to see what it evaluates to under the current system values. To do
this, press the Test pushbutton. This will display the Test dialog box. Press Test again to evaluate
the expression. The expression value will be shown as well as any errors. Press OK or Cancel to
go back.
Step 4.
Enter a new 80 character comment for this calculation in the comment field.
Step 5.
Press the SAVE AS pushbutton to save the calculation. The Save As dialog box will be
displayed. Here you must enter a new Tag. Enter HeatLoss, and press enter. SIMVOX will check
for duplicate tags and if none are found, it will add the cloned calculation to the dataset child
window.
6.1.4.1.3 Delete
You cannot delete calculations unless the entire dataset is offline. To take a dataset offline, use
the On/Off Toolbar icon.
Select the Edit--Delete pulldown to delete existing calculations. When selected, the Delete
Calculation dialog box will be displayed.
Step 1.
Select the calculation tag from the dropdown list. This will display the calculation details.
Step 2.
Press the OK pushbutton. This will remove the calculation and repaint the display.
Step 3.
Press the Cancel pushbutton to return back to the child window display. A prompt to reload the
dataset will be displayed. Press the YES pushbutton, and the dataset will be reloaded and
brought back online.
Step 1.
Step 2.
Select the dataset from the dropdown list. The list displayed will comprise all the available
datasets.
Step 3.
Press the Browse pushbutton to get the File Open dialog. You can browse around in the
directories and select the file, wherever it is located. Double clicking on the file, or single
clicking and then pressing the OK pushbutton will read the file name and directory into the Load
Calc File dialog box.
Step 4.
With the dataset selected and the calculations file selected, press the OK pushbutton. SIMVOX
will start reading the file, checking it for syntax errors as it goes along. If no errors are detected,
the calculations child window will be created.
If any errors are detected in the calculations file, an error message prompt will be displayed
showing the text in error. You can correct the errors by editing the tag file with any standard text
editor. The Toolbar contains the notepad icon. You can use it to edit.
Step 5.
Step 1.
Single click on this button. This will display a dialog box showing all the known detail for the
calculation.
Step 2.
D Comment -- The comment field can be edited after pressing the Edit pushbutton.
Step 3.
After editing, (uneditable fields are grey) press the OK pushbutton to save changes in the
SIMVOX database. If no changes were made or to discard changes, press the Cancel pushbutton.
Step 4.
Usage:
ABS (--100.0)
ABS (PVE (TIC--810--1))
ABS (CALC (TestCalc))
Return Value:
This function returns the absolute value of its parameter.
Usage:
EXP (1.0)
EXP (CALC (AnotherCalc))
Return Value:
This function returns the exponentiol function of its parameter.
Usage:
IN (CALC(MyCalc), FLOW (XV--800--1,OPEN), FLOW (FIC--800--2,))
Return Value:
This function returns 1.0 if the first parameter lies between the second two parameters.
Otherwise, it returns 0.0. If any tag is not found, the returned value is 0.0, and an error message
is displayed in the spreadsheet error column.
Usage:
LIMIT (CALC(MyCalc), 100.0. 0.0)
Return Value:
This function returns the parameter if it lies between the second two parameters. If
parameter is higher than the second parameter, the second parameter is returned. Otherwise, if it
is lower than the third parameter, the third parameter is returned. If any tag is not found, the
returned value is 0.0, and an error message is displayed in the spreadsheet error column.
Usage:
LOG (4.0)
LOG (PVE (TI--810--1))
Return Value:
This function returns the log base 2 of its parameter.
Usage:
LOG10 (100.0)
LOG10 (PVE (TI--810--1))
Return Value:
This function returns the log base 10 of its parameter.
Usage:
MIN (FLOW (XV--800--1,), FLOW (XV--810--1, OPEN))
MIN (FLOW (XV--800--1,),
MIN (FLOW(FIC--810--1,), FLOW (XV--810--1, OPEN)))
Return Value:
This function returns the minimum of its 2 parameter.
Usage:
MAX (FLOW (XV--800--1,), FLOW (XV--810--1, OPEN))
MAX ((FLOW (XV--800--1,)/2.5),
MAX ((FLOW(FIC--810--1,)*5.0), FLOW (XV--810--1, OPEN)))
Return Value:
This function returns the maximum of its 2 parameter.
Usage:
POW (FLOW(FI--100--1), 2)
Return Value:
This function returns the first parameter raised to the second parameter. If any tag is not
found, the returned value is 0.0, and an error message is displayed in the spreadsheet error
column.
Usage:
SQRT (FLOW (XV--800--1,))
SQRT (CALC (CalcTag)
Return Value:
This function returns the square root of its parameter.
Usage:
ACOS (X)
Return Value:
This function returns the arccosine of X in the range 0 to pi radians.
Usage:
COS (X)
Return Value:
This function returns the cosine of X.
Usage:
COSH (X)
Return Value:
This function returns the hyperbolic cosine of X.
Usage:
ASIN (X)
Return Value:
This function returns the arcsine of X in the range --pi/2 to pi/2 radians.
Usage:
SIN (X)
Return Value:
This function returns the sine of X.
Usage:
SINH (X)
Return Value:
This function returns the hyperbolic sine of X.
Usage:
ATAN (X)
Return Value:
This function returns the arctangent of X in the range --pi/2 to pi/2 radians.
Usage:
TAN (X)
Return Value:
This function returns the tangent of X.
Usage:
TANH (X)
Return Value:
This function returns the hyperbolic tangent of X.
Usage:
RAN (10.0, 20.0)
Return Value:
This function returns a pseudo random floating point number between the first argument
and the second argument.
Usage:
AI (TI--100--1)
AI (PI--810--1)
AI (FI--831--1)
Return Value:
This function returns the percent value of the parameter tag. The value is in the range 0.0
to 100.0. If tag is not found, the returned value is 0.0, and an error message is displayed in the
spreadsheet error column.
Usage:
AIE (TI--100--1)
AIE (PI--810--1)
AIE (FI--831--1)
Return Value:
This function returns the engineering units value of the parameter tag. The value is in the
range EUL to EUH, as defined by the object. If tag is not found, the returned value is 0.0, and an
error message is displayed in the spreadsheet error column.
Usage:
AO (XPO--100--1)
Return Value:
This function returns the percent value of the parameter tag. The value is in the range 0.0
to 100.0. If tag is not found, the returned value is 0.0, and an error message is displayed in the
spreadsheet error column.
Usage:
AOE (XPO--100--1)
Return Value:
This function returns the engineering units value of the parameter tag. The value is in the
range EUL to EUH, as defined by the object. If tag is not found, the returned value is 0.0, and an
error message is displayed in the spreadsheet error column.
Usage:
CALC (MyCalc)
Return Value:
This function returns the engineering units value of the parameter tag. The value is the
evaluated result of the calculation expression. If tag is not found, the returned value is 0.0, and
an error message is displayed in the spreadsheet error column.
You can call other calculations from within a calculation expression. The following rules
must be followed when calling calculations which are On--Demand or Time--Based.
Usage:
DCD_EQ (XV--800--1, OPEN)
DCD_EQ (XV--100--1, CLOSE)
Return Value:
This function returns the value 1.0 if the Discrete Control Device specified by parameter
tag is in the specified SP. Otherwise, 0.0 is returned. If tag is not found, the returned value is 0.0,
and an error message is displayed in the spreadsheet error column.
Usage:
DCD_NEQ (XV--800--1, OPEN)
Return Value:
This function returns the value 1.0 if the Discrete Control Device specified by parameter
tag is not in the specified SP. Otherwise, 0.0 is returned. If tag is not found, the returned value is
0.0, and an error message is displayed in the spreadsheet error column.
Usage:
DIO (LS--100--1)
DIO (TEST--DO)
Return Value:
This function returns the value of the parameter tag. The value is 0.0 or 1.0. If tag is not
found, the returned value is 0.0, and an error message is displayed in the spreadsheet error
column.
Usage:
FILT (AIE(TI--100--1), 10.0, 1.0)
FILT (CALC(TEST--DO), 20.0, 1.0)
Return Value:
This function returns the 1st order filter value of the 1st parameter, based on the 2nd and
3rd parameters (time factor and gain, respectively). If an error occurs in obtaining the value of
the 1st parameter, a 0.0 is returned and an error message is displayed in the spreadsheet error
column.
Usage:
FLOW (FIC--100--1, )
FLOW (XV--800--1, OPEN)
FLOW (XV--800--2, )
Return Value:
This function returns the engineering units flow value of the parameter tag as defined
below:
1. If the tag is a loop, the second parameter is ignored and the current PV value is returned.
2. If the tag is a Discrete Control Device, and the second parameter is specified (non blank), then
the current flow is returned only if the Discrete Control Device is in the specified SP. If not, a 0.0
is returned.
3. If the tag is a Discrete Control Device, and the second parameter is blank, then the current
flow is returned regardless of the SP.
If tag is not found, the returned value is 0.0, and an error message is displayed in the spreadsheet
error column.
Usage:
IVP (FIC--100--1)
Return Value:
This function returns the IVP of the parameter tag in percent. The value is in the range
0.0 to 100.0. If tag is not found, the returned value is 0.0, and an error message is displayed in
the spreadsheet error column.
Usage:
POLY (Arg1, Arg2, Arg3, Arg4)
Return Value:
This function returns the 3rd degree polynomial value of the specified parameters.
Usage:
PVE (FIC--100--1)
Return Value:
This function returns the PV of the parameter tag in engineering units. The value is in the
range EUL to EUH, of the specified object. If tag is not found, the returned value is 0.0, and an
error message is displayed in the spreadsheet error column.
Usage:
PV (FIC--100--1)
Return Value:
This function returns the PV of the parameter tag in percent. The value is in the range 0.0
to 100.0. If tag is not found, the returned value is 0.0, and an error message is displayed in the
spreadsheet error column.
Usage:
PULSES (PCI--TAG)
Return Value:
This function returns the raw pulses value of the parameter tag. The value is in the range
0.0 to 65535.0. If tag is not found, the returned value is 0.0, and an error message is displayed in
the spreadsheet error column.
RATE 1 parameter Last calculated rate value of the PCI tag pa-
rameter
Usage:
RATE (PCI--TAG)
Return Value:
This function returns the rate value of the parameter tag as calculated by SIMVOX. If tag
is not found, the returned value is 0.0, and an error message is displayed in the spreadsheet error
column.
PCIE 1 parameter Engineering units value of Pulse Count Input tag pa-
rameter
Usage:
PCIE (PCI--TAG)
Return Value:
This function returns the engineering units value of the parameter tag. The value is in the
range EUL to EUH, as defined by the object. If tag is not found, the returned value is 0.0, and an
error message is displayed in the spreadsheet error column.
6.1.4.4.3 Operators
NOTE
In existing C code, the name of the main module is main (). It represents the entry point of the
program when it is started. With SIMVOX, the entry point of the program is now a module
which creates a window. After window creation completes, this module starts a second thread
from which the existing code will be called as an external module. Consequently, you must
assign a specific name to the code module. This name is Model. By changing main () to Model
(), the existing code becomes a function which can be called from the window. The existing code
is now compiled as an external module and always linked with mod.obj, as shown in the make
file below.
Existing FORTRAN code follows the same mechanism. The FORTRAN main program has a
statement program xyz. This statement is not needed any more. Instead, the main program is
converted to a subroutine with the name MODEL, compiled as an external module and linked
with fmod.obj. The window creation is handled by fmod.obj.
In general, FORTRAN passes all parameters by reference. C calls could easily be made to do
the same, even though C, in general, passes all parameters by value. VAX/VMS further allowed
passing constants, eg, file--card--channel addresses, by reference.
This is not the case with the compilers available under Windows NT.
C Code.
When porting existing C code, the only code that must change is where a SIMVOX function is
being called with a constant passed by reference. For example:
Existing code: sim20_getdi_fcc (&ds, &12, &11, &13, &value, &error, &errdst);
Ported code: sim20_getdi_fcc (&ds, 12, 11, 13, &value, &error, &errdst);
Existing code: sim20_setpci (&ds, &40703, &value, &rate_p, &error, &errdst, &10);
Ported code: sim20_setpci (&ds, 40703, &value, &rate_p, &error, &errdst, 10);
Please examine the C model provided as an example. This is located in your installed SIMVOX
directory. The subdirectory is called \C.
FORTRAN Code.
When porting existing FORTRAN code, the only code that must change is the SIMVOX
function names. This can be easily accomplished with a search and replace in the editor of your
choice. For example:
Existing code: call sim20_getdi_fcc (ds, 12, 11, 13, value, error, errdst);
Ported code: temp_di sim20_getdi_fcc (ds, 12, 11, 13, value, error, errdst);
Where temp_ai and temp_di are temporary Double and long variables, respectively. These are
required because the SIMVOX functions all return a value.
Please examine the FORTRAN model provided as an example. This is located in your installed
SIMVOX directory. The subdirectory is called \FORTRAN.
For a complete description of the current programming API, please refer to Appendices A--E.
The function calling sequence is also detailed under the online SIMVOX main menu help.
Unsupported Functions.
The Programming API of SIMVOX supports all functions available in existing VAX/VMS code,
with the exception of the following:
1. sim20_wakeup; and
2. sim20_sleep.
C Make File:
!include <ntwin32.mak>
all : $(proj).exe
You can copy this file as xyz.mak. To invoke this make file, open the command prompt window.
Set your default directory where your source files are located. Then from the prompt, enter the
following command:
nmake /f xyz.mak
The make file will compile and link xyz if a change was made to the source program since the
last compile/link. If compile errors are detected in the source program, the error messages are
sent to the users terminal. You must correct these errors and repeat the compilation process.
all : $(proj).exe
You can copy this file as xyz.mak. To invoke this make file, open the command prompt window.
Set your default directory where your source files are located. Then from the prompt, enter the
following command:
nmake /f xyz.fmk
The make file will compile and link xyz if a change was made to the source program since the
last compile/link. If compile errors are detected in the source program, the error messages are
sent to the users terminal. You must correct these errors and repeat the compilation process.
For a complete description of the compilation process, the user is referred to the compiler
manufacturers language reference and users manual.
Access by address currently supports the PROVOX addressing methodology of File, Card, and
Channel only. As Allen Bradley PLC, Modicon PLC, and RS3 controllers are added, their
respective addressing mechanisms will also be supported.
Access by Tag allows external applications to request data by tag (e.g., Discrete Control Device,
Loop, Analog Input, Analog Out, e.t.c.), or by Calculation tag (i.e., User calculations).
Each DDE link specification contains three parts: the application specification, the topic
specification, and the item label. E.g.
SIMVOX|AIDS1!WT--803--1
In the above example SIMVOX is the application, AIDS1 is the topic and WT--803--1 is the item
label. Note the seperators between the three parts: the | and the !.
Step1.
Step2.
where
n = dataset number, 1 to 8 maximum.
FICACH is the file--card--channel address, including leading zeros. For example, to read
file 1, card 1, and channel 1, specify 010101. For file 16, card 14, channel 16, specify
161416.
MyTag is the tag for the selected data item in the selected dataset.
Step3.
Step1.
You can write data into SIMVOX by using the DDE write capability of spreadsheets and other
DDE compliant applications. For example, in Excel, the following macro can be used to open a
channel and then write to a specific data item.
a. Address write:
=INITIATE(SIMVOX,FCCDSn)
=POKE(Chan1,FICACH,C1)
=TERMINATE(Chan1)
=RETURN()
b. Tag write:
=INITIATE(SIMVOX,AIDSn)
=POKE(Chan2,MyTag,D5)
=TERMINATE(Chan2)
=RETURN()
NOTE
c. Calculation write:
=INITIATE(SIMVOX,CALDSn)
=POKE(Chan3,CalcTag,A10)
=TERMINATE(Chan3)
=RETURN()
where
n = dataset number, 1 to 4 maximum.
FICACH is the file--card--channel address, including leading zeros. For example, to read
file 1, card 1, and channel 1, specify 010101. For file 16, card 14, channel 16, specify
161416.
Chan1, Chan2, Chan3 are the names defined for each respective INITIATE command
using Excels Formula Name Define option.
The first step in checking communications is to verify that the line status is correct. A
Communication Line Monitor is an invaluable tool for this purpose. The line status
depicted in Figure 3.5 assumes the male connector of the line monitor connected directly
to the E/I card. The female side of the line monitor is connected to the cable going to the
PC Workstation. With the cables connected in this way and communications active, the
line monitor should have the status depicted in Figure 3.5.
Figure 3.5 also depicts the line monitor status when only parts of the cable are connected.
For example, with only the PC side connected, only yellow LED number 3 is on.
Alternatively, with the line monitor connected to the E/I card only, yellow LED number
2, red LEDs number 4 and 20 should be on. In addition, the red LED number 2 should
flash periodically.
With both sides connected, yellow LEDs 2 and 3 should be on and red LEDs 4, 5, 6, and
20 should be on. Then with communications active, LEDs 2 and 3 on both sides flash
periodically. If the user does not see this, the cable has a problem which should be
corrected.
The E/I card should be in the correct state for communications to work. The green LED
on the E/I card should be blinking on a 1 second interval with no communications. When
communications are initiated and are valid, the LED does not blink.
If the LED blinks on a half second interval or is off, the E/I card is in an invalid state. To
correct this, remove the E/I card from the I/O card file and disconnect the RS--232 cable
going to the PC Workstation. Reinstall the E/I card first and wait for the green LED to
blink on a 1 second interval. Now reconnect the cable between the E/I card and the PC
Workstation.
In this category, the user will see symptoms like no communications at all or
communications with invalid data values. This may be caused by a configuration
mismatch between the controller and SIMVOX.
In the first case, the E/I card may be configured in the wrong I/O card file. Or the
physical address on the I/O card file may be wrong. Please refer to Figure 3.3 for
information on I/O card file addressing. Additionally, the E/I card may have been placed
in the wrong slot in the I/O card file.
In the second case, the E/I card does not get its configuration from SIMVOX, but rather
from the controller. SIMVOX sets the I/O configuration from the user supplied SIO file.
The File_card_channels specified in the SIO file should match the card list of the E/I card
in the controller definition. Since the E/I card reads and writes data values from specific
parts of the SIMVOX database, a discrepancy arises with configuration mismatches. The
user should terminate communications, correct the mismatches and reinitiate the entire
process.
Another reason for bad data values is when physical I/O cards, (which are also being
simulated through the E/I card), are placed in the I/O card file along with the E/I card.
The user should remove simulated cards and leave only the E/I card and unsimulated
cards installed in the card file.
8.0 Examples
This section will define more complex modeling examples. A more detailed description of a
level and temperature model will follow. The definition of the process to be modeled precedes
the steps needed to model through SIMVOX.
T2 TT TIC
023 023
LIC FO
2000 gal
021
P-- 100B TY-- 023
15 gpm
FV-- 025
LIT
B-- 201 15 gpm
15 gpm 021
20000 gal P-- 02A
P-- 201A
FT FT
FY-- 024
024A 024B
FI FI
0024A 024B
P-- 02B
FIC
P-- 201B 15 gpm
15 gpm 024
SUMMARY:
All Supply DCDs (e.g. Pumps P--100A & P--100B) have flow set to 15 gpm.
All Pathing DCDs (e.g. FV--022) have flow set to the path capacity.
CALCULATIONS:
T2_PMP1
(DCD_EQ(P_02A,START) OR DCD_EQ(P_02B,START)) AND (PV(LIC021) > 1)
AND (DCD_NEQ(FV025,CLOSE))
B100_PMP1
(DCD_EQ(P_100A,START) OR DCD_EQ(P_100B,START)) AND
(DCD_NEQ(FV022,CLOSE))
B201_PMP1
(DCD_EQ(P_201A,START) OR DCD_EQ(P_201B,START)) AND
(DCD_NEQ(FV022,CLOSE))
T2_IN
(CALC(B100_PMP1) OR CALC(B201_PMP1) * FLOW(FV022,) * (IVP(LIC021) /
100)
T2_OUT
CALC(T2_PMP1) * DCD_EQ(FV025,FEED) * (IVP(FIC024) / 100) * 15gpm
FLOW_OUT
(IVP(LIC021)/100) * 120 #/m
ASSIGNMENT:
LIC021
a. Calc If: ALWAYS
b. Function: INTEGRATE
c. PV(in): Track Calc: T2_IN
d. PV(out): Track Calc: T2_OUT
FI024A,B
a. Calc If: If Calc T2_PMP1
b. Function: FILTER1
c. Track Calc:FLOW_OUT
Step 1.
Select the Discrete Control Device window of the Tieback program. Depress the detail
button of the P--100A Discrete Control Device on the spreadsheet. In the Discrete
Control Device Dynamics Group box select the START setpoint and enter in 15.0 in the
Value field. Press OK and repeat for P--100B, P--201A, and P--201B. Similarly set the
flow value for each of the path Discrete Control Devices, such as FV--022 and FV--025.
Step 2.
Bring up the Calculation program and create a new calculation file. (See Section 4.5)
Click on the Edit Add option and add calculation T2_PMP1.
Press the Edit pushbutton and enter in the expression for this calculation.
For this calculation, we wish to confirm that either pump P_02A or P_02B is running and
that there is something in tank T2 and that the outlet valve FV025 is not closed. The
equation for this is:
(DCD_EQ(P_02A,START) OR DCD_EQ(P_02B,START)) AND (PV(LIC021) > 1)
AND (DCD_NEQ(FV025, CLOSE))
Add the following calculations to the calculation file in the same manner.
B100_PMP1
B201_PMP1
T2_IN
T2_OUT
FLOW_OUT
Step 3.
Now we must assign the constraints for our redundant transmitters FI024A and FI024B.
First bring up the Tags application and click on the detail pushbutton found on the
spreadsheet for the AI tag FI024A. We want this flow indicator to follow the output of
the level of tank T2. In order to do this we will need to track that output. The tracking
must occur only when either of the pumps before this transmitter is running, the tank is
not empty and exit valve FV025 is not closed.
In order to simulate this we must select the If Calc radiobutton in the Calculate Group
box. Clicking on this radiobutton will list all of the available calculations for this dataset.
For this tag select the T2_PMP1 calculation. Next select the conditional operator that we
will need which is the > symbol. The condition value should be 0. (The = symbol
could also be used with a condition value of 1.)
Now we are ready to define the dynamics for this transmitter. Click on the Other
radiobutton of the Tag Dynamics and press the Details button. In the Analog Input
Dynamics dialog, we will define the tracking conditions for this tag and control the
behavior of this tag through modeling functions.
We will need to add the Filter1 as well as the Integrate function. Add the appropriate
parameters to the Filter1 function dialog to smooth out the rise for this tag. The tracking
for this tag is based upon the level in the tank. For this we need to click on the Track
Calc radiobutton and double click on the FLOW_OUT calculation from the calculation
list provided. Press OK to finish the dynamics of this tag. Press OK on the detail dialog
of this tag to save the changes to the SIMVOX database.
Step 4.
Select the Loop window of the Tieback application. Depress the detail pushbutton found
on the spreadsheet for loop LIC021. Press the Model and Level radiobuttons for this
loop. Click on the Details pushbutton to open the Loop Level Dynamics dialog.
Choose modeling functions to be applied. Here we elect to Integrate the level. To do this,
double click on Integrate in the list on the left hand side. This will add Integrate to the
applied functions list.
Select the type of vessel we are modeling. Assuming that T2 is a Vertical tank, use the
dropdown list to select vessel type as Vertical. This will grey the Angle and Radius fields.
You must, however, specify the Capacity. Our tank here can hold 2,000.00 gallons, so we
enter 2000.0 in the capacity field.
Step 5.
Step 6.
Now we are ready to specify what makes our level rise and what makes it fall. The input
and output are assigned as follows:
When we first enter the Level Dynamics dialog box, the PV In radiobutton will be
selected, so we can add the input signals right away.
To add the input calculation, click on the Track Calc radiobutton. This will display all the
available calculations in the current dataset. Select T2_IN by double clicking on it. It will
get added to the applied list.
Now press the Done pushbutton. SIMVOX will read the signal list and save the values,
while enabling the PV Out radiobutton. Click on the PV Out radiobutton. This will
disable the PV In radiobutton and show all the Output signals.
To add the output calculation, select T2_OUT by double clicking on it. It will get added
to the applied list.
Now press the Done pushbutton. SIMVOX will read the signal list and save it. Press the
OK pushbutton to return to the main Loop dialog box. Verify that your Calculate If
condition is correct. It should be the Always radiobutton. Press the OK push button. This
saves the level loop definition in the SIMVOX database.
T2 TT TIC
023 023
2000 gal
LIC FO
021
P-- 100B
TY-- 023
15 gpm
FI FI
0024A 024B
P-- 02B
P-- 201B 15 gpm FIC
15 gpm
024
SUMMARY:
All Supply DCDs (e.g. Pumps P--100A & P--100B) have flow set to 15 gpm.
All Pathing DCDs (e.g. FV--022) have flow set to the path capacity.
CALCULATIONS:
T2_IN
(CALC(B100_PMP1) OR CALC(B201_PMP1) * FLOW(FV022,) * (IVP(LIC021) /
100)
T2_OUT
CALC(T2_PMP1) * DCD_EQ(FV025,FEED) * (IVP(FIC024) / 100) * 15gpm
T2_IBTU
(CALC(T2_IN) * 8.34 #/gal) * (150C * 1.8 + 32)
T2_HBTU
(25000 btu/hr / 60) * (IVP(TIC023) / 100)
T2_LOSS
600 btu/min * PV(LIC021)
T2_OBTU
(CALC(T2_OUT) * 8.34 #/gal) * (PV(TIC023) * 1.8 + 32)
T2_TMP
(((CALC(T2_IBTU) + CALC(T2_HBTU) -- CALC(T2_OBTU) -- CALC(T2_LOSS)) /
((2000gal * 8.34 #/gal) * (PV(LIC021) / 100)) --32) / 1.8
ASSIGNMENT:
TIC023
a. Calc If: ALWAYS
b. Function: FILTER1
c. PV(in): Track Calc: T2_TMP
d. PV(out): Track: none
1) T2_IBTU -- This calculation will take the flow value given by calculation T2_IN and
convert this to an input BTU value.
2) T2_HBTU -- This calculation will take the current output (IVP) for the temperature
control loop TIC023 and returns the current heat value.
3) T2_LOSS -- This calculation will determine the loss of heat by multiplying a constant
loss value by the level in the tank. The equation for this is:
4) T2_OBTU -- This calculation will take the flow value given by the calculation
T2_OUT and convert this to an output BTU value multiplied by the PV value of the
temperature control loop TIC023.
5) T2_TMP -- This calculation will use the results of the above equations and return the
final temperature for the model. The equation for this is:
Step 1.
Select the Discrete Control Device window of the Tieback program. Depress the detail
button of the P--100A Discrete Control Device on the spreadsheet. In the Discrete
Control Device Dynamics Group box select the START setpoint and enter in 15.0 in the
Value field. Press OK and repeat for P--100B, P--201A, and P--201B. Similarly set the
flow value for each of the path Discrete Control Devices, such as FV--022 and FV--025.
Step 2.
Bring up the Calculation program using the calculations created in section 8.1. Click on
the Edit Add menu option and add calculation T2_IBTU.
Press the Edit pushbutton and enter in the expression for this calculation.
For this calculation, we wish to determine the input BTUs. This equation uses the results
of equations already defined. The equation for T2_IBTU is:
(CALC(T2_IN) * 8.34 #/gal) * (150C * 1.8 + 32)
Add the following calculations to the calculation file in the same manner.
T2_HBTU
T2_LOSS
T2_OBTU
T2_TMP
Step 3.
Check the detail dialogs for the tags FI024A and FI024B. The Tag Dynamics group box
should have the Other radiobutton selected. The Calculate Group box should indicate
that the modeling functions are calculated if the calculation T2_PMP1 is > 0.
The Details button will call up the Dynamics dialog which should show a modeling
function of Integrate and Filter1 with parameters 10.0 and 1 for the filter. These should
also be tracking the previously defined calculation FLOW_OUT. (If any of the items are
not set, see section 8.1.1 step 3 for more information)
Step 4.
Select the Loop window of the Tieback application. Check the detail of the LIC021 loop
tag by pressing the pushbutton on the spreadsheet. The vessel type (accessed from the
Details pushbutton on the detail dialog) should be vertical with a capacity of 2000.0 gal.,
if not see section 8.11 for information.
Now depress the detail pushbutton found on the spreadsheet for loop TIC023. Press the
Model and Temperature radiobuttons for this loop. Click on the Details pushbutton to
open the Temperature Dynamics dialog.
Note that the function will be added and appear as Filter1 (x.y, 1.0) in the list, where x.y
is the filter time in seconds, and 1.0 is the gain. You can edit this by double clicking on
the function.
Now we are ready to specify what makes our temperature rise and what makes it fall. We
will use the calculations defined above for this information.
Assuming these calculations are already loaded in the Calculations window, we can go
ahead and complete our loop definition. When we first enter the Temperature Dynamics
dialog box, the PV In radiobutton will be selected, so we can add the input signals right
away.
First click on the Track Calc radiobutton. This will display all the available calculations
in the current dataset. Select T2_TMP by double clicking on it. It will get added to the
applied list. T2_TMP as shown in section 8.2 will internally call the other calculations.
Now press the Done pushbutton. SIMVOX will read the signal list and save it. Press the
OK pushbutton to return to the main Loop dialog box. Verify that your Calculate If
condition is correct. It should be the Always radiobutton. Press the OK push button. This
saves the temperature loop definition in the SIMVOX database.
Note that this example does not take into account the Enthalpy already in the tank.
LIBRARY INDEX
sim20_attach_ds (ds, error, errdst)
sim20_attach_multi_ds(ds, error, errdst)
sim20_dcd (ds, template, output, input, dcdnum, error, errdst, trantime, tranpv)
sim20_delay (sec)
sim20_getds ()
sim20_get_all_ds (flag)
sim20_note (note)
sim20_sleep ()
SIM20_ATTACH_DS
Attach to a dataset. All programs must use this function to attach to a dataset. SIMVOX
calls do not work correctly without it. Attaching is done prior to all other SIMVOX calls
except sim20_getds and sim20_get_all_ds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_ATTACH_DS (DS, ERROR, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
...
call sim20_attach_ds (ds, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
...
sim20_attach_ds (&ds, &error, &errdst);
...
SIM20_ATTACH_MULTI_DS
Attach to multiple datasets. Gets all the datasets on the command line and attaches to
those datasets. Stores the attached datasets in the dataset array provided as the first
parameter.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_ATTACH_MULTI_DS (DS, ERROR, ERRDST)
where:
DS(4) INTEGER*4 Dataset array
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds[4] long Dataset array
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds(4)
integer*4 error
integer*4 errdst /1/
...
call sim20_attach_multi_ds (ds, error, errdst)
...
C:
long ds [4];
long error;
long errdst = 1;
...
sim20_attach_multi_ds (ds, &error, &errdst);
...
SIM20_DCD
Tieback DCD output patterns to input patterns. This function is called once for each
DCD to be resolved by the tieback program. SIMVOX Tools option allows automatic
creation of tieback programs.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_DCD (DS, TEMPLATE, OUTPUT, INPUT, DCDNUM, ERROR, ERRDST, TRANTIME,
TRANPV)
where:
DS INTEGER*4 Dataset number (1--4)
TEMPLATE(35) INTEGER*4 Thirty--five element array containing the
DCD template
OUTPUT (8) INTEGER*4 Eight element array containing the
File--Card--Channel addresses of the
outputs
INPUT (16) INTEGER*4 Sixteen element array containing the
File--Card--Channel addresses of the inputs
DCDNUM INTEGER*4 Sequence number of the DCD (1--255)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TRANTIME INTEGER*4 Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
TRANPV INTEGER*4 PV to set up on the inputs during the
transition time (--32768 to +32767)
where:
ds long Dataset number (1--4)
template long[35] Thirty--five element array containing the
DCD template
output long[8] Eight element array containing the
File--Card--Channel addresses of the
outputs
input long[16] Sixteen element array containing the
File--Card--Channel addresses of the inputs
dcdnum long Sequence number of the DCD (1--255)
error long Error return code
errdst long Destination of error messages
trantime long Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
tranpv long PV to set up on the inputs during the
transition time (--32768 to +32767)
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 dcdnum
integer*4 trantime
integer*4 tranpv
integer*4 dcd_output (8 )
integer*4 dcd_input (16)
integer*4 template (35)
...
trantime = 0
tranpv = 0
while (.TRUE.)
call sim20_dcd (ds, template, dcd_output, dcd_input, 1, error, errdst, trantime, tranpv)
...
endwhile
C:
long ds = 1;
long error;
long errdst = 1;
long dcdnum;
long trantime;
long tranpv;
...
trantime = 0;
tranpv = 0;
while (TRUE)
{
sim20_dcd(&ds, template, dcd_output, dcd_input, 1, &error, &errdst, trantime, tranpv);
...
SIM20_DELAY
Put calling process to sleep for the specified amount of time. The time is specified in
seconds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_DELAY (SEC)
where:
SEC REAL Number of seconds to delay
where:
sec double Real Number of seconds to delay
Examples
FORTRAN:
...
while (.TRUE.)
...
...
C:
...
while (TRUE)
{
...
sim20_delay (&delay);
}
SIM20_GETAIC
SIM20_GETAIC_FCC
Get an analog input in counts. SIM20_GETAIC_FCC uses less CPU as compared to
SIM20_GETAIC.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETAIC (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_GETAIC_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE INTEGER*4 Number of counts (0--4095)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog input
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value long Number of counts (0--4095)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 80501
tempint = sim20_getaic (ds, ficach, value, error, errdst)
...
tempint = sim20_getaic (ds, 80506, value, error, errdst)
...
...
file = 8
card = 5
chan = 1
tempint = sim20_getaic_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_getaic_fcc (ds, 1, 1, 1, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 80501;
sim20_getaic (&ds, ficach, &value, &error, &errdst);
...
sim20_getaic (&ds, 80506, &value, &error, &errdst);
...
...
file = 8;
card = 5;
chan = 1;
sim20_getaic_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getaic_fcc (&ds, 1, 1, 1, &value, &error, &errdst);
...
SIM20_GETAIE
SIM20_GETAIE_FCC
Get the engineering unit value of the AI point specified by the file--card--channel.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_GETAIE (DS, FICACH, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
TEMPREAL = SIM20_GETAIE_FCC (DS, FILE, CARD, CHAN, VALUE, EUHIGH, EULOW, ERROR,
ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog
input (channels 1 to 8 of card only)
file long File address of pulse count input (1 -- 16)
card long Card address of pulse count input (1 -- 14)
chan long Channel address of pulse count input (1 -- 8)
value double Value read in engineering units of the AI point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
ficach = 51309
value = 0
euhigh = 0
eulow = 0
tempreal = sim20_getaie (ds, ficach, value, euhigh, eulow, error, errdst)
...
tempreal = sim20_getaie (ds, 51208, value, euhigh, eulow, error, errdst)
...
...
file = 5
card = 13
chan = 9
value = 0
tempreal = sim20_getaie_fcc (ds, file, card, chan, value, euhigh, eulow, error, errdst)
...
tempreal = sim20_getaie_fcc (ds, 4, 7, 6, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
double euhigh;
double eulow;
...
ficach = 121202;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim20_getaie (&ds, ficach, &value, &error, &euhigh, &eulow, &errdst);
...
sim20_getaie (&ds, 121102, &value, &error, &euhigh, &eulow, &errdst);
...
...
file = 12;
card = 12;
chan = 2;
value = 20.25;
sim20_getaie_fcc (&ds, file, card, chan, &value, &euhigh, &eulow, &error, &errdst);
...
sim20_getaie_fcc (&ds, 11, 8, 1, &value, &euhigh, &eulow, &error, &errdst);
...
SIM20_GETAIP
SIM20_GETAIP_FCC
Get an analog input in percent. SIM20_GETAIP_FCC uses less CPU as compared to
SIM20_GETAIP.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_GETAIP (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPREAL = SIM20_GETAIP_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE REAL*8 Percent (--25.0 to +100.0) or (0.0 to
+125.0) depending on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog input
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value double Percent (--25.0 to +100.0) or (0.0 to
+125.0) depending on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 tempreal
...
ficach = 100904
tempreal = sim20_getaip (ds, ficach, value, error, errdst)
...
tempreal = sim20_getaip (ds, 100902, value, error, errdst)
...
...
file = 10
card = 9
chan = 4
tempreal = sim20_getaip_fcc (ds, file, card, chan, value, error, errdst)
...
tempreal = sim20_getaip_fcc (ds, 2, 5, 3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
...
ficach = 100904;
sim20_getaip (&ds, ficach, &value, &error, &errdst);
...
sim20_getaip (&ds, 100902, &value, &error, &errdst);
...
...
file = 10;
card = 9;
chan = 4;
sim20_getaip_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getaip_fcc (&ds, 2, 5, 3, &value, &error, &errdst);
...
SIM20_GETAOC
SIM20_GETAOC_FCC
Get an analog output in counts. SIM20_GETAOC_FCC uses less CPU as compared to
SIM20_GETAOC.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETAOC (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_GETAOC_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog
output (channels 1--8 of card only)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 8)
VALUE INTEGER*4 Number of counts (0--4095)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog
output (channels 1--8 of card only)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 8)
value long Number of counts (0--4095)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 20205
tempint = sim20_getaoc (ds, ficach, value, error, errdst)
...
tempint = sim20_getaoc (ds, 20209, value, error, errdst)
...
...
file = 2
card = 2
chan = 5
tempint = sim20_getaoc_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_getaoc_fcc (ds, 7, 8, 4, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 20205;
sim20_getaoc (&ds, ficach, &value, &error, &errdst);
...
sim20_getaoc (&ds, 20209, &value, &error, &errdst);
...
...
file = 2;
card = 2;
chan = 5;
sim20_getaoc_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getaoc_fcc (&ds, 7, 8, 4, &value, &error, &errdst);
...
SIM20_GETAOP
SIM20_GETAOP_FCC
Get an analog output in percent. SIM20_GETAOP_FCC uses less CPU as compared to
SIM20_GETAOP.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_GETAOP (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPREAL = SIM20_GETAOP_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog
output (channels 1--8 or card only)
FILE INTEGER*4 File address of analog output (1 -- 16)
CARD INTEGER*4 Card address of analog output (1 -- 14)
CHAN INTEGER*4 Channel address of analog output (1 -- 8)
VALUE REAL*8 Percent (--25.0 to +100.0)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog
output (channels 1--8 or card only)
file long File address of analog output (1 -- 16)
card long Card address of analog output (1 -- 14)
chan long Channel address of analog output (1 -- 8)
value double Percent (--25.0 to +100.0)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 tempreal
...
ficach = 31102
tempreal = sim20_getaop (ds, ficach, value, error, errdst)
...
tempreal = sim20_getaop (ds, 31106, value, error, errdst)
...
...
file = 3
card = 11
chan = 2
tempreal = sim20_getaop_fcc (ds, file, card, chan, value, error, errdst)
...
tempreal = sim20_getaop_fcc (ds, 7, 5, 4, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
...
ficach = 31102;
sim20_getaop (&ds, ficach, &value, &error, &errdst);
...
sim20_getaop (&ds, 31106, &value, &error, &errdst);
...
...
file = 3;
card = 11;
chan = 2;
sim20_getaop_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getaop_fcc (&ds, 7, 5, 4, &value, &error, &errdst);
...
SIM20_GETCALCINDEX
Get the index of a calculation given its tag and dataset.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETCALCINDEX (DS, TAG, INDEX, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
TAG CHARACTER*16 Tag of the calculation
INDEX INTEGER*4 Index of the calculation within the DLL
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Intger to store return of function
where:
ds long dataset number (1--4)
tag[16] char Tag of the calculation
index long Index of the calculation within the DLL
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds
character*16 tag
integer*4 index
integer*4 error
integer*4 errdst
integer*4 tempint
ds = 1
tag = testcalc
index = 0
C:
long ds;
char tag[16];
long index;
long error;
long errdst;
long temp;
ds = 1;
strcpy(tag, testcalc);
index = 0;
SIM20_GETCALCVALUE
Get the value of a calculation given its index and dataset.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_GETCALCVALUE (DS, INDEX, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
INDEX INTEGER*4 Index of the calculation within the DLL
VALUE REAL*8 Value of the calculation
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
index long Index of the calculation within the DLL
value double Value of the calculation
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds
integer*4 index
real*8 value
integer*4 error
integer*4 errdst
integer*4 tempint
real*8 tempreal
ds = 1
value = 0
tag = testcalc
tempint = sim20_getcalcindex (ds, tag, index, error, errdst)
tempreal = sim20_getcalcvalue (ds, index, value, error, errdst)
C:
long ds;
long index;
double value;
long error;
long errdst;
double temp;
ds = 1;
strcpy(tag, testcalc);
sim20_getcalcindex (&ds, tag, &index, &error, &errdst);
sim20_getcalcvalue (&ds, index, &value, &error, &errdst);
SIM20_GETDI
SIM20_GETDI_FCC
Get a discrete input channel. SIM20_GETDI_FCC uses less CPU as compared to
SIM20_GETDI.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETDI (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_GETDI_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of discrete
input (10101--161416)
FILE INTEGER*4 File address of discrete input (1 -- 16)
CARD INTEGER*4 Card address of discrete input (1 -- 14)
CHAN INTEGER*4 Channel address of discrete input
(1 -- 16)
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of discrete
input (10101--161416)
file long File address of discrete input (1 -- 16)
card long Card address of discrete input (1 -- 14)
chan long Channel address of discrete input
(1 -- 16)
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 151016
tempint = sim20_getdi (ds, ficach, value, error, errdst)
...
tempint = sim20_getdi (ds, 151012, value, error, errdst)
...
...
file = 15
card = 10
chan = 16
tempint = sim20_getdi_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_getdi_fcc (ds, 12, 11, 13, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 151016;
sim20_getdi (&ds, ficach, &value, &error, &errdst);
...
sim20_getdi (&ds, 151012, &value, &error, &errdst);
...
...
file = 15;
card = 10;
chan = 16;
sim20_getdi_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getdi_fcc (&ds, 12, 11, 13, &value, &error, &errdst);
...
SIM20_GETDIW
SIM20_GETDIW_FCC
Get a group of 16 discrete inputs on a single card. SIM20_GETDIW_FCC uses less CPU
as compared to SIM20_GETDIW.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETDIW (DS, FFCx, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_GETDIW_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FFCx INTEGER*4 File--Card--Channel address of ANY channel
on a discrete input card (10101--161416)
FILE INTEGER*4 File address of discrete input (1 -- 16)
CARD INTEGER*4 Card address of discrete input (1 -- 14)
CHAN INTEGER*4 Channel address of ANY discrete input
(1 -- 16)
VALUE INTEGER*4 (0 -- 65535) (channel 1 = bit 0 = lsb)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ffcx long File--Card--Channel address of ANY channel
on a discrete input card (10101--161416)
file long File address of discrete input (1 -- 16)
card long Card address of discrete input (1 -- 14)
chan long Channel address of ANY discrete input
(1 -- 16)
value long (0 -- 65535) (channel 1 = bit 0 = lsb)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 31409
tempint = sim20_getdiw (ds, ficach, value, error, errdst)
...
tempint = sim20_getdiw (ds, 31403, value, error, errdst)
...
...
file = 3
card = 14
chan = 9
tempint = sim20_getdiw_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_getdiw_fcc (ds, 5, 13, 7, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 31409;
sim20_getdiw (&ds, ficach, &value, &error, &errdst);
...
sim20_getdiw (&ds, 31403, &value, &error, &errdst);
...
...
file = 3;
card = 14;
chan = 9;
sim20_getdiw_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getdiw_fcc (&ds, 5, 13, 7, &value, &error, &errdst);
...
SIM20_GETDO
SIM20_GETDO_FCC
Get a discrete output channel. SIM20_GETDO_FCC uses less CPU as compared to
SIM20_GETDO.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETDO (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_GETDO_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of discrete
output (10101--161416)
FILE INTEGER*4 File address of discrete output (1 -- 16)
CARD INTEGER*4 Card address of discrete output (1 -- 14)
CHAN INTEGER*4 Channel address of discrete output
(1 -- 16)
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of discrete
output (10101--161416)
file long File address of discrete output (1 -- 16)
card long Card address of discrete output (1 -- 14)
chan long Channel address of discrete output
(1 -- 16)
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 140102
tempint = sim20_getdo (ds, ficach, value, error, errdst)
...
tempint = sim20_getdo (ds, 140109, value, error, errdst)
...
...
file = 14
card = 1
chan = 2
tempint = sim20_getdo_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_getdo_fcc (ds, 10, 3, 3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 140102;
sim20_getdo (&ds, ficach, &value, &value, &error, &errdst);
...
sim20_getdo (&ds, 140109, &value, &value, &error, &errdst);
...
...
file = 14;
card = 1;
chan = 2;
sim20_getdo_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getdo_fcc (&ds, 10, 3, 3, &value, &error, &errdst);
...
SIM20_GETDOW
SIM20_GETDOW_FCC
Get a group of 16 discrete outputs on a single card. SIM20_GETDOW_FCC uses less
CPU as compared to SIM20_GET_DOW.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETDOW (DS, FFCx, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_GETDOW_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FFCx INTEGER*4 File--Card--Channel address of ANY channel
on a discrete output card (10101--161416)
FILE INTEGER*4 File address of discrete output (1 -- 16)
CARD INTEGER*4 Card address of discrete output (1 -- 14)
CHAN INTEGER*4 Channel address of ANY discrete output
(1 -- 16)
VALUE INTEGER*4 (0 -- 65535) (channel 1 = bit 0 = lsb)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ffcx long File--Card--Channel address of ANY channel
on a discrete output card (10101--161416)
file long File address of discrete output (1 -- 16)
card long Card address of discrete output (1 -- 14)
chan long Channel address of ANY discrete output
(1 -- 16)
value long (0 -- 65535) (channel 1 = bit 0 = lsb)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 40506
tempint = sim20_getdow (ds, ficach, value, error, errdst)
...
tempint = sim20_getdow (ds, 40508, value, error, errdst)
...
...
file = 4
card = 5
chan = 6
tempint = sim20_getdow_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_getdow_fcc (ds, 3, 3, 4, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 40506;
sim20_getdow (&ds, ficach, &value, &error, &errdst);
...
sim20_getdow (&ds, 40508, &value, &error, &errdst);
...
...
file = 4;
card = 5;
chan = 6;
sim20_getdow_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getdow_fcc (&ds, 3, 3, 4, &value, &error, &errdst);
...
SIM20_GETDS
Get the dataset entered on the command line.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GETDS ()
where:
TEMPINT INTEGER*4 Integer to store return of function
Examples
FORTRAN:
integer*4 ds
integer*4 error
integer*4 errdst
...
ds = sim20_getds ()
call sim20_attach_ds (ds, error, errdst)
...
C:
long ds;
long error
long errdst
...
ds = sim20_getds ();
sim20_attach_ds (&ds, &error, &errdst);
...
SIM20_GET_ALL_DS
Reads the command line into an internal string if the flag argument is TRUE and returns
the first dataset. On subsequent calls, the flag argument should be FALSE. This will
return any additional datasets. If the dataset returned is zero, there are no more datasets.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_GET_ALL_DS (FLAG)
where:
FLAG INTEGER*4 Flag indicating input from command line
TEMPINT INTEGER*4 Integer to store return of function
where:
flag long Flag indicating input from command line
Examples
FORTRAN:
integer*4 ds1, ds2
...
ds1 = sim20_get_all_ds (.TRUE.)
ds2 = sim20_get_all_ds (.FALSE.)
C:
long flag;
long ds1, ds2;
{
...
flag = TRUE;
/* get the command line */
/* ds1 contains the first dataset in the command line */
ds1 = sim20_get_all_ds (flag);
flag = FALSE;
/* ds2 contains the next dataset in the command line */
ds2 = sim20_get_all_ds (flag);
}
SIM20_GETPCI
SIM20_GETPCI_FCC
Get a pulse count input. SIM20_GETPCI_FCC uses less CPU as compared to
SIM20_GETPCI.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_GETPCI (DS, FICACH, VALUE, RATE, ERROR, ERRDST)
CALL SIM20_GETPCI_FCC (DS, FILE, CARD, CHAN, VALUE, RATE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of pulse count
input (channels 1 to 8 of card only)
FILE INTEGER*4 File address of pulse count input
(1 -- 16)
CARD INTEGER*4 Card address of pulse count input
(1 -- 14)
CHAN INTEGER*4 Channel address of pulse count input
(1 -- 8)
VALUE INTEGER*4 Number of raw pulses (0 -- 65,535)
RATE REAL*8 Pulses per rate period. Rate period is
declared in the UOC definition from 0.1
to 5.0
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of pulse count
input (channels 1 to 8 of card only)
file long File address of pulse count input
(1 -- 16)
card long Card address of pulse count input
(1 -- 14)
chan long Channel address of pulse count input
(1 -- 8)
value long Number of raw pulses (0 -- 65,535)
rate double Pulses per rate period. Rate period is
declared in the UOC definition from 0.1
to 5.0
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
real*8 rate
...
ficach = 60901
call sim20_getpci (ds, ficach, value, rate, error, errdst)
...
call sim20_getpci (ds, 60908, value, rate, error, errdst)
...
...
file = 6
card = 9
chan = 1
call sim20_getpci_fcc (ds, file, card, chan, value, rate, error, errdst)
...
call sim20_getpci_fcc (ds, 1, 1, 1, value, rate, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
double rate;
...
ficach = 60901;
sim20_getpci (&ds, ficach, &value, &rate, &error, &errdst);
...
sim20_getpci (&ds, 60908, &value, &rate, &error, &errdst);
...
...
file = 6;
card = 9;
chan = 1;
sim20_getpci_fcc (&ds, file, card, chan, &value, &rate, &error, &errdst);
...
sim20_getpci_fcc (&ds, 1, 1, 1, &value, &rate, &error, &errdst);
...
SIM20_GETSI
SIM20_GETSI_FCC
Get an smart input as a floating point number. SIM20_GETSI_FCC uses less CPU as
compared to SIM20_GETSI.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_GETSI (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPREAL = SIM20_GETSI_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of smart input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE REAL*8 Floating point number
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of smart input
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value double Floating point number
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 tempreal
...
ficach = 100904
tempreal = sim20_getsi (ds, ficach, value, error, errdst)
...
tempreal = sim20_getsi (ds, 100902, value, error, errdst)
...
...
file = 10
card = 9
chan = 4
tempreal = sim20_getsi_fcc (ds, file, card, chan, value, error, errdst)
...
tempreal = sim20_getsi_fcc (ds, 2, 5, 3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
...
ficach = 100904;
sim20_getsi (&ds, ficach, &value, &error, &errdst);
...
sim20_getsi (&ds, 100902, &value, &error, &errdst);
...
...
file = 10;
card = 9;
chan = 4;
sim20_getsi_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getsi_fcc (&ds, 2, 5, 3, &value, &error, &errdst);
...
SIM20_GETSO
SIM20_GETSO_FCC
Get a smart output as a floating point number. SIM20_GETSO_FCC uses less CPU as
compared to SIM20_GETSO.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_GETSO (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPREAL = SIM20_GETSO_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of smart output
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE REAL*8 Floating point number
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of smart output
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value double Floating point number
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 tempreal
...
ficach = 100904
tempreal = sim20_getso (ds, ficach, value, error, errdst)
...
tempreal = sim20_getso (ds, 100902, value, error, errdst)
...
...
file = 10
card = 9
chan = 4
tempreal = sim20_getso_fcc (ds, file, card, chan, value, error, errdst)
...
tempreal = sim20_getso_fcc (ds, 2, 5, 3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
...
ficach = 100904;
sim20_getso (&ds, ficach, &value, &error, &errdst);
...
sim20_getso (&ds, 100902, &value, &error, &errdst);
...
...
file = 10;
card = 9;
chan = 4;
sim20_getso_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_getso_fcc (&ds, 2, 5, 3, &value, &error, &errdst);
...
SIM20_LAGLOOP
Tieback a loop analog output to analog input. This function provides first order lag.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_LAGLOOP (DS, PV, VO, GAIN, TIME, EXEC, REVACT, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
PV INTEGER*4 File--Card--Channel address of process
variable or analog input (10101--161416)
VO INTEGER*4 File--Card--Channel address of the valve
output or analog output (10101--161408)
Channels 1 -- 8 of card only.
GAIN REAL*8 Loop sensitivity (average = 1.0)
TIME REAL*8 Loop lag time in seconds
EXEC REAL*8 Tieback execution interval in seconds
REVACT INTEGER*4 0 for a direct--acting loop; 1 for a
reverse--acting loop
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
pv long File--Card--Channel address of process
variable or analog input (10101--161416)
vo long File--Card--Channel address of the valve
output or analog output (10101--161408)
Channels 1 -- 8 of card only.
gain double Loop sensitivity (average = 1.0)
time double Loop lag time in seconds
exec double Loop execution interval in seconds
revact long 0 for a direct--acting loop; 1 for a
reverse--acting loop
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 errdst /1/
integer*4 pv
integer*4 vo
real*8 gain
real*8 time
real*8 exec
integer*4 revact
...
pv = 70210
vo = 70202
gain = 1.0
time = 10.0
exec = 3.0
revact = 0
call sim20_lagloop (ds, pv, vo, gain, time, exec, revact, errdst)
...
call sim20_lagloop (ds, 60102, 60202, 1.0, 10.0, 3.0, 0, errdst)
...
C:
long ds = 1;
long errdst = 1;
long pv;
long vo;
double gain;
double time;
double exec;
long revact;
...
pv = 70210;
vo = 70202;
gain = 1.0;
time = 10.0;
exec = 3.0;
revact = 0;
sim20_lagloop (&ds, pv, vo, gain, time, exec, revact, &errdst);
...
sim20_lagloop (&ds, 60102, 60202, 1.0, 10.0, 3.0, 0, &errdst);
...
SIM20_LOOP
Tieback a loop analog output to analog input without any lag.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_LOOP (DS, PV, VO, GAIN, REVACT, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
PV INTEGER*4 File--Card--Channel address of process
variable or analog input (10101--161416)
VO INTEGER*4 File--Card--Channel address of the valve
output or analog output (10101--161408)
Channels 1 -- 8 of card only.
GAIN REAL*8 Loop sensitivity (average = 1.0)
REVACT INTEGER*4 0 for a direct--acting loop; 1 for a
reverse--acting loop
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
pv long File--Card--Channel address of process
variable or analog input (10101--161416)
vo long File--Card--Channel address of the valve
output or analog output (10101--161408)
Channels 1 -- 8 of card only.
gain double Loop sensitivity (average = 1.0)
revact long 0 for a direct--acting loop; 1 for a
reverse--acting loop
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 errdst /1/
integer*4 pv
integer*4 vo
real*8 gain
integer*4 revact
...
pv = 70210
vo = 70202
gain = 1.0
revact = 0
call sim20_loop (ds, pv, vo, gain, revact, errdst)
...
C:
long ds = 1;
long errdst = 1;
long pv;
long vo;
double gain;
long revact;
...
pv = 70210;
vo = 70202;
gain = 1.0;
revact = 0;
sim20_loop (&ds, pv, vo, gain, revact, &errdst);
...
SIM20_NOTE
Post a note to the message box.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_NOTE (NOTE)
where:
NOTE CHARACTER*(*) Note to be displayed
where:
note char[] Note to be displayed
Examples
FORTRAN:
C:
sim20_note(Point found);
SIM20_SETAIC
SIM20_SETAIC_FCC
Set an analog input in counts. SIM20_SETAIC_FCC uses less CPU as compared to
SIM20_SETAIC.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_SETAIC (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_SETAIC_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE INTEGER*4 Number of counts (0--4095)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog input
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value long Number of counts (0--4095)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 121202
value = 520
tempint = sim20_setaic (ds, ficach, value, error, errdst)
...
tempint = sim20_setaic (ds, 121102, value, error, errdst)
...
...
file = 12
card = 12
chan = 2
value = 520
tempint = sim20_setaic_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_setaic_fcc (ds, 11, 8, 1, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 121202;
value = 520;
sim20_setaic (&ds, ficach, &value, &error, &errdst);
...
sim20_setaic (&ds, 121102, &value, &error, &errdst);
...
...
file = 12;
card = 12;
chan = 2;
value = 520;
sim20_setaic_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_setaic_fcc (&ds, 11, 8, 1, &value, &error, &errdst);
...
SIM20_SETAIE
SIM20_SETAIE_FCC
Set the engineering unit value of the AI point specified by the file--card--channel.
Format
where:
where:
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
ficach = 51309
value = 30.0
euhigh = 0
eulow = 0
tempreal = sim20_setaie (ds, ficach, value, euhigh, eulow, error, errdst)
...
tempreal = sim20_setaie (ds, 51208, value, euhigh, eulow, error, errdst)
...
...
file = 5
card = 13
chan = 9
value = 25.0
tempreal = sim20_setaie_fcc (ds, file, card, chan, value, euhigh, eulow, error, errdst)
...
tempreal = sim20_setaie_fcc (ds, 4, 7, 6, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
double euhigh;
double eulow;
...
ficach = 121202;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim20_setaie (&ds, ficach, &value, &error, &euhigh, &eulow, &errdst);
...
sim20_setaie (&ds, 121102, &value, &error, &euhigh, &eulow, &errdst);
...
...
file = 12;
card = 12;
chan = 2;
value = 20.25;
sim20_setaie_fcc (&ds, file, card, chan, &value, &euhigh, &eulow, &error, &errdst);
...
sim20_setaie_fcc (&ds, 11, 8, 1, &value, &euhigh, &eulow, &error, &errdst);
...
SIM20_SETAIP
SIM20_SETAIP_FCC
Set an analog input in percent. SIM20_SETAIP_FCC uses less CPU as compared to
SIM20_SETAIP.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_SETAIP (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPREAL = SIM20_SETAIP_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of analog input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE REAL*8 Percent (--25.0 to +100.0) or (0.0 to
+125.0) depending on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of analog input
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value double Percent (--25.0 to +100.0) or (0.0 to
+125.0) depending on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 tempreal
...
ficach = 51309
value = 30.0
tempreal = sim20_setaip (ds, ficach, value, error, errdst)
...
tempreal = sim20_setaip (ds, 51208, value, error, errdst)
...
...
file = 5
card = 13
chan = 9
value = 30.0
tempreal = sim20_setaip_fcc (ds, file, card, chan, value, error, errdst)
...
tempreal = sim20_setaip_fcc (ds, 4, 7, 6, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
...
ficach = 51309;
value = 30.0;
sim20_setaip (&ds, ficach, &value, &error, &errdst);
...
sim20_setaip (&ds, 51208, &value, &error, &errdst);
...
...
file = 5;
card = 13;
chan = 9;
value = 30.0;
sim20_setaip_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_setaip_fcc (&ds, 4, 7, 6, &value, &error, &errdst)
...
SIM20_SETCALCVALUE
Set the value of a calculation given its index and dataset.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_SETCALCVALUE (DS, INDEX, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
INDEX INTEGER*4 Index of the calculation within the DLL
VALUE REAL*8 Value of the calculation
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
index long Index of the calculation within the DLL
value double Value of the calculation
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds
integer*4 index
real*8 value
integer*4 error
integer*4 errdst
real*8 tempreal
ds = 1
value = 9.87
tag = testcalc
tempint = sim20_getcalcindex (ds, tag, index, error, errdst)
teampreal = sim20_setcalcvalue (ds, index, value, error, errdst)
C:
long ds;
long index;
double value;
long error;
long errdst;
double temp;
ds = 1;
value = 9.87;
strcpy(tag, testcalc);
sim20_getcalcindex (&ds, tag, &index, &error, &errdst);
sim20_setcalcvalue (&ds, index, &value, &error, &errdst);
SIM20_SETDI
SIM20_SETDI_FCC
Set a discrete input channel. SIM20_SETDI_FCC uses CPU as compared to
SIM20_SETDI.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_SETDI (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_SETDI_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of discrete
input (10101--161416)
FILE INTEGER*4 File address of discrete input (1 -- 16)
CARD INTEGER*4 Card address of discrete input (1 -- 14)
CHAN INTEGER*4 Channel address of discrete input
(1 -- 16)
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of discrete
input (10101--161416)
file long File address of discrete input (1 -- 16)
card long Card address of discrete input (1 -- 14)
chan long Channel address of discrete input
(1 -- 16)
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 20901
value = 1
tempint = sim20_setdi (ds, ficach, value, error, errdst)
...
tempint = sim20_setdi (ds, 20915, value, error, errdst)
...
...
file = 2
card = 9
chan = 1
value = 1
tempint = sim20_setdi_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_setdi_fcc (ds, 4, 6, 2, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 20901;
value = 1;
sim20_setdi (&ds, ficach, &value, &error, &errdst);
...
sim20_setdi (&ds, 20915, &value, &error, &errdst);
...
...
file = 2;
card = 9;
chan = 1;
value = 1;
sim20_setdi_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_setdi_fcc (&ds, 4, 6, 2, &value, &error, &errdst);
...
SIM20_SETDIW
SIM20_SETDIW_FCC
Set a group of 16 discrete inputs on a single card. SIM20_SETDIW_FCC uses less CPU
as compared to SIM20_SETDIW.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM20_SETDIW (DS, FFCx, VALUE, ERROR, ERRDST)
TEMPINT = SIM20_SETDIW_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FFCx INTEGER*4 File--Card--Channel address of ANY channel
on a discrete input card (10101--161416)
FILE INTEGER*4 File address of discrete input (1 -- 16)
CARD INTEGER*4 Card address of discrete input (1 -- 14)
CHAN INTEGER*4 Channel address of ANY discrete input
(1 -- 16)
VALUE INTEGER*4 (0 -- 65535) (channel 1 = bit 0 = lsb)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
ffcx long File--Card--Channel address of ANY channel
on a discrete input card (10101--161416)
file long File address of discrete input (1 -- 16)
card long Card address of discrete input (1 -- 14)
chan long Channel address of ANY discrete input
(1 -- 16)
value long (0 -- 65535) (channel 1 = bit 0 = lsb)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 tempint
...
ficach = 110204
value = 9507
tempint = sim20_setdiw (ds, ficach, value, error, errdst)
...
tempint = sim20_setdiw (ds, 110209, value, error, errdst)
...
...
file = 11
card = 2
chan = 4
value = 9507
tempint = sim20_setdiw_fcc (ds, file, card, chan, value, error, errdst)
...
tempint = sim20_setdiw_fcc (ds, 3, 1, 7, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
long value;
...
ficach = 110204;
value = 9507;
sim20_setdiw (&ds, ficach, &value, &error, &errdst);
...
sim20_setdiw (&ds, 110209, &value, &error, &errdst);
...
...
file = 11;
card = 2;
chan = 4;
value = 9507;
sim20_setdiw_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_setdiw_fcc (&ds, 3, 1, 7, &value, &error, &errdst);
...
SIM20_SETPCI
SIM20_SETPCI_FCC
Set a pulse count input. SIM20_SETPCI_FCC uses less CPU as compared to
SIM20_SETPCI.
Format
where:
where:
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 file
integer*4 card
integer*4 chan
integer*4 value
integer*4 inc
real*8 rate_p
...
inc = 55
rate_p = 1.0
value = 0
WHILE (.TRUE.)
...
value = value + inc
call sim20_setpci (ds, 30703, value, rate_p, error, errdst, 72)
...
...
file = 3
card = 7
chan = 5
call sim20_setpci_fcc (ds, file, card, chan, value, rate_p, error, errdst, 72)
...
ENDWHILE
C:
long ds = 1;
long error;
long errdst = 1;
long file;
long card;
long chan;
long value;
double rate_p;
long inc;
...
value = 0;
rate_p = 1.0;
...
while (TRUE) {
...
value += inc;
sim20_setpci (&ds, 40703, &value, &rate_p, &error, &errdst, 10);
...
file = 3;
card = 7;
chan = 3;
sim20_setpci_fcc (&ds, file, card, chan, &value, &rate_p, &error,
&errdst, 10);
}
SIM20_SETSI
SIM20_SETSI_FCC
Set a smart input in channel. SIM20_SETSI_FCC uses less CPU as compared to
SIM20_SETSI.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM20_SETSI (DS, FICACH, VALUE, ERROR, ERRDST)
TEMPREAL = SIM20_SETSI_FCC (DS, FILE, CARD, CHAN, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
FICACH INTEGER*4 File--Card--Channel address of smart input
(10101--161416)
FILE INTEGER*4 File address of analog input (1 -- 16)
CARD INTEGER*4 Card address of analog input (1 -- 14)
CHAN INTEGER*4 Channel address of analog input (1 -- 16)
VALUE REAL*8 Percent (--25.0 to +100.0) or (0.0 to
+125.0) depending on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
ficach long File--Card--Channel address of smart input
(10101--161416)
file long File address of analog input (1 -- 16)
card long Card address of analog input (1 -- 14)
chan long Channel address of analog input (1 -- 16)
value double Percent (--25.0 to +100.0) or (0.0 to
+125.0) depending on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 ficach
integer*4 file
integer*4 card
integer*4 chan
real*8 value
real*8 tempreal
...
ficach = 51309
value = 30.0
tempreal = sim20_setsi (ds, ficach, value, error, errdst)
...
tempreal = sim20_setsi (ds, 51208, value, error, errdst)
...
...
file = 5
card = 13
chan = 9
value = 30.0
tempreal = sim20_setsi_fcc (ds, file, card, chan, value, error, errdst)
...
tempreal = sim20_setsi_fcc (ds, 4, 7, 6, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long ficach;
long file;
long card;
long chan;
double value;
...
ficach = 51309;
value = 30.0;
sim20_setsi (&ds, ficach, &value, &error, &errdst);
...
sim20_setsi (&ds, 51208, &value, &error, &errdst);
...
...
file = 5;
card = 13;
chan = 9;
value = 30.0;
sim20_setsi_fcc (&ds, file, card, chan, &value, &error, &errdst);
...
sim20_setsi_fcc (&ds, 4, 7, 6, &value, &error, &errdst)
...
SIM20_SLEEP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatability with existing code. It simply delays for 1 second before returning.
Format
FORTRAN calling sequence and parameter description:
CALL SIM20_SLEEP ()
Examples
FORTRAN:
while (.TRUE.)
...
call sim20_sleep ()
endwhile
C:
sim20_sleep ();
}
SIM20_WAKEUP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatability with existing code.
LIBRARY INDEX
sim10_attach_ds (ds, error, errdst)
sim10_attach_multi_ds(ds, error, errdst)
sim10_dcd (ds, template, output, input, dcdnum, error, errdst, trantime, tranpv)
sim10_delay (sec)
sim10_getaic (ds, ffcc, value, error, errdst)
sim10_getaie (ds, ffcc, value, euhigh, eulow, error, errdst)
sim10_getaip (ds, ffcc, value, error, errdst)
sim10_getaoc (ds, ffcc, value, error, errdst)
sim10_getaop (ds, ffcc, value, error, errdst)
sim10_getdi (ds, ffcc, value, error, errdst)
sim10_getdib (ds, ffcc, value, error, errdst)
sim10_getdo (ds, ffcc, value, error, errdst)
sim10_getdob (ds, ffcc, value, error, errdst)
sim10_getds ()
sim10_get_all_ds (flag)
sim10_getpci (ds, ffcc, value, rate, error, errdst)
sim10_loop (ds, pv, vo, gain, revact, errdst)
sim10_note (note)
sim10_setaic (ds, ffcc, value, error, errdst)
sim10_setaie (ds, ffcc, value, euhigh, eulow, error, errdst)
sim10_setaip (ds, ffcc, value, error, errdst)
sim10_setdi (ds, ffcc, value, error, errdst)
sim10_setdib (ds, ffcc, value, error, errdst)
sim10_setpci (ds, ffcc, value, rate_p, error, errdst, index)
sim10_sleep ()
sim10_wakeup (number, units, error)
SIM10_ATTACH_DS
Attach to a dataset. All programs must use this function to attach to a dataset. SIMVOX
calls do not work correctly without it. Attaching is done prior to all other SIMVOX calls
except sim10_getds and sim10_get_all_ds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_ATTACH_DS (DS, ERROR, ERRDST)
where:
DS INTEGER*2 Dataset number (1--4)
ERROR INTEGER*2 Error return value
ERRDST INTEGER*2 Destination of error messages
where:
ds short Dataset number (1--4)
error short Error return value
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
...
call sim10_attach_ds (ds, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
...
sim10_attach_ds (&ds, &error, &errdst);
...
SIM10_ATTACH_MULTI_DS
Attach to multiple datasets. Gets all the datasets on the command line and attaches to
those datasets. Stores the attached datasets in the dataset array provided as the first
parameter.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_ATTACH_MULTI_DS (DS, ERROR, ERRDST)
where:
DS(4) INTEGER*2 Dataset array
ERROR INTEGER*2 Error return value
ERRDST INTEGER*2 Destination of error messages
where:
ds[4] short Dataset array
error short Error return value
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds(4)
integer*2 error
integer*2 errdst /1/
...
call sim10_attach_multi_ds (ds, error, errdst)
...
C:
short ds [4];
short error;
short errdst = 1;
...
sim10_attach_multi_ds (ds, &error, &errdst);
...
SIM10_DCD
Tieback DCD output patterns to input patterns. This function is called once for each
DCD to be resolved by the tieback program. SIMVOX Tools option allows automatic
creation of tieback programs.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_DCD (DS, TEMPLATE, OUTPUT, INPUT, DCDNUM, ERROR, ERRDST, TRANTIME,
TRANPV)
where:
DS INTEGER*2 Dataset number (1--4)
TEMPLATE(35) INTEGER*2 Thirty--five element array containing the
DCD template
OUTPUT (8) INTEGER*2 Eight element array containing the
File--Card--Channel addresses of the
outputs
INPUT (16) INTEGER*2 Sixteen element array containing the
File--Card--Channel addresses of the inputs
DCDNUM INTEGER*2 Sequence number of the DCD (1--128)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TRANTIME INTEGER*2 Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
TRANPV INTEGER*2 PV to set up on the inputs during the
transition time (--32768 to +32767)
where:
ds short Dataset number (1--4)
template short[35] Thirty--five element array containing the
DCD template
output short[8] Eight element array containing the
File--Card--Channel addresses of the
outputs
input short[16] Sixteen element array containing the
File--Card--Channel addresses of the inputs
dcdnum short Sequence number of the DCD (1--128)
error short Error return code
errdst short Destination of error messages
trantime short Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
tranpv short PV to set up on the inputs during the
transition time (--32768 to +32767)
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 dcdnum
integer*2 trantime
integer*2 tranpv
integer*2 dcd_output (8 )
integer*2 dcd_input (16)
integer*2 template (35)
...
trantime = 0
tranpv = 0
while (.TRUE.)
call sim10_dcd (ds, template, dcd_output, dcd_input, 1, error, errdst, trantime,
tranpv)
...
endwhile
C:
short ds = 1;
short error;
short errdst = 1;
short dcdnum;
short trantime;
short tranpv;
...
trantime = 0;
tranpv = 0;
while (TRUE)
{
sim10_dcd(&ds, template, dcd_output, dcd_input, 1, &error, &errdst, trantime,
tranpv);
...
SIM10_DELAY
Put calling process to sleep for the specified amount of time. The time is specified in
seconds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_DELAY (SEC)
where:
SEC REAL Number of seconds to delay
where:
sec double Real Number of seconds to delay
Examples
FORTRAN:
...
while (.TRUE.)
...
...
C:
...
while (TRUE)
{
...
sim10_delay (&delay);
}
SIM10_GETAIC
Get an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETAIC (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog input
(111--1668)
VALUE INTEGER*2 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog input
(111--1668)
value short Number of counts (0--4095, or --32768 to
+32767 for WSI)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 851
tempint = sim10_getaic (ds, ffcc, value, error, errdst)
...
tempint = sim10_getaic (ds, 856, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 851;
sim10_getaic (&ds, ffcc, &value, &error, &errdst);
...
sim10_getaic (&ds, 856, &value, &error, &errdst);
...
SIM10_GETAIE
Get the engineering unit value of the AI point specified by the file--card--channel.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM10_GETAIE (DS, FFCC, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog input
(111--1668)
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog
input (111--1668)
value double Value read in engineering units of the AI point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
ffcc = 538
value = 0
euhigh = 0
eulow = 0
tempreal = sim10_getaie (ds, ffcc, value, euhigh, eulow, error, errdst)
...
tempreal = sim10_getaie (ds, 528, value, euhigh, eulow, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
double value;
double euhigh;
double eulow;
...
ffcc = 1222;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim10_getaie (&ds, ffcc, &value, &error, &euhigh, &eulow, &errdst);
...
sim10_getaie (&ds, 1212, &value, &error, &euhigh, &eulow, &errdst);
...
SIM10_GETAIP
Get an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM10_GETAIP (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog input
(111--1668)
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog input
(111--1668)
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
real*8 value
real*8 tempreal
...
ffcc = 1064
tempreal = sim10_getaip (ds, ffcc, value, error, errdst)
...
tempreal = sim10_getaip (ds, 1062, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
double value;
...
ffcc = 144;
sim10_getaip (&ds, ffcc, &value, &error, &errdst);
...
sim10_getaip (&ds, 1062, &value, &error, &errdst);
...
SIM10_GETAOC
Get an analog output in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETAOC (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog
output (111--1668)
VALUE INTEGER*2 Number of counts (0--4095)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog
output (111--1668)
value short Number of counts (0--4095)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 225
tempint = sim10_getaoc (ds, ffcc, value, error, errdst)
...
tempint = sim10_getaoc (ds, 228, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 228;
sim10_getaoc (&ds, ffcc, &value, &error, &errdst);
...
sim10_getaoc (&ds, 224, &value, &error, &errdst);
...
SIM10_GETAOP
Get an analog output in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM10_GETAOP (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog
output (111--1668)
VALUE REAL*8 Percent (--25.0 to +100.0)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog
output (111--1668)
value double Percent (--25.0 to +100.0)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
real*8 value
real*8 tempreal
...
ffcc = 312
tempreal = sim10_getaop (ds, ffcc, value, error, errdst)
...
tempreal = sim10_getaop (ds, 316, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
double value;
...
ffcc = 312;
sim10_getaop (&ds, ffcc, &value, &error, &errdst);
...
sim10_getaop (&ds, 316, &value, &error, &errdst);
...
SIM10_GETDI
Get a discrete input channel.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETDI (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of discrete
input (111--1668)
VALUE INTEGER*2 (0 -- 1)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of discrete
input (111--1668)
value short (0 -- 1)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 1516
tempint = sim10_getdi (ds, ffcc, value, error, errdst)
...
tempint = sim10_getdi (ds, 1512, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 1516;
sim10_getdi (&ds, ffcc, &value, &error, &errdst);
...
sim10_getdi (&ds, 1512, &value, &error, &errdst);
...
SIM10_GETDIB
Get a group of 8 discrete inputs on a single card.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETDIB (DS, FFCx, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCx INTEGER*2 File--Card--Channel address of ANY channel
on a discrete input card (111--1668)
VALUE INTEGER*2 (0 -- 255) (channel 1 = bit 0 = lsb)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcx short File--Card--Channel address of ANY channel
on a discrete input card (111--1668)
value short (0 -- 255) (channel 1 = bit 0 = lsb)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 319
tempint = sim10_getdib (ds, ffcc, value, error, errdst)
...
tempint = sim10_getdib (ds, 313, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 319;
sim10_getdib (&ds, ffcc, &value, &error, &errdst);
...
sim10_getdib (&ds, 343, &value, &error, &errdst);
...
SIM10_GETDO
Get a discrete output channel.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETDO (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of discrete
output (111--1668)
VALUE INTEGER*2 (0 -- 1)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of discrete
output (111--1668)
value short (0 -- 1)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 1412
tempint = sim10_getdo (ds, ffcc, value, error, errdst)
...
tempint = sim10_getdo (ds, 1419, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 1412;
sim10_getdo (&ds, ffcc, &value, &value, &error, &errdst);
...
sim10_getdo (&ds, 1418, &value, &value, &error, &errdst);
...
SIM10_GETDOB
Get a group of 8 discrete outputs on a single card.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETDOB (DS, FFCx, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCx INTEGER*2 File--Card--Channel address of ANY channel
on a discrete output card (111--1668)
VALUE INTEGER*2 (0 -- 255) (channel 1 = bit 0 = lsb)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcx short File--Card--Channel address of ANY channel
on a discrete output card (111--1668)
value short (0 -- 255) (channel 1 = bit 0 = lsb)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 456
tempint = sim10_getdob (ds, ffcc, value, error, errdst)
...
tempint = sim10_getdob (ds, 458, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 456;
sim10_getdob (&ds, ffcc, &value, &error, &errdst);
...
sim10_getdob (&ds, 458, &value, &error, &errdst);
...
SIM10_GETDS
Get the dataset entered on the command line.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GETDS ()
where:
TEMPINT INTEGER*2 Integer to store return of function
Examples
FORTRAN:
integer*2 ds
integer*2 error
integer*2 errdst
...
ds = sim10_getds ()
call sim10_attach_ds (ds, error, errdst)
...
C:
short ds;
short error
short errdst
...
ds = sim10_getds ();
sim10_attach_ds (&ds, &error, &errdst);
...
SIM10_GET_ALL_DS
Reads the command line into an internal string if the flag argument is TRUE and returns
the first dataset. On subsequent calls, the flag argument should be FALSE. This will
return any additional datasets. If the dataset returned is zero, there are no more datasets.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_GET_ALL_DS (FLAG)
where:
FLAG INTEGER*2 Flag indicating input from command line
TEMPINT INTEGER*2 Integer to store return of function
where:
flag short Flag indicating input from command line
Examples
FORTRAN:
integer*2 ds1, ds2
...
ds1 = sim10_get_all_ds (.TRUE.)
ds2 = sim10_get_all_ds (.FALSE.)
C:
short flag;
short ds1, ds2;
{
...
flag = TRUE;
/* get the command line */
/* ds1 contains the first dataset in the command line */
ds1 = sim10_get_all_ds (flag);
flag = FALSE;
/* ds2 contains the next dataset in the command line */
ds2 = sim10_get_all_ds (flag);
}
SIM10_GETPCI
Get a pulse count input.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_GETPCI (DS, FFCC, VALUE, RATE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of pulse count
input (111--1668)
VALUE INTEGER*2 Number of raw pulses (0 -- 65,535)
RATE REAL*8 Pulses per rate period. Rate period is
declared in the UOC definition from 0.1
to 5.0
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of pulse count
input (111--1668)
value short Number of raw pulses (0 -- 65,535)
rate double Pulses per rate period. Rate period is
declared in the UOC definition from 0.1
to 5.0
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
real*8 rate
...
ffcc = 661
call sim10_getpci (ds, ffcc, value, rate, error, errdst)
...
call sim10_getpci (ds, 668, value, rate, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
double rate;
...
ffcc = 641;
sim10_getpci (&ds, ffcc, &value, &rate, &error, &errdst);
...
sim10_getpci (&ds, 648, &value, &rate, &error, &errdst);
...
SIM10_LOOP
Tieback a loop analog output to analog input without any lag.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_LOOP (DS, PV, VO, GAIN, REVACT, ERRDST)
where:
DS INTEGER*2 Dataset number (1--4)
PV INTEGER*2 File--Card--Channel address of process
variable or analog input (111--1668)
VO INTEGER*2 File--Card--Channel address of the valve
output or analog output (111--1668)
GAIN REAL*8 Loop sensitivity (average = 1.0)
REVACT INTEGER*2 0 for a direct--acting loop; 1 for a
reverse--acting loop
ERRDST INTEGER*2 Destination of error messages
where:
ds short Dataset number (1--4)
pv short File--Card--Channel address of process
variable or analog input (111--1668)
vo short File--Card--Channel address of the valve
output or analog output (111--1668)
gain double Loop sensitivity (average = 1.0)
revact short 0 for a direct--acting loop; 1 for a
reverse--acting loop
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 errdst /1/
integer*2 pv
integer*2 vo
real*8 gain
integer*2 revact
...
pv = 721
vo = 722
gain = 1.0
revact = 0
call sim10_loop (ds, pv, vo, gain, revact, errdst)
...
C:
short ds = 1;
short errdst = 1;
short pv;
short vo;
double gain;
short revact;
...
pv = 721;
vo = 722;
gain = 1.0;
revact = 0;
sim10_loop (&ds, pv, vo, gain, revact, &errdst);
...
SIM10_NOTE
Post a note to the message box.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_NOTE (NOTE)
where:
NOTE CHARACTER*(*) Note to be displayed
where:
note char[] Note to be displayed
Examples
FORTRAN:
C:
sim10_note(Point found);
SIM10_SETAIC
Set an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_SETAIC (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog input
(111--1668)
VALUE INTEGER*2 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog input
(111--1668)
value short Number of counts (0--4095, or --32768 to
+32767 for WSI)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 1222
value = 520
tempint = sim10_setaic (ds, ffcc, value, error, errdst)
...
tempint = sim10_setaic (ds, 1212, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 1222;
value = 520;
sim10_setaic (&ds, ffcc, &value, &error, &errdst);
...
sim10_setaic (&ds, 1212, &value, &error, &errdst);
...
SIM10_SETAIE
Set the engineering unit value of the AI point specified by the file--card--channel.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM10_SETAIE (DS, FFCC, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog input
(111--1668)
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds short dataset number (1--4)
fcc short File--Card--Channel address of analog
input (111--1668)
value double Value read in engineering units of the AI
point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
ffcc = 538
value = 30.0
euhigh = 0
eulow = 0
tempreal = sim10_setaie (ds, ffcc, value, euhigh, eulow, error, errdst)
...
tempreal = sim10_setaie (ds, 512, value, euhigh, eulow, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
double value;
double euhigh;
double eulow;
...
ffcc = 1212;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim10_setaie (&ds, ffcc, &value, &error, &euhigh, &eulow, &errdst);
...
sim10_setaie (&ds, 1212, &value, &error, &euhigh, &eulow, &errdst);
...
SIM10_SETAIP
Set an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM10_SETAIP (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of analog input
(111--1668)
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of analog input
(111--1668)
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
real*8 value
real*8 tempreal
...
ffcc = 513
value = 30.0
tempreal = sim10_setaip (ds, ffcc, value, error, errdst)
...
tempreal = sim10_setaip (ds, 512, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
double value;
...
ffcc = 513;
value = 30.0;
sim10_setaip (&ds, ffcc, &value, &error, &errdst);
...
sim10_setaip (&ds, 518, &value, &error, &errdst);
...
SIM10_SETDI
Set a discrete input channel.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_SETDI (DS, FFCC, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of discrete
input (111--1668)
VALUE INTEGER*2 (0 -- 1)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of discrete
input (111--1668)
value short (0 -- 1)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 241
value = 1
tempint = sim10_setdi (ds, ffcc, value, error, errdst)
...
tempint = sim10_setdi (ds, 215, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 261;
value = 1;
sim10_setdi (&ds, ffcc, &value, &error, &errdst);
...
sim10_setdi (&ds, 265, &value, &error, &errdst);
...
SIM10_SETDIB
Set a group of 8 discrete inputs on a single card.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM10_SETDIB (DS, FFCx, VALUE, ERROR, ERRDST)
where:
DS INTEGER*2 dataset number (1--4)
FFCx INTEGER*2 File--Card--Channel address of ANY channel
on a discrete input card (111--1668)
VALUE INTEGER*2 (0 -- 255) (channel 1 = bit 0 = lsb)
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
TEMPINT INTEGER*2 Integer to store return of function
where:
ds short dataset number (1--4)
ffcx short File--Card--Channel address of ANY channel
on a discrete input card (111--1668)
value short (0 -- 255) (channel 1 = bit 0 = lsb)
error short Error return code
errdst short Destination of error messages
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 ffcc
integer*2 value
integer*2 tempint
...
ffcc = 1124
value = 9507
tempint = sim10_setdib (ds, ffcc, value, error, errdst)
...
tempint = sim10_setdib (ds, 1125, value, error, errdst)
...
C:
short ds = 1;
short error;
short errdst = 1;
short ffcc;
short value;
...
ffcc = 1144;
value = 9507;
sim10_setdib (&ds, ffcc, &value, &error, &errdst);
...
sim10_setdib (&ds, 1134, &value, &error, &errdst);
...
SIM10_SETPCI
Set a pulse count input.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_SETPCI (DS, FFCC, VALUE, RATE_P, ERROR, ERRDST, INDEX)
where:
DS INTEGER*2 dataset number (1--4)
FFCC INTEGER*2 File--Card--Channel address of pulse count
input (111--1668)
VALUE INTEGER*2 Number of raw pulses (0 -- 65,535)
RATE_P REAL*8 PCI rate period as declared in the
UOC/IFC definition from 0.1 to 5.0
ERROR INTEGER*2 Error return code
ERRDST INTEGER*2 Destination of error messages
INDEX INTEGER*2 A unique number between 1 and 255
where:
ds short dataset number (1--4)
ffcc short File--Card--Channel address of pulse count
input (1668)
value short Number of raw pulses (0 -- 65,535)
rate_p double PCI rate period as declared in the
UOC/IFC definition from 0.1 to 5.0
error short Error return code
errdst short Destination of error messages
index short A unique number between 1 and 255
Examples
FORTRAN:
integer*2 ds /1/
integer*2 error
integer*2 errdst /1/
integer*2 value
integer*2 inc
real*8 rate_p
...
inc = 55
rate_p = 1.0
value = 0
WHILE (.TRUE.)
...
value = value + inc
call sim10_setpci (ds, 363, value, rate_p, error, errdst, 72)
...
ENDWHILE
C:
short ds = 1;
short error;
short errdst = 1;
short value;
double rate_p;
short inc;
...
value = 0;
rate_p = 1.0;
...
while (TRUE) {
...
value += inc;
sim10_setpci (&ds, 443, &value, &rate_p, &error, &errdst, 10);
...
}
SIM10_SLEEP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatability with existing code. It simply delays for 1 second before returning.
Format
FORTRAN calling sequence and parameter description:
CALL SIM10_SLEEP ()
Examples
FORTRAN:
while (.TRUE.)
...
call sim10_sleep ()
endwhile
C:
sim10_sleep ();
}
SIM10_WAKEUP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatability with existing code.
LIBRARY INDEX
sim_ab_attach_ds (ds, error, errdst)
sim_ab_attach_multi_ds (ds, error, errdst)
sim_ab_delay (sec)
sim_ab_getds ()
sim_ab_get_all_ds (flag)
sim_ab_note (note)
sim_ab_sleep ()
SIM_AB_ATTACH_DS
Attach to a dataset. All programs must use this function to attach to a dataset. SIMVOX
calls do not work correctly without it. Attaching is done prior to all other SIMVOX calls
except sim_ab_getds and sim_ab_get_all_ds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_ATTACH_DS (DS, ERROR, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
...
call sim_ab_attach_ds (ds, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
...
sim_ab_attach_ds (&ds, &error, &errdst);
...
SIM_AB_ATTACH_MULTI_DS
Attach to multiple datasets. Gets all the datasets on the command line and attaches to
those datasets. Stores the attached datasets in the dataset array provided as the first
parameter.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_ATTACH_MULTI_DS (DS, ERROR, ERRDST)
where:
DS(4) INTEGER*4 Dataset array
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds[4] long Dataset array
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds(4)
integer*4 error
integer*4 errdst /1/
...
call sim_ab_attach_multi_ds (ds, error, errdst)
...
C:
long ds [4];
long error;
long errdst = 1;
...
sim_ab_attach_multi_ds (ds, &error, &errdst);
...
SIM_AB_DCD
Tieback DCD output patterns to input patterns. This function is called once for each
DCD to be resolved by the tieback program. SIMVOX Tools option allows automatic
creation of tieback programs.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_DCD (DS, TEMPLATE, OUTPUT, INPUT, DCDNUM, ERROR, ERRDST, TRANTIME,
TRANPV)
where:
DS INTEGER*4 Dataset number (1--4)
TEMPLATE(35) INTEGER*4 Thirty--five element array containing the
DCD template
OUTPUT (8) CHARACTER*10 Eight element array containing the
Addresses of the outputs
INPUT (16) CHARACTER*10 Sixteen element array containing the
Addresses of the inputs
DCDNUM INTEGER*4 Sequence number of the DCD (1--128)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TRANTIME INTEGER*4 Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
TRANPV INTEGER*4 PV to set up on the inputs during the
transition time (--32768 to +32767)
where:
ds long Dataset number (1--4)
template long[35] Thirty--five element array containing the
DCD template
output char[10][8] Eight element array containing the
Addresses of the outputs
input char[10][16] Sixteen element array containing the
Addresses of the inputs
dcdnum long Sequence number of the DCD (1--128)
error long Error return code
errdst long Destination of error messages
trantime long Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
tranpv long PV to set up on the inputs during the
transition time (--32768 to +32767)
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 dcdnum
integer*4 trantime
integer*4 tranpv
character*10 dcd_output (8 )
character*10 dcd_input (16)
integer*4 template (35)
...
trantime = 0
tranpv = 0
while (.TRUE.)
call sim_ab_dcd (ds, template, dcd_output, dcd_input, 1, error, errdst, trantime,
tranpv)
...
endwhile
C:
long ds = 1;
long error;
long errdst = 1;
long dcdnum;
long trantime;
long tranpv;
...
trantime = 0;
tranpv = 0;
while (TRUE)
{
sim_ab_dcd(&ds, template, dcd_output, dcd_input, 1, &error, &errdst, trantime,
tranpv);
...
SIM_AB_DELAY
Put calling process to sleep for the specified amount of time. The time is specified in
seconds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_DELAY (SEC)
where:
SEC REAL Number of seconds to delay
where:
sec double Real Number of seconds to delay
Examples
FORTRAN:
...
while (.TRUE.)
...
...
C:
...
while (TRUE)
{
...
sim_ab_delay (&delay);
}
SIM_AB_GETAIC
Get an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETAIC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of analog input
VALUE INTEGER*4 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog input
value long Number of counts (0--4095, or --32768 to
+32767 for WSI)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 value
integer*4 tempint
...
tempint = sim_ab_getaic (ds, N13:890, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long value;
...
sim_ab_getaic (&ds, N14:5, &value, &error, &errdst);
...
SIM_AB_GETAIE
Get the engineering unit value of the AI point specified.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_AB_GETAIE (DS, ADDR, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of analog input
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog input
value double Value read in engineering units of the AI point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
value = 0
euhigh = 0
eulow = 0
...
tempreal = sim_ab_getaie (ds, N89:67, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
double value;
double euhigh;
double eulow;
...
strcpy (addr, N16:64);
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim_ab_getaie (&ds, addr, &value, &error, &euhigh, &eulow, &errdst);
...
sim_ab_getaie (&ds, N15:65, &value, &error, &euhigh, &eulow, &errdst);
...
SIM_AB_GETAIP
Get an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_AB_GETAIP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of analog input
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog input
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
real*8 value
real*8 tempreal
...
write (addr, (1X, A)) N64:13
tempreal = sim_ab_getaip (ds, addr, value, error, errdst)
...
tempreal = sim_ab_getaip (ds, N65:12, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
double value;
...
strcpy (addr, N9:144);
sim_ab_getaip (&ds, addr, &value, &error, &errdst);
...
sim_ab_getaip (&ds, N12:54, &value, &error, &errdst);
...
SIM_AB_GETAOC
Get an analog output in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETAOC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of analog output
VALUE INTEGER*4 Number of counts (0--4095)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog output
value long Number of counts (0--4095)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) N24:13
tempint = sim_ab_getaoc (ds, addr, value, error, errdst)
...
tempint = sim_ab_getaoc (ds, N98:998, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, N23:228);
sim_ab_getaoc (&ds, addr, &value, &error, &errdst);
...
sim_ab_getaoc (&ds, N43:54, &value, &error, &errdst);
...
SIM_AB_GETAOP
Get an analog output in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_AB_GETAOP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of analog output
VALUE REAL*8 Percent (--25.0 to +100.0)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog output
value double Percent (--25.0 to +100.0)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
real*8 value
real*8 tempreal
...
write (addr, (1X, A)) N68:65
tempreal = sim_ab_getaop (ds, addr, value, error, errdst)
...
tempreal = sim_ab_getaop (ds, N10:10, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
double value;
...
strcpy (addr, N12:312);
sim_ab_getaop (&ds, addr, &value, &error, &errdst);
...
sim_ab_getaop (&ds, N32:316, &value, &error, &errdst);
...
SIM_AB_GETDI
Get a discrete input.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETDI (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of discrete input
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of discrete input
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) I:10/2
tempint = sim_ab_getdi (ds, addr, value, error, errdst)
...
tempint = sim_ab_getdi (ds, I:10/3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, I:11/4);
sim_ab_getdi (&ds, addr, &value, &error, &errdst);
...
sim_ab_getdi (&ds, I:8/5, &value, &error, &errdst);
...
SIM_AB_GETDIB
Get a group of 8 discrete inputs on a single card.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETDIB (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of ANY channel
on a discrete input card
VALUE INTEGER*4 (0 -- 255) (channel 1 = bit 0 = lsb)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of ANY channel
on a discrete input card
value long (0 -- 255) (channel 1 = bit 0 = lsb)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) I:10/2
tempint = sim_ab_getdib (ds, addr, value, error, errdst)
...
tempint = sim_ab_getdib (ds, I:12/2, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, I:3/1);
sim_ab_getdib (&ds, addr, &value, &error, &errdst);
...
sim_ab_getdib (&ds, I:4/2, &value, &error, &errdst);
...
SIM_AB_GETDO
Get a discrete output.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETDO (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of discrete output
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of discrete output
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) O:10/2
tempint = sim_ab_getdo (ds, addr, value, error, errdst)
...
tempint = sim_ab_getdo (ds, O:12/4, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, O:14/2);
sim_ab_getdo (&ds, addr, &value, &value, &error, &errdst);
...
sim_ab_getdo (&ds, O:14/1, &value, &value, &error, &errdst);
...
SIM_AB_GETDOB
Get a group of 8 discrete outputs on a single card.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETDOB (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of ANY channel
on a discrete output card
VALUE INTEGER*4 (0 -- 255) (channel 1 = bit 0 = lsb)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of ANY channel
on a discrete output card
value long (0 -- 255) (channel 1 = bit 0 = lsb)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) O:10/2
tempint = sim_ab_getdob (ds, addr, value, error, errdst)
...
tempint = sim_ab_getdob (ds, O:15/5, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, O:45/6);
sim_ab_getdob (&ds, addr, &value, &error, &errdst);
...
sim_ab_getdob (&ds, O:45/8, &value, &error, &errdst);
...
SIM_AB_GETDS
Get the dataset entered on the command line.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GETDS ()
where:
TEMPINT INTEGER*4 Integer to store return of function
Examples
FORTRAN:
integer*4 ds
integer*4 error
integer*4 errdst
...
ds = sim_ab_getds ()
call sim_ab_attach_ds (ds, error, errdst)
...
C:
long ds;
long error
long errdst
...
ds = sim_ab_getds ();
sim_ab_attach_ds (&ds, &error, &errdst);
...
SIM_AB_GET_ALL_DS
Reads the command line into an internal string if the flag argument is TRUE and returns
the first dataset. On subsequent calls, the flag argument should be FALSE. This will
return any additional datasets. If the dataset returned is zero, there are no more datasets.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_GET_ALL_DS (FLAG)
where:
FLAG INTEGER*4 Flag indicating input from command line
TEMPINT INTEGER*4 Integer to store return of function
where:
flag long Flag indicating input from command line
Examples
FORTRAN:
integer*4 ds1, ds2
...
ds1 = sim_ab_get_all_ds (.TRUE.)
ds2 = sim_ab_get_all_ds (.FALSE.)
C:
long flag;
long ds1, ds2;
{
...
flag = TRUE;
/* get the command line */
/* ds1 contains the first dataset in the command line */
ds1 = sim_ab_get_all_ds (flag);
flag = FALSE;
/* ds2 contains the next dataset in the command line */
ds2 = sim_ab_get_all_ds (flag);
}
SIM_AB_LOOP
Tieback a loop analog output to analog input without any lag.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_LOOP (DS, PV, VO, GAIN, REVACT, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
PV CHARACTER*(*) Address of process
variable or analog input
VO CHARACTER*(*) Address of the valve
output or analog output
GAIN REAL*8 Loop sensitivity (average = 1.0)
REVACT INTEGER*4 0 for a direct--acting loop; 1 for a
reverse--acting loop
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
pv char[] Address of process
variable or analog input
vo char[] Address of the valve
output or analog output
gain double Loop sensitivity (average = 1.0)
revact long 0 for a direct--acting loop; 1 for a
reverse--acting loop
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 errdst /1/
character*80 pv
character*80 vo
real*8 gain
integer*4 revact
...
write (pv, (1X, A)) N11:10
write (vo, (1X, A)) N10:10
gain = 1.0
revact = 0
call sim_ab_loop (ds, pv, vo, gain, revact, errdst)
...
C:
long ds = 1;
long errdst = 1;
char pv[80];
char vo[80];
double gain;
long revact;
...
strcpy (pv, N7:21);
strcpy (vo, N7:22);
gain = 1.0;
revact = 0;
sim_ab_loop (&ds, pv, vo, gain, revact, &errdst);
...
SIM_AB_NOTE
Post a note to the message box.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_NOTE (NOTE)
where:
NOTE CHARACTER*(*) Note to be displayed
where:
note char[] Note to be displayed
Examples
FORTRAN:
C:
sim_ab_note(Point found);
SIM_AB_SETAIC
Set an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_SETAIC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of analog input
VALUE INTEGER*4 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog input
value long Number of counts (0--4095, or --32768 to
+32767 for WSI)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) N10:10
value = 520
tempint = sim_ab_setaic (ds, addr, value, error, errdst)
...
tempint = sim_ab_setaic (ds, N11:11, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, N12:22);
value = 520;
sim_ab_setaic (&ds, addr, &value, &error, &errdst);
...
sim_ab_setaic (&ds, N12:12, &value, &error, &errdst);
...
SIM_AB_SETAIE
Set the engineering unit value of the AI point specified.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_AB_SETAIE (DS, ADDR, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CAHRACTER*(*) Address of analog input
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog input
value double Value read in engineering units of the AI
point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
write (addr, (1X, A)) N22:10
value = 30.0
euhigh = 0
eulow = 0
tempreal = sim_ab_setaie (ds, addr, value, euhigh, eulow, error, errdst)
...
tempreal = sim_ab_setaie (ds, N51:51, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
double value;
double euhigh;
double eulow;
...
strcpy (addr, N12:12);
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim_ab_setaie (&ds, addr, &value, &error, &euhigh, &eulow, &errdst);
...
sim_ab_setaie (&ds, N12:12, &value, &error, &euhigh, &eulow, &errdst);
...
SIM_AB_SETAIP
Set an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_AB_SETAIP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of analog input
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
real*8 value
real*8 tempreal
...
write (addr, (1X, A)) N50:2
value = 30.0
tempreal = sim_ab_setaip (ds, addr, value, error, errdst)
...
tempreal = sim_ab_setaip (ds, N51:3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
double value;
...
strcpy (addr, N13:50);
value = 30.0;
sim_ab_setaip (&ds, addr, &value, &error, &errdst);
...
sim_ab_setaip (&ds, N12:12, &value, &error, &errdst);
...
SIM_AB_SETDI
Set a discrete input.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_SETDI (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of discrete input
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of discrete input
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) I:10/2
value = 1
tempint = sim_ab_setdi (ds, addr, value, error, errdst)
...
tempint = sim_ab_setdi (ds, I:12/3, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, I:26/1);
value = 1;
sim_ab_setdi (&ds, addr, &value, &error, &errdst);
...
sim_ab_setdi (&ds, I:26/5, &value, &error, &errdst);
...
SIM_AB_SETDIB
Set a group of 8 discrete inputs on a single card.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_AB_SETDIB (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR CHARACTER*(*) Address of ANY channel
on a discrete input card
VALUE INTEGER*4 (0 -- 255) (channel 1 = bit 0 = lsb)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr char[] Address of ANY channel
on a discrete input card
value long (0 -- 255) (channel 1 = bit 0 = lsb)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
character*80 addr
integer*4 value
integer*4 tempint
...
write (addr, (1X, A)) I:10/2
value = 9507
tempint = sim_ab_setdib (ds, addr, value, error, errdst)
...
tempint = sim_ab_setdib (ds, I:11/2, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
char addr[80];
long value;
...
strcpy (addr, I:11/4);
value = 9507;
sim_ab_setdib (&ds, addr, &value, &error, &errdst);
...
sim_ab_setdib (&ds, I:11/3, &value, &error, &errdst);
...
SIM_AB_SLEEP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatability with existing code. It simply delays for 1 second before returning.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_AB_SLEEP ()
Examples
FORTRAN:
while (.TRUE.)
...
call sim_ab_sleep ()
endwhile
C:
sim_ab_sleep ();
}
SIM_AB_WAKEUP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatability with existing code.
LIBRARY INDEX
sim_mod_attach_ds (ds, error, errdst)
sim_mod_attach_multi_ds (ds, error, errdst)
sim_mod_delay (sec)
sim_mod_getds ()
sim_mod_get_all_ds (flag)
sim_mod_note (note)
sim_mod_sleep ()
SIM_MOD_ATTACH_DS
Attach to a dataset. All programs must use this function to attach to a dataset. SIMVOX
calls do not work correctly without it. Attaching is done prior to all other SIMVOX calls
except sim_mod_getds and sim_mod_get_all_ds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_ATTACH_DS (DS, ERROR, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
...
call sim_mod_attach_ds (ds, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
...
sim_mod_attach_ds (&ds, &error, &errdst);
...
SIM_MOD_ATTACH_MULTI_DS
Attach to multiple datasets. Gets all the datasets on the command line and attaches to
those datasets. Stores the attached datasets in the dataset array provided as the first
parameter.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_ATTACH_MULTI_DS (DS, ERROR, ERRDST)
where:
DS(4) INTEGER*4 Dataset array
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds[4] long Dataset array
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds(4)
integer*4 error
integer*4 errdst /1/
...
call sim_mod_attach_multi_ds (ds, error, errdst)
...
C:
long ds [4];
long error;
long errdst = 1;
...
sim_mod_attach_multi_ds (ds, &error, &errdst);
...
SIM_MOD_DCD
Tieback DCD output patterns to input patterns. This function is called once for each
DCD to be resolved by the tieback program. SIMVOX Tools option allows automatic
creation of tieback programs.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_DCD (DS, TEMPLATE, OUTPUT, INPUT, DCDNUM, ERROR, ERRDST, TRANTIME,
TRANPV)
where:
DS INTEGER*4 Dataset number (1--4)
TEMPLATE(35) INTEGER*4 Thirty--five element array containing the
DCD template
OUTPUT (8) INTEGER*4 Eight element array containing the
addresses of the outputs
INPUT (16) INTEGER*4 Sixteen element array containing the
addresses of the inputs
DCDNUM INTEGER*4 Sequence number of the DCD (1--128)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TRANTIME INTEGER*4 Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
TRANPV INTEGER*4 PV to set up on the inputs during the
transition time (--32768 to +32767)
where:
ds long Dataset number (1--4)
template long[35] Thirty--five element array containing the
DCD template
output long[8] Eight element array containing the
addresses of the outputs
input long[16] Sixteen element array containing the
addresses of the inputs
dcdnum long Sequence number of the DCD (1--128)
error long Error return code
errdst long Destination of error messages
trantime long Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
tranpv long PV to set up on the inputs during the
transition time (--32768 to +32767)
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 dcdnum
integer*4 trantime
integer*4 tranpv
integer*4 dcd_output (8 )
integer*4 dcd_input (16)
integer*4 template (35)
...
trantime = 0
tranpv = 0
while (.TRUE.)
call sim_mod_dcd (ds, template, dcd_output, dcd_input, 1, error, errdst, trantime,
tranpv)
...
endwhile
C:
long ds = 1;
long error;
long errdst = 1;
long dcdnum;
long trantime;
long tranpv;
...
trantime = 0;
tranpv = 0;
while (TRUE)
{
sim_mod_dcd(&ds, template, dcd_output, dcd_input, 1, &error, &errdst, trantime,
tranpv);
...
SIM_MOD_DELAY
Put calling process to sleep for the specified amount of time. The time is specified in
seconds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_DELAY (SEC)
where:
SEC REAL Number of seconds to delay
where:
sec double Real Number of seconds to delay
Examples
FORTRAN:
...
while (.TRUE.)
...
...
C:
...
while (TRUE)
{
...
sim_mod_delay (&delay);
}
SIM_MOD_GETAIC
Get an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_GETAIC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE INTEGER*4 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value long Number of counts (0--4095, or --32768 to
+32767 for WSI)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 30567
tempint = sim_mod_getaic (ds, addr, value, error, errdst)
...
tempint = sim_mod_getaic (ds, 30856, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 30851;
sim_mod_getaic (&ds, addr, &value, &error, &errdst);
...
sim_mod_getaic (&ds, 30856, &value, &error, &errdst);
...
SIM_MOD_GETAIE
Get the engineering unit value of the AI point specified.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_MOD_GETAIE (DS, ADDR, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value double Value read in engineering units of the AI point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
addr = 30538
value = 0
euhigh = 0
eulow = 0
tempreal = sim_mod_getaie (ds, addr, value, euhigh, eulow, error, errdst)
...
tempreal = sim_mod_getaie (ds, 30528, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
double euhigh;
double eulow;
...
addr = 31222;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim_mod_getaie (&ds, addr, &value, &error, &euhigh, &eulow, &errdst);
...
sim_mod_getaie (&ds, 31212, &value, &error, &euhigh, &eulow, &errdst);
...
SIM_MOD_GETAIP
Get an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_MOD_GETAIP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 tempreal
...
addr = 31064
tempreal = sim_mod_getaip (ds, addr, value, error, errdst)
...
tempreal = sim_mod_getaip (ds, 31062, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
...
addr = 33144;
sim_mod_getaip (&ds, addr, &value, &error, &errdst);
...
sim_mod_getaip (&ds, 31062, &value, &error, &errdst);
...
SIM_MOD_GETAOC
Get an analog output in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_GETAOC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog output
VALUE INTEGER*4 Number of counts (0--4095)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog output
value long Number of counts (0--4095)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 40225
tempint = sim_mod_getaoc (ds, addr, value, error, errdst)
...
tempint = sim_mod_getaoc (ds, 50228, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 55228;
sim_mod_getaoc (&ds, addr, &value, &error, &errdst);
...
sim_mod_getaoc (&ds, 62224, &value, &error, &errdst);
...
SIM_MOD_GETAOP
Get an analog output in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_MOD_GETAOP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog output
VALUE REAL*8 Percent (--25.0 to +100.0)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog output
value double Percent (--25.0 to +100.0)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 tempreal
...
addr = 46312
tempreal = sim_mod_getaop (ds, addr, value, error, errdst)
...
tempreal = sim_mod_getaop (ds, 64316, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
...
addr = 40312;
sim_mod_getaop (&ds, addr, &value, &error, &errdst);
...
sim_mod_getaop (&ds, 54316, &value, &error, &errdst);
...
SIM_MOD_GETDI
Get a discrete input.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_GETDI (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of discrete input
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of discrete input
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 11516
tempint = sim_mod_getdi (ds, addr, value, error, errdst)
...
tempint = sim_mod_getdi (ds, 11512, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 11516;
sim_mod_getdi (&ds, addr, &value, &error, &errdst);
...
sim_mod_getdi (&ds, 11512, &value, &error, &errdst);
...
SIM_MOD_GETDO
Get a discrete output.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_GETDO (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of discrete output
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of discrete output
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 1412
tempint = sim_mod_getdo (ds, addr, value, error, errdst)
...
tempint = sim_mod_getdo (ds, 1419, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 1412;
sim_mod_getdo (&ds, addr, &value, &value, &error, &errdst);
...
sim_mod_getdo (&ds, 1418, &value, &value, &error, &errdst);
...
SIM_MOD_GETDS
Get the dataset entered on the command line.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_GETDS ()
where:
TEMPINT INTEGER*4 Integer to store return of function
Examples
FORTRAN:
integer*4 ds
integer*4 error
integer*4 errdst
...
ds = sim_mod_getds ()
call sim_mod_attach_ds (ds, error, errdst)
...
C:
long ds;
long error
long errdst
...
ds = sim_mod_getds ();
sim_mod_attach_ds (&ds, &error, &errdst);
...
SIM_MOD_GET_ALL_DS
Reads the command line into an internal string if the flag argument is TRUE and returns
the first dataset. On subsequent calls, the flag argument should be FALSE. This will
return any additional datasets. If the dataset returned is zero, there are no more datasets.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_GET_ALL_DS (FLAG)
where:
FLAG INTEGER*4 Flag indicating input from command line
TEMPINT INTEGER*4 Integer to store return of function
where:
flag long Flag indicating input from command line
Examples
FORTRAN:
integer*4 ds1, ds2
...
ds1 = sim_mod_get_all_ds (.TRUE.)
ds2 = sim_mod_get_all_ds (.FALSE.)
C:
long flag;
long ds1, ds2;
{
...
flag = TRUE;
/* get the command line */
/* ds1 contains the first dataset in the command line */
ds1 = sim_mod_get_all_ds (flag);
flag = FALSE;
/* ds2 contains the next dataset in the command line */
ds2 = sim_mod_get_all_ds (flag);
}
SIM_MOD_LOOP
Tieback a loop analog output to analog input without any lag.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_LOOP (DS, PV, VO, GAIN, REVACT, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
PV INTEGER*4 Address of process varimodle or
analog input
VO INTEGER*4 Address of the valve
output or analog output
GAIN REAL*8 Loop sensitivity (average = 1.0)
REVACT INTEGER*4 0 for a direct--acting loop; 1 for a
reverse--acting loop
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
pv long Address of process
varimodle or analog input
vo long Address of the valve
output or analog output
gain double Loop sensitivity (average = 1.0)
revact long 0 for a direct--acting loop; 1 for a
reverse--acting loop
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 errdst /1/
integer*4 pv
integer*4 vo
real*8 gain
integer*4 revact
...
pv = 30721
vo = 40722
gain = 1.0
revact = 0
call sim_mod_loop (ds, pv, vo, gain, revact, errdst)
...
C:
long ds = 1;
long errdst = 1;
long pv;
long vo;
double gain;
long revact;
...
pv = 33721;
vo = 43722;
gain = 1.0;
revact = 0;
sim_mod_loop (&ds, pv, vo, gain, revact, &errdst);
...
SIM_MOD_NOTE
Post a note to the message box.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_NOTE (NOTE)
where:
NOTE CHARACTER*(*) Note to be displayed
where:
note char[] Note to be displayed
Examples
FORTRAN:
C:
sim_mod_note(Point found);
SIM_MOD_SETAIC
Set an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_SETAIC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE INTEGER*4 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value long Number of counts (0--4095, or --32768 to
+32767 for WSI)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 31222
value = 520
tempint = sim_mod_setaic (ds, addr, value, error, errdst)
...
tempint = sim_mod_setaic (ds, 31212, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 31222;
value = 520;
sim_mod_setaic (&ds, addr, &value, &error, &errdst);
...
sim_mod_setaic (&ds, 31212, &value, &error, &errdst);
...
SIM_MOD_SETAIE
Set the engineering unit value of the AI point specified.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_MOD_SETAIE (DS, ADDR, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
fcc long Address of analog input
value double Value read in engineering units of the AI
point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
addr = 31538
value = 30.0
euhigh = 0
eulow = 0
tempreal = sim_mod_setaie (ds, addr, value, euhigh, eulow, error, errdst)
...
tempreal = sim_mod_setaie (ds, 32512, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
double euhigh;
double eulow;
...
addr = 31212;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim_mod_setaie (&ds, addr, &value, &error, &euhigh, &eulow, &errdst);
...
sim_mod_setaie (&ds, 31212, &value, &error, &euhigh, &eulow, &errdst);
...
SIM_MOD_SETAIP
Set an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_MOD_SETAIP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 tempreal
...
addr = 34513
value = 30.0
tempreal = sim_mod_setaip (ds, addr, value, error, errdst)
...
tempreal = sim_mod_setaip (ds, 36512, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
...
addr = 38513;
value = 30.0;
sim_mod_setaip (&ds, addr, &value, &error, &errdst);
...
sim_mod_setaip (&ds, 39518, &value, &error, &errdst);
...
SIM_MOD_SETDI
Set a discrete input.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_MOD_SETDI (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of discrete input
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of discrete input
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 12241
value = 1
tempint = sim_mod_setdi (ds, addr, value, error, errdst)
...
tempint = sim_mod_setdi (ds, 12215, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 11261;
value = 1;
sim_mod_setdi (&ds, addr, &value, &error, &errdst);
...
sim_mod_setdi (&ds, 11265, &value, &error, &errdst);
...
SIM_MOD_SLEEP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatmodility with existing code. It simply delays for 1 second before returning.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_MOD_SLEEP ()
Examples
FORTRAN:
while (.TRUE.)
...
call sim_mod_sleep ()
endwhile
C:
sim_mod_sleep ();
}
SIM_MOD_WAKEUP
This function is not supported in SIMVOX for Windows NT. It is provided for
compatmodility with existing code.
LIBRARY INDEX
sim_ti_attach_ds (ds, error, errdst)
sim_ti_attach_multi_ds (ds, error, errdst)
sim_ti_delay (sec)
sim_ti_getds ()
sim_ti_get_all_ds (flag)
sim_ti_note (note)
sim_ti_sleep ()
SIM_TI_ATTACH_DS
Attach to a dataset. All programs must use this function to attach to a dataset. SIMVOX
calls do not work correctly without it. Attaching is done prior to all other SIMVOX calls
except sim_ti_getds and sim_ti_get_all_ds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_ATTACH_DS (DS, ERROR, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
...
call sim_ti_attach_ds (ds, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
...
sim_ti_attach_ds (&ds, &error, &errdst);
...
SIM_TI_ATTACH_MULTI_DS
Attach to multiple datasets. Gets all the datasets on the command line and attaches to
those datasets. Stores the attached datasets in the dataset array provided as the first
parameter.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_ATTACH_MULTI_DS (DS, ERROR, ERRDST)
where:
DS(4) INTEGER*4 Dataset array
ERROR INTEGER*4 Error return value
ERRDST INTEGER*4 Destination of error messages
where:
ds[4] long Dataset array
error long Error return value
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds(4)
integer*4 error
integer*4 errdst /1/
...
call sim_ti_attach_multi_ds (ds, error, errdst)
...
C:
long ds [4];
long error;
long errdst = 1;
...
sim_ti_attach_multi_ds (ds, &error, &errdst);
...
SIM_TI_DCD
Tieback DCD output patterns to input patterns. This function is called once for each
DCD to be resolved by the tieback program. SIMVOX Tools option allows automatic
creation of tieback programs.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_DCD (DS, TEMPLATE, OUTPUT, INPUT, DCDNUM, ERROR, ERRDST, TRANTIME,
TRANPV)
where:
DS INTEGER*4 Dataset number (1--4)
TEMPLATE(35) INTEGER*4 Thirty--five element array containing the
DCD template
OUTPUT (8) INTEGER*4 Eight element array containing the
addresses of the outputs
INPUT (16) INTEGER*4 Sixteen element array containing the
addresses of the inputs
DCDNUM INTEGER*4 Sequence number of the DCD (1--128)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TRANTIME INTEGER*4 Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
TRANPV INTEGER*4 PV to set up on the inputs during the
transition time (--32768 to +32767)
where:
ds long Dataset number (1--4)
template long[35] Thirty--five element array containing the
DCD template
output long[8] Eight element array containing the
addresses of the outputs
input long[16] Sixteen element array containing the
addresses of the inputs
dcdnum long Sequence number of the DCD (1--128)
error long Error return code
errdst long Destination of error messages
trantime long Number of seconds to wait before setting
up the new PV on the inputs after a new
SP appears on the outputs
tranpv long PV to set up on the inputs during the
transition time (--32768 to +32767)
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 dcdnum
integer*4 trantime
integer*4 tranpv
integer*4 dcd_output (8 )
integer*4 dcd_input (16)
integer*4 template (35)
...
trantime = 0
tranpv = 0
while (.TRUE.)
call sim_ti_dcd (ds, template, dcd_output, dcd_input, 1, error, errdst, trantime,
tranpv)
...
endwhile
C:
long ds = 1;
long error;
long errdst = 1;
long dcdnum;
long trantime;
long tranpv;
...
trantime = 0;
tranpv = 0;
while (TRUE)
{
sim_ti_dcd(&ds, template, dcd_output, dcd_input, 1, &error, &errdst, trantime,
tranpv);
...
SIM_TI_DELAY
Put calling process to sleep for the specified amount of time. The time is specified in
seconds.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_DELAY (SEC)
where:
SEC REAL Number of seconds to delay
where:
sec double Real Number of seconds to delay
Examples
FORTRAN:
...
while (.TRUE.)
...
...
C:
...
while (TRUE)
{
...
sim_ti_delay (&delay);
}
SIM_TI_GETAIC
Get an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_GETAIC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE INTEGER*4 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value long Number of counts (0--4095, or --32768 to
+32767 for WSI)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 3567
tempint = sim_ti_getaic (ds, addr, value, error, errdst)
...
tempint = sim_ti_getaic (ds, 3856, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 3851;
sim_ti_getaic (&ds, addr, &value, &error, &errdst);
...
sim_ti_getaic (&ds, 3856, &value, &error, &errdst);
...
SIM_TI_GETAIE
Get the engineering unit value of the AI point specified.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_TI_GETAIE (DS, ADDR, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value double Value read in engineering units of the AI point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
addr = 3538
value = 0
euhigh = 0
eulow = 0
tempreal = sim_ti_getaie (ds, addr, value, euhigh, eulow, error, errdst)
...
tempreal = sim_ti_getaie (ds, 4528, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
double euhigh;
double eulow;
...
addr = 1222;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim_ti_getaie (&ds, addr, &value, &error, &euhigh, &eulow, &errdst);
...
sim_ti_getaie (&ds, 1212, &value, &error, &euhigh, &eulow, &errdst);
...
SIM_TI_GETAIP
Get an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_TI_GETAIP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 tempreal
...
addr = 3164
tempreal = sim_ti_getaip (ds, addr, value, error, errdst)
...
tempreal = sim_ti_getaip (ds, 3062, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
...
addr = 3344;
sim_ti_getaip (&ds, addr, &value, &error, &errdst);
...
sim_ti_getaip (&ds, 3102, &value, &error, &errdst);
...
SIM_TI_GETAOC
Get an analog output in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_GETAOC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog output
VALUE INTEGER*4 Number of counts (0--4095)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog output
value long Number of counts (0--4095)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 4025
tempint = sim_ti_getaoc (ds, addr, value, error, errdst)
...
tempint = sim_ti_getaoc (ds, 5028, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 5228;
sim_ti_getaoc (&ds, addr, &value, &error, &errdst);
...
sim_ti_getaoc (&ds, 6224, &value, &error, &errdst);
...
SIM_TI_GETAOP
Get an analog output in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_TI_GETAOP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog output
VALUE REAL*8 Percent (--25.0 to +100.0)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog output
value double Percent (--25.0 to +100.0)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 tempreal
...
addr = 4312
tempreal = sim_ti_getaop (ds, addr, value, error, errdst)
...
tempreal = sim_ti_getaop (ds, 6416, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
...
addr = 4012;
sim_ti_getaop (&ds, addr, &value, &error, &errdst);
...
sim_ti_getaop (&ds, 5436, &value, &error, &errdst);
...
SIM_TI_GETDI
Get a discrete input.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_GETDI (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of discrete input
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of discrete input
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 1116
tempint = sim_ti_getdi (ds, addr, value, error, errdst)
...
tempint = sim_ti_getdi (ds, 1152, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 1151;
sim_ti_getdi (&ds, addr, &value, &error, &errdst);
...
sim_ti_getdi (&ds, 1152, &value, &error, &errdst);
...
SIM_TI_GETDO
Get a discrete output.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_GETDO (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of discrete output
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of discrete output
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 1412
tempint = sim_ti_getdo (ds, addr, value, error, errdst)
...
tempint = sim_ti_getdo (ds, 1419, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 1412;
sim_ti_getdo (&ds, addr, &value, &value, &error, &errdst);
...
sim_ti_getdo (&ds, 1418, &value, &value, &error, &errdst);
...
SIM_TI_GETDS
Get the dataset entered on the command line.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_GETDS ()
where:
TEMPINT INTEGER*4 Integer to store return of function
Examples
FORTRAN:
integer*4 ds
integer*4 error
integer*4 errdst
...
ds = sim_ti_getds ()
call sim_ti_attach_ds (ds, error, errdst)
...
C:
long ds;
long error
long errdst
...
ds = sim_ti_getds ();
sim_ti_attach_ds (&ds, &error, &errdst);
...
SIM_TI_GET_ALL_DS
Reads the command line into an internal string if the flag argument is TRUE and returns
the first dataset. On subsequent calls, the flag argument should be FALSE. This will
return any additional datasets. If the dataset returned is zero, there are no more datasets.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_GET_ALL_DS (FLAG)
where:
FLAG INTEGER*4 Flag indicating input from command line
TEMPINT INTEGER*4 Integer to store return of function
where:
flag long Flag indicating input from command line
Examples
FORTRAN:
integer*4 ds1, ds2
...
ds1 = sim_ti_get_all_ds (.TRUE.)
ds2 = sim_ti_get_all_ds (.FALSE.)
C:
long flag;
long ds1, ds2;
{
...
flag = TRUE;
/* get the command line */
/* ds1 contains the first dataset in the command line */
ds1 = sim_ti_get_all_ds (flag);
flag = FALSE;
/* ds2 contains the next dataset in the command line */
ds2 = sim_ti_get_all_ds (flag);
}
SIM_TI_LOOP
Tieback a loop analog output to analog input without any lag.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_LOOP (DS, PV, VO, GAIN, REVACT, ERRDST)
where:
DS INTEGER*4 Dataset number (1--4)
PV INTEGER*4 Address of process varitile or
analog input
VO INTEGER*4 Address of the valve
output or analog output
GAIN REAL*8 Loop sensitivity (average = 1.0)
REVACT INTEGER*4 0 for a direct--acting loop; 1 for a
reverse--acting loop
ERRDST INTEGER*4 Destination of error messages
where:
ds long Dataset number (1--4)
pv long Address of process
varitile or analog input
vo long Address of the valve
output or analog output
gain double Loop sensitivity (average = 1.0)
revact long 0 for a direct--acting loop; 1 for a
reverse--acting loop
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 errdst /1/
integer*4 pv
integer*4 vo
real*8 gain
integer*4 revact
...
pv = 3721
vo = 4722
gain = 1.0
revact = 0
call sim_ti_loop (ds, pv, vo, gain, revact, errdst)
...
C:
long ds = 1;
long errdst = 1;
long pv;
long vo;
double gain;
long revact;
...
pv = 3371;
vo = 4372;
gain = 1.0;
revact = 0;
sim_ti_loop (&ds, pv, vo, gain, revact, &errdst);
...
SIM_TI_NOTE
Post a note to the message box.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_NOTE (NOTE)
where:
NOTE CHARACTER*(*) Note to be displayed
where:
note char[] Note to be displayed
Examples
FORTRAN:
C:
sim_ti_note(Point found);
SIM_TI_SETAIC
Set an analog input in counts.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_SETAIC (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE INTEGER*4 Number of counts (0--4095, or --32768 to
+32767 for WSI)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value long Number of counts (0--4095, or --32768 to
+32767 for WSI)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 3122
value = 520
tempint = sim_ti_setaic (ds, addr, value, error, errdst)
...
tempint = sim_ti_setaic (ds, 212, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 322;
value = 520;
sim_ti_setaic (&ds, addr, &value, &error, &errdst);
...
sim_ti_setaic (&ds, 3122, &value, &error, &errdst);
...
SIM_TI_SETAIE
Set the engineering unit value of the AI point specified.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_TI_SETAIE (DS, ADDR, VALUE, EUHIGH, EUHIGH, EULOW, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Value read in engineering units of the AI
point
EUHIGH REAL*8 High engineering units of the point
EULOW REAL*8 Low engineering units of the point
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
fcc long Address of analog input
value double Value read in engineering units of the AI
point
euhigh double High engineering units of the point
eulow double Low engineering units of the point
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 euhigh
real*8 eulow
real*8 tempreal
...
addr = 338
value = 30.0
euhigh = 0
eulow = 0
tempreal = sim_ti_setaie (ds, addr, value, euhigh, eulow, error, errdst)
...
tempreal = sim_ti_setaie (ds, 3512, value, euhigh, eulow, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
double euhigh;
double eulow;
...
addr = 3112;
value = 55.0;
euhigh = 100.0;
eulow = 0.0;
sim_ti_setaie (&ds, addr, &value, &error, &euhigh, &eulow, &errdst);
...
sim_ti_setaie (&ds, 312, &value, &error, &euhigh, &eulow, &errdst);
...
SIM_TI_SETAIP
Set an analog input in percent.
Format
FORTRAN calling sequence and parameter description:
TEMPREAL = SIM_TI_SETAIP (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of analog input
VALUE REAL*8 Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPREAL REAL*8 Real to store return of function
where:
ds long dataset number (1--4)
addr long Address of analog input
value double Percent (--25.0 to +100.0 or 0.0 to
+125.0 or --128.0 to +127.996) depending
on card type
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
real*8 value
real*8 tempreal
...
addr = 3451
value = 30.0
tempreal = sim_ti_setaip (ds, addr, value, error, errdst)
...
tempreal = sim_ti_setaip (ds, 3651, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
double value;
...
addr = 513;
value = 30.0;
sim_ti_setaip (&ds, addr, &value, &error, &errdst);
...
sim_ti_setaip (&ds, 3518, &value, &error, &errdst);
...
SIM_TI_SETDI
Set a discrete input.
Format
FORTRAN calling sequence and parameter description:
TEMPINT = SIM_TI_SETDI (DS, ADDR, VALUE, ERROR, ERRDST)
where:
DS INTEGER*4 dataset number (1--4)
ADDR INTEGER*4 Address of discrete input
VALUE INTEGER*4 (0 -- 1)
ERROR INTEGER*4 Error return code
ERRDST INTEGER*4 Destination of error messages
TEMPINT INTEGER*4 Integer to store return of function
where:
ds long dataset number (1--4)
addr long Address of discrete input
value long (0 -- 1)
error long Error return code
errdst long Destination of error messages
Examples
FORTRAN:
integer*4 ds /1/
integer*4 error
integer*4 errdst /1/
integer*4 addr
integer*4 value
integer*4 tempint
...
addr = 122
value = 1
tempint = sim_ti_setdi (ds, addr, value, error, errdst)
...
tempint = sim_ti_setdi (ds, 1221, value, error, errdst)
...
C:
long ds = 1;
long error;
long errdst = 1;
long addr;
long value;
...
addr = 161;
value = 1;
sim_ti_setdi (&ds, addr, &value, &error, &errdst);
...
sim_ti_setdi (&ds, 115, &value, &error, &errdst);
...
SIM_TI_SLEEP
This function is not supported in SIMVOX for Windows NT. It is provided for
compattiility with existing code. It simply delays for 1 second before returning.
Format
FORTRAN calling sequence and parameter description:
CALL SIM_TI_SLEEP ()
Examples
FORTRAN:
while (.TRUE.)
...
call sim_ti_sleep ()
endwhile
C:
sim_ti_sleep ();
}
SIM_TI_WAKEUP
This function is not supported in SIMVOX for Windows NT. It is provided for
compattiility with existing code.
10/03/95 64
SIMVOX -- Version 2.3 Appendix F
The following errors are generated by the SIMVOX library functions. In user programs, the error
destination argument in function calls determines where the error message goes. Currently, the
argument considers only two values: 0 or 1.
If the argument is 0, errors are not displayed at all. If the argument is 1 and the tieback/model is
attached to the terminal, error messages are displayed on the users terminal. It is recommended
practice to check tiebacks/models for errors before starting them from the menu system as
detached processes. The benefits are two fold. Firstly, SIMVOX functions cause a higher CPU
load when there are errors. And stating the obvious, secondly, the simulation does not function
correctly.
In section 6.4 of the manual, we presented the various errors and why they were caused. Why an
error is caused should inform the user of what action to take to correct the problem. Here the
error messages examples are presented to familiarize users with what to expect.
This error code informs the users that a F--C--C being referenced is not the correct type for the
calling function. The name of the calling function, the data set number, and the F--C--C in
question are displayed. For example, this error is generated if an AI is referenced as a DI. The
following are some examples:
GETAIP ERROR: data set 1, 10101 is not defined as AI
SETDI ERROR: data set 2, 120110 is not defined as DI
DCD ERROR: DCD #5, DO, data set 4, 71112 is not defined as DO
This error code informs users that the referenced F--C--C is invalid. The name of the calling
function, the data set number, and the F--C--C in question are displayed. For example, this error
is generated if any of the F--C--C components are out of range. Valid ranges are 1--16 for files,
1--14 for cards, and 1--8 or 1--16 for channels (type dependent). When specifying F--C--C in
SIMVOX calls, two digits are used for each component. For example, file 1, card 1, and channel
1 will be represented as 10101 without the leading zero. File 16, card 14, and channel 16 will be
represented as 161416. The following are some examples of this error:
GETAIP ERROR: data set 2, 100217 is an invalid FCC
SETPCI ERROR: SETPCI #10, PCI, data set 6, 81010 is an invalid FCC
GETAOP ERROR: data set 2, 100916 is an invalid FCC
This error is generated if the referenced F--C--C is not defined in the specified simulated I/O file.
The name of the calling function, the data set number, and the F--C--C in question are displayed.
Here are some examples:
GETAIP ERROR: data set 2, 100216 is undefined
GETAOP ERROR: data set 2, 100908 is undefined
SETPCI ERROR: SETPCI #10, PCI, data set 6, 81008 is undefined
This error is generated while setting values of input channels and the value is out of range. For
example, while setting a DI channel, a value other than 0 or 1 is specified. Similarly, while
setting an AI channel, a value outside of --25.0 to 100% or 0.0 to 125% is specified. The name
of the calling function, the data set number, the F--C--C in question is displayed. The following
are two examples:
SETAIP ERROR: data set 2, 100201 value 150.5 is out of range for type AI
SETDI ERROR: data set 1, 10101 value 8 is out of range for type DI
This error is generated specifically for DCD and PCI functions. Both of these functions have an
index number. Valid range for this index number is 1--255. If a call has a number outside this
range, this error is generated. The name of the calling function, the data set number, and the
index number in question is displayed. The following are two examples:
DCD ERROR: DCD #256, data set 4, number 256 is out of range
SETPCI ERROR: SETPCI #300, data set 6, number 300 is out of range
If a program is not attached to a data set, it cannot reference any F--C--C in that data set. This
error is generated in those cases.
GETAOP ERROR: Program is not attached to data set 1
SETAIP ERROR: Program is not attached to data set 5
SETDI ERROR: Program is not attached to data set 6
If a specified data set number is outside the range of purchased data sets, this error is generated.
The program cannot access any F--C--C data in data sets in the system.
DCD ERROR: Data set 5 is out of range.
Valid range is 1 to 4.
This message is based on the number of data sets purchased by the user for this license of
SIMVOX.
If the user starting a program does not have WORLD privilege, the program will not be allowed
to attach to data sets. This error message is generated in those cases. Please see your VMS
System Manager to correct this problem.
DCD ERROR: Insufficient privilege. WORLD privilege is required
SETPCI ERROR: Insufficient privilege. WORLD privilege is required
GETDI ERROR: Insufficient privilege. WORLD privilege is required
SIMVOX allows a maximum of 8 tiebacks and models active on each data set at any time. If the
user tries to exceed this by starting another program, SIMVOX will generate this error message.
ATTACH_DS ERROR: Unable to attach to data set 1.
Maximum of 8 Tiebacks/Models are already attached
SIMVOX Functions
This page intentionally blank
SIMVOX -- Version 2.3 Appendix G
Average
Description:
The function will average all of the signals listed in the PV In tag list and the PV Out tag
list.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Average function name in the list box to include this
function. Average is the default modeling function that is applied.
Deadtime
Description:
The Deadtime function performs a time based deadtime. The input to the Deadtime
object is stored and used as the function output after the specified time has passed.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Deadtime function name in the list box to include this
function. A dialog will appear which will enable you to set the parameter values of this
function.
Parameters:
Decay
Description:
The function simulates the decay of a physical quantity like temperature, pressure etc.
based on the input signal.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Decay function name in the list box to include this
function. A dialog will appear which will enable you to set the parameter values of this
function.
Parameters:
Decay Time: The first order time filter for the decay.
Filter1
Description:
This function performs first order filter lag between the last output and the current input to
determine current output. The returned value is the current output multiplied by the gain.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Filter1 function name in the list box to include this
function. A dialog will appear which will enable you to set the parameter values of this
function.
Parameters:
Filter2
Description:
This function performs second order filter lag between the last output and the current
input to determine current output. The returned value is the current output multiplied by
the gain.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Filter2 function name in the list box to include this
function. A dialog will appear which will enable you to set the parameter values of this
function.
Parameters:
Integrate
Description:
The function performs time based linear integration between the last output and the
current input and increments the total. The returned value is the current total. The
function is limited by the Engineering Units Low Value and the Capacity of the Vessel
that is defined.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Integrate function name in the list box to include this
function. The Integrate function will use the Vessel Capacity for the upper limit for the
integration.
Invert Track
Description:
Invert Track inverts the input signal value from 0 to 1 or 1 to 0.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double clicking the Invert Track function name in the list box to include
this function.
Mass Xfer
Description:
The function performs time based mass transfer between the last output and the current
input and increments the total. The returned value is the current total. The function is
limited by the Engineering Units Low Value and the Capacity of the Vessel that is
defined.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Mass Xfer function name in the list box to include this
function. The Mass Xfer function will use the Vessel Capacity for the upper limit for the
integration.
Maximum
Description:
The function will subtract the PV Out value (the value associated with the tag) from the
largest value in the PV In tag list.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Maximum function name in the list box to include this
function.
Minimum
Description:
The function will subtract the PV Out value (the value associated with the tag) from the
smallest value in the PV In tag list.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Minimum function name in the list box to include this
function.
Polynomial
Description:
This function performs this third degree polynomial function on the input. The function uses the
following basic equation:
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Polynomial function name in the list box to include this
function. A dialog will appear which will enable you to set the parameter values of this
function.
Parameters:
Track
Description:
Track is equivalent to Equate. The input signal value is assigned to the modeled object.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Track function name in the list box to include this
function.
Sum
Description:
Sum adds up all the pulse signals
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Sum function name in the list box to include this function.
Valve Hysteresis
Description:
The function simulates the action of a modulating valve based on the input signal. The
function limits the stroke between 0 and 100%. Therefore the output is limited to
between 0 and 100 times the gain.
Usage:
Select the function by either clicking once on the function name to select it and press the
Add button or double click the Hysteresis function name in the list box to include this
function. A dialog will appear which will enable you to set the parameter values of this
function.
Parameters:
Addressing Schemes
-- 7 --
This page intentionally blank
-- 8 --
SIMVOX -- Version 2.3 Appendix H
Provox EIC
The address is a number representing the input or output of the tag in question. The file and
channel numbers may not exceed 16, while the card number may not exceed 14. The file, card,
and channel numbers are specified together to make up one number as follows:
FFCACH
Provox IDI
The address is a number representing the input or output of the tag in question. The file and
channel numbers may not exceed 16, while the card number may not exceed 14. The file, card,
and channel numbers are specified together to make up one number as follows:
FFCACH
Input and output addresses are specified in Octal. N table addresses are specified in
decimal
For example:
I : 0/0 ------ Input table, word 0, bit 0
I : 10/17 ------ Input table, word 8, bit 15
OR word 10, bit 17 (Octal)
I: 20/15 ------ Input table, word 16, bit 13
OR word 20, word 15 (Octal)
PLC3:
N: 0:10 N table 0, word 10
N: 7:56 N table 7, word 56
PLC5:
N: 6:5 Illegal!
N: 7:10 N table 7, word 10
So, a discrete output at Word 3, bit 9; a discrete input at Word 23, bit 0 and an analog input at file
16, Word 38 would appear as follows:
O:3/11 (discrete output)
I:23/0 (discrete input)
N16:38 (analog output/input).
Modicon MODBUS/MODBUS+
The address is a number representing the input or output of the tag in question. The size of the
number determines the type.
TI565 (NITP)
The address is an alpha numeric value representing the input or output in question. It is a
combination of an alphabet (or alphabets) and a number.
Examples :
Y4765 is a discrete output address, WX256 is an analog input address, X11 is a discrete
input address, and WY7898 is an analog output address.
GE
The address is a number representing the input or output of the tag in question. The size of the
number determines the type.
Rosemount RS3
The address is an alpha numeric value representing the input or output in question. At the
address level, there is no distinction between an Analog vs. a Discrete address. The following
format is used:
CCLA
Notes
Notes
UM25.0:SPE311