30806_LAB HMIWeb Display Builder Advanced Scripting
30806_LAB HMIWeb Display Builder Advanced Scripting
Contents
Configure Security Level Change in HMIWeb Graphics......................................................................3
The purpose of this lesson is to perform security level changes from HMIWeb displays. ENGR is
the highest security level that can be used.
After completion of this lab, you will be able to:
Introduction
In the earlier releases of Experion, you were not able to change the access level of function blocks
from HMIWeb displays. This functionality may be required for a particular write operation. This
does not change the access level of Station.
In this lesson you will script buttons that change the security level of a function block to perform
specific control operations.
Procedure
Step Action
2 Call up the Detail Display for 11_TI40. (Press F12 to Open Detail Display)
Double click to
open properties
window
Double click on the NUMERICA function block to open the properties window.
Step Action
ATTENTION
Step Action
ATTENTION
Step Action
ATTENTION
Step Action
7 Change the access level of your station to manager (mngr) and change the PV value
again. This time the change should be successful.
Verify that the Security Level Change option is enabled on the Security tab in Server
Wide Settings.
Select Configure > System Hardware>Server Wide Settings from station.
Step Action
Step Action
Step Action
13 Select the Script Data tab and click the Add button.
Enter the following Point Details:
Point: 11_TI40
Parameter: NUMERICA.PV
Display as: Numeric
Update : Default
Security: Operator
ATTENTION
Step Action
14 On the General tab, rename the pushbutton and enter the tooltip details as shown
below.
15 Select the Details tab and enter the button’s label as shown:
Set PV = 50
Step Action
ATTENTION
Step Action
22 Select the pushbutton that you just created and duplicate it. (This new button will be used
to set the PV value of 11_TI40 to 25.)
23 Open the Properties Window of the duplicated pushbutton, select the Details tab and
modify the button’s label as follows: Set PV = 25
24 On the General tab, modify the name of the pushbutton to btnSet25 and modify the
tooltip accordingly.
26 Right click the duplicated pushbutton (btnSet25) and select Edit Script.
27 Modify the button’s script to change the PV value being written to 25. Close the script
window when finished.
(Note: At runtime, this alphanumeric will call a faceplate and will display the PV value
being set by the pushbuttons.)
29 On the Behaviors tab, check the Faceplate box and deselect Hover.
Step Action
Step Action
35 Call up your SecurityLevel.htm display, and select the alphanumeric to call the
faceplate, as shown.
Step Action
ATTENTION
37 If the PV value of 11_TI40 did not change, verify that the Security Level Change option is
enabled on the Security tab in Server Wide Settings.
Select Configure > System Hardware > Server Wide Settings
38 Optional: If extra practice is desired to further test the access level change functionality,
add additional buttons to your Security Level display to write new values to 11_TI40 or
modify the script on the existing pushbuttons.
Prerequisites
Introduction
HMIWeb displays are customized DHTML (Dynamic HTML) pages based on the Web-standard
Document Object Model (DOM). This means that display scripts are very similar to scripts used in
standard Web pages. You can write scripts in either VBScript or JScript. In this lab, we are going to
create script that could be used as a manual sequence for process startup.
We are going to write script only for the Tower Top Pressurization stabilization. A Popup display
named Startup Sequence with 8 steps for a pressure stabilization sequence will be configured.
Step 1 and Step 2 will have common YES and NO buttons.
Steps 3/4, Steps 5/6, and Steps 7/8 will also have common YES and NO buttons.
After clicking the Start Sequence button, Step 1 will be active and flashing in dim gray; all other
steps will be inactive. Only the YES and NO button for this step will be seen. The user must first
click on the Step 1 button to stop it from flashing the YES and NO buttons will then become
activated (and the YES button will be flashing). After the user clicks the YES button, then Step 1
will be deactivated and Step 2 will be activated and flashing. If the NO button is selected, that
particular step will start flashing again. When Step 2 is completed, then Step 3 will be activated
along with its YES and NO buttons; a down arrow indicates the direction of the startup sequence.
The same functionality is repeated for Step 5 and Step 7.
The popup “Start_Sequence” will be called from a pushbutton added to your “D_100” display.
ATTENTION
Procedure
Step Action
1 If you have performed the previous lab as per pre-defined course sequence then open
D_100 graphic from Abstract which you have built, else open display
< D_100.htm > from C:\ProgramData\Honeywell\Experion PKS\Client\DisplayDB
2 Open a new Popup display by clicking on the arrow (as indicated) and selecting Popup.
Step Action
Accept the defaults for any remaining parameters. Close the Properties window.
1 Add a pushbutton to the Popup display and enter the following property details:
General tab:
Name: Start
Width: 170
Height: 26
Details Tab:
Label: Start Sequence
Color Tab
Fill Color: Silver
Font Tab
Font tab: 10, Bold, Arial
2 Similarly, add additional buttons modifying the following details (see the illustration on the
next page as a layout guide for pushbutton locations).
3 When finished, your Popup display should look similar to the one shown in the below
illustration.
Note the dotted line in the above example; this indicates the size of the Popup when
called in Station. The display size was defined in step 3.
4 Add another pushbutton (Width: 28 and Height: 26) to your Popup.
See step 9 for the location of this new arrow object.
Open the pushbutton Properties window and delete any text in the Label field in the
Details tab.
Change the color to silver.
Close the Properties window.
Draw a triangle using black as the fill (use the Polygon tool to draw this).
Place the triangle on the pushbutton as shown.
5 Repeat the above step and create two more similarly grouped arrow objects (Hint: use
the duplicate function).
Name the new objects Arrow2 and Arrow3.
6 Place them next to the 2nd, 4th, and 6th button as shown in the following illustration.
7 Create one more additional arrow object and place it next to the 8th step button.
Modify the Visibility property of all the Yes/No buttons, the Arrow buttons, and the
Restart button as follows:
In the General tab, select the hidden option.
When these buttons are needed, the script will make them visible.
Open the Properties window of the alphanumeric and enter the following details on the
General tab:
Name: a
Visibility: visible (see the following note)
Font: 10, Bold, Arial
NOTE: During the testing phase, you may want to see the numbers written to the
numeric. This property can be left at the default value during the testing of your
Popup, and then changed to “hidden” after testing, if desired.
A - Object Browser – The arrow opens a list of all the objects in the display. If an object
is scripted, the object name is in bold type.
B - Event Browser – The arrow opens a list of all available events for this object. Scripts
are event driven, and the events presented are different based on object type. If an event
is used in the display, the event name is in bold type.
14 Script for Reset shapes, Steps S1 and S2 (on the Start button):
In the scripting window, click the Object Browser arrow and choose the object named
Start.
Select the onclick event.
Enter the following script – to save typing time, the Start Sequence.txt file is
located in your abstract folder).
19 NOTE: The alphanumeric “a” is connected to a point on the Server that is used to
store the last step number executed.
This script is written such that when a user clicks the Start button:
The script checks the a.value number for the last step executed by the user (a.value
indicates the step number).
a.value is checked to enable the next step to be executed and starts that step
flashing in dim gray color.
All other steps are disabled. For the step that is active, the corresponding Yes and
No buttons are enabled.
Initially the corresponding Yes button is disabled until a step is selected and active.
When a.value = 8, the Start Sequence is completed and will display the Reset
button. To start the sequence again, select Reset.
37 Close the scripting window and save the display in the Abstract folder as
Start_Sequence.
38 Add a pushbutton to your D_100 graphic to call up the Start_Sequence Popup display.
Place the button below your D100_Trend button.
42 Select the Popup tab and enter the Popup file name as shown:
Start_Sequence.htm
43 Modify the Font tab to size 8, bold, center. Close the Properties window.
Your pushbutton will be similar to the one shown:
48 Click Step1.
NOTE: It may be helpful to make the alphanumeric visible while testing your program.
(Step 1, when clicked, writes a “1” to the alphanumeric).
Step 1 will stop flashing (after being clicked) and the Yes button is now enabled and
flashing.
52 Click Step 2.
Step 2 will stop flashing.
The Yes button will be enabled and flashing (and a “2” is written to the
alphanumeric).
53 Click the Yes button.
Step 2 has now been completed and will be disabled.
The Yes and No buttons will disappear.
The down arrow will appear next to Step 2 indicating the direction of the
process step to take next.
Step 3 will be enabled and flashing dim gray.
The Yes and No buttons will appear next to Step 3. (The Yes button is disabled).
54 Click on Step 3.
Step 3 will stop flashing.
The Yes button is enabled and flashing.
55 Click the Yes button.
The Restart button will disappear, the alphanumeric will be reset, and the Start
Sequence button will appear.
59 Click the Start Sequence button.
The sequence will start again.