12/01/2011

Aspen Plus Tutorial 6-Azeotropic_Extractive Distillation

This tutorial will guide you though the setup of an azeotropic distillation column using RADFRAC.

Residue and Miscibility

Before setting up the model, the tutorial will show how to use Aspen's ability to create residue curves based on your chose models and the add to that a liquid-liquid miscibility curve.

Flowsheet

Start a new flowsheet in Aspen and add a FLASH3 unit and add stream FEED to the feed stream, VAPOR to the vapor stream, 1-LIQUID to the first liquid stream and 2-LIQUID to the second liquid stream.

Components and Properties

The components are vinyl acetate (VA, VINYL-ACETATE, C4H6O2-1), acetic acid (AA, ACETIC-ACID, C2H4O2-1) and water (H2O, WATER, H2O).  We will use the NRTL-RK property set.

Feed Stream

We will set up Aspen to vary this stream a short bit later.  For now define the feed stream as having T=230F, P=65psi, VA = 1 lbmol/hr, H2O = 1 lbmol/hr.  This will be the pressure at the top of the column.

Flash3

Define the decanter as shown below.  Here we have set the pressure to 0 denoting no pressure drop and heat duty to zero denoting adiabatic phase separation.  Thus this unit will have the same conditions as the inlet stream.  The key component (the majority component) in the 2nd liquid stream will be water.


Sensitivity Analysis

We can use Aspen to get an idea of how sensitive (how much our process changes) our process is to a changing variable.  We will use this feature to get a list of the liquid-liquid equilibria for a water-VA-AA system.  We will later put this on a ternary diagram.

To set the sensitivity, expand "Model Analysis Tools" and click on Sensitivity.  Add a new object.  You will then need to add FORTRAN variables to calculate your data.  Don't despair.  We won't be using any heavy duty FORTRAN and you shouldn't need much more than what is in this tutorial.  Just so you know, basic statements are much like any other programming language. y = 2 (2+ 2x - sin(x)/2)x-1 would be written y = 2*(2+2*x-sin(x)/2)**(x-1).  But again, you probably won't need all of that. 

We want to examine 6 variables, the mole fractions of each component in the 2 liquid streams. Select new to enter in each of the variable definitions.


http://www.cadfamily.com/html/Article/Aspen%20Plus%20Tutorial%206-Azeotropic_Extractive%20Distillation_993_1.htm

http://www.cadfamily.com/html/Article/Aspen%20Plus%20Tutorial%206-Azeotropic_Extractive%20Distillation_993_2.htm

http://www.cadfamily.com/html/Article/Aspen%20Plus%20Tutorial%206-Azeotropic_Extractive%20Distillation_993_3.htm

Cimplicity notes in Chemical

Use these hyperlinks to quickly navigate through this document:

Important NOTES that you should read before proceeding

Converting a new project from the plant MarkV devices to the OPCGateway device

Deleting Points

Deleting devices

Deleting ports

Make sure the OPC Client option is set

Run the Cimplicity ‘Project Wizard’

Running a configured Cimplicity project on another machine

DCOMCNFG Settings

Services Settings

Troubleshooting

Important NOTES that you should read before proceeding

NOTE1: In order to configure points in a project, you must be running a version of Cimplicity with a valid license. This means you cannot have the ‘two hour trial license’ version. If you are using the temporary/trial license Cimplicity 6.1 disk that we have, you need to perform this configuration within the first four days of installing Cimplicity. Cimplicity gives you full functionality for 4 days after installation. After that time, the trial version will default to a 2 hour trial license (which will not let you perform the configuration steps below – there will be no warnings, it just won’t work). So, if, when you start a Cimplicity project (by clicking the blue arrow on the top toolbar of the workbench), you get a warning that says you only have a 2 hour trial license, uninstall and re-install Cimplicity so that you will have full privileges for four days. When you install Cimplicity, install the development server package. This will contain the ‘Workbench’ program that you will be working with much of the time.

NOTE2: In order to perform the configuration steps listed below, you will need version of the OPCGatewayEngine running on either Dynsim or Tsunami. This OPCGatewayEngine must be properly configured for the GEMarkV controls (or other controls) reflected in the Cimplicity graphics (see OPCGatewayEngine help for more). Only points that are listed in the OPCGatewayEngine.tree file will be available to Cimplicity, so make sure all the points Cimplicity needs are in the tree file. One way to do this is to reconcile the tree file with the points listed in the Cimplicity project. Open both (open the tree file in excel so that you can sort the data better) and check to see that they contain the same points. If they do not, add points to the tree file as necessary. Point types and descriptions should be obtainable from the Cimplicty project point details view. At the time of writing (June 2005) the OPCGatewayEngine is specifically geared to be run with GEMarkV engines. If other emulations are to be run, the OPCGatewayEngine will likely need to be modified.

NOTE3: During this process, Cimplicity may crash periodically (I know…great software…but who are we to talk…). This most often happens if one is trying to configure a point that has already been configured. More on this below. If Cimplicity crashes, simply restart it and pick up from where you left off.

Converting a new project from the plant MarkV devices to the OPCGateway device

[return to Top of the Document]

In order to configure an actual plant Cimplicity project file into a form that can be used with an ESSCOR simulator, the points associated with the Cimplicity screens must be reconfigured. The easiest and fastest way to do this is to delete all the points and subsequently re-add them properly configured. The other option is to manually reconfigure each point one by one.

In addition to removing points, the devices associated with the points should be deleted as well. When the Cimplicity points are re-added, they will be associated with an OPCGateway server device. Before devices can be deleted, all points associated with that device must be deleted. Similarly, points can only be associated with one device at a time; so if a point is associated with device M1 (real main turbine MarkV controller) it cannot be associated with the OPCGateway server. Thus, such a point must be removed and re-added (this is the easiest way to do this, rather than reconfiguring each point).

Deleting Points [return to Top of the Document]

1) Open a Cimplicity project (*.gef file)

2) Click on ‘points’ in the tree at the left.

3) Make sure all the Cimplicity points that you will need also appear in the OPCGatewayEngine.tree file (see NOTE2 above for details). In order to do this efficiently, you will need to know which devices you are interested. For the Wansley project, for example, we only needed points associated with M1 and S1 (Unit 1) and could ignore M2 and S2 (Unit 2).

a. Perform this point reconciliation step before you delete any points!!!

b. If you haven’t already done so, close the Cimplicity project and back up the entire CIMPROJ directory so that you have the plant’s original controls to work with in case things don’t go according to plan…

4) From the ‘view’ menu, select ‘Details’. The screen should look something like this:

5) In the ‘Details’ view, use shift to select multiple points. Delete all points that do not have their ‘device’ set to $GLOBAL.

a. For the Wansley project, we also deleted a few $GLOBAL points because we re-added them via the OPCGatewayEngine. These points were:

M1_VALID

M1_TIME

M1_DATE

S1_VALID

S1_TIME

S1_DATE

Deleting devices [return to Top of the Document]

1) Once all the points have been deleted, highlight ‘Devices’ in the tree at left (Devices reside in the ‘Equipment’ folder)

2) Delete all devices (i.e. M1, M2, S1, S2) – if you cannot delete a device, it is likely that there are still points associated with that device. Delete the points and then delete the device.

Deleting ports [return to Top of the Document]

1) After all the devices are deleted, ports can be deleted. In the tree at left, highlight ‘Ports’ (also under the ‘Equipment’ folder).

2) Delete all ports.

Make sure the OPC Client option is set [return to Top of the Document]

1) From the Cimplicity ‘project’ menu, select ‘properties’

2) Make sure ‘Basic Control’ is selected in the top box, and ‘OPC client’ in the bottom box.

3) Click ‘OK’

In order to add an OPCGatewayEngine device and add points associated with this device, you must have a properly configured OPCGatewayEngine running on either the same computer or another computer that is networked to the Cimplicity machine. Only the points that appear in the OPCGatewayEngine.tree file will be available to Cimplicity, so make sure all the points you need are in this file. If you are not all that familiar with Cimplicity and/or the OPCGateway engine, it will likely be easier if the two are running on the same machine. If you are using two machines, see additional notes about dcomcnfg settings as well as services settings.

Run the Cimplicity ‘Project Wizard’ [return to Top of the Document]

1) From the ‘Project’ menu, select ‘Project Wizard’

2) At the first screen, click ‘next’ so that you move on to ‘protocol selection’

3) You may have several protocol options on the ‘Available Protocols Page’. Uncheck all protocols except OPC client. Make sure OPC client is checked and click ‘next’

a. If there is no OPC Client option, you may have installed Cimplicity without the OPC Client option. This can be remedied by re-installing Cimplicity.

4) On the ‘Protocol Description Page’ enter nothing if you are running the OPCGatewayEngine on the same computer as Cimplicity. If you are running the OPCGatewayEngine on another computer on the network, enter it in the ‘Computer’ field. Click next:

5) On the ‘Detected Devices’ page, an OPCGateway erver should appear in the list. Check this one and uncheck any others.

6) On the ‘Device Description’ page modify the ‘Device ID’ and ‘Description’ if needed. Usually this will only be necessary if you are configuring points that are on another machine. If you are doing this, the device ID may appear as computername_OPC.Gateway.Server.DA. To maintain portability, it is probably best to make the device ID and description as generic as possible as per the image below. The search criteria and patterns to exclude can be used if desired, but are not recommended unless you have been through the wizard a couple of times and are just trying to configure a few points.

http://www.cadfamily.com/html/Article/Cimplicity%20notes%20in%20Chemical_994_1.htm

Configuration and Use of GE MarkVI Hardware and Software in a Simulation

I. Loading eTCSS Software (specific to Iberdrola)

1) load all programs on the Version 01.00.03 CD

2) load everything that is on the Version 03.01.02 CD (this does not have everything, just a couple of updates)

II. Configuring a GEM6 Controller for Use in a Simulation

1) Change the IP address (see “Changing IP Address of the Controller” below)

2) also change IP address in *.m6b file (this should be done first)

a. clock = internal

b. NTP – client disabled

c. Ethernet set-up – enter IP address

3) Upon receiving the *.m6b files from the plant, open each one and do an ‘export all’ (Toolbox file menu). Be sure to export each m6b file into it’s own directory, as it is easy to confuse the files otherwise. Also, be sure the directories exist (use the specify each directory option to be sure). For G1 and G2 there are 10 files each, for S1 there are 42 files (for iberdrola). It is a little tedious (to specify the directories) but it only has to be done once, and then you are sure it is correct.

4) After the export, close the *.m6b file, find the *.prj file and open that from the toolbox. It will re-import all the files and make sure all the libraries are current. If this step is omitted, the libraries on the machine may not be the same as the ones the *.m6b files contain/are looking for. If this is the case, the simulation will not work. This step reconciles everything, and is only necessary when first working with the *.m6b files from the plant.

5) Put into database (FULL)

6) Get from database (FULL)

7) Validate

8) Build

9) Save the resulting *.m6b file (not a bad idea to save it as G1_sim.m6b or something to differentiate it from the plant’s original file(s))

10) Download the product code (only needs to be done once)

a. Toolbox device menu--> download--> product code (runtime)

b. select.dnl is the file

c. R processor

d. reboot the controller

11) Download the application code (needs to be done each time controls are updated) Follow the steps below (“Configuring a GEM6 Controls file from the Plant for Simulation”) Reboot the controller after downloading application code.

III. Configuring the Turbine HMI Device (*.hmb file)

This will do a bunch of things to help set up CIMPLICITY. It will overwrite the existing icn.ini file, so if you want to save the old one, do it before the steps below! (Note: the icn.ini file resides in the C:\WINNT directory for Windows2000, or C:\WINDOWS for XP)

1) Open the *.hmb file

2) if EGD exchange does not appear, do an ‘insert next’ and grab the exchange(s) that you need.

3) get from database to populate (or make current)

4) validate and build – generates icn.ini file hosts file, imports signals and scaling to Cimplicity

IV. Creating *.csv Files Necessary for Configuration of *.m6b Files

1) Create the I/O Points List and export it to a *.csv file.

a. from view menu -> reports -> I/O Points list

2) Create the Signal List and export it to a *.csv file.

3) Convert both *.csv files to *.xls files.

4) Sort the I/O Points List by Point Name and then by Signal Name

5) Get rid of any EGD network points – only rack I/O should remain.

6) Keep only points with Signal Names

a. Sort remaining data by Signal Name

b. Delete all rows without a Signal Name

7) What about MainBoard Stuff?

8) Sort by Direction, Data Type and Signal Name

9) Change FLOAT to REAL, BIT to BOOL, LONG to DWORD (only DWORD’s are likely Main Board points, which we probably don’t need)

10) Make directions all caps (Read -> READ and Write ->WRITE)

11) Get Descriptions by using VLOOKUP on Signal Name from Signal List file.

a. remember to put $ around the table lookup so that the table does not shift down as you copy and paste the VLOOKUP formula

b. once done, copy the descriptions and paste special -> values to get rid of the formulas

12) Get rid of superfluous columns. The final form of the file should be

EGD Address, Type, Signal Name (modified), Direction, Description.

Other fields can be left in after Description without adversely affecting the conversion to GEM6 text format.

13) If you know exactly what points you need, you may be able to eliminate some more points at this point. (Alarms, Main Board, etc). If you are not sure, leave them in for now. It is easier to remove them later than to add them later.

14) Add the EGD Address (see “How to add an EGD Address” below)

15) Modify the Signal Name by substituting “G1\” with “G1_” (use the SUBSTITUTE worksheet function in excel – specify the last argument as “1” to be sure that it only substitutes the first instance of G1\ in the string...just in case.

a. don’t forget to copy and paste special -> values to get rid of the formula.

b. delete the old Signal Name column

16) Add the EGD Address (steps 17-28 below)

17) Separate data into 3 worksheets that contain WRITEs, BOOL READs, and REAL READs. (can separate after adding EGD Addresses as well – may be better to do it that way so the master spreadsheet has the EGD Addresses on it) If there are a lot of writes, the writes can be separated into BOOL WRITE and REAL WRITE. If any exchanges contain WORD or DWORD, it will be easier to incorporate these with the REALs. Put them after the REALs so that they will be easy to delete if necessary later on. Each worksheet represents an EGD Exchange for the GEM6 controller. The exchanges need to be less than 1400 bytes each, so if they are longer, you need to split them up further.

18) Sort according to Type and Signal Name (if data is not already sorted this way)

19) Insert a column on the far left side of the sheet, so that the EGD Address column is now the ‘B’ Column. Add the appropriate header information on the first line of the file.

20) Set B2 = 0.

21) Depending on the type, paste the appropriate formula into B3

22) Modify the formula as the type changes. In between types, you will need to manually enter the value. If the BOOLs end on 21.2, for example, if the next point is a REAL, it has to start at 24, because a REAL is 4 bytes and must have an address that is evenly divisible by the number of bytes it takes up. WORD = 2 bytes and DWORD = 4 bytes.

*** HELP YOURSELF OUT. paste these formulas into the equation pane at the top of the spreadsheet rather than in the cell. That way the formatting will not get messed up. ***

For BOOL

=IF(EXACT(C2,"BOOL"),IF(EXACT(RIGHT(B2,2),".7"),(B2*10+3)/10,(B2*10+1)/10),"ERROR")

For REAL

=IF(EXACT(C2,"REAL"),B2+4,"ERROR")

For DWORD

=IF(EXACT(C2,”DWORD”),B2+4,”ERROR”)

For WORD

=IF(EXACT(C2,”WORD”),B2+2,”ERROR”)

In the above examples, the formula would reside in cell B3. Cell B2 = 0

If cutting and pasting these formulas from word, all quotes must be erased and retyped. Don’t ask...this is a weird thing with the excel/word crossover...

You may need to change the font to Arial and 10 point to be consistent with Excel.

Note, the formula for BOOL must have the multiplication and division by ten. If is it not there, and you add 0.3 and 0.1, excel has a problem SOMETIMES does not calculate the formula properly as you will get some 6.59999999 (instead of 6.6) values, at which time the RIGHT(B2,2) will yield “99” instead of “.6”. Trust me on this one. Save yourself the headache and do the addition with integers.

One could concoct a really long formula that would take care allow bools, reals, words, and dwords to be intermingled, but it is much easier to fill in the EGD addresses when the data are sorted by type, to separate the bools from everything else, and then by SignalName, to get them in alphabetical order. Since bools will be in a different exchange and the remainder of the values are mostly real, it’s not to difficult to accomodate the odd WORD or DWORD that gets thrown into the mix.

23) Copy and Paste Special -> Values

24) Add “EGD” and the proper amount of zeros to the numbers To convert the raw numbers to EGD addresses (in text), use a variation of the following formula:

=CONCATENATE("EGD000",IF(EXACT((RIGHT(B2*10,1)),"0"),B2&".0",B2))

*** IMPORTANT *** when the numbers get larger than 10, remove a zero from the “EGD000”. When they get larger than 100, remove another zero.

25) paste special -> values

26) remove the extra column and make sure the header in the first row is correct as per above (it might have changed as columns were added and removed)

27) Adjust the values in the header row (especially the length) to reflect the properties of the Exchange.

28) done!

GSM Notes

When setting up the ‘fake’ GSM exchanges – be sure to do a VLOOKUP and check to make sure that you don’t redefine points that are already used in other exchanges. Remember, this bypass is just to get the points into the GEM6Engine so they can be cross referenced to the FSIMEngine. If they are already defined elsewhere, we do not need to redefine them here (as they will already be in the other engine)

V. Configuring a Plant GEM6 (*.m6b) Controls File for Simulation

1) Set up the .ini file (in the C:\WINNT directory for Windows 2000 or the C:\WINDOWS directory for XP) with the proper exchanges (size, address, etc)

2) Make sure the HOSTS file defines everything in the ICN.ini file

3) repeat this on the ESSCOR Simulation machine

4) reboot the GE Toolbox PC

5) stop and restart the ICN service on the ESSCOR machine

a. If the does not appear in the “Services” window, see the “Installing ICN Service” section of this document.

6) Create a directory for the appropriate *.m6b file (for this example: G1)

7) Put the appropriate *.m6b file in the directory

8) Open the control system toolbox

9) Open the approriate *.m6b file (for this example: G1_sim.m6b)

10) If a default m6b file comes up when the Toolbox is opened (likely the 7fa Trainer) it can be closed.

11) Export all (highlight the top of the tree --> File --> Export --> All; specify the G1 (or appropriate) directory when prompted)

12) If this is a new controls file from the plant, this step is crucial. After exporting all

a. close the *.m6b file (save the changes – enter your name and a little note)

b. Go to the directory where everything was exported and open the *.prj file. This action will import everything and update all the libraries to current versions. This is important because if the libraries used at the plant are different than those used in the simulation (version of Toolbox) you will not be able to run the simulation properly.

c. set the privilege level to 2 (set “Setting privilege level” below) and ‘Save As’ this file with the name you want it to have (i.e. the name will default to the plant’s name, probably just G1.m6b. If you are calling your files G1_sim.m6b or something, save this file as such.)

13) Using the GE_TRE executable, convert egddata*.csv files to the tre format required for importing into the *.m6b files. *** Note *** each controller will have its own egddatamain_egd.txt and egddatamain_fn.txt files. These will be imported into the controller *.m6b file (in this case, G1_sim.m6b). On the other hand, the egddatasim_fn.txt files that are generated (one for each controller) will need to be combined into one alldatasim_fn.txt file. Similarly, the egddatasim_egd.txt files (one for each controller) will need to be combined into one alldatasim_egd.txt file. The reason for this is that all the simulated input must be configured in one SIM3.m6b file (sim3 is the device name that was used for the iberdrola simulator – it can be anything you want). See the summary below for a summary of what to do with the iberdrola configuration files (iberdrola has two gas turbines and a steam turbine. Your application may be different – adjust accordingly.) It is possible that there is no SIM.tre or SIM_fn.tre file as there may not be a SIM Function in the controller yet. If this is the case, see “Creating Functions and Tasks” below)

G1: egddatamain_egd.txt -> paste into EGD1.tre file exported from G1_sim.m6b.

Be sure to paste over only what is appropriate (for the case of the iberdrola simulator, the SIM_O and GSM exchanges are pasted over)

-> import modified EGD1.tre file into G1_sim.mb6 (the existing EGD1 network must be deleted before you will be allowed to import a new one)

G1: egddatamain_fn.txt -> change *.txt to *.tre and import into G1_sim.m6b

G2: egddatamain_egd.txt -> paste into EGD1.tre file exported from G2_sim.m6b

-> import modified EGD1.tre file into G2_sim.mb6 (the existing EGD1 network must be deleted before you will be allowed to import a new one)

G2: egddatamain_fn.txt -> change *.txt to *.tre and import into G2_sim.m6b

S1: egddatamain_egd.txt -> paste into EGD1.tre file exported from S1_sim.m6b

-> import modified EGD1.tre file into S1_sim.mb6 (the existing EGD1 network must be deleted before you will be allowed to import a new one)

S1: egddatamain_fn.txt -> change *.txt to *.tre and import into S1_sim.m6b

combine the following into an alldatasim_fn.tre file

G1: egddatasim_fn.txt

G2: egddatasim_fn.txt

S1: egddatasim_fn.txt

combine the following into an alldatasim_egd.tre file

G1: egddatasim_egd.txt

G2: egddatasim_egd.txt

S1: egddatasim_egd.txt

14) Open the SIM3.m6b file. Import the alldatasim_egd/fn.tre files into the SIM3.m6b file that must be created to accommodate the simulation (the SIM3.m6b file defines all the inputs and exchanges that originate from the ESSCOR simulator – signal definitions and exchange definitions are all that is required inside this file)

15) put into database (full)

16) get from database (full) (you may get some undefined signals – make sure they are signals you don’t care about – click yes to create them. They should not cause problems...you will see the warning every time you get and validate)

17) select top line (SIM3)

18) validate (check mark) (two errors will come up for the SIM3 case)

19) Open the G1_sim.m6b file

20) import the G1 egddatamain_fn.tre file (to create the *.tre file, simply change the file extension of the generated file (from GE_TRE executable) to *.tre from *.txt)

21) import the modified G1 EGD1.tre file (the one you pasted the information from egddatamain_egd.txt into)

22) put into database (full) (fix any warnings or errors)

23) get from database (full) (fix any warnings or errors – except undefined sig warning – see next step)

24) validate (1 warning – may have to do with undefined signals – make sure only signals that you don’t need are undefined – for iberdrola, there are 26 for G1 & G2, and 3 for S1. If you get other warnings or errors, fix them)

25) build (hammer)

26) save

27) download (uncheck download to memory & choose R processor when prompted)

28) repeat for G2 and S1 as necessary

 

http://www.cadfamily.com/html/Article/Configuration%20and%20Use%20of%20GE%20MarkVI%20Hardware%20and%20Software%20in%20a%20Simulation_995_1.htm

Dynsim OPCGatewayEngine-Software Documentation

System Architecture Diagram

The OPCGatewayEngine does not contain any points. Its function is to serve as an OPC Server that makes points from other engines (typically GEMarkVEngine) available to various OPC Clients (i.e. Softing SOClient, Cimplicity HMI, etc.). The OPCGatewayEngine.tree file contains a list of all the points (from other engines) that will be made available to OPC clients via the OPCGatewayEngine’s OPC server. Thus, all the OPCGatewayEngine does is make points from other SIM4ME engines available to OPC clients. It is, as its name suggests, simply a ‘gateway’.

In the OPCGatewayEngine.tree file, prefixes are added to each point in order to associate a point with its engine. The ‘prefix_to_engine’ command line option determines which prefixes go with which engine. For example, if the ‘prefix_to_engine’ option is set as

-prefix_to_engine “M1_ Main_MarkVEngine”

it means that all points that are prefixed with “M1_” in the tree file are found in the engine named “Main_MarkVEngine”. The OPCGatewayEngine.tree file would list the points in this engine as “M1_pointname”. If, for example, the pointname is TNH1, the listing in the tree file would be M1_TNH1. Note that there is no actual point in any engine called M1_TNH1, there is only a point called TNH1 and it resides in the Main_MarkVEngine (as indicated by the M1_ prefix).

The OPC protocol supports two-way communication (when thus configured). This means that the server can write to the client, and the client can write to the server. In other words, the source engine can send data to the OPC client, AND the OPC client can manipulate data in the source engine (i.e. both clients and servers can send and receive data).


Installation Guide

The OPCGatewayEngine is installed through the Dynsim OTS Engines install shield. The installer will ensure that all the relevant files are installed, registered where appropriate.

After installation via the install shield, the following steps must be completed before the OPCGatewayEngine can be used effectively.

All of these steps are outlined in the User Guide below.

User Guide

Registering the OPCGateway

After installing the OPCGatewayEngine, the setup_OPCGateway.bat script must be modified for the machine that is being used and run. The locations of DLLs will be different for XP and 2000 machines. Modify the bat file appropriately and run it. This setup script only needs to be run once. It is found in .\Engines\OPCGateway\Bin. Before running this script, be sure top check that the path to the OpcGatewayEngine.exe (first line of the script) is correct. If it is not correct, fix it before running. While running the script, an SOProxy.dll error will occur. This is OK.

OPCGatewayEngine.tree and .env files

The OPCGatewayEngine_sample.tree and OPCGatewayEngine_sample.env files in the .\Engines\OPCGateway\System directory are only sample files. Delete them or replace them with the proper project files before running (see below for more information). The .\System directory is a good place for the *.tree and *.env files, but they can reside where ever the user desires to put them. If *.tree and *.env files are used (they are not necessary in every application) be sure to specify the location of these files via the Engine Configuration dialog box in the GUI.

An OPCGatewayEngine.env file will not be necessary for every application. If it is necessary, modify it as appropriate. The *.env file should point to the computer on which the simulation is run. An OPCGatewayEngine.tree file is necessary for every application. The tree file determines which points are made available to OPC Clients (i.e. Cimplicity) via the OPCGatewayEngine OPC server. Create a tree file that is appropriate for your application. If you are running Cimplicity (as in the Wansley project) a good way to come up with a list of points is to look at the ‘points tree’ in plant’s unmodified Cimplicity project file (see Cimplicity notes.doc).

If you are running OPCGatewayEngine with a GEMarkVEngine(s) (which is most likely the case) all the points made available to the Cimplicity OPC client will be coming from the GEMarkVEngine. Make sure that all the points you want to see are actually initialized by the GEMarkVEngine. You don’t necessarily need to check point by point. You can take your best shot at the OPCGatewayEngine.tree file by using the Cimplicity ‘points tree’. Once this is done, run a model with the GEMarkVEngine(s) and the OPCGatewayEngine. If you have followed the instructions below and in “Cimplicity notes.doc” carefully, points from the source engine (GEMarkV in this case) should be visible in the Cimplicity interface (or other OPC Client). Check that the communication is valid by changing a value on the server side (in the SIM4ME glossary) and making sure that it changes on the client side (Cimplicity, Softing, etc.) Once communication has been established, it is easy to determine which points are not initialized properly (by either GEMarkV or OPCGateway) because they will appear as either *** or garbage numbers in the Cimplicity interface. Add these points to the tree file, and restart the model.

Another important thing about the tree file is that point types listed in the OPCGatewayEngine.tree file must correspond to point types that the OPC client is expecting. If, for example, the OPCGatewayEngine serves up TNH1 as a real, but the client is expecting a bool, there will be problems. Double check the point types in the OPCGatewayEngine.tree file with the plant’s unmodified (original) configuration files (for the Wansley project, this means double checking point types in the Cimplicity project file (under the ‘points tree’) and in the GEMarkV ‘Unitdata.dat’ file.)

Configuring the OPCGatewayEngine in the SIM4ME Environment

1) Install the OPCGatewayEngine via the install shield

2) Create a simulation with an OPCGatewayEngine, or open an existing *.s4m file that contains an OPCGatewayEngine.

3) Highlight the simulation and open the ‘Simulation Configuration’ dialogue box

4) Highlight the OPCGatewayEngine and open its ‘Engine Configuration’ dialogue box

5) You will need to set several values in the ‘Engine Configuration’ dialogue box

a. Set the location for the IC and Backtrack files

b. Set an appropriate Synchronization period

c. Set the directory path for OPCGatewayEngine configuration files (this should point to the directory where the *.tree and *.env files are)

d. Set the ‘Engine name to prefix table’ value. The engine names associated with each prefix must exactly match (case sensitive) the engine names in the ‘Simulation Configuration’ dialogue box.

i. For the Wansley project this entry was:

M1_ Main_MarkVEngine S1_ BFPT_MarkVEngine

ii. The “M1_” and “S1_” are the prefix values that are placed before point names in the OPCGatewayEngine.tree file so that the OPCGatewayEngine knows where to look (i.e. in which engine) for a particular point. For example, say there is a point in the Main_MarkVEngine called “TNH1”. This point exists as TNH1 in the Main_MarkVEngine and can be called up in the SIM4ME glossary by entering either TNH1 or Main_MarkVEngine##TNH1. The EngineName## specifier only needs to be used in the glossary if there is another point by the same name in another engine. In the OPCGatewayEngine.tree file, the Main_MarkVEngine TNH1 point will be called M1_TNH1 so that the OPCGatewayEngine knows that TNH1 comes from the Main_MarkVEngine. There is no actual point called M1_TNH1 as the prefix is used only in the initialization of the OPCGatewayEngine and then it is dropped. This means the point is served up as TNH1 and an OPC Client will be looking for a point called TNH1, not M1_TNH1.

e. Set the ‘Delay in seconds to wait for other engines to start’. This is a very important option that must be set correctly in order for the OPCGatewayEngine to have access to all the points it is to make available via its OPC Server. For the OPCGatewayEngine, “OPC Gateway I/O started” indicates that the OPCGateway initialization is complete. This message cannot appear until after all the engines listed in the ‘prefix_to_engine’ option have completed their initialization. That is to say that any engines from which points will be made available through the OPC server need to complete their initialization before the OPCGatewayEngine initializes the OPC server. For the Wansley project, 60 seconds was plenty of time to allow the GEMarkVEngines to complete their initialization. This will, of course, vary from computer to computer and project to project. If the delay time is not set properly, some points will look fine on the client side, while others will be garbage.

f. DEVELOPER NOTE from N. Schmid: I modified the OPCGatewayEngine so as to remove the need for the wait time, but it was a bit unstable and we didn’t have the time and resources to test it out. I checked the file in to source control as “OPCGatewayEngine_no_wait.cpp”. Basically what I did was make the OPCGatewayEngine initialize the server on the first time step – which is necessarily after all the engines were initialized. Unfortunately, this also meant that the OPC client had to be initialized after the first time step. If and when the OPCGatewayEngine is used again, we may want to spend a little time seeing if we come up with a robust way of initializing the OPC server without a ‘wait_time’ command line option.

6) In order for the OPC server and clients to interact with one another successfully the DCOMCNFG and Services settings must be correct. See the sections below for more.

http://www.cadfamily.com/html/Article/Dynsim%20OPCGatewayEngine-Software%20Documentation_997_1.htm

http://www.cadfamily.com/html/Article/Dynsim%20OPCGatewayEngine-Software%20Documentation_997_2.htm

Dynsim OPCEngine-Software Documentation

System Architecture Diagram

SIM4ME is a modular environment, which allows multiple engines and multiple Graphical User Interfaces (GUI) to work in a co-ordinated effort for the development and use of dynamic simulation applications such as Operator Training Simulators (OTS). The SIM4ME architecture is capable of being distributed and therefore supports splitting OTS tasks between multiple processors and/or multiple computers.

A SIM4ME engine handles interactions between a specific emulation package or modelling environment and the SIM4ME Simulation Executive, or other engines. The OPCEngine facilitates data transfer between any SIM4ME engine, such as a DynsimPower engine or one of several DCS emulation or interface engines, and a third party software or hardware package via standardized OPC communication protocol.

This document describes the OPCEngine implementation for SIM4ME and the functional requirements placed on an OPC server wishing to integrate with the SIM4ME architecture by using the OPCEngine.

The following are true of the OPCEngine and the OPC Server it interacts with:

· OPC Data Access (OPC DA) is used as the communications protocol.

· The engine is implemented as an OPC Client application.

· The engine supports both OPC DA 2.0x and 1.0a specifications, and always uses OPC DA 2.0x interfaces in preference to OPC 1.0a interfaces where available.

· The engine supports connection to both In-Process and Out-of-Process OPC servers on the local machine and Out-of-Process servers on a remote machine via use of DCOM.

· The OPC Server in general is not integral to the emulator / model, and hence additional internal communications between the OPC Server and physical DEVICE (emulation / model) are typically necessary.

· The OPC Server implements an internal CACHE for values obtained from the physical DEVICE.

A more detailed look at the OPCEngine architecture is depicted below.


Installation Guide

The SIM4ME OPCEngine package will be installed through a standard Windows installation package built with InstallShield.

This installer will ensure that all the relevant files are installed, registered where appropriate.

After installation via the install shield, the following steps must be completed before the OPCEngine can be used effectively.

All of these steps are outlined in the User Guide below.


User Guide

Starting the OPCSim Configurator

Before running the OPCEngine, the OPCSim Configurator is used to configure OPC data points and groups. The SIM4ME OPCSim Configurator will be started from a menu pick on the Windows Start Menu:

Figure 1 SIM4ME OPCEngine Start Menu Entries

Once started the main application window for the OPCSim Configurator will be displayed:

Figure 2 OPCEngine Configurator main window

The main application window consists of a number of different areas:

· Workspace

· Error Log

· OPC Item List

· Toolbar

· Status Bar

· Header Bar

The use and function of these different areas will be described as appropriate below.

OPC Server Configuration

Before configuration can begin the user must first select and make a connection to the target OPC Server.

This can be done through the ‘OPC Server…’ option on the Config menu of the OPCSim Configurator, or via the Toolbar button.

Selecting the ‘OPC Server…’ option will display the OPC Server Setup dialog box:

Figure 3 OPC Server Setup dialog box

This dialog box lists all OPC Servers (OPC DA 1.0 and DA 2.0) registered on the local PC, OPC Servers registered on remote PC’s (assuming both local and remote PC’s have OPCEnum installed and that DCOM on both machines is correctly configured). It also allows for the manual entry of an OPC Server via its ProgID if a server is not listed.

To continue a user must select an OPC server, or enter a server’s ProgID.

Clicking OK on this dialog will establish communications with the OPC Server, which will be indicated by the ‘Connection State’ displayed in the Status Bar.

Figure 4 OPC Server Connection Status


OPC Communications Setup

Once an OPC Server has been configured the next step is to configure the OPC communications settings, and the options for the OPCEngine operation. This is done through the ‘OPC Comms Setup…’ option on the Config menu, via the toolbar button.

Figure 5 OPCEngine Configuration Dialog

OPC Data Transfer Options

The Settings in this dialog for OPC Data Transfer allow the user to configure the following:

¨ Update Rate: The rate at which changes in values for outputs from the OPC Server will be advised to the SIM4ME OPCEngine

¨ % Deadband: The deadband value to be specified for all OPC groups used by the OPC. This value follows the deadband specification as described in the OPC DA specifications.


OPCEngine (Client) Configuration

The ‘Configuration Options’ settings allow the use to specify how the OPCEngine will operate.

The options are:

¨ Run Engine in Step Mode: The OPCEngine will require specification of an OPC Item / tag which will cause the OPC Server to execute one step of integration time, and another tag which will indicate that the step has been completed. If this option is not specified the OPCEngine will still operate in step fashion, however it will not trigger the OPC Server to execute any logic.

¨ Save State with Snapshots: When selected, the OPCEngine will maintain the current running state of the simulation through snapshots. The actual operation of saving and restoring snapshot data can be performed by either the OPCEngine itself, or by the OPC Server. When selected, a number of tags will need to be configured to enable the OPCEngine to perform snapshot functionality. When Snapshots are being used, the OPCEngine can optionally trigger the OPC Server to ‘Reset’. This option is provided so that certain OPC Servers can write restored values into operating registers after restoration of a snapshot. This option, if configured, will be performed synchronously after restoration of a snapshot and before the engine resumes stepped operation.

http://www.cadfamily.com/html/Article/Dynsim%20OPCEngine-Software%20Documentation_996_1.htm

http://www.cadfamily.com/html/Article/Dynsim%20OPCEngine-Software%20Documentation_996_2.htm

http://www.cadfamily.com/html/Article/Dynsim%20OPCEngine-Software%20Documentation_996_3.htm

Running a GEMarkVEngine

 

Use the hyperlinks below to quickly navigate through this document

Setting up a GEMarkVEngine

Running an OPCGatewayEngine with GEMarkVEngine(s)

Changes to Configuration Files

Troubleshooting

Sample config_file.dat entry

Sample Options.xml

Setting up a GEMarkVEngine [ return to Top of the Document]

After the GEMarkVEngine is installed, a few steps must be followed to ensure that it is set up properly.

If it is not already there, add a GEMarkVEngine to your SIM4ME simulation.

NOTE TO DEVELOPMENT ENGINEERS: If you are manually editing the config_file.dat, the GEMarkV engine header is [GEMarkV]. See sample config_file.dat entry below for details. If the install shield worked correctly, however, you should not need to manually edit the config_file.dat.

The GEMarkVEngine reads in the following 9 data files upon initialization:

ALLOCSSP.ASG

CONST_B.SRC

CONST_Q.SRC

FACTORY.ASG

IO.ASG

MSTR_SEQ.LST

SCLEDATA.DAT (may not be required for all installations)

SITE.ASG

Unitdata.dat

You should receive these files from the plant you are working with. Several changes will likely need to be made to these files before they will work properly with the GEMarkV emulation. Please see the Changes to Configuration Files section of this document for more information. It is also possible that the controls from the plant use control blocks that ESSCOR has not yet coded into its emulation. Please consult the software group if you suspect this to be the case. This is something that should be determined in the bidding/design plan stage of the project.

Place the configuration files (modified as necessary) in a ‘working’ directory such as:

C:\Program Files\SIMSCI\SIM4ME2X\Engines\GEMarkV\Working

If the project requires more than one GEMarkVEngine, the GEMarkV configuration files for each engine will need to be in separate directories. For example, if GEMarkV is used to control both the main and boiler feed pump turbines, one will need two sets of configuration files; one for the main turbine and one for the boiler feed pump turbines. The two sets of configuration files will be different and should be placed in different directories. One option is to create two working directories as follows:

C:\Program Files\SIMSCI\SIM4ME2X\Engines\GEMarkV\Working_main

C:\Program Files\SIMSCI\SIM4ME2X\Engines\GEMarkV\Working_BFPT

Specify the appropriate path for the configuration files with the –mv_dir command line option. This option must be set correctly for each GEMarkVEngine. If you are using he SIM4ME GUI (Graphical User Interface) the –mv_dir option is set in the ‘Simulation Configuration’ dialogue box. Enter the directory path for the configuration files in the field labeled: “Directory Path for MarkV Configuration Files”.

Make sure the IC and Backtrack paths are set appropriately.

Make sure delt and sync_period are compatible with the plant’s controls, other engines, and the SimExecutive. The ‘delt’ command line option should be set to the cycle time of the GEMarkV controls. Consult your plant contact if you are unsure of the appropriate cycle time.

‘Ignore Tolerance Checking while Cross Referencing’ can be left as ‘no’

Running an OPCGatewayEngine with GEMarkVEngine(s) [ return to Top of the Document]

Make sure the OPCGatewayEngine does not finish starting up before all the GEMarkVEngines have completed there initialization. GEMarkVEngine initialization is complete when the “GEMarkVEngine Initialization Complete” message appears in the dos window (or message window of Dynsim). The OPCGatewayEngine “OPC Gateway I/O started” indicates that the OPCGateway initialization is complete. If the “OPC Gateway I/O started” message appears in the dos window before the “GEMarkVEngine Initialization Complete” message appears, any GEMarkVEngine points initialized after the “OPC Gateway I/O started” message will not be available to Cimplicity. The way to fix this problem is to increase the “wait_time” for the OPCGatewayEngine. This can be done through the ‘Simulation Configuration” dialogue box of the OPCGatewayEngine. See OPCGatewayEngine documentation for more details.

If the GEMarkVEngine values are bad in the SIM4ME glossary as well, then it means the points in question are not being initialized properly in the GEMarkVEngine. It may be that the point type is incorrect. Point types for the GEMarkVEngine are specified in the second column of Unitdata.dat. See Mark5UnitDatalexer.l for how ESSCOR handles each point type. You will need the assistance of a software engineer to access this file.

If values are not being transferred to Cimplicity (or another OPC client) correctly, make sure the point types in the Unitdata.dat file and the OPCGatewayEngine.tree file are compatible. If a point is specified as a bool in one file and a real, the point will not be transferred across the OPC protocol correctly. Figure out which is correct (the GEMarkV unitdata.dat file is more than likely the correct type) and make changes accordingly.

Changes to Configuration Files [ return to Top of the Document]

These notes are based on configuration file changes that had to be made to the Wansley configuration files for the Wansley 2005 upgrade. If you are working on the Wansley project and have received new GEMarkV configuration files, make sure you address all of the issues outlined below. If you are working on another project, you will likely have to use these notes as a general guide for changes that may need to be made. DO NOT assume that your project is exactly like the Wansley project. Look for similarities and differences and make changes as appropriate and necessary.

The following is a list of changes that needed to be made to get the configuration files working properly (for Wansley Upgrade 2005).

ALLOCSSP.ASG minor changes – replaced Q_ALM_SP_333 & 334 with L30SEF_FOX and L30SEF_MAN

CONST_B.SRC no changes

CONST_Q.SRC minor constant changes plus a few additions near end

Manual changes: increase indexes on KEXP_BLEND, KRE1_TRANS, KDE1_TRANS, and KDE2_TRANS by one.

(0->1 and 1->2 as needed … see MSTR_SEQ.LST notes below)

FACTORY.ASG no changes

IO.ASG minor changes + Manual change: enilssen uncommented out TNH1 – this change was manually made in the new file – TNH1 is the turbine speed probe. Also, made the following changes:

Changed: (in IO.ASG)

C_CD_CO57TMR C_CD_CO57TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO57

C_CD_CO58TMR C_CD_CO58TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO58

C_CD_CO59TMR C_CD_CO59TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO59

C_CD_CO60TMR C_CD_CO60TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO60

To:

C_CD_CO61 C_CD_CO57TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO57

C_CD_CO62 C_CD_CO58TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO58

C_CD_CO63 C_CD_CO59TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO59

C_CD_CO64 C_CD_CO60TMR LOG ;C1 TMR INTERFACE FOR C_CD_CO60

MSTR_SEQ.LST massive changes everywhere – this is how the rungs seems to be configured. A lot of the changes seem to be a result of renumbering the rungs. Manual change: fixed top so that it does not have garbage on top. Also, around line 1003, got rid of F:\UNIT1\ as well as garbage on line 1002. Same thing at 2123/2124, 4003/4004, 4042/4043, 5257/5258, 6239/6240, 6272/6273. On these last two, B and Q are different. Change to B to Q at lines 6240 and 6273 as per ‘File Modification Notes.doc’ file in J:\Wansley\GE MarkV\Main Turbine.

Also, search on _TRANS and change indexes from 0 to 1.

KRE1_TRANS0 -> KRE1_TRANS1

KEXP_BLEND0 -> KEXP_BLEND1

KDE1_TRANS0 -> KDE1_TRANS1

KEXP_BLEND0 -> KEXP_BLEND1

KDE2_TRANS0 -> KDE2_TRANS1

KEXP_BLEND0 -> KEXP_BLEND1

Also, update CONST_Q.SRC accordingly.

http://www.cadfamily.com/html/Article/Running%20a%20GEMarkVEngine_998_1.htm

WGCEngine, NetSim and MonitorGAP usage and installation notes

 

NOTE: If you are reinstalling and/or upgrading TSUNAMI, make sure to check the PATH environment variable (refer to Appendix B) after the installation is complete.

If you are having trouble getting WGCEngine to run in Dynsim, see the ‘Troubleshooting’ section at the end of this document.

Installation of NetSim, Monitor GAP and WGCEngine

1) Install Microsoft Visual Studio 6 on the machine that is to run Woodward’s NetSim utility

2) Download the latest version of NetSim from www.woodward.com (at the time of this writing, it is NetSim 5.0)

3) Install NetSim on the project machine.

4) Authorize the license (See Todd Thayer or Nick Schmid for license information regarding NetSim)

a. when NetSim is started for the first time, it will prompt the user to authorize the license. It will spit out a “Site Code” and ask you for a “License Key”.

b. Go to www.woodward.com . You will need to establish a user account to access the licensing section of the website. You may use Nick.Schmid@Invensys.com for the user account as it is already set up. You will need to enter the site code and the serial number (which we obtain from woodward when we pay for / are given a license). If everything works correctly, you will get the “License Key” that you need to run NetSim.

c. NOTE: If you re-install NetSim, a new Site Code will be generated, and you will therefore need a new License Key to run the software. If you do this, please use the “transfer license to disk” option as we only get two authorizations per license. If you are transferring NetSim from one computer to another, use the transfer license utility as well. If you have problems, contact Brian Baker or Glen Strandvold (see top of document for their contact information).

5) Download Monitor GAP from the woodward website. DownLoad Gap programmer 3.04 – option GAP/ Coder Advanced + Mathworks 3.04 - 2 . Start it up and select “read ony”. To authorize the monitor GAP license, go to the security menu and select Authorize Monitor GAP. You will need a Site Code and serial number to obtain a license key, analogous to the NetSim authorization

6) If the WGCEngine was not installed when you installed TSUNAMI, create a WGC directory in:

C:\Invensys\TSUNAMI\Engines

In that WGC directory, put the engine.dat file that corresponds to the WGCEngine, and make a bin directory. In the bin directory, put WGCEngine.exe

7) The first time you start up TSUNAMI, you will need to create and/or edit the simulation that is going to use the WGCEngine. In the simulation editor dialog box, you will need to a WGCEngine to the simulation and then go to the Engine Configuration dialog box by selecting the WGCEngine and hitting the ‘Engine Details’ button. You must enter –dllname, -xrefin (or –insize) and –xrefout (or –outsize) in the Run Arguments box in order to run the WGCEngine. See the Command Line options section of this document for more information.

8) PATHS: After installing everything, your PATH system environment variable may be a bit messed up. In Control Panel -> System -> Advanced -> Environment Variables -> SYSTEM variables (not USER variables): PATH, LIB and INCLUDE must be set up properly in order for NetSim and TSUNAMI to function properly together. Examples are in Appendix B: Path Information. You will need to reboot the machine in order for the path modifications to take full effect.

Configure the Communication:

1) TMR Controls

Start Woodward’s NetSim application. From within the NetSim application, open the project specific dll for TMR Controls

Bowen ex : C:\NetSim\Projects\Bowen_Cntrls\TMR_cntrl\cntrl\Debug\wgc_tmp.dll

In the Control 1 WGC TMP.dll Netsim Control Executive window click on communications menu. Click on configure modbus and check for entries in SCADA_1_FOX.Transmission medium should be UDP and the UDP port 5011 enabled.

2) Modbus Controls

Start Woodward’s NetSim application. From within the NetSim application, open the project specific dll for Modbus Controls

Bowen ex : C:\NetSim\Projects\Bowen_Cntrls\Modbus_cntrl\Cntrl\Debug\Bowen_Modbus_304.dll

In the Control 2 Bowen_Modbus_304.dll Netsim Control Executive window click on communications

Menu. Click on configure modbus and check for entries in MODBUS_MASTER . Transmission medium should be UDP and the UDP port 5011 enabled and the IP address of the PC address where the Netsim Control executive is running.

Starting up a simulator that uses a WGCEngine:

1) Start Woodward’s NetSim application.

2) From within the NetSim application, open the project specific *.dll

a. bowen ex: C:\NetSim\Projects\Bowen_Cntrls\TMR_cntrl\cntrl\Debug\wgc_tmp.dll

b. click on the green arrow ‘com’ button to initiate communications

c. if the project uses a modbus, open a second instance of NetSim and open the modbus specific *.dll. bowen ex: C:\NetSim\Projects\Bowen_Cntrls\Modbus_cntrl\Cntrl\Debug\Bowen_Modbus_304.dll

d. click on the green arrow ‘com’ button to initiate communications

3) Start TSUNAMI

a. A correctly configured TsunamiGUI.bat file will start the SimExecutive and the WGCEngine and any other engines that are desired if you have set up the engines properly. If you are having problems, see Appendix A for an example of a config_file.dat file that will work with this engine.

If you desire to run from batch files, start the SimExecutive first, and then the WGCEngine and any other engines you want to run. After starting the SimExecutive, it does not matter if you start the WGCEngine before or after any other engines.

General notes:

1) NetSim does not support relative paths. Absolute paths must be used a file name is required (-dllname, -ic_path, -bkt_path, -xrefin, -xrefout). If you happen to use a relative path, that path will be ignored, and the files will be saved or looked for in their default locations. Because of the way that NetSim handles snapshots, -ic_path and –bkt_path will be ignored if they are entered. ICs and backtracks will always be stored in their default locations (in the same directory as the project specific *.dll.) If the project runs more than one instance of NetSim, snapshot save files will be saved for each instance of NetSim in the corresponding default directory. The files are both required as they are not the same. The default location for the bowen project is: C:\NetSim\Projects\Bowen_Cntrls\TMR_cntrl\cntrl\Debug

2) Use forward slash “/” in all path entries.

3) GAP Monitor

Current user must be logged on as administrator for the OPC server to load.

The model must have started. The OPC server is not started until the model has begun running.

If neither of the above work, on the Control Executive Options menu try toggling the OPC Stop and OPC Start items and then try Monitor GAP again.

Also, there is a limitation on the OPC which only allows one instance of it on a PC at any time. By default, the OPC server is attached to your first Control Executive. If you want to start the OPC server for the second Control Executive, first you need to stop the OPC on the first and then start it on the second. This means that Monitor GAP will only work with one Control Executive at any time.

Command line options: (and engine specific variables)

In order to start the WGCEngine automatically from the TSUNAMI start-up script, THE FOLLOWING COMMAND LINE ARGUMENTS ARE REQUIRED in Simulation Editor/ Engine Details => Engine Configuration / Run Arguments: -dllname, -xrefin (or –insize), -xrefout (or –outsize)

Engine specific variables are TIME, WGC_DBG, and WGC_DELT. They are described below.

“-dllname”, Name of wgc interface DLL to be loaded. This is not to be confused with the project specific DLL that is opened when NetSim is started. In most cases, this path will be:

C:/NetSim/Programfiles/bin/wgcintfc.dll

NOTE#1: be sure to use an ABSOLUTE PATH as NetSim does not support relative paths

NOTE#2: use forward slashes “/” as TSUNAMI has problems with backslashes

“-xrefin”, Name and path of project specific xrefin CSV file. If Woodward has supplied you with a project specific excel file (which is very likely) there are two tabs in the file that are called something like XREFIN and XREFOUT. These tabs should have the format:

VARIBALE NAME, INDEX, DESCRIPTION, UNITS

save each tab as a *.CSV file and point to these *.csv files with this command line option. For example:

-xrefin "C:\Documents and

Settings\nschmid\Desktop\woodward\bowen_beta\Bowen_Cntrls\TMR_cntrl\xrefin.csv"

Do NOT use –insize if you specify –xrefin.

“xrefout”, analagous to “-xrefin” see above. Do NOT use –outsize if you specify -xrefout.

“-insize”, Number of inputs – This is only to be used if –xrefin is NOT used. Instead of creating WGCPoints with variable names from an xrefin file, this option will create an array of WGCPoints called WGC_IN that is analagous to the input array that is passed to the woodward project specific controls DLL.

“-outsize”, Number of outputs – This is only to be used if –xrefout is NOT used. Instead of creating WGCPoints with variable names from an xrefout file, this option will create an array of WGCPoints called WGC_OUT that is analagous to the output array that is passed from the woodward project specific controls DLL.

“-debugLevel”, options are “none”, “low”, and “high” – none is the default. If low or high is specified, print statements are enabled that help one to debug the code. Debug level can also be set via the WGC_DBG variable in the glossary. 0 corresponds to “none”, 1 to “low”, and 2 to “high”.

“-delt”, WGC_DELT can be set to something other than the default value of 0.25 with this command line option. WGC_DELT can also be modified dynamically in the glossary (no need to reload, it should take effect right away). Note of caution: Woodward’s NetSim has an internal speed setting and apparently adjusts the controls based on that setting. It would be a good idea to thoroughly understand how this works before messing with WGC_DELT here.

The simulation time for the WGC Engine is simply TIME. To view it in the glossary, enter it as WGCEngine##TIME.

http://www.cadfamily.com/html/Article/WGCEngine,%20NetSim%20and%20MonitorGAP%20usage%20and%20installation%20notes_999_1.htm