Вы находитесь на странице: 1из 16

Using the BatchObjects Demo

This document describes the required preparation to set up and run the BatchObjects demo.
The description shows, as an example, two machines, one running Industrial Application Server, the
second running InBatch 8.1 Premier Edition. It is assumed that both machines will run Windows 2003
Server Standard Edition in a workgroup environment, as this set up is more complex relative to the
security settings than two machines working as part of a domain.
Note: Windows 2003 Server, Standard Edition, comes with many security settings, which, unlike former
Windows Server operating systems, are disabled by default. In order to access a Windows 2003 Server
machine remotely, the user has to enable the appropriate security settings.
To use DCOM in a workgroup environment, the user must have a common administrator account on
both the server and the client machine. Furthermore, to use DCOM from Industrial Application Server
scripting, this must be the same account that the user used/created when installing the Industrial
Application Server software and requesting an account.

Setup two PCs


a. Have both machines running either Windows 2003 Standard Edition or Windows 2000
Server SP4.
b. Download and install all security upgrades from Microsofts web page.
c. Have both machines as part of the same workgroup.
d. In this example, the first machine, running InBatch 8.1, is named fsibsrv.
e. The second machine, running Industrial Application Server 1.5, is named fsindappsrv.
f. Both machines have installed MS SQL Server 2000, SP3a, and Acrobat Reader 6.0.
NOTE: Microsoft SQL Server must be installed to use mixed-mode security. See the
Microsoft SQL Server documentation for more details.
g. Both machines are using the same User Name and Login for the Wonderware-related
services. (Later on referred to as Standard WW User Name)

Preparing the BatchServer machine (fsibsrv)


a. Install InBatch 8.1 Prerequisite Software - Crystal Reports 8.
b. Install InBatch 8.1 Premier Edition.
c. Install InBatch Info Server.

Preparing InBatch :
a.
b.
c.
d.

Load the included InBatch Premier Demo into its config_a directory.
Remove the read-only attribute from the files.
Startup the Environment Display
If you have chosen a name for the Application Server other than FSINDAPPSRV, then do the
following sub-steps:
1. Start the TagLinker Application.
2. From the Edit menu, select Access... to display the Access Editor.
3. On the Access Editor, select the AppServer access name from the list on the left.
4. In the Application field on the right, change the string to replace FSINDAPPSRV with the
node name of your Application Server. The final string should read:
\\YOUR_APPLICATION_SERVER_NODE_NAME\FSGateway, where the string
YOUR_APPLICATION_SERVER_NODE_NAME represents the node name of your application
server.
5. Click the Change button.
6. Close the Access Editor
7. Close TagLinker
8. On the Environment Display menu, select Update\Runtime
9. Click Yes on the Environment Display Warning dialog.

10. When the database copy is complete, Click Done on the Database Copy dialog.

Preparing DCOM on Windows 2003 to allow MaterialSrv.exe being used remotely :


a. Enable the Local Security Policy Option "Network Access: Let Everyone permissions apply to
anonymous users".
1. Click on Start > Programs > Administrative Tools > Local Security Policy.
2. Expand the Local Policies Tree.
3. Select Security Options.
4. Scroll down to "Network Access: Let Everyone permissions apply to anonymous users"
and double click on it.
5. Select the Enabled radio button.
6. Click on the OK button to save the change.
b. Add Everyone to the group of users that can access and launch DCOM Services. (This is
done via DCOMcnfg.)
1. Run DCOMCNFG from the command line.
2. Go to Component Services\Computers\My Computer
3. Right click on My Computer, select Properties and add Everyone to the default security
settings for accessing and launching a DCOM service

4. Set the defaults for the identification on the computer component to None.
Note: If the default authentication level is set to Identify (default), the scripts will run as
designed, but IAS issues a warning to the logger that says that the script has timed out.

5. Finally, set the permission to launch the DCOM component to the user you created during
installation. (This user has to be the same on both machines.)

c. Reboot the machine


d. After reboot, log on to the machine, start InBatch Environment Display, go to Runtime and
start all services
e. Watch out that the system is running, you also may want to open up Batch Display, Material
Editor and Scheduler to work with the Batch system

Preparing DCOM on Windows 2000 to allow MaterialSrv.exe being used remotely :


a. Add Everyone to the group of users that can access and launch DCOM Services. (This is
done via DCOMcnfg.)
1. Run DCOMCNFG from the command line.
2. Select the default security tab.

3. Click the Edit Default button for the Default Access Permissions.
4. Add the Everyone user and click the OK button.

5.
6.
7.
8.

Click the Edit Default button for the Default Launch Permissions.
Add the Everyone User and click the OK button.
Click the Edit Default button for the Default Configuration Permissions.
Select the Everyone user, give them full access and click OK.

9. Click the Applications Tab, select the Wonderware.MaterialSrv application from the list
and click the Properties button.
10. Select (None) for the Authentication Level.

11. Select the Identity tab and enter the Standard WW User Name for the identity.

12. Click Ok to save the changes.


13. Click Ok to close DCOMcnfg and save all changes.

Preparing the Industrial AppServer machine (fsindappsrv)


a. Install InTouch 9.0
b. Install InBatch Runtime Client (pointing to the InBatch server node name and remote
directory)
c. Install Industrial Application Server 1.5.
d. Install FS Gateway Server 1.0

Preparing DCOM on Windows 2003 to allow IAS to use MaterialSrv.exe being remotely on
the InBatch Server:
a. Configure DCOM security.
1. Run DCOMCNFG from the command line.
2. Under Component Services\Computers\My Computer right click and select properties and
the Default Properties Tab, set Default Authentication Level to Default, and the Default
Impersonation Level to Identify.

3. Under My Computer/DCOM Config, right click on Wonderware.MaterialSrv and select


properties.

4. Under the General tab, set the Authentication Level to none.

5. Under the Identity tab, set the permission to launch the DCOM component to the user
you created during installation. (This user has to be the same on both machines.)

Preparing the PreWeigh Database


b. Create a database called PreWeigh on your local SQL Server
c. Start Query Analyzer and connect to the SQL Server
d. Import PreWeigh.sql script that is included with this demo and run it.

Preparing Industrial AppServer:


a. Start the ArchestrA Integrated Development Environment (IDE)
b. Create a galaxy called BatchObjectsDemo and connect to it.
c. From the IDE Galaxy menu, select Import > Script Function Library, and import
MaterialSrv.exe to the Galaxy. MaterialSrv.exe can be found under \Program Files\Factory
Suite\InBatch\bin
NOTE: An error may occur during this step if the Default Impersonation Level is set to
Anonymous for DCOM.
d. From the IDE Galaxy menu, select Import > Automation Objects, and using the default
settings, import the AutomationObject package file BatchObjectsDemo.aaPKG that is included
with this demo.
NOTE: When importing on ArchestrA 2.0 you must select the Migrate option under Object
Version Mismatch in order to properly import the objects.
e. From the IDE Galaxy menu, select Import > Galaxy Load, and using the default settings,
import the BatchObjectsDemo.csv file that is included with this demo.
f. If you have named your Application server something other than FSINDAPPSRV, then do the
following:
1. Find the GRNode platform object in the IDE and double-click to edit it.
2. On the General tab, change the Network address attribute to the node name of your
Application Server.
3. Save the GRNode object and check it in.

g. If you have named your Batch Server node something other than FSIBSRV, then do the
following
1. Find the BatchProxy_001 object in the IDE and double-click to edit it.
2. On the General tab, change the Server name attribute to the node name of your
Batch Server.
3. Save the BatchProxy_001 object and check it in.
h. Change the connection information for the PreWeigh database.
1. Find the PreWeighDB object in the SystemArea and double-click to edit it.
2. Select the UDA tab and change the following values to match your database server:
SQLServer Name of the machine where the PreWeigh database exists.
SQLUserName Name of the user to connect to the PreWeigh database.
SQLPassword Password for the user to connect to the PreWeigh database.

Preparing FS Gateway Server 1.0


a. Open up SMC and drill down to FS Gateway configuration (DA Server Manager\Default
Group\Local\ArchestrA.FSGateway.1\Configuration)
b. Change the Poke Mode to Control Mode.
c. Add a New ArchestrA Object (leave the default name for the object)
d. In the Write Credentials, enter in the appropriate Workgroup/Domain name, User Name and
the appropriate password
e. Save your changes. (Note that you will get an error message that there is no platform
deployed, ignore this).
f. Right click on ArchestrA.FSGateway.1 and activate Configure as Auto Service in order to
auto start the server when the machine is started.
g. Exit the SMC.

Preparing InTouch
a. Copy the InTouch application directory to your local disk, the location does not matter.
b. Remove the read-only attribute from the files.
c. Start the InTouch and use the Find Applications feature to locate the application directory
you just copied over.
d. Perform the following steps on the InTouch application:
1. Start InTouch Application Manager and add the application directory.
2. Start InTouch Window Maker
3. Open the BatchSymbols window
4. Use a shape tool to create any shape on the screen, double-click on the shape to link it.
5. Click on the Visibility button to display the visibility link editor.
6. Double-click on the Expression field to display the Select Tag dialog.
7. Click on the ellipsis () button immediately to the right of the Tag Source dropdown
selector. This displays the Define Tag Sources editor.
8. Select BatchObjectsDemo (the only one in the list) and click the Edit button. This will
display the Define Tag Source dialog.
9. Using the Galaxy Name dropdown at the bottom, select the Galaxy name that you
created.
10. Click OK.
11. Click Close.
12. Click the ok buttons until you get all the way out.
13. Save the window, delete the shape you created and close Window Maker.

Start the Demo


Follow these steps to start the demo:
a. Reboot the system.
b. Deploy the current IAS application.

c. On the App server, start up the SMC, select DAServer Manager\BatchObjectsDemo\GRNode,


right-click on Archestra.FSGateway.1, and select Activate Server.
NOTE: This only has to be performed the first time it is started up.
d. On the Batch Server, start InBatch Environment Display.
e. On the Batch Server, start All InBatch runtime applications.
f. On the App server, start up InTouch WindowViewer.

Running the Demo


There are several capabilities illustrated by the demo:

Monitoring Material Inventory


The InTouch View application should startup with a screen similar to that shown below.

The boxes across the top are SmartSymbols which represent the 6 silo tanks in the InBatch model.
Each box displays the ID of the material assigned to the unit, the Name of the material, and the total
unit quantity with a unit of measure. This information is coming from attributes on the SiloInventory
objects in the application server. Use the IDE to find the SiloInventory objects located just below the

silo tank objects T101 T106. There is also a SiloInventoryObject below the WFISkid unit object. The
SiloInventory object is ultimately derived from the $BatchInventory object. You can show this
relationship in the derivation view of the IDE.
Double-click on the $Silo.SiloInventory object to examine the scripting. The cyclic script is set to
periodically refresh the material information being read from the InBatch material database through the
MaterialSrv.exe OLE automation server. The inherited scripts from the $BatchInventory base object
illustrate the COM scripting necessary to interact with the automation server. Since there can be
communications delays, these scripts should run asynchronously to minimize interference with the
Engine scan. Note: There is object help available for each of the base Batch objects.

Modifying Material Inventory


Clicking on the Material Monitor button will show more detailed material information. You can change
the amount of the first sublot contained in the unit by clicking the General Information button at the top
of the Material Monitor pop-up. Then a new quantity can be entered in the New Quantity field. Note
that these changes take affect in the InBatch material database. This is normally done to correlate
InBatch material inventory with real-world measured values obtained manually by tank outage, or
automatically through level sensing I/O.

Alarming on Material Inventory Levels


Note that inventory level alarms my be configured on the bottom of the Material Manager pop-up
window.

a.
b.
c.
d.

Click on the Alarm Config. box to change it from Disabled to Enabled


Enter High and Low alarm limits for the alarm
Modify the New Quantity to a value outside of the alarm limits.
Click the General Information box back to Monitor to enable the Refresh to check for
alarms. Note: Alarms will not be detected in the Modify mode.
e. Alarm conditions are checked every time the BatchInventory object refreshes its information
in Monitor mode.

Monitoring Phases
The BatchPhase object acts as a phase monitor and can also contain phase logic for InBatch. The
objects in this demo all contain phase logic and perform the expected phase state transitions using
scripts on the object. To test the Mix phase manually, click on the Mix button next to the SSM1 unit
object in the InTouch View application.

This displays the Manual Phase Ctrl pop-up window at the lower right. Notice that the phase is set to
Simulate an automatic transition to the Done state after a time delay. Click the Start button on the
Manual Phase Ctrl pop-up and notice the transition to the Run state. Observe the affect of other
buttons. Also observe the behavior of the object in the Object Viewer utility.

InBatch Phase Interaction


Start the InBatch Batch Scheduler application and schedule a batch using the CoDemo recipe and the
ALL train. Initialize the batch. Start the Batch Display application and start the batch. Notice that the

SSM1 SmartSymbol on InTouch View indicates that the unit is allocated and a batch is running in it.
Notice also that the Mix phase has started. Click UnitDetails at the bottom of the SSM1 Unit box on
InTouch View and the Unit Details pop-up is displayed at the lower right.

This pop-up shows further details about the unit coming from InBatch system tags which are linked to
BatchUnit attributes. On the left are Allocation Status, Equipment Status, Batch Status, Batch Mode,
and Batch Size. On the right are the Campaign ID, Lot ID and Batch ID of the batch which has the unit
allocated, the ID and Name of the recipe for the current batch as well as the ID for the last recipe to
run on the unit.

The PWAdd Phase


The PWAdd phase is designed as a pre-weigh addition phase which queries a database for pre-weighed
kits of material. Scripting in the application object queries the database and retrieves information
about the material in the kit. This information is validated against phase parameters before the
operator is permitted to add the kit to the batch. Once the phase starts and goes into the Run state,
click on the PreWeigh box on the mixer graphic to display the PreWeigh Phase Control pop-up.

The 4 yellow circles on the pop-up screen represent kits of material with barcode labels that can be
scanned into the InTouch application to supply the phase parameter. Scripting on the PWAdd
BatchPhase object in Application Server, query the database and check the information. A message is
displayed to the operator to indicate if it is OK to add the kit to the batch. Once a valid kit is selected
the phase goes to the Done state and can be acknowledged in Batch Display. InBatch will record the
parameter information which is supplied from the PreWeigh database.

The BulkLiq Phase


This phase is designed to monitor a PLC phase adding liquid ingredients from the silos into the mixers.
The BulkLiq object in Application Server, detects alarm conditions on the ingredient addition. For the
demo, the phase is set up to simulate the phase logic and randomly generates actual ingredient values
as the phase runs. If it completes out of tolerance, an alarm is generated.
The second time this phase runs, it looks at the material characteristic information to make adjustments
to the target value. This is done in this demo to simulate phase logic applying a compensation for
variations in material characteristics such as potency or concentration. Notice in the material database,
that the concentration of the material in T101 is 75% instead of the default of 85%. The target for the
BulkLiq phase is automatically adjusted to compensate when the phase runs material from this tank.

Вам также может понравиться