HMI Applications PowerNet Software Version 3.20 and Greater D-1 Appendix D Integrating Third-Party HMI Applications with PowerNet Software Appendix Contents Overview................................................................................................................................. D-1 ActiveX Capability ................................................................................................................. D-1 ActiveX Control Functions ..................................................................................................... D-2 Integrating Wonderware InTouch Software with PowerNet Software .................................. D-3 Integrating ICONICS Genesis32 Software with PowerNet Software .................................... D-8 Overview PowerNet Software can be integrated with third-party HMI graphical applications so as to handle alarming and to display facility site plans, one-lines, elevations, and trend profiles. Graphical elements, such as breakers and starters, can be animated to indicate an open, closed, or tripped status. Depending on what kind of PowerNet System you purchased, one of two such graphical applications might be bundled with your PowerNet Software on a second CD: either Wonderware InTouch software or ICONICS Genesis32 software. This appendix provides a description of PowerNet's ActiveX capabilities and the basic information necessary to integrate PowerNet with Wonderware or ICONICS. All the necessary script for PowerNet's ActiveX control is included. However, the how-to sections are deliberately only outlines, because the details on how to use Wonderware or ICONICS integration applications are for Wonderware and ICONICS to document in their own users' manuals and on-line help. ActiveX Capability ActiveX controls are standalone software components that perform specific functions in a standard way. ActiveX controls are not separate applications. Instead, they are modules that are placed into a container application. The HMI applications Wonderware InTouch and ICONICS Genesis32 are ActiveX containers. Such third-party HMI applications can contain and thereby allow use of the ActiveX Monitor windows that you received with your purchase of PowerNet Software. The ActiveX windows allow you to link faceplate data from Cutler-Hammer INCOM devices without creating custom screens or using tags for the parameters displayed within those windows. These are the same display plates used by PowerNet Monitor. Security privileges do not need to be recreated within third-party HMI applications. The PowerNet ActiveX component allows the user to log on and off using the user security
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
HMI Appl icat ions
PowerNet Sof tware Vers ion 3 .20 and Greater D-1
Appendix D Integrating Third-Party HMI Applications with PowerNet Software
ActiveX Control Functions..................................................................................................... D-2
Integrating Wonderware InTouch Software with PowerNet Software .................................. D-3
Integrating ICONICS Genesis32 Software with PowerNet Software.................................... D-8
Overview
PowerNet Software can be integrated with third-party HMI graphical applications so as to
handle alarming and to display facility site plans, one-lines, elevations, and trend profiles.
Graphical elements, such as breakers and starters, can be animated to indicate an open, closed,
or tripped status.
Depending on what kind of PowerNet System you purchased, one of two such graphical
applications might be bundled with your PowerNet Software on a second CD: either
Wonderware InTouch software or ICONICS Genesis32 software.
This appendix provides a description of PowerNet's ActiveX capabilities and the basic
information necessary to integrate PowerNet with Wonderware or ICONICS. All the
necessary script for PowerNet's ActiveX control is included. However, the how-to sections
are deliberately only outlines, because the details on how to use Wonderware or ICONICS
integration applications are for Wonderware and ICONICS to document in their own users'
manuals and on-line help.
ActiveX Capability
ActiveX controls are standalone software components that perform specific functions in a
standard way. ActiveX controls are not separate applications. Instead, they are modules that
are placed into a container application. The HMI applications Wonderware InTouch and
ICONICS Genesis32 are ActiveX containers.
Such third-party HMI applications can contain and thereby allow use of the ActiveX Monitor
windows that you received with your purchase of PowerNet Software. The ActiveX windows
allow you to link faceplate data from Cutler-Hammer INCOM devices without creating
custom screens or using tags for the parameters displayed within those windows. These are
the same display plates used by PowerNet Monitor.
Security privileges do not need to be recreated within third-party HMI applications. The
PowerNet ActiveX component allows the user to log on and off using the user security
HMI Appl icat ions
D-2 PowerNet Sof tware Vers ion 3 .20 and Greater
defined within the PowerNet System. An inactive terminal can automatically log a user off to
prevent unauthorized access.
By using the PowerNet Monitor ActiveX control, you can do the following:
♦ connect to PowerNet DeviceServers,
♦ display/monitor real-time device data,
♦ display/monitor a device's real-time mix/max values,
♦ execute device control functions, and
♦ show graphical historical trending for selected device attributes.
ActiveX Control Functions
In conjunction with your third-party graphics package, the Cutler-Hammer CHWrapActiveX control allows you to create a graphical user interface with custom buttons for several control
functions. The following table lists the PowerNet ActiveX Control functions that you can call
in your third-party graphics application script.
Function Call (Italics indicate a variable that you will provide using your third-party graphics package.)
Description
ActiveXStartApplication This must be the first function you call in order
to set up the system properly. This function
sets up the system, allocates the necessary
resources, and displays a log-on screen for the
user to log on to the system. Note that the log-
on screen might not appear if you have already
logged on to any PowerNet Software
applications. Returns a 0 if the function worked
properly.
ActiveXIsAutoLogoffSet Returns a 1 (i.e., true) if the auto-logoff feature
is enabled.
ActiveXIsViewOnly Returns a 1 (i.e., true) if the current user has
only view-only privileges
ActiveXLogOff Logs the current user off, meaning that the user
can only perform operations associated with
view-only security privileges from then on.
ActiveXLogOn Displays the log on dialog box so that a user
can log on or re-log on to the system. The
user's access privileges will accord with those
granted them in the PowerNet System at large.
Returns a 0 if the function worked properly.
ActiveXLogOnEx(userid, password) Uses the specified user ID and password to log
on or re-log on automatically to the system
without displaying the log-on screen. Returns a
0 if the function worked properly.
ActiveXSetAutoLogoff(boolean value) Enables (boolean value = 1) or disables
(boolean value = 0) the auto-logoff feature.
HMI Appl icat ions
PowerNet Sof tware Vers ion 3 .20 and Greater D-3
Function Call (Italics indicate a variable that you will provide using your third-party graphics package.)
Description
ActiveXEnd Disconnects all the PowerNet DeviceServers
and releases all the allocated resources. This
must be the last function you call in an
application.
ActiveXShowDevice(IP, Device_Number) Displays the real-time device values
monitor/control screen for the device with the
specified IP address and device number.
Returns a 0 if the function failed.
ActiveXShowDeviceMinMax(IP,
Device_Number)
Displays the real-time device min/max values
monitor/control screen for the device with the
specified IP address and device number.
Returns a 0 if the function failed.
ActiveXShow(IP) Manually reconnects to the DeviceServer
whose IP address is specified in the
parentheses and restarts all of the displayed
attribute connections. Note that to use this
function, the device has to already be
connected to the DeviceServer using either the
ActivXShowDevice or
ActivXShowDeviceMinMax functions.
0=Failed to connect to DeviceServer.
1=DeviceServer is still connected.
-1=DeviceServer or IP address not found.
ActiveXSetAutoReconnectTime(Seconds) Sets the auto reconnect time in seconds.
The range is 30-300 seconds (5 minutes).
Default is 60 seconds.
0=disable.
Integrating Wonderware InTouch Software with PowerNet Software
This section discusses the capabilities of Wonderware InTouch software when it is integrated
with PowerNet Software and provides an example of the application script you will need to
compose in order to integrate the two of them.
PowerNet DDE Interface
Wonderware InTouch most often receives information through PowerNet DDE Server. DDE
Server must first be running on a computer before information can be viewed from the
PowerNet network through Wonderware InTouch software. If you cannot guarantee that a
user will first start DDE Server before starting Wonderware InTouch, it is recommended that
you place DDE Server in your startup script within Wonderware.
Setting Up the PowerNet Monitor ActiveX Control in Wonderware InTouch
You can install and configure the Monitor ActiveX control that came with your purchase of
PowerNet using the Wonderware applications called InTouch and WindowMaker.
HMI Appl icat ions
D-4 PowerNet Sof tware Vers ion 3 .20 and Greater
Note
This documentation limits itself to providing only the most basic information about Wonderware
applications, the information necessary to integrate them with PowerNet. For detailed documentation
and for updates about those applications, you should refer to Wonderware's own web site, users'
manuals, and on-line help.
The following tasks are involved in installing your PowerNet ActiveX control:
♦ creating a blank application using Wonderware's InTouch application,
♦ installing the PowerNet ActiveX control in the application,
♦ creating two windows for the application,
♦ adding PowerNet script to control each of the windows,
♦ creating control buttons for one of the windows,
♦ adding PowerNet script to control each of the buttons, and
♦ testing your application.
The following sections include the steps necessary to accomplish these various tasks. The
sections describe a minimalist application consisting of two windows and the four most
commonly used PowerNet ActiveX control functions (Show Values, Show MinMax, Log On,
and Log Off). For information about the other functions available with your PowerNet
ActiveX control, see the earlier section, ActiveX Control Functions. You can create more
windows and buttons to suit your application users' needs.
Creating a New, Blank Application
To create a blank application file for scripting, complete the following steps.
1. From the Windows Start menu, select Programs and then, from the submenus that pop
up Wonderware FactorySuite and InTouch.
Note
If InTouch has never before been run on the PC you are using, the Welcome to InTouch Application
Manager wizard window displays. If it does display, click the Cancel button.
The InTouch Application Manager window displays.
2. From the File menu, select New.
The first dialog box of the Create New Application wizard displays.
3. Follow the wizard prompts to create a new application in its own folder.
InTouch creates a new application and displays the new application in the Application
Manager list.
You are now ready to install the PowerNet ActiveX control.
Installing the PowerNet ActiveX Control
To install the PowerNet ActiveX Control in your InTouch application, complete the following
steps.
1. In the Application Manager window of InTouch, select the new application you
created.
2. From the File menu, select WindowMaker.
The WindowMaker application starts and displays the new application in a development
environment.
5. From the Special menu, select Configure and, from the submenu that pops up, select
Wizard/ActiveX Installation.
The Wizard/ActiveXInstallation dialog box displays.
HMI Appl icat ions
PowerNet Sof tware Vers ion 3 .20 and Greater D-5
6. Click on the ActiveX Control Installation tab.
The tab displays both installed and still available ActiveX controls.
7. Scroll through the Available ActiveX controls list box; find and select
CHWrapActiveX.
8. Click the Install button.
WindowMaker installs the selected control into your application. The control displays in
the list box above the one from which you selected it.
9. Click the OK button.
The Wizard/ActivXInstallation dialog box closes.
You are now ready to create and script the Startup window.
Creating and Scripting the Startup Window
The Startup window will not be seen by the end user of your InTouch application. Its purpose
is simply to house the PowerNet ActiveX control.
To create and script the Startup window, complete the following steps.
1. In the WindowMaker environment for your new application, select New Window
from the File menu.
The Window Properties dialog box displays.
2. Click in the Name field to position the cursor there and type a name, such as Startup,
for the new window.
3. Click the OK button.
The Window Properties dialog box closes and the form for your new window displays.
4. Click the Wizard icon on the toolbar.
The Wizard Selection dialog box displays.
5. From the list of wizards in the Wizard Selection dialog box, click the ActiveX Controls category, if it is not already selected.
All available ActiveX controls display in the box to the right of the list.
6. Select the ocx icon for the CHWrapActiveXCtrl control and then click the OK button.
(Alternatively, you can double-click the ocx icon.)
The Wizard Selection dialog box closes.
7. Move your mouse over the form for your window.
The mouse pointer displays as a corner symbol.
8. Click the location in your window where you want to paste the control.
The control is pasted where you clicked.
Note
The squares surrounding a control are sizing handles and indicate that it is currently selected.
9. Right-click on the new ActiveX object and select Properties.
The Properties dialog box for the Active object displays.
10. In the Properties dialog box, select the Control Name tab, enter a unique name for
your control in the ControlName field, and then click the OK button.
HMI Appl icat ions
D-6 PowerNet Sof tware Vers ion 3 .20 and Greater
The Properties dialog box closes.
Important
You must define a unique name for each ActiveX control in your InTouch application. The name will
be used to identify the control in the scripts you write for this and the MainScreen window, as well as
for the buttons you create.
11. From the Special menu, select Scripts and, from the submenu that pops up, Window Scripts.
The application's Script window displays.
12. From the Condition Type drop-down menu, select On Show and then enter the
following script into the scripting window, replacing CHWrapActiveXCtrl with the
control name you designated in the properties box in step 10.
#CHWrapActiveXCtrl.ActiveXStartApplication();
13. Click OK to save this script.
You are now ready to create and script the window that end users of your application will
see.
Creating and Scripting the MainScreen Window
The MainScreen window is the one the end users of your InTouch application will see. In this
documentation, it is called MainScreen; but you can give it any name you think will be
meaningful to your end users.
1. In the WindowMaker environment for your new application, select New Window
from the File menu.
A dialog box displays asking if you want to copy the scripts from the Startup window you
just created to the new one you are creating.
2. Click the No button.
The Window Properties dialog box displays.
3. Click in the Name field to position the cursor there and type a name, such as
MainScreen, for the second window.
4. Click the OK button.
The Window Properties dialog box closes and the form for your new window displays.
Note
The new form displays directly on top of the Startup window you created previously. You can click
and drag the new form around the environment, if you want to see the Startup window.
5. From the Special menu, select Scripts and, from the submenu that pops up, Application Scripts.
The application's Script dialog box displays.
6. From the Condition Type drop-down menu in the Script dialog box, select On Shutdown and type the following script into the script box below the drop-down menu.
Replace CHWrapActiveXCtrl with the control name you entered when creating the
Startup window (see Creating and Scripting the Startup Window). And replace
MainScreen with the window name you entered in step 3 above (but keep the double
quotation marks).
#CHWrapActiveXCtrl.ActiveXEnd();
SHOW "MainScreen";
7. Click OK to save this script.
You are now ready to add control buttons to your MainScreen window.
HMI Appl icat ions
PowerNet Sof tware Vers ion 3 .20 and Greater D-7
Creating and Scripting Control Buttons
This section describes how to create and script buttons for the four most commonly used
PowerNet ActiveX functions: Show Values, Show MinMax, Log On, and Log Off.
To create and script these buttons, complete the following steps.
1. With the form for your MainScreen window open in WindowMaker, click the button tool icon on the Drawing toolbar.
2. Move your mouse back over the form for your MainScreen window.
The mouse pointer displays as crosshairs.
3. Click, drag, and release the mouse to draw a button.
The button displays with the default label, Text.
4. To change the label, right-click on the button, select Substitute and, from the submenu
that pops up, Substitute Strings.
The Substitute Strings dialog box displays.
5. In the New String text box, type the desired label for this button and then click the OK button.
The Substitute Strings dialog box closes and your button displays its new label.
6. Repeat steps 1 to 5 until you have created a total of four buttons.
7. Double-click one of the buttons you created.
The Animation Links dialog box displays.
8. In the Touch Links section of the Animation Links dialog box, click the Action
button.
The Action button's check box is selected and the Action Script window displays.
9. From the Condition Type drop-down menu, select On Key Down and enter one of the
following scripts.
Replace CHWrapActiveXCtrl with the control name you entered when creating the
Startup window (see Creating and Scripting the Startup Window).
Replace the letters IP used here with the DeviceServer's actual IP address, but keep the
double quotation marks.
For a Show Values button, enter the following script.
#CHWrapActiveXCtrl.ActiveXShowDevice("IP", 1);
For a Show MinMax button, enter the following script.